Class EntityMixin
java.lang.Object
dev.latvian.mods.kubejs.core.mixin.EntityMixin
- All Implemented Interfaces:
EntityKJS,MessageSenderKJS,WithPersistentData,ScriptTypeHolder
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract floatdistanceTo(net.minecraft.world.entity.Entity arg) abstract doubledistanceToSqr(double x, double y, double z) abstract doubledistanceToSqr(net.minecraft.world.entity.Entity arg) abstract doubledistanceToSqr(net.minecraft.world.phys.Vec3 vec) abstract voidabstract net.minecraft.core.DirectionKubeJS addsEntityKJS.kjs$getFacing()which also can specify whether the entity is looking down or up.abstract List<net.minecraft.world.entity.Entity> Replaced in JS byEntityKJS.kjs$getPassengers().abstract net.minecraft.nbt.CompoundTagabstract Stringabstract net.minecraft.world.entity.EntityType<?> getType()EntityKJS.kjs$getType()returns a string in JS.abstract UUIDgetUUID()abstract floatabstract floatgetXRot()abstract floatgetYRot()abstract booleanhurt(net.minecraft.world.damagesource.DamageSource source, float hp) Replaced byabstract booleanisAlliedTo(net.minecraft.world.entity.Entity e) abstract booleannet.minecraft.nbt.CompoundTag@Nullable net.minecraft.nbt.CompoundTagvoidkjs$setRawPersistentData(@Nullable net.minecraft.nbt.CompoundTag tag) abstract net.minecraft.world.level.Levellevel()Replaced in JS byEntityKJS.kjs$getLevel().abstract voidmoveTo(double x, double y, double z, float yaw, float pitch) abstract voidmoveTo(net.minecraft.core.BlockPos pos, float yRot, float xRot) DisambiguatesEntity.moveTo(Vec3, float, float)in JS.abstract voidplayerTouch(net.minecraft.world.entity.player.Player arg) abstract voidpush(double x, double y, double z) abstract voidsetDeltaMovement(double x, double y, double z) abstract voidsetGlowingTag(boolean glowing) abstract voidsetXRot(float pitch) abstract voidsetYBodyRot(float yBodyRot) abstract voidsetYRot(float yaw) abstract net.minecraft.world.entity.item.ItemEntityspawnAtLocation(net.minecraft.world.level.ItemLike item) DisambiguatesEntity.spawnAtLocation(ItemStack)in JS.abstract net.minecraft.world.entity.item.ItemEntityspawnAtLocation(net.minecraft.world.level.ItemLike item, int offsetY) DisambiguatesEntity.spawnAtLocation(ItemStack, float)in JS.abstract voidteleportTo(double x, double y, double z) Replaced in JS byEntityKJS.kjs$teleportTo(double, double, double).abstract booleanteleportTo(net.minecraft.server.level.ServerLevel level, double x, double y, double z, Set<net.minecraft.world.entity.RelativeMovement> relativeMovements, float yaw, float pitch) Hidden, most similar equivalent usable by JS isEntityKJS.kjs$teleportToLevel(ServerLevel, double, double, double, float, float).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.latvian.mods.kubejs.core.EntityKJS
kjs$attack, kjs$attack, kjs$damage, kjs$damage, kjs$distanceTo, kjs$distanceTo, kjs$distanceToBlock, kjs$distanceToBlockSqr, kjs$getBlock, kjs$getDisplayName, kjs$getDistance, kjs$getDistanceSq, kjs$getDistanceSq, kjs$getFacing, kjs$getItem, kjs$getLevel, kjs$getMotionX, kjs$getMotionY, kjs$getMotionZ, kjs$getName, kjs$getNbt, kjs$getPassengers, kjs$getProfile, kjs$getScriptType, kjs$getServer, kjs$getTeamId, kjs$getTeamName, kjs$getType, kjs$getUsername, kjs$isAmbientCreature, kjs$isAnimal, kjs$isClientPlayer, kjs$isFrame, kjs$isItem, kjs$isLiving, kjs$isMonster, kjs$isOnScoreboardTeam, kjs$isOnScoreboardTeam, kjs$isPeacefulCreature, kjs$isPlayer, kjs$isSelf, kjs$isServerPlayer, kjs$isWaterCreature, kjs$mergeNbt, kjs$rayTrace, kjs$rayTrace, kjs$rayTraceEntity, kjs$runCommand, kjs$runCommandSilent, kjs$self, kjs$setMotionX, kjs$setMotionY, kjs$setMotionZ, kjs$setNbt, kjs$setPosition, kjs$setPosition, kjs$setPositionAndRotation, kjs$setRotation, kjs$setX, kjs$setY, kjs$setZ, kjs$spawn, kjs$teleportTo, kjs$teleportTo, kjs$teleportTo, kjs$teleportToLevel, kjs$tellMethods inherited from interface dev.latvian.mods.kubejs.core.MessageSenderKJS
kjs$setActivePostShader, kjs$setStatusMessage
-
Field Details
-
tickCount
@RemapForJS("tickCount") public int tickCount
-
-
Constructor Details
-
EntityMixin
public EntityMixin()
-
-
Method Details
-
playerTouch
public abstract void playerTouch(net.minecraft.world.entity.player.Player arg) -
kjs$getPersistentData
public net.minecraft.nbt.CompoundTag kjs$getPersistentData()- Specified by:
kjs$getPersistentDatain interfaceWithPersistentData
-
getPersistentData
@RemapForJS("getForgePersistentData") public abstract net.minecraft.nbt.CompoundTag getPersistentData() -
kjs$getRawPersistentData
@Nullable @HideFromJS public @Nullable net.minecraft.nbt.CompoundTag kjs$getRawPersistentData()- Specified by:
kjs$getRawPersistentDatain interfaceEntityKJS
-
kjs$setRawPersistentData
@HideFromJS public void kjs$setRawPersistentData(@Nullable @Nullable net.minecraft.nbt.CompoundTag tag) - Specified by:
kjs$setRawPersistentDatain interfaceEntityKJS
-
getUUID
-
getStringUUID
-
isCurrentlyGlowing
@RemapForJS("isGlowing") public abstract boolean isCurrentlyGlowing() -
setGlowingTag
@RemapForJS("setGlowing") public abstract void setGlowingTag(boolean glowing) -
getYRot
@RemapForJS("getYaw") public abstract float getYRot() -
setYRot
@RemapForJS("setYaw") public abstract void setYRot(float yaw) -
getXRot
@RemapForJS("getPitch") public abstract float getXRot() -
setXRot
@RemapForJS("setPitch") public abstract void setXRot(float pitch) -
setYBodyRot
@RemapForJS("setBodyYaw") @Info("Sets the entity\'s body yaw.") public abstract void setYBodyRot(float yBodyRot) -
getVisualRotationYInDegrees
@RemapForJS("getBodyYaw") @Info("Gets the entity\'s body yaw (if the entity is a `LivingEntity`), or the entity\'s visual rotation (if the entity is an item entity or an item frame).") public abstract float getVisualRotationYInDegrees() -
setDeltaMovement
@RemapForJS("setMotion") public abstract void setDeltaMovement(double x, double y, double z) -
moveTo
@RemapForJS("setPositionAndRotation") public abstract void moveTo(double x, double y, double z, float yaw, float pitch) -
push
@RemapForJS("addMotion") public abstract void push(double x, double y, double z) -
getPassengers
Replaced in JS byEntityKJS.kjs$getPassengers(). -
isAlliedTo
@RemapForJS("isOnSameTeam") public abstract boolean isAlliedTo(net.minecraft.world.entity.Entity e) -
getDirection
@RemapForJS("getHorizontalFacing") public abstract net.minecraft.core.Direction getDirection()KubeJS addsEntityKJS.kjs$getFacing()which also can specify whether the entity is looking down or up. -
extinguishFire
@RemapForJS("extinguish") public abstract void extinguishFire() -
hurt
@HideFromJS public abstract boolean hurt(net.minecraft.world.damagesource.DamageSource source, float hp) Replaced by -
getType
@RemapForJS("getEntityType") public abstract net.minecraft.world.entity.EntityType<?> getType()EntityKJS.kjs$getType()returns a string in JS. -
distanceToSqr
@Info("Measures the **square** of a distance of entity to the point at specified 3D position vector.") public abstract double distanceToSqr(net.minecraft.world.phys.Vec3 vec) -
distanceToSqr
@Info("Measures the distance of entity to the point at specified `x`, `y` and `z`.") public abstract double distanceToSqr(double x, double y, double z) -
distanceToSqr
@RemapForJS("distanceToEntitySqr") @Info("Measures the **square** of a distance of entity to another entity.") public abstract double distanceToSqr(net.minecraft.world.entity.Entity arg) -
distanceTo
@RemapForJS("distanceToEntity") @Info("Measures the distance of entity to another entity.") public abstract float distanceTo(net.minecraft.world.entity.Entity arg) -
teleportTo
@HideFromJS public abstract void teleportTo(double x, double y, double z) Replaced in JS byEntityKJS.kjs$teleportTo(double, double, double). -
teleportTo
@HideFromJS public abstract boolean teleportTo(net.minecraft.server.level.ServerLevel level, double x, double y, double z, Set<net.minecraft.world.entity.RelativeMovement> relativeMovements, float yaw, float pitch) Hidden, most similar equivalent usable by JS isEntityKJS.kjs$teleportToLevel(ServerLevel, double, double, double, float, float). -
level
@HideFromJS public abstract net.minecraft.world.level.Level level()Replaced in JS byEntityKJS.kjs$getLevel(). -
spawnAtLocation
@HideFromJS public abstract net.minecraft.world.entity.item.ItemEntity spawnAtLocation(net.minecraft.world.level.ItemLike item) DisambiguatesEntity.spawnAtLocation(ItemStack)in JS. -
spawnAtLocation
@HideFromJS public abstract net.minecraft.world.entity.item.ItemEntity spawnAtLocation(net.minecraft.world.level.ItemLike item, int offsetY) DisambiguatesEntity.spawnAtLocation(ItemStack, float)in JS. -
moveTo
@RemapForJS("moveToBlockPos") public abstract void moveTo(net.minecraft.core.BlockPos pos, float yRot, float xRot) DisambiguatesEntity.moveTo(Vec3, float, float)in JS.
-