Available Methods
- attackEntityFrom ( )
- getEyeHeight ( )
- isSneaking ( )
- setLocationAndAngles ( )
- getPositionVector ( )
- getEntityId ( )
- getLook ( )
- setDead ( )
- getEntityWorld ( )
- setFire ( )
- getBukkitEntity ( )
- isBeingRidden ( )
- getPosition ( )
- getPositionEyes ( )
- getEntityBoundingBox ( )
- setPosition ( )
- setGlowing ( )
- getCapability ( )
- isCreatureType ( )
- getDistanceSqToEntity ( )
- setWorld ( )
- startRiding ( )
- getDistanceToEntity ( )
- setVelocity ( )
- getClass ( )
- getDistanceSq ( )
- writeToNBT ( )
- getName ( )
- moveEntity ( )
- isEntityAlive ( )
- getVelocity ( )
- refreshPositionAndAngles ( )
- slowMovement ( )
- setPositionAndUpdate ( )
- getPassengers ( )
- getPos ( )
- getCustomNameTag ( )
- rayTrace ( )
- getY ( )
- isGlowing ( )
- isInWater ( )
- writeToNBTOptional ( )
- hasNoGravity ( )
- getEntityData ( )
- getExtendedProperties ( )
- getUniqueID ( )
- doesEntityNotTriggerPressurePlate ( )
- getCameraPosVec ( )
- hasCustomName ( )
- isRiding ( )
Related Classes
- java.util.Iterator
- java.util.UUID
- java.util.stream.Collectors
- javax.annotation.Nullable
- javax.annotation.Nonnull
- org.jetbrains.annotations.NotNull
- org.lwjgl.opengl.GL11
- net.minecraft.world.World
- net.minecraft.item.ItemStack
- net.minecraft.block.Block
- net.minecraft.client.Minecraft
- net.minecraftforge.common.MinecraftForge
- net.minecraft.entity.player.EntityPlayer
- net.minecraft.util.ResourceLocation
- net.minecraft.nbt.NBTTagCompound
- net.minecraft.tileentity.TileEntity
- net.minecraft.init.Blocks
- net.minecraft.block.material.Material
- net.minecraft.entity.EntityLivingBase
- net.minecraft.entity.player.EntityPlayerMP
- net.minecraft.util.math.BlockPos
- net.minecraft.server.MinecraftServer
- net.minecraft.entity.item.EntityItem
- net.minecraft.world.chunk.Chunk
- net.minecraftforge.fml.common.eventhandler.SubscribeEvent
Java Code Examples for net.minecraft.entity.Entity#refreshPositionAndAngles()
The following examples show how to use
net.minecraft.entity.Entity#refreshPositionAndAngles() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EntityValue.java From fabric-carpet with MIT License | 6 votes |
private static void updatePosition(Entity e, double x, double y, double z, float yaw, float pitch) { if ( !Double.isFinite(x) || Double.isNaN(x) || !Double.isFinite(y) || Double.isNaN(y) || !Double.isFinite(z) || Double.isNaN(z) || !Float.isFinite(yaw) || Float.isNaN(yaw) || !Float.isFinite(pitch) || Float.isNaN(pitch) ) return; if (e instanceof ServerPlayerEntity) { // this forces position but doesn't angles for some reason. Need both in the API in the future. EnumSet<PlayerPositionLookS2CPacket.Flag> set = EnumSet.noneOf(PlayerPositionLookS2CPacket.Flag.class); set.add(PlayerPositionLookS2CPacket.Flag.X_ROT); set.add(PlayerPositionLookS2CPacket.Flag.Y_ROT); ((ServerPlayerEntity)e).networkHandler.teleportRequest(x, y, z, yaw, pitch, set ); } else { e.refreshPositionAndAngles(x, y, z, yaw, pitch); ((ServerWorld) e.getEntityWorld()).getChunkManager().sendToNearbyPlayers(e, new EntityPositionS2CPacket(e)); } }
Example 2
Source File: Entity_portalSuffocationMixin.java From fabric-carpet with MIT License | 5 votes |
@Redirect(method = "changeDimension", at = @At( value = "INVOKE", target = "Lnet/minecraft/entity/Entity;refreshPositionAndAngles(Lnet/minecraft/util/math/BlockPos;FF)V" )) private void alternativeSetPositionAndAngles(Entity entity, BlockPos blockPos_1, float float_1, float float_2) { if (CarpetSettings.portalSuffocationFix && CarpetSettings.fixedPosition != null) entity.refreshPositionAndAngles(CarpetSettings.fixedPosition.x, CarpetSettings.fixedPosition.y, CarpetSettings.fixedPosition.z, float_1, float_2); else entity.refreshPositionAndAngles(blockPos_1, float_1, float_2); }