diff --git a/patches/minecraft/net/minecraft/world/chunk/ChunkHolder.java.patch b/patches/minecraft/net/minecraft/world/chunk/ChunkHolder.java.patch index 7dfe3eca7..66ef643c0 100644 --- a/patches/minecraft/net/minecraft/world/chunk/ChunkHolder.java.patch +++ b/patches/minecraft/net/minecraft/world/chunk/ChunkHolder.java.patch @@ -18,7 +18,16 @@ this.field_219320_o[this.field_219321_p++] = short1; } -@@ -177,20 +179,22 @@ +@@ -154,7 +156,7 @@ + public void func_219274_a(Chunk p_219274_1_) { + if (this.field_219321_p != 0 || this.field_219325_t != 0 || this.field_219324_s != 0) { + World world = p_219274_1_.func_177412_p(); +- if (this.field_219321_p == 64) { ++ if (this.field_219321_p >= net.minecraftforge.common.ForgeConfig.SERVER.clumpingThreshold.get()) { + this.field_219323_r = -1; + } + +@@ -177,20 +179,19 @@ int k = (this.field_219320_o[0] >> 8 & 15) + this.field_219319_n.field_77275_b * 16; BlockPos blockpos = new BlockPos(l, j1, k); this.func_219293_a(new SChangeBlockPacket(world, blockpos), false); @@ -29,12 +38,9 @@ - } else if (this.field_219321_p == 64) { + } else if (this.field_219321_p >= net.minecraftforge.common.ForgeConfig.SERVER.clumpingThreshold.get()) { this.func_219293_a(new SChunkDataPacket(p_219274_1_, this.field_219322_q), false); -+ //TODO: Fix Mojang's fuckup to modded by combining all TE data into the chunk data packet... seriously... packet size explosion! } else if (this.field_219321_p != 0) { this.func_219293_a(new SMultiBlockChangePacket(this.field_219321_p, this.field_219320_o, p_219274_1_), false); - -+ //} Keep this in the else until we figure out a fix for mojang's derpitude on the data packet so we don't double send crap. -+ //{// Forge: Send only the tile entities that are updated, Adding this brace lets us keep the indent and the patch small for(int i1 = 0; i1 < this.field_219321_p; ++i1) { int k1 = (this.field_219320_o[i1] >> 12 & 15) + this.field_219319_n.field_77276_a * 16; int l1 = this.field_219320_o[i1] & 255; diff --git a/src/main/java/net/minecraftforge/common/crafting/RecipeType.java b/src/main/java/net/minecraftforge/common/crafting/RecipeType.java deleted file mode 100644 index dbb296c85..000000000 --- a/src/main/java/net/minecraftforge/common/crafting/RecipeType.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Minecraft Forge - * Copyright (c) 2016-2019. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation version 2.1 - * of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -package net.minecraftforge.common.crafting; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Nullable; - -import org.apache.logging.log4j.LogManager; - -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.util.ResourceLocation; - -public class RecipeType -{ - private static final Map> TYPES = new HashMap<>(); - - protected final ResourceLocation id; - protected final Class baseClass; - - private RecipeType(ResourceLocation id, Class baseClass) { - this.id = id; - this.baseClass = baseClass; - } - - public ResourceLocation getId() - { - return id; - } - - /** - * @return The class that all recipes of this type must extend. - */ - public Class getBaseClass() - { - return baseClass; - } - - /** - * @param id The name of the recipe type. - * @param baseClass The base class of all recipes using this type. - * @return A recipe type, with the provided ID and base class, or null, if the entry exists and the base class is incorrect. - */ - @SuppressWarnings("unchecked") - @Nullable - public static RecipeType get(ResourceLocation id, Class baseClass) - { - RecipeType type = TYPES.get(id); - if(type == null) - { - type = new RecipeType<>(id, baseClass); - TYPES.put(id, type); - } - else if(type.getBaseClass() != baseClass) - { - LogManager.getLogger().error("Attempted to access RecipeType {} with the wrong base class. Provided {}, expected {}."); - return null; - } - return (RecipeType) type; - } -} diff --git a/src/main/java/net/minecraftforge/common/crafting/VanillaRecipeTypes.java b/src/main/java/net/minecraftforge/common/crafting/VanillaRecipeTypes.java deleted file mode 100644 index 84e1dbcb6..000000000 --- a/src/main/java/net/minecraftforge/common/crafting/VanillaRecipeTypes.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Minecraft Forge - * Copyright (c) 2016-2019. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation version 2.1 - * of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -package net.minecraftforge.common.crafting; - -import net.minecraft.item.crafting.FurnaceRecipe; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.util.ResourceLocation; - -public final class VanillaRecipeTypes -{ - /** - * Used for normal crafting. - */ - public static final RecipeType CRAFTING = RecipeType.get(new ResourceLocation("crafting"), IRecipe.class); - - /** - * Used for furnace recipes. - */ - public static final RecipeType SMELTING = RecipeType.get(new ResourceLocation("smelting"), FurnaceRecipe.class); - -}