mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 16:54:22 +00:00
Fix issue reading chunks from the network when client and server do not agree on block count. Closes #34925
This commit is contained in:
1 parent
b270839e91
commit
daf21e4dcf
2 files changed
+41
No files matched your search
@@ -0,0 +1,39 @@
|
||||
--- ../src-base/minecraft/net/minecraft/world/chunk/BlockStateContainer.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/chunk/BlockStateContainer.java
|
||||
@@ -30,6 +30,10 @@
|
||||
|
||||
private void func_186012_b(int p_186012_1_)
|
||||
{
|
||||
+ setBits(p_186012_1_, false);
|
||||
+ }
|
||||
+ private void setBits(int p_186012_1_, boolean forceBits)
|
||||
+ {
|
||||
if (p_186012_1_ != this.field_186024_e)
|
||||
{
|
||||
this.field_186024_e = p_186012_1_;
|
||||
@@ -47,6 +51,8 @@
|
||||
{
|
||||
this.field_186022_c = field_186023_d;
|
||||
this.field_186024_e = MathHelper.func_151241_e(Block.field_176229_d.func_186804_a());
|
||||
+ if (forceBits)
|
||||
+ this.field_186024_e = p_186012_1_;
|
||||
}
|
||||
|
||||
this.field_186022_c.func_186041_a(field_186020_a);
|
||||
@@ -102,11 +108,15 @@
|
||||
|
||||
if (this.field_186024_e != i)
|
||||
{
|
||||
- this.func_186012_b(i);
|
||||
+ this.setBits(i, true); //Forge, Force bit density to fix network issues, resize below if needed.
|
||||
}
|
||||
|
||||
this.field_186022_c.func_186038_a(p_186010_1_);
|
||||
p_186010_1_.func_186873_b(this.field_186021_b.func_188143_a());
|
||||
+
|
||||
+ int regSize = MathHelper.func_151241_e(Block.field_176229_d.func_186804_a());
|
||||
+ if (this.field_186022_c == field_186023_d && this.field_186024_e != regSize) // Resize bits to fit registry.
|
||||
+ this.func_186008_a(regSize, field_186020_a);
|
||||
}
|
||||
|
||||
public void func_186009_b(PacketBuffer p_186009_1_)
|
||||
@@ -55,3 +55,5 @@ net/minecraft/world/storage/loot/LootEntry.<init>(II[Lnet/minecraft/world/storag
|
||||
net/minecraft/world/storage/loot/LootEntryItem.<init>(Lnet/minecraft/item/Item;II[Lnet/minecraft/world/storage/loot/functions/LootFunction;[Lnet/minecraft/world/storage/loot/conditions/LootCondition;Ljava/lang/String;)V=|p_i46644_1_,p_i46644_2_,p_i46644_3_,p_i46644_4_,p_i46644_5_,entryName
|
||||
net/minecraft/world/storage/loot/LootEntryTable.<init>(Lnet/minecraft/util/ResourceLocation;II[Lnet/minecraft/world/storage/loot/conditions/LootCondition;Ljava/lang/String;)V=|p_i46639_1_,p_i46639_2_,p_i46639_3_,p_i46639_4_,entryName
|
||||
net/minecraft/world/storage/loot/LootEntryEmpty.<init>(II[Lnet/minecraft/world/storage/loot/conditions/LootCondition;Ljava/lang/String;)V=|p_i46645_1_,p_i46645_2_,p_i46645_3_,entryName
|
||||
|
||||
net/minecraft/world/chunk/BlockStateContainer.setBits(IZ)V=|p_186012_1_,forceBits
|
||||
Reference in new issue
Block a user