From 2e0222dd38faa697f5a05a9f0137e79a15ab2078 Mon Sep 17 00:00:00 2001 From: Robotia Date: Sun, 20 Mar 2016 01:48:50 -0400 Subject: [PATCH] Hopeful TFC Bug Fix + other stuff --- .../entity/EntityLivingBase.java.patch | 278 +++++++++++------- .../network/NetHandlerPlayServer.java.patch | 52 ++-- .../storage/ExtendedBlockStorage.java.patch | 14 +- 3 files changed, 206 insertions(+), 138 deletions(-) diff --git a/patches/net/minecraft/entity/EntityLivingBase.java.patch b/patches/net/minecraft/entity/EntityLivingBase.java.patch index f05811db..70866d15 100644 --- a/patches/net/minecraft/entity/EntityLivingBase.java.patch +++ b/patches/net/minecraft/entity/EntityLivingBase.java.patch @@ -278,16 +278,21 @@ this.dataWatcher.updateObject(6, Float.valueOf(MathHelper.clamp_float(p_70606_1_, 0.0F, this.getMaxHealth()))); } -@@ -757,7 +868,8 @@ +@@ -757,11 +868,12 @@ } else { - if ((p_70097_1_ == DamageSource.anvil || p_70097_1_ == DamageSource.fallingBlock) && this.getEquipmentInSlot(4) != null) + // CraftBukkit - Moved into damageEntity_CB(DamageSource, float) -+ if (false && (p_70097_1_ == DamageSource.anvil || p_70097_1_ == DamageSource.fallingBlock) && this.getEquipmentInSlot(4) != null) ++ /*if (false && (p_70097_1_ == DamageSource.anvil || p_70097_1_ == DamageSource.fallingBlock) && this.getEquipmentInSlot(4) != null) { this.getEquipmentInSlot(4).damageItem((int)(p_70097_2_ * 4.0F + this.rand.nextFloat() * p_70097_2_ * 2.0F), this); p_70097_2_ *= 0.75F; +- } ++ }*/ + + this.limbSwingAmount = 1.5F; + boolean flag = true; @@ -773,16 +885,27 @@ return false; } @@ -380,7 +385,7 @@ { i = (this.getActivePotionEffect(Potion.resistance).getAmplifier() + 1) * 5; j = 25 - i; -@@ -1122,26 +1271,161 @@ +@@ -1122,26 +1271,218 @@ } } @@ -392,9 +397,134 @@ + + // Cauldron end + ++ private EntityDamageEvent calculateDebuffsAndCallCB(final DamageSource damagesource, float f) ++ { ++ final boolean human = this instanceof EntityPlayer; ++ final float originalDamage = f; ++ // Calculates the damage debuff that occurs when an entity has something on his/her head ++ Function hardHat = new Function() { ++ @Override ++ public Double apply(Double f) ++ { ++ if ((damagesource == DamageSource.anvil || damagesource == DamageSource.fallingBlock) ++ && EntityLivingBase.this.getEquipmentInSlot(4) != null) ++ { ++ // Saves you from 1/4 damage ++ return -(f * 0.25F); ++ } ++ return -0.0; ++ } ++ }; ++ float hardHatModifier = hardHat.apply((double) f).floatValue(); ++ f += hardHatModifier; ++ ++ // Calculates the damage debuff that occurs when a player is blocking and can block the damage source ++ Function blocking = new Function() { ++ @Override ++ public Double apply(Double f) ++ { ++ if (human) ++ { ++ if (!damagesource.isUnblockable() && ((EntityPlayer) EntityLivingBase.this).isBlocking() && f > 0.0F) ++ { ++ //Reduce by a bit more than half ++ return -(f - ((1.0F + f) * 0.5F)); ++ } ++ } ++ return -0.0; ++ } ++ }; ++ float blockingModifier = blocking.apply((double) f).floatValue(); ++ f += blockingModifier; ++ ++ // Calculates the damage debuff that occurs when a player (or entity) is wearing armor...this is damn problematic ++ Function armor = new Function() { ++ @Override ++ public Double apply(Double f) ++ { ++ // Cauldron start - apply forge armor hook ++ if (human) ++ { ++ return -(f - ArmorProperties.ApplyArmor(EntityLivingBase.this, ((EntityPlayer) EntityLivingBase.this).inventory.armorInventory, ++ damagesource, f.floatValue(), false)); ++ } ++ // Cauldron end ++ // For non-players...the normal old calcs ++ return -(f - EntityLivingBase.this.applyArmorCalculations(damagesource, f.floatValue())); ++ } ++ }; ++ float armorModifier = armor.apply((double) f).floatValue(); ++ f += armorModifier; ++ ++ // Calculates potion effect debuffs ++ Function resistance = new Function() { ++ @Override ++ public Double apply(Double f) ++ { ++ if (!damagesource.isDamageAbsolute() && EntityLivingBase.this.isPotionActive(Potion.resistance) && damagesource != DamageSource.outOfWorld) ++ { ++ int i = (EntityLivingBase.this.getActivePotionEffect(Potion.resistance).getAmplifier() + 1) * 5; ++ int j = 25 - i; ++ float f1 = f.floatValue() * (float) j; ++ return -(f - (f1 / 25.0F)); ++ } ++ return -0.0; ++ } ++ }; ++ float resistanceModifier = resistance.apply((double) f).floatValue(); ++ f += resistanceModifier; ++ ++ // Calculates other potion effect debuffs ++ Function magic = new Function() { ++ @Override ++ public Double apply(Double f) ++ { ++ return -(f - EntityLivingBase.this.applyPotionDamageCalculations(damagesource, f.floatValue())); ++ } ++ }; ++ float magicModifier = magic.apply((double) f).floatValue(); ++ f += magicModifier; ++ ++ // Calculates "damage absorption ability" debuffs ++ Function absorption = new Function() { ++ @Override ++ public Double apply(Double f) ++ { ++ return -(Math.max(f - Math.max(f - EntityLivingBase.this.getAbsorptionAmount(), 0.0F), 0.0F)); ++ } ++ }; ++ float absorptionModifier = absorption.apply((double) f).floatValue(); ++ ++ // Here's why... (facepalm Bukkit) ++ EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, originalDamage, hardHatModifier, blockingModifier, ++ armorModifier, resistanceModifier, magicModifier, absorptionModifier, hardHat, blocking, armor, resistance, magic, absorption); ++ ++ return event; ++ } + // CraftBukkit start + protected boolean damageEntity_CB(final DamageSource damagesource, float f) + { // void -> boolean, add final ++ ++ /*if (!this.isEntityInvulnerable()) ++ { ++ f = ForgeHooks.onLivingHurt(this, damagesource, f); ++ if (f < 0) return true; ++ f = this.applyArmorCalculations(damagesource, f); ++ f = this.applyPotionDamageCalculations(damagesource, f); ++ float f1 = f; ++ f = Math.max(f - this.getAbsorptionAmount(), 0.0F); ++ this.setAbsorptionAmount(this.getAbsorptionAmount() - (f1 - f)); ++ ++ if (f != 0.0F) ++ { ++ float f2 = this.getHealth(); ++ this.setHealth(f2 - f); ++ this.func_110142_aN().func_94547_a(damagesource, f2, f); ++ this.setAbsorptionAmount(this.getAbsorptionAmount() - f); ++ } ++ }*/ ++ ++ if (!this.isEntityInvulnerable()) { - p_70665_2_ = ForgeHooks.onLivingHurt(this, p_70665_1_, p_70665_2_); @@ -404,127 +534,57 @@ - float f1 = p_70665_2_; - p_70665_2_ = Math.max(p_70665_2_ - this.getAbsorptionAmount(), 0.0F); - this.setAbsorptionAmount(this.getAbsorptionAmount() - (f1 - p_70665_2_)); ++ // Check if entity is a "human" aka player + final boolean human = this instanceof EntityPlayer; -+ float originalDamage = f; ++ final float originalDamage = f; + // Cauldron start - apply forge damage hook + f = ForgeHooks.onLivingHurt(this, damagesource, f); -+ if (f <= 0) return true; ++ // If the damage is negative return true ++ if (f < 0) return true; ++ // Thermos detect null damage ++ final boolean nulldmg = f == 0; + // Cauldron end -+ Function hardHat = new Function() { -+ @Override -+ public Double apply(Double f) -+ { -+ if ((damagesource == DamageSource.anvil || damagesource == DamageSource.fallingBlock) -+ && EntityLivingBase.this.getEquipmentInSlot(4) != null) -+ { -+ return -(f - (f * 0.75F)); -+ } -+ return -0.0; -+ } -+ }; ++ - if (p_70665_2_ != 0.0F) -+ float hardHatModifier = hardHat.apply((double) f).floatValue(); -+ f += hardHatModifier; -+ -+ Function blocking = new Function() { -+ @Override -+ public Double apply(Double f) -+ { -+ if (human) -+ { -+ if (!damagesource.isUnblockable() && ((EntityPlayer) EntityLivingBase.this).isBlocking() && f > 0.0F) -+ { -+ return -(f - ((1.0F + f) * 0.5F)); -+ } -+ } -+ return -0.0; -+ } -+ }; -+ float blockingModifier = blocking.apply((double) f).floatValue(); -+ f += blockingModifier; -+ -+ Function armor = new Function() { -+ @Override -+ public Double apply(Double f) -+ { -+ // Cauldron start - apply forge armor hook -+ if (human) -+ { -+ return -(f - ArmorProperties.ApplyArmor(EntityLivingBase.this, ((EntityPlayer) EntityLivingBase.this).inventory.armorInventory, -+ damagesource, f.floatValue(), false)); -+ } -+ // Cauldron end -+ return -(f - EntityLivingBase.this.applyArmorCalculations(damagesource, f.floatValue())); -+ } -+ }; -+ float armorModifier = armor.apply((double) f).floatValue(); -+ f += armorModifier; -+ -+ Function resistance = new Function() { -+ @Override -+ public Double apply(Double f) -+ { -+ if (!damagesource.isDamageAbsolute() && EntityLivingBase.this.isPotionActive(Potion.resistance) && damagesource != DamageSource.outOfWorld) -+ { -+ int i = (EntityLivingBase.this.getActivePotionEffect(Potion.resistance).getAmplifier() + 1) * 5; -+ int j = 25 - i; -+ float f1 = f.floatValue() * (float) j; -+ return -(f - (f1 / 25.0F)); -+ } -+ return -0.0; -+ } -+ }; -+ float resistanceModifier = resistance.apply((double) f).floatValue(); -+ f += resistanceModifier; -+ -+ Function magic = new Function() { -+ @Override -+ public Double apply(Double f) -+ { -+ return -(f - EntityLivingBase.this.applyPotionDamageCalculations(damagesource, f.floatValue())); -+ } -+ }; -+ float magicModifier = magic.apply((double) f).floatValue(); -+ f += magicModifier; -+ -+ Function absorption = new Function() { -+ @Override -+ public Double apply(Double f) -+ { -+ return -(Math.max(f - Math.max(f - EntityLivingBase.this.getAbsorptionAmount(), 0.0F), 0.0F)); -+ } -+ }; -+ float absorptionModifier = absorption.apply((double) f).floatValue(); -+ -+ EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, originalDamage, hardHatModifier, blockingModifier, -+ armorModifier, resistanceModifier, magicModifier, absorptionModifier, hardHat, blocking, armor, resistance, magic, absorption); -+ if (event.isCancelled()) ++ EntityDamageEvent ede = calculateDebuffsAndCallCB(damagesource, f); ++ ++ if (ede.isCancelled()) { ++ return false; ++ } ++ f = (float) ede.getFinalDamage(); ++ /*if (event.isCancelled()) ++ { + return false; + } + -+ f = (float) event.getFinalDamage(); -+ -+ // Apply damage to helmet ++ f = (float) event.getFinalDamage(); ++ */ ++ ++ if ( nulldmg ) return true; // Preclude any stupidity with null head items ++ ++ // Apply damage to helmet -- equivalent of Forge EntityLivingBase code line 760 + if ((damagesource == DamageSource.anvil || damagesource == DamageSource.fallingBlock) && this.getEquipmentInSlot(4) != null) + { -+ this.getEquipmentInSlot(4).damageItem((int) (event.getDamage() * 4.0F + this.rand.nextFloat() * event.getDamage() * 2.0F), this); ++ this.getEquipmentInSlot(4).damageItem((int) (ede.getDamage() * 4.0F + this.rand.nextFloat() * ede.getDamage() * 2.0F), this); + } + + // Apply damage to armor + if (!damagesource.isUnblockable()) + { -+ float armorDamage = (float) (event.getDamage() + event.getDamage(DamageModifier.BLOCKING) + event.getDamage(DamageModifier.HARD_HAT)); ++ float armorDamage = (float) (ede.getDamage() + ede.getDamage(DamageModifier.BLOCKING) + ede.getDamage(DamageModifier.HARD_HAT)); + if (human) { + EntityPlayer player = (EntityPlayer) this; + armorDamage = ArmorProperties.ApplyArmor(player, player.inventory.armorInventory, damagesource, armorDamage, true); + } else { + this.damageArmor(armorDamage); + } ++ ++ // Thermos AVOID DAMAGE if armor nullifies it (CraftBukkit failed to include this, this is why TFC bug happened) ++ if (armorDamage <= 0) return true; + } -+ -+ absorptionModifier = (float) -event.getDamage(DamageModifier.ABSORPTION); ++ float absorptionModifier = (float) -ede.getDamage(DamageModifier.ABSORPTION); + this.setAbsorptionAmount(Math.max(this.getAbsorptionAmount() - absorptionModifier, 0.0F)); + if (f != 0.0F) + { @@ -545,7 +605,9 @@ + return true; + } + // CraftBukkit end ++ // CraftBukkit start ...caught you! + this.setAbsorptionAmount(this.getAbsorptionAmount() - f); ++ // CraftBukkit end } + return true; // CraftBukkit } @@ -553,7 +615,7 @@ } public CombatTracker func_110142_aN() -@@ -1558,6 +1842,7 @@ +@@ -1558,6 +1899,7 @@ public void onUpdate() { if (ForgeHooks.onLivingUpdate(this)) return; @@ -561,7 +623,7 @@ super.onUpdate(); if (!this.worldObj.isRemote) -@@ -1608,7 +1893,9 @@ +@@ -1608,7 +1950,9 @@ } } @@ -571,7 +633,7 @@ double d0 = this.posX - this.prevPosX; double d1 = this.posZ - this.prevPosZ; float f = (float)(d0 * d0 + d1 * d1); -@@ -1621,7 +1908,8 @@ +@@ -1621,7 +1965,8 @@ { f3 = 1.0F; f2 = (float)Math.sqrt((double)f) * 3.0F; @@ -581,7 +643,7 @@ } if (this.swingProgress > 0.0F) -@@ -1682,6 +1970,7 @@ +@@ -1682,6 +2027,7 @@ this.worldObj.theProfiler.endSection(); this.field_70764_aw += f2; @@ -589,7 +651,7 @@ } protected float func_110146_f(float p_110146_1_, float p_110146_2_) -@@ -1757,6 +2046,7 @@ +@@ -1757,6 +2103,7 @@ this.motionZ = 0.0D; } @@ -597,7 +659,7 @@ this.worldObj.theProfiler.startSection("ai"); if (this.isMovementBlocked()) -@@ -1783,6 +2073,7 @@ +@@ -1783,6 +2130,7 @@ } } @@ -605,7 +667,7 @@ this.worldObj.theProfiler.endSection(); this.worldObj.theProfiler.startSection("jump"); -@@ -1811,13 +2102,17 @@ +@@ -1811,13 +2159,17 @@ this.moveStrafing *= 0.98F; this.moveForward *= 0.98F; this.randomYawVelocity *= 0.9F; @@ -623,7 +685,7 @@ } this.worldObj.theProfiler.endSection(); -@@ -1829,17 +2124,36 @@ +@@ -1829,17 +2181,36 @@ { List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.expand(0.20000000298023224D, 0.0D, 0.20000000298023224D)); diff --git a/patches/net/minecraft/network/NetHandlerPlayServer.java.patch b/patches/net/minecraft/network/NetHandlerPlayServer.java.patch index 9e6fa310..f2f7b969 100644 --- a/patches/net/minecraft/network/NetHandlerPlayServer.java.patch +++ b/patches/net/minecraft/network/NetHandlerPlayServer.java.patch @@ -641,7 +641,7 @@ { ChatComponentTranslation chatcomponenttranslation = new ChatComponentTranslation("chat.cannotSend", new Object[0]); chatcomponenttranslation.getChatStyle().setColor(EnumChatFormatting.RED); -@@ -708,51 +1059,385 @@ +@@ -708,51 +1059,393 @@ { if (!ChatAllowedCharacters.isAllowedCharacter(s.charAt(i))) { @@ -893,6 +893,14 @@ + org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.startTiming(); // Spigot + // CraftBukkit start + CraftPlayer player = this.getPlayerB(); ++ ++ // Thermos - block specified commands completely - no one will ever believe you. ++ if(net.minecraftforge.cauldron.configuration.CauldronConfig.instance.blockedCMDs.contains(p_147361_1_)) ++ { ++ org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.stopTiming(); // Spigot ++ return; ++ } ++ + PlayerCommandPreprocessEvent event = new PlayerCommandPreprocessEvent(player, p_147361_1_, new LazyPlayerSet()); + this.server.getPluginManager().callEvent(event); + @@ -1039,7 +1047,7 @@ if (p_147357_1_.func_149513_d() == 1) { this.playerEntity.setSneaking(true); -@@ -772,7 +1457,7 @@ +@@ -772,7 +1465,7 @@ else if (p_147357_1_.func_149513_d() == 3) { this.playerEntity.wakeUpPlayer(false, true, true); @@ -1048,7 +1056,7 @@ } else if (p_147357_1_.func_149513_d() == 6) { -@@ -789,8 +1474,20 @@ +@@ -789,8 +1482,20 @@ public void processUseEntity(C02PacketUseEntity p_147340_1_) { @@ -1070,7 +1078,7 @@ this.playerEntity.func_143004_u(); if (entity != null) -@@ -805,9 +1502,53 @@ +@@ -805,9 +1510,53 @@ if (this.playerEntity.getDistanceSqToEntity(entity) < d0) { @@ -1124,7 +1132,7 @@ } else if (p_147340_1_.func_149565_c() == C02PacketUseEntity.Action.ATTACK) { -@@ -819,6 +1560,13 @@ +@@ -819,6 +1568,13 @@ } this.playerEntity.attackTargetEntityWithCurrentItem(entity); @@ -1138,7 +1146,7 @@ } } } -@@ -834,8 +1582,19 @@ +@@ -834,8 +1590,19 @@ case 1: if (this.playerEntity.playerConqueredTheEnd) { @@ -1159,7 +1167,7 @@ else if (this.playerEntity.getServerForPlayer().getWorldInfo().isHardcoreModeEnabled()) { if (this.serverController.isSinglePlayer() && this.playerEntity.getCommandSenderName().equals(this.serverController.getServerOwner())) -@@ -871,17 +1630,461 @@ +@@ -871,17 +1638,461 @@ public void processCloseWindow(C0DPacketCloseWindow p_147356_1_) { @@ -1622,7 +1630,7 @@ if (ItemStack.areItemStacksEqual(p_147351_1_.func_149546_g(), itemstack)) { this.playerEntity.playerNetServerHandler.sendPacket(new S32PacketConfirmTransaction(p_147351_1_.func_149548_c(), p_147351_1_.func_149547_f(), true)); -@@ -903,6 +2106,12 @@ +@@ -903,6 +2114,12 @@ } this.playerEntity.sendContainerAndContentsToPlayer(this.playerEntity.openContainer, arraylist); @@ -1635,7 +1643,7 @@ } } } -@@ -925,9 +2134,61 @@ +@@ -925,9 +2142,61 @@ boolean flag = p_147344_1_.func_149627_c() < 0; ItemStack itemstack = p_147344_1_.func_149625_d(); boolean flag1 = p_147344_1_.func_149627_c() >= 1 && p_147344_1_.func_149627_c() < 36 + InventoryPlayer.getHotbarSize(); @@ -1698,7 +1706,7 @@ if (flag1 && flag2 && flag3) { if (itemstack == null) -@@ -956,6 +2217,11 @@ +@@ -956,6 +2225,11 @@ public void processConfirmTransaction(C0FPacketConfirmTransaction p_147339_1_) { @@ -1710,7 +1718,7 @@ Short oshort = (Short)this.field_147372_n.lookup(this.playerEntity.openContainer.windowId); if (oshort != null && p_147339_1_.func_149533_d() == oshort.shortValue() && this.playerEntity.openContainer.windowId == p_147339_1_.func_149532_c() && !this.playerEntity.openContainer.isPlayerNotUsingContainer(this.playerEntity)) -@@ -966,6 +2232,11 @@ +@@ -966,6 +2240,11 @@ public void processUpdateSign(C12PacketUpdateSign p_147343_1_) { @@ -1722,7 +1730,7 @@ this.playerEntity.func_143004_u(); WorldServer worldserver = this.serverController.worldServerForDimension(this.playerEntity.dimension); -@@ -980,6 +2251,7 @@ +@@ -980,6 +2259,7 @@ if (!tileentitysign.func_145914_a() || tileentitysign.func_145911_b() != this.playerEntity) { this.serverController.logWarning("Player " + this.playerEntity.getCommandSenderName() + " just tried to change non-editable sign"); @@ -1730,7 +1738,7 @@ return; } } -@@ -990,6 +2262,7 @@ +@@ -990,6 +2270,7 @@ for (j = 0; j < 4; ++j) { boolean flag = true; @@ -1738,7 +1746,7 @@ if (p_147343_1_.func_149589_f()[j].length() > 15) { -@@ -1018,7 +2291,29 @@ +@@ -1018,7 +2299,29 @@ int k = p_147343_1_.func_149586_d(); i = p_147343_1_.func_149585_e(); TileEntitySign tileentitysign1 = (TileEntitySign)tileentity; @@ -1769,7 +1777,7 @@ tileentitysign1.markDirty(); worldserver.markBlockForUpdate(j, k, i); } -@@ -1041,7 +2336,22 @@ +@@ -1041,7 +2344,22 @@ public void processPlayerAbilities(C13PacketPlayerAbilities p_147348_1_) { @@ -1793,7 +1801,7 @@ } public void processTabComplete(C14PacketTabComplete p_147341_1_) -@@ -1093,16 +2403,18 @@ +@@ -1093,16 +2411,18 @@ { if (itemstack.getItem() == Items.writable_book && itemstack.getItem() == itemstack1.getItem()) { @@ -1816,7 +1824,7 @@ } finally { -@@ -1135,19 +2447,18 @@ +@@ -1135,19 +2455,18 @@ if (itemstack.getItem() == Items.written_book && itemstack1.getItem() == Items.writable_book) { @@ -1842,7 +1850,7 @@ } finally { -@@ -1174,9 +2485,12 @@ +@@ -1174,9 +2493,12 @@ ((ContainerMerchant)container).setCurrentRecipeIndex(i); } } @@ -1856,7 +1864,7 @@ } } else if ("MC|AdvCdm".equals(p_147349_1_.func_149559_c())) -@@ -1222,9 +2536,12 @@ +@@ -1222,9 +2544,12 @@ this.playerEntity.addChatMessage(new ChatComponentTranslation("advMode.setCommand.success", new Object[] {s1})); } } @@ -1871,7 +1879,7 @@ } finally { -@@ -1257,9 +2574,12 @@ +@@ -1257,9 +2582,12 @@ tileentitybeacon.markDirty(); } } @@ -1886,7 +1894,7 @@ } } } -@@ -1281,6 +2601,13 @@ +@@ -1281,6 +2609,13 @@ containerrepair.updateItemName(""); } } @@ -1900,7 +1908,7 @@ } } -@@ -1292,6 +2619,21 @@ +@@ -1292,6 +2627,21 @@ } } diff --git a/patches/net/minecraft/world/chunk/storage/ExtendedBlockStorage.java.patch b/patches/net/minecraft/world/chunk/storage/ExtendedBlockStorage.java.patch index b25836fd..6d872c51 100644 --- a/patches/net/minecraft/world/chunk/storage/ExtendedBlockStorage.java.patch +++ b/patches/net/minecraft/world/chunk/storage/ExtendedBlockStorage.java.patch @@ -30,21 +30,19 @@ public Block getBlockByExtId(int p_150819_1_, int p_150819_2_, int p_150819_3_) { int l = this.blockLSBArray[p_150819_2_ << 8 | p_150819_3_ << 4 | p_150819_1_] & 255; -@@ -39,7 +62,12 @@ +@@ -39,7 +62,11 @@ { l |= this.blockMSBArray.get(p_150819_1_, p_150819_2_, p_150819_3_) << 8; } -- + -+ for(int IDTOBAN : net.minecraftforge.cauldron.configuration.CauldronConfig.instance.instantRemove.getValue()) -+ { -+ if ( l == IDTOBAN) return Blocks.air; -+ } ++ // Thermos instant delete block IDs which are banned ++ if (net.minecraftforge.cauldron.configuration.CauldronConfig.instance.instantRemove.contains(l)) return Blocks.air; + + return Block.getBlockById(l); } -@@ -139,6 +167,106 @@ +@@ -139,6 +166,106 @@ public void removeInvalidBlocks() { @@ -151,7 +149,7 @@ this.blockRefCount = 0; this.tickRefCount = 0; -@@ -197,29 +325,72 @@ +@@ -197,29 +324,72 @@ public void setBlockLSBArray(byte[] p_76664_1_) {