|
14 | 14 | import net.minecraft.entity.damage.DamageSource; |
15 | 15 | import net.minecraft.entity.data.DataTracker; |
16 | 16 | import net.minecraft.nbt.NbtCompound; |
17 | | -import net.minecraft.network.packet.s2c.play.EntityAttributesS2CPacket; |
18 | | -import net.minecraft.network.packet.s2c.play.EntitySpawnS2CPacket; |
19 | 17 | import net.minecraft.server.network.ServerPlayerEntity; |
20 | 18 | import net.minecraft.util.math.BlockPos; |
21 | 19 | import net.minecraft.world.World; |
22 | 20 |
|
23 | 21 | import java.util.Collection; |
24 | 22 | import java.util.Collections; |
25 | | -import java.util.List; |
26 | | - |
27 | | -import static net.minecraft.entity.decoration.ArmorStandEntity.ARMOR_STAND_FLAGS; |
28 | 23 |
|
29 | 24 | /** |
30 | 25 | * The ephemeral seat entity used to allow the player to have a sit pose |
@@ -73,25 +68,7 @@ public SeatEntity(World world, double x, double y, double z) { |
73 | 68 | */ |
74 | 69 | @Override |
75 | 70 | public EntityType<?> getPolymerEntityType(ServerPlayerEntity player) { |
76 | | - return EntityType.ARMOR_STAND; |
77 | | - } |
78 | | - |
79 | | - /** |
80 | | - * Tells the client that we're a marker armor stand, and that we have no health. |
81 | | - */ |
82 | | - @Override |
83 | | - public void modifyRawTrackedData(List<DataTracker.SerializedEntry<?>> data, ServerPlayerEntity player, |
84 | | - boolean initial) { |
85 | | - data.add(new DataTracker.Entry<>(ARMOR_STAND_FLAGS, (byte) 16).toSerialized()); |
86 | | - // This must be manually sent as there's no other mechanism we can use to send |
87 | | - // this. |
88 | | - if (player != null) { |
89 | | - // Really, this shouldn't be null but apparently Polymer 0.3.13+1.19.3 is |
90 | | - // slightly busted in that joining a world while sitting on a seat causes an |
91 | | - // instant crash. |
92 | | - // We can at least mitigate it here. |
93 | | - player.networkHandler.sendPacket(new EntityAttributesS2CPacket(getId(), MAX_HEALTH_NULL_SINGLE)); |
94 | | - } |
| 71 | + return EntityType.BLOCK_DISPLAY; |
95 | 72 | } |
96 | 73 |
|
97 | 74 | @Override |
|
0 commit comments