NMSAdapter

public abstract class NMSAdapter

Constructors

Link copied to clipboard
public void NMSAdapter()

Functions

Link copied to clipboard
public Optional<TransientMovementOverride> beginFlee(LivingEntity livingEntity, Location threatLocation, double speedModifier)
Temporarily makes a pathfinding entity flee from a threat while leaving its permanent goals, combat target, and AI flags untouched.
Link copied to clipboard
public boolean canReach(LivingEntity livingEntity, Location location)
Link copied to clipboard
Creates a custom Bedrock presentation bound to an existing Bukkit entity.
Link copied to clipboard
public FakeCustomEntity createFakeCustomEntity(Location location, CustomEntityDefinition definition)
Creates a packet-only custom visual entity.
Link copied to clipboard
public FakeItem createFakeItem(Location location, FakeItemSettings settings)
Creates a FakeItem that displays an item visually without being pickable.
Link copied to clipboard
public abstract FakeText createFakeText(Location location, FakeTextSettings settings)
Creates a FakeText that automatically uses TextDisplay for Java Edition players and ArmorStand for Bedrock Edition players.
Link copied to clipboard
public MindHost createMindHost(MindFailureListener failureListener)
Creates the version-specific native Mind host.
public MindHost createMindHost(NamespacedKey hostIdentity, MindFailureListener failureListener)
Creates a native Mind host with a stable owner identity persisted on every carrier.
public MindHost createMindHost(NamespacedKey hostIdentity, MindFailureListener failureListener, MindActionSink actionSink)
Creates a native Mind host with a synchronous semantic action sink.
Link copied to clipboard
public abstract PacketModelEntity createPacketArmorStandEntity(Location location)
Link copied to clipboard
Link copied to clipboard
public abstract PacketModelEntity createPacketDisplayEntity(Location location)
Link copied to clipboard
public PacketEntityInterface createPacketEntity(EntityType entityType, Location location)
Creates a generic packet entity of the specified type.
Link copied to clipboard
public PacketInteractionEntity createPacketInteractionEntity(Location location, float width, float height)
Creates a packet-only Interaction entity for detecting player clicks.
Link copied to clipboard
public abstract PacketTextEntity createPacketTextArmorStandEntity(Location location)
Link copied to clipboard
public final Optional<PathfindingHandle> createPathfindingHandle(LivingEntity livingEntity)
Creates one reusable, interruptible navigation handle for an existing mob.
protected Optional<PathfindingHandle> createPathfindingHandle(LivingEntity livingEntity, int priority)
Implemented by adapters that can install native goals on the supplied entity.
Link copied to clipboard
public abstract void damageWithoutCooldown(LivingEntity target, double amount, Entity source)
Delivers a living attacker or owned arrow hit through native damage and Bukkit events, bypassing only this invocation's hit cooldown.
Link copied to clipboard
public abstract void doNotMove(LivingEntity livingEntity)
Link copied to clipboard
Creates a builder for FakeItem with customizable options.
Link copied to clipboard
Creates a builder for FakeText with customizable styling options.
Link copied to clipboard
public abstract boolean forcedMove(LivingEntity livingEntity, double speedModifier, Location location)
Link copied to clipboard
public abstract float getBodyRotation(Entity entity)
Link copied to clipboard
public float getConsumptionSeconds(ItemStack item)
Effective native consumption duration, including material defaults; -1 for non-consumables.
Link copied to clipboard
public int getDamageCooldownTicks(LivingEntity entity)
Returns the remaining native hit cooldown, independently of other invulnerability timers.
Link copied to clipboard
Link copied to clipboard
public RangedAmmunition grantOrdinaryAmmunition(Plugin plugin, Predicate<Player> eligible)
Grants ordinary bow/crossbow ammunition while retaining the native item-use and projectile paths.
Link copied to clipboard
public boolean hideScoreboardNumbers(Objective objective)
Hides the numeric score column for a sidebar objective while keeping score values available for ordering.
Link copied to clipboard
public void initializePacketInteractionListener(Plugin plugin)
Initializes the packet interaction listener for detecting clicks on packet-only entities.
Link copied to clipboard
public boolean isMindBody(Entity entity)
Returns whether an entity is any MagmaCore native mind carrier.
Link copied to clipboard
public boolean isPositionEntityTicking(Location location)
Checks the entity-ticking chunk level without loading the destination chunk.
Link copied to clipboard
public abstract boolean move(LivingEntity livingEntity, double speedModifier, Location targetLocation)
Simply makes an entity move to a point.
Link copied to clipboard
public boolean removeFreeWill(LivingEntity livingEntity)
Removes vanilla goals and brain behaviors from a mob without disabling its pathfinding AI.
Link copied to clipboard
public abstract void setBlockInNativeDataPalette(World world, int x, int y, int z, BlockData blockData, boolean applyPhysics)
Link copied to clipboard
public abstract boolean setCustomHitbox(Entity entity, float width, float height, boolean fixed)
Sets a custom hitbox size for an entity
Link copied to clipboard
public void setDamageCooldownTicks(LivingEntity entity, int ticks)
Changes only the native hit cooldown; the previous hit amount and other immunity remain unchanged.
Link copied to clipboard
public void setDamageIndicatorParticleCap(int max)
Sets the maximum number of DAMAGE_INDICATOR particles that outbound ClientboundLevelParticlesPacket packets may carry.
Link copied to clipboard
public boolean setPassengerOffset(Entity entity, double offsetX, double offsetY, double offsetZ)
Sets a custom passenger riding offset for an entity, overriding where passengers sit.
Link copied to clipboard
public void shutdownMindHost()
Stops all native mind sessions while retaining their rehydration markers.
Link copied to clipboard
Shuts down the packet interaction listener.
Link copied to clipboard
public boolean supportsFakeItems()
Checks if FakeItem is supported on this server version.
Link copied to clipboard
public abstract void universalMove(LivingEntity livingEntity, double speedModifier, Location location)
Pathfinding method which will move an entity to a point with a complete disregard for any pathfinding.
Link copied to clipboard
@Nullable()
public @Nullable() AbstractWanderBackToPoint wanderBackToPoint(@NonNull() @NonNull() LivingEntity livingEntity, @NonNull() @NonNull() Location blockLocation, double maximumDistanceFromPoint, int maxDurationTicks)
Makes a mob wander back to a point when it reaches a certain distance from that point, acting as a leash.
public abstract AbstractWanderBackToPoint wanderBackToPoint(LivingEntity livingEntity, Location blockLocation, double maximumDistanceFromPoint, int maxDurationTicks, OverridableWanderPriority overridableWanderPriority)
Link copied to clipboard
public ItemStack withConsumptionSeconds(ItemStack item, float seconds)
Returns a copy with only consumption duration changed, preserving native effects and animation.