mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-24 01:19:24 +00:00
修复家具
This commit is contained in:
@@ -57,7 +57,7 @@ public class BukkitFurnitureElement extends AbstractFurnitureElement {
|
||||
WorldPosition position = furniture.position();
|
||||
Vector3f offset = conjugated.transform(new Vector3f(position()));
|
||||
packets.accept(FastNMS.INSTANCE.constructor$ClientboundAddEntityPacket(
|
||||
entityId, UUID.randomUUID(), position.x() + offset.x, position.y() + offset.y, position.z() - offset.z, 0, position.xRot(),
|
||||
entityId, UUID.randomUUID(), position.x() + offset.x, position.y() + offset.y, position.z() - offset.z, 0, position.yRot(),
|
||||
MEntityTypes.ITEM_DISPLAY, 0, CoreReflections.instance$Vec3$Zero, 0
|
||||
));
|
||||
if (applyDyedColor()) {
|
||||
|
||||
@@ -57,7 +57,7 @@ public class CustomHitBoxConfig extends AbstractHitBoxConfig {
|
||||
Vector3f offset = conjugated.transform(new Vector3f(position()));
|
||||
try {
|
||||
packets.accept(FastNMS.INSTANCE.constructor$ClientboundAddEntityPacket(
|
||||
entityId[0], UUID.randomUUID(), position.x() + offset.x, position.y() + offset.y, position.z() - offset.z, 0, position.xRot(),
|
||||
entityId[0], UUID.randomUUID(), position.x() + offset.x, position.y() + offset.y, position.z() - offset.z, 0, position.yRot(),
|
||||
FastNMS.INSTANCE.method$CraftEntityType$toNMSEntityType(this.entityType), 0, CoreReflections.instance$Vec3$Zero, 0
|
||||
), true);
|
||||
packets.accept(FastNMS.INSTANCE.constructor$ClientboundSetEntityDataPacket(entityId[0], List.copyOf(this.cachedValues)), true);
|
||||
|
||||
@@ -64,7 +64,7 @@ public class HappyGhastHitBoxConfig extends AbstractHitBoxConfig {
|
||||
double x = position.x();
|
||||
double y = position.y();
|
||||
double z = position.z();
|
||||
float yaw = position.xRot();
|
||||
float yaw = position.yRot();
|
||||
packets.accept(FastNMS.INSTANCE.constructor$ClientboundAddEntityPacket(
|
||||
entityIds[0], UUID.randomUUID(), x + offset.x, y + offset.y, z - offset.z, 0, yaw,
|
||||
MEntityTypes.HAPPY_GHAST, 0, CoreReflections.instance$Vec3$Zero, 0
|
||||
|
||||
@@ -64,7 +64,7 @@ public class InteractionHitBoxConfig extends AbstractHitBoxConfig {
|
||||
double x = position.x();
|
||||
double y = position.y();
|
||||
double z = position.z();
|
||||
float yaw = position.xRot();
|
||||
float yaw = position.yRot();
|
||||
Vec3d vec3d = new Vec3d(x + offset.x, y + offset.y, z - offset.z);
|
||||
packets.accept(FastNMS.INSTANCE.constructor$ClientboundAddEntityPacket(
|
||||
entityId[0], UUID.randomUUID(), vec3d.x, vec3d.y, vec3d.z, 0, yaw,
|
||||
|
||||
@@ -216,7 +216,7 @@ public class ShulkerHitBoxConfig extends AbstractHitBoxConfig {
|
||||
double x = position.x();
|
||||
double y = position.y();
|
||||
double z = position.z();
|
||||
float yaw = position.xRot();
|
||||
float yaw = position.yRot();
|
||||
double originalY = y + offset.y;
|
||||
double integerPart = Math.floor(originalY);
|
||||
double fractionalPart = originalY - integerPart;
|
||||
|
||||
Reference in New Issue
Block a user