Class StaffCastEnv
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.StaffCastEnv
-
Nested Class Summary
Nested classes/interfaces inherited from class at.petrak.hexcasting.api.casting.eval.CastingEnvironment
CastingEnvironment.HeldItemInfo, CastingEnvironment.StackDiscoveryMode -
Field Summary
Fields inherited from class at.petrak.hexcasting.api.casting.eval.env.PlayerBasedCastEnv
caster, DEFAULT_AMBIT_RADIUS, DEFAULT_SENTINEL_RADIUSFields inherited from class at.petrak.hexcasting.api.casting.eval.CastingEnvironment
componentMap, world -
Constructor Summary
ConstructorsConstructorDescriptionStaffCastEnv(net.minecraft.server.level.ServerPlayer caster, net.minecraft.world.InteractionHand castingHand) -
Method Summary
Modifier and TypeMethodDescriptionlongextractMediaEnvironment(long cost, boolean simulate) Attempt to extract the given amount of media.net.minecraft.world.InteractionHandstatic voidhandleNewPatternOnServer(net.minecraft.server.level.ServerPlayer sender, MsgNewSpellPatternC2S msg) voidpostCast(at.petrak.hexcasting.api.casting.eval.vm.CastingImage image) Do things after the whole cast is finished (i.e.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, precheckAction, queryForMatchingStack, removeExtension, replaceItemForPlayer, triggerCreateEvent, withdrawItem
-
Constructor Details
-
StaffCastEnv
public StaffCastEnv(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
-
postCast
public void postCast(at.petrak.hexcasting.api.casting.eval.vm.CastingImage image) Description copied from class:CastingEnvironmentDo things after the whole cast is finished (i.e. every pattern to be executed has been executed).- Overrides:
postCastin classCastingEnvironment
-
extractMediaEnvironment
public long extractMediaEnvironment(long cost, 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
-
handleNewPatternOnServer
public static void handleNewPatternOnServer(net.minecraft.server.level.ServerPlayer sender, MsgNewSpellPatternC2S msg)
-