Class CorporeaHelperImpl
java.lang.Object
vazkii.botania.common.impl.corporea.CorporeaHelperImpl
- All Implemented Interfaces:
CorporeaHelper
-
Field Summary
Fields inherited from interface vazkii.botania.api.corporea.CorporeaHelper
INSTANCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateMatcher(String name) Create a CorporeaRequestMatcher from a String.createMatcher(net.minecraft.world.item.ItemStack stack, boolean checkNBT) Create a CorporeaRequestMatcher from an ItemStack and NBT-checkness.getNodesOnNetwork(CorporeaSpark spark) Gets all the nodes on this spark network.getSparkForBlock(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) Gets the spark attached to the block in the coords passed in.<T extends CorporeaRequestMatcher>
voidregisterRequestMatcher(net.minecraft.resources.ResourceLocation id, Class<T> clazz, Function<net.minecraft.nbt.CompoundTag, T> deserializer) requestItem(CorporeaRequestMatcher matcher, int itemCount, CorporeaSpark spark, @Nullable net.minecraft.world.entity.LivingEntity entity, boolean doit) Requests items from the network associated withspark.intsignalStrengthForRequestSize(int requestSize) Returns the comparator strength for a corporea request that corporea crystal cubes and retainers use, following the usual "each step up requires double the items" formula.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface vazkii.botania.api.corporea.CorporeaHelper
doesBlockHaveSpark
-
Constructor Details
-
CorporeaHelperImpl
public CorporeaHelperImpl()
-
-
Method Details
-
getNodesOnNetwork
Description copied from interface:CorporeaHelperGets all the nodes on this spark network. This is memoized for use once every tick. The order of the nodes in this set are unspecified.- Specified by:
getNodesOnNetworkin interfaceCorporeaHelper
-
createMatcher
public CorporeaRequestMatcher createMatcher(net.minecraft.world.item.ItemStack stack, boolean checkNBT) Description copied from interface:CorporeaHelperCreate a CorporeaRequestMatcher from an ItemStack and NBT-checkness.- Specified by:
createMatcherin interfaceCorporeaHelper
-
createMatcher
Description copied from interface:CorporeaHelperCreate a CorporeaRequestMatcher from a String.- Specified by:
createMatcherin interfaceCorporeaHelper
-
requestItem
public CorporeaResult requestItem(CorporeaRequestMatcher matcher, int itemCount, CorporeaSpark spark, @Nullable @Nullable net.minecraft.world.entity.LivingEntity entity, boolean doit) Description copied from interface:CorporeaHelperRequests items from the network associated withspark.- Specified by:
requestItemin interfaceCorporeaHelper- Parameters:
matcher- Specifies what you want to request. SeeCorporeaHelper.createMatcher(net.minecraft.world.item.ItemStack, boolean)to create one.itemCount- Specifies the maximum amount you want to request. If -1, the amount is unlimited.entity- The entity that initiated this request, if there is one.doit- If false, only counts the items instead of actually extracting
-
getSparkForBlock
public CorporeaSpark getSparkForBlock(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) Description copied from interface:CorporeaHelperGets the spark attached to the block in the coords passed in. Note that the coords passed in are for the block that the spark will be on, not the coords of the spark itself.- Specified by:
getSparkForBlockin interfaceCorporeaHelper
-
signalStrengthForRequestSize
public int signalStrengthForRequestSize(int requestSize) Description copied from interface:CorporeaHelperReturns the comparator strength for a corporea request that corporea crystal cubes and retainers use, following the usual "each step up requires double the items" formula.- Specified by:
signalStrengthForRequestSizein interfaceCorporeaHelper
-
registerRequestMatcher
public <T extends CorporeaRequestMatcher> void registerRequestMatcher(net.minecraft.resources.ResourceLocation id, Class<T> clazz, Function<net.minecraft.nbt.CompoundTag, T> deserializer) - Specified by:
registerRequestMatcherin interfaceCorporeaHelper
-
clearCache
public void clearCache()
-