Contents
Class TriggerRule
java.lang.Object
com.hypixel.hytale.builtin.triggervolumes.effect.TriggerRule
- Direct Known Subclasses:
AbstractDenyRule, CreativePlacementRule, DamageMultiplierRule, FlyRule, NoDamageRule, NoHealRule, NoTickRule
Base class for always-active trigger volume rules. Unlike
TriggerEffect, rules have
no event, interval, or delay: a rule applies continuously while its volume is enabled and the
volume's rules are active (see VolumeEntry.isRulesActive()).
Rules are pure data; enforcement lives in separate systems that query
TriggerVolumeManager.hasActiveRule() / getActiveRules() at the relevant
cancellable event hooks. Builtin rules ship with builtin enforcement systems; plugins that
register their own rule types via TriggerVolumesPlugin.registerRuleType() must also
register their own enforcement systems.
Implementing a new rule:
1. Extend this class and define a BuilderCodec that chains from BASE_CODEC.
2. Register it through TriggerVolumesPlugin.registerRuleType().
3. Register an enforcement system that queries the manager and cancels the relevant events.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BuilderCodec<TriggerRule> static final CodecMapCodec<TriggerRule> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TriggerRuledeepCopy(TriggerRule rule) static List<TriggerRule> deepCopyList(List<TriggerRule> rules) booleanvoidrotateInPlace(float yawRadians, org.joml.Vector3d volumeOrigin) Rotates volume-anchored offsets and facings when a prefab paste or world-gen placement applies a yaw to the owning volume.voidsetEnabled(boolean enabled)
-
Field Details
-
CODEC
-
BASE_CODEC
-
-
Constructor Details
-
TriggerRule
public TriggerRule()
-
-
Method Details
-
isEnabled
public boolean isEnabled() -
setEnabled
public void setEnabled(boolean enabled) -
rotateInPlace
public void rotateInPlace(float yawRadians, @Nonnull org.joml.Vector3d volumeOrigin) Rotates volume-anchored offsets and facings when a prefab paste or world-gen placement applies a yaw to the owning volume. The yaw follows the entity transform convention: world offsets move likeVector3d.rotateY(double). World-, entity-, and event-anchored fields must stay unchanged.volumeOriginis the post-rotation volume origin, needed by block-grid rules to rotate about the target cell center. -
deepCopy
-
deepCopyList
-