mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 19:39:22 +00:00
[1.16] Fix inconsistency of multipart entity ids (#8605)
This commit is contained in:
1 parent
4e47eab41e
commit
a4ca2c69f0
4 files changed
+21
-8
No files matched your search
@@ -36,17 +36,14 @@
|
||||
}
|
||||
|
||||
public void func_147279_a(SAnimateHandPacket p_147279_1_) {
|
||||
@@ -854,8 +_,8 @@
|
||||
@@ -854,6 +_,7 @@
|
||||
livingentity.func_213312_b(d0, d1, d2);
|
||||
livingentity.field_70761_aq = (float)(p_147281_1_.func_149032_n() * 360) / 256.0F;
|
||||
livingentity.field_70759_as = (float)(p_147281_1_.func_149032_n() * 360) / 256.0F;
|
||||
- if (livingentity instanceof EnderDragonEntity) {
|
||||
- EnderDragonPartEntity[] aenderdragonpartentity = ((EnderDragonEntity)livingentity).func_213404_dT();
|
||||
+ if (livingentity.isMultipartEntity()) {
|
||||
+ net.minecraftforge.entity.PartEntity<?>[] aenderdragonpartentity = livingentity.getParts();
|
||||
+ if (false) // Forge: Fix MC-158205: Moved into setId()
|
||||
if (livingentity instanceof EnderDragonEntity) {
|
||||
EnderDragonPartEntity[] aenderdragonpartentity = ((EnderDragonEntity)livingentity).func_213404_dT();
|
||||
|
||||
for(int i = 0; i < aenderdragonpartentity.length; ++i) {
|
||||
aenderdragonpartentity[i].func_145769_d(i + p_147281_1_.func_149024_d());
|
||||
@@ -1004,8 +_,10 @@
|
||||
clientplayerentity1.func_233645_dx_().func_233784_a_(clientplayerentity.func_233645_dx_());
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
-public abstract class Entity implements INameable, ICommandSource {
|
||||
+public abstract class Entity extends net.minecraftforge.common.capabilities.CapabilityProvider<Entity> implements INameable, ICommandSource, net.minecraftforge.common.extensions.IForgeEntity {
|
||||
protected static final Logger field_184243_a = LogManager.getLogger();
|
||||
private static final AtomicInteger field_213331_b = new AtomicInteger();
|
||||
protected static final AtomicInteger field_213331_b = new AtomicInteger();
|
||||
private static final List<ItemStack> field_190535_b = Collections.emptyList();
|
||||
private static final AxisAlignedBB field_174836_a = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
|
||||
private static double field_70155_l = 1.0D;
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
--- a/net/minecraft/entity/boss/dragon/EnderDragonEntity.java
|
||||
+++ b/net/minecraft/entity/boss/dragon/EnderDragonEntity.java
|
||||
@@ -104,6 +_,14 @@
|
||||
}
|
||||
|
||||
this.field_184677_bJ = new PhaseManager(this);
|
||||
+ this.func_145769_d(field_213331_b.getAndAdd(this.field_70977_g.length + 1) + 1); // Forge: Fix MC-158205: Make sure part ids are successors of parent mob id
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void func_145769_d(int p_145769_1_) {
|
||||
+ super.func_145769_d(p_145769_1_);
|
||||
+ for(int i = 0; i < this.field_70977_g.length; ++i) // Forge: Fix MC-158205: Set part ids to successors of parent mob id
|
||||
+ this.field_70977_g[i].func_145769_d(p_145769_1_ + i + 1);
|
||||
}
|
||||
|
||||
public static AttributeModifierMap.MutableAttribute func_234257_m_() {
|
||||
@@ -408,8 +_,8 @@
|
||||
BlockPos blockpos = new BlockPos(k1, l1, i2);
|
||||
BlockState blockstate = this.field_70170_p.func_180495_p(blockpos);
|
||||
|
||||
@@ -224,6 +224,7 @@ protected net.minecraft.data.loot.BlockLootTables func_218570_h(Lnet/minecraft/b
|
||||
protected net.minecraft.data.loot.EntityLootTables field_218586_a # ENTITY_ON_FIRE
|
||||
protected net.minecraft.data.loot.EntityLootTables func_218582_a(Lnet/minecraft/entity/EntityType;Lnet/minecraft/loot/LootTable$Builder;)V # add
|
||||
protected net.minecraft.data.loot.EntityLootTables func_218585_a(Lnet/minecraft/util/ResourceLocation;Lnet/minecraft/loot/LootTable$Builder;)V # add
|
||||
protected net.minecraft.entity.Entity field_213331_b # ENTITY_COUNTER
|
||||
public net.minecraft.entity.Entity func_70022_Q()Ljava/lang/String; # getEncodeId
|
||||
public net.minecraft.entity.EntitySpawnPlacementRegistry func_209343_a(Lnet/minecraft/entity/EntityType;Lnet/minecraft/entity/EntitySpawnPlacementRegistry$PlacementType;Lnet/minecraft/world/gen/Heightmap$Type;Lnet/minecraft/entity/EntitySpawnPlacementRegistry$IPlacementPredicate;)V # register
|
||||
public net.minecraft.entity.MobEntity field_70714_bg # goalSelector
|
||||
|
||||
Reference in new issue
Block a user