This commit is contained in:
gnembon committed 2021-04-28 17:05:42 -03:00
1 parent 624f9973c8
commit b84478e7db
9 files changed
+27 -27

No files matched your search

@@ -52,7 +52,7 @@ public class PerimeterInfoCommand
{
nbttagcompound.putString("id", mobId);
Entity baseEntity = EntityType.loadEntityWithPassengers(nbttagcompound, source.getWorld(), (entity_1x) -> {
entity_1x.refreshPositionAndAngles(new BlockPos(pos.getX(), -10, pos.getZ()), entity_1x.yaw, entity_1x.pitch);
entity_1x.refreshPositionAndAngles(new BlockPos(pos.getX(), -10, pos.getZ()), entity_1x.method_36454(), entity_1x.method_36455()); // yaw pitch
return !source.getWorld().tryLoadEntity(entity_1x) ? null : entity_1x;
});
if (!(baseEntity instanceof MobEntity))
@@ -116,8 +116,8 @@ public class EntityPlayerActionPack
case SOUTH: return look(0, 0);
case EAST: return look(-90, 0);
case WEST: return look(90, 0);
case UP: return look(player.yaw, -90);
case DOWN: return look(player.yaw, 90);
case UP: return look(player.method_36454(), -90);
case DOWN: return look(player.method_36454(), 90);
}
return this;
}
@@ -128,8 +128,8 @@ public class EntityPlayerActionPack
public EntityPlayerActionPack look(float yaw, float pitch)
{
player.yaw = yaw % 360;
player.pitch = MathHelper.clamp(pitch, -90, 90);
player.method_36456(yaw % 360); //setYaw
player.method_36457(MathHelper.clamp(pitch, -90, 90)); // setPitch
// maybe player.setPositionAndAngles(player.x, player.y, player.z, yaw, MathHelper.clamp(pitch,-90.0F, 90.0F));
return this;
}
@@ -142,7 +142,7 @@ public class EntityPlayerActionPack
public EntityPlayerActionPack turn(float yaw, float pitch)
{
return look(player.yaw + yaw, player.pitch + pitch);
return look(player.method_36454() + yaw, player.method_36455() + pitch);
}
public EntityPlayerActionPack turn(Vec2f rotation)
+1 -1
View File
@@ -50,7 +50,7 @@ public class XPcombine
if (getTextureByXP(first.getExperienceAmount()) != size)
{
newOrb = new ExperienceOrbEntity(EntityType.EXPERIENCE_ORB, first.world);
newOrb.refreshPositionAndAngles(first.getX(), first.getY(), first.getZ(), first.yaw, first.pitch);
newOrb.refreshPositionAndAngles(first.getX(), first.getY(), first.getZ(), first.method_36454(), first.method_36455());
((ExperienceOrbInterface)newOrb).setAmount(first.getExperienceAmount());
first.world.spawnEntity(newOrb);
@@ -27,7 +27,7 @@ public abstract class GuardianEntityMixin extends HostileEntity
if (!this.world.isClient && !this.isRemoved() && CarpetSettings.renewableSponges && !((Object)this instanceof ElderGuardianEntity))
{
ElderGuardianEntity elderGuardian = new ElderGuardianEntity(EntityType.ELDER_GUARDIAN ,this.world);
elderGuardian.refreshPositionAndAngles(this.getX(), this.getY(), this.getZ(), this.yaw, this.pitch);
elderGuardian.refreshPositionAndAngles(this.getX(), this.getY(), this.getZ(), this.method_36454(), this.method_36455());
elderGuardian.initialize(serverWorld ,this.world.getLocalDifficulty(elderGuardian.getBlockPos()), SpawnReason.CONVERSION, (EntityData)null, (NbtCompound)null);
elderGuardian.setAiDisabled(this.isAiDisabled());
@@ -69,7 +69,7 @@ public class EntityPlayerMPFake extends ServerPlayerEntity
server.getPlayerManager().onPlayerConnect(new NetworkManagerFake(NetworkSide.SERVERBOUND), playerShadow);
playerShadow.setHealth(player.getHealth());
playerShadow.networkHandler.requestTeleport(player.getX(), player.getY(), player.getZ(), player.yaw, player.pitch);
playerShadow.networkHandler.requestTeleport(player.getX(), player.getY(), player.getZ(), player.method_36454(), player.method_36455());
playerShadow.interactionManager.changeGameMode(player.interactionManager.getGameMode());
((ServerPlayerEntityInterface) playerShadow).getActionPack().copyFrom(((ServerPlayerEntityInterface) player).getActionPack());
playerShadow.stepHeight = 0.6F;
@@ -142,7 +142,7 @@ public class Entities {
ServerWorld serverWorld = cc.s.getWorld();
Entity entity_1 = EntityType.loadEntityWithPassengers(tag, serverWorld, (entity_1x) -> {
entity_1x.refreshPositionAndAngles(vec3d.x, vec3d.y, vec3d.z, entity_1x.yaw, entity_1x.pitch);
entity_1x.refreshPositionAndAngles(vec3d.x, vec3d.y, vec3d.z, entity_1x.method_36454(), entity_1x.method_36455());
return !serverWorld.tryLoadEntity(entity_1x) ? null : entity_1x;
});
if (entity_1 == null) {
@@ -429,7 +429,7 @@ public class EntityValue extends Value
put("uuid",(e, a) -> new StringValue(e.getUuidAsString()));
put("id",(e, a) -> new NumericValue(e.getId()));
put("pos", (e, a) -> ListValue.of(new NumericValue(e.getX()), new NumericValue(e.getY()), new NumericValue(e.getZ())));
put("location", (e, a) -> ListValue.of(new NumericValue(e.getX()), new NumericValue(e.getY()), new NumericValue(e.getZ()), new NumericValue(e.yaw), new NumericValue(e.pitch)));
put("location", (e, a) -> ListValue.of(new NumericValue(e.getX()), new NumericValue(e.getY()), new NumericValue(e.getZ()), new NumericValue(e.method_36454()), new NumericValue(e.method_36455())));
put("x", (e, a) -> new NumericValue(e.getX()));
put("y", (e, a) -> new NumericValue(e.getY()));
put("z", (e, a) -> new NumericValue(e.getZ()));
@@ -467,7 +467,7 @@ public class EntityValue extends Value
return new NumericValue(e.getType().isIn(tag));
});
put("yaw", (e, a)-> new NumericValue(e.yaw));
put("yaw", (e, a)-> new NumericValue(e.method_36454()));
put("head_yaw", (e, a)-> {
if (e instanceof LivingEntity)
{
@@ -483,7 +483,7 @@ public class EntityValue extends Value
return Value.NULL;
});
put("pitch", (e, a)-> new NumericValue(e.pitch));
put("pitch", (e, a)-> new NumericValue(e.method_36455()));
put("look", (e, a) -> {
Vec3d look = e.getRotationVector();
return ListValue.of(new NumericValue(look.x),new NumericValue(look.y),new NumericValue(look.z));
@@ -1010,25 +1010,25 @@ public class EntityValue extends Value
NumericValue.asNumber(coords.get(0)).getDouble(),
NumericValue.asNumber(coords.get(1)).getDouble(),
NumericValue.asNumber(coords.get(2)).getDouble(),
e.yaw,
e.pitch
e.method_36454(),
e.method_36455()
);
});
put("x", (e, v) ->
{
updatePosition(e, NumericValue.asNumber(v).getDouble(), e.getY(), e.getZ(), e.yaw, e.pitch);
updatePosition(e, NumericValue.asNumber(v).getDouble(), e.getY(), e.getZ(), e.method_36454(), e.method_36455());
});
put("y", (e, v) ->
{
updatePosition(e, e.getX(), NumericValue.asNumber(v).getDouble(), e.getZ(), e.yaw, e.pitch);
updatePosition(e, e.getX(), NumericValue.asNumber(v).getDouble(), e.getZ(), e.method_36454(), e.method_36455());
});
put("z", (e, v) ->
{
updatePosition(e, e.getX(), e.getY(), NumericValue.asNumber(v).getDouble(), e.yaw, e.pitch);
updatePosition(e, e.getX(), e.getY(), NumericValue.asNumber(v).getDouble(), e.method_36454(), e.method_36455());
});
put("yaw", (e, v) ->
{
updatePosition(e, e.getX(), e.getY(), e.getZ(), ((float)NumericValue.asNumber(v).getDouble()) % 360, e.pitch);
updatePosition(e, e.getX(), e.getY(), e.getZ(), ((float)NumericValue.asNumber(v).getDouble()) % 360, e.method_36455());
});
put("head_yaw", (e, v) ->
{
@@ -1047,7 +1047,7 @@ public class EntityValue extends Value
put("pitch", (e, v) ->
{
updatePosition(e, e.getX(), e.getY(), e.getZ(), e.yaw, MathHelper.clamp((float)NumericValue.asNumber(v).getDouble(), -90, 90));
updatePosition(e, e.getX(), e.getY(), e.getZ(), e.method_36454(), MathHelper.clamp((float)NumericValue.asNumber(v).getDouble(), -90, 90));
});
//"look"
@@ -1065,8 +1065,8 @@ public class EntityValue extends Value
e.getX() + NumericValue.asNumber(coords.get(0)).getDouble(),
e.getY() + NumericValue.asNumber(coords.get(1)).getDouble(),
e.getZ() + NumericValue.asNumber(coords.get(2)).getDouble(),
e.yaw,
e.pitch
e.method_36454(),
e.method_36455()
);
});
@@ -1290,7 +1290,7 @@ public class EntityValue extends Value
BlockValue bv= (BlockValue)a;
if (bv.getPos()==null || bv.getWorld() == null)
throw new InternalExpressionException("block for spawn modification should be localised in the world");
spe.setSpawnPoint(bv.getWorld().getRegistryKey(), bv.getPos(), e.yaw, true, false);
spe.setSpawnPoint(bv.getWorld().getRegistryKey(), bv.getPos(), e.method_36454(), true, false); // yaw
}
else if (a.isNull())
{
+1 -1
View File
@@ -114,7 +114,7 @@ public class MobAI
e.setVelocity(vec3d.x, jumpStrength, vec3d.z);
if (e.isSprinting())
{
float u = e.yaw * 0.017453292F;
float u = e.method_36454() * 0.017453292F; // yaw
e.setVelocity(e.getVelocity().add((-MathHelper.sin(g) * 0.2F), 0.0D, (MathHelper.cos(u) * 0.2F)));
}
e.velocityDirty = true;