Class PackagedItemCastEnv
java.lang.Object
at.petrak.hexcasting.api.casting.eval.CastingEnvironment
at.petrak.hexcasting.api.casting.eval.env.PlayerBasedCastEnv
at.petrak.hexcasting.api.casting.eval.env.PackagedItemCastEnv
-
Nested Class Summary
Nested classes/interfaces inherited from class at.petrak.hexcasting.api.casting.eval.CastingEnvironment
CastingEnvironment.HeldItemInfo, CastingEnvironment.StackDiscoveryMode -
Field Summary
FieldsFields inherited from class at.petrak.hexcasting.api.casting.eval.env.PlayerBasedCastEnv
caster, castingHand, DEFAULT_AMBIT_RADIUS, DEFAULT_SENTINEL_RADIUSFields inherited from class at.petrak.hexcasting.api.casting.eval.CastingEnvironment
componentMap, world -
Constructor Summary
ConstructorsConstructorDescriptionPackagedItemCastEnv(net.minecraft.server.level.ServerPlayer caster, net.minecraft.world.InteractionHand castingHand) -
Method Summary
Modifier and TypeMethodDescriptionlongextractMediaEnvironment(long costLeft, boolean simulate) Attempt to extract the given amount of media.net.minecraft.world.InteractionHandgetSound()voidpostExecution(at.petrak.hexcasting.api.casting.eval.CastResult result) Do whatever you like after a pattern is executed.Methods inherited from class at.petrak.hexcasting.api.casting.eval.env.PlayerBasedCastEnv
canOvercast, extractMediaFromInventory, getAmbitRadius, getCaster, getCastingEntity, getMishapEnvironment, getPrimaryStacks, getSentinelRadius, getUsableStacks, hasEditPermissionsAtEnvironment, isCreativeMode, isVecInRangeEnvironment, mishapSprayPos, printMessage, produceParticles, replaceItem, sendMishapMsgToPlayer, setPigmentMethods inherited from class at.petrak.hexcasting.api.casting.eval.CastingEnvironment
actionKey, addCreateEventListener, addCreateEventListener, addExtension, assertEntityInRange, assertPosInRange, assertPosInRangeForEditing, assertVecInRange, assertVecInWorld, canEditBlockAt, extractMedia, getExtension, getHeldItemToOperateOn, getOtherHand, getPrimaryStacksForPlayer, getUsableStacksForPlayer, getWorld, hasEditPermissionsAt, isEnlightened, isEntityInRange, isEntityInRange, isVecInAmbit, isVecInRange, isVecInWorld, maxOpCount, postCast, precheckAction, queryForMatchingStack, removeExtension, replaceItemForPlayer, triggerCreateEvent, withdrawItem
-
Field Details
-
sound
-
-
Constructor Details
-
PackagedItemCastEnv
public PackagedItemCastEnv(net.minecraft.server.level.ServerPlayer caster, net.minecraft.world.InteractionHand castingHand)
-
-
Method Details
-
postExecution
public void postExecution(at.petrak.hexcasting.api.casting.eval.CastResult result) Description copied from class:CastingEnvironmentDo whatever you like after a pattern is executed.- Overrides:
postExecutionin classPlayerBasedCastEnv
-
extractMediaEnvironment
public long extractMediaEnvironment(long costLeft, boolean simulate) Description copied from class:CastingEnvironmentAttempt to extract the given amount of media. Returns the amount of media left in the cost.If there was enough media found, it will return less or equal to zero; if there wasn't, it will be positive.
- Specified by:
extractMediaEnvironmentin classCastingEnvironment
-
getCastingHand
public net.minecraft.world.InteractionHand getCastingHand()- Specified by:
getCastingHandin classCastingEnvironment
-
getPigment
- Specified by:
getPigmentin classCastingEnvironment
-
getSound
-