Fix Redstone Torch memory leak (#3474)

This commit is contained in:
Ben Staddon 2016-12-01 00:26:38 +00:00 committed by LexManos
parent 96f88538d5
commit ef1efaffec

View file

@ -0,0 +1,11 @@
--- ../src-base/minecraft/net/minecraft/block/BlockRedstoneTorch.java
+++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneTorch.java
@@ -23,7 +23,7 @@
public class BlockRedstoneTorch extends BlockTorch
{
- private static final Map<World, List<BlockRedstoneTorch.Toggle>> field_150112_b = Maps.<World, List<BlockRedstoneTorch.Toggle>>newHashMap();
+ private static final Map<World, List<BlockRedstoneTorch.Toggle>> field_150112_b = new java.util.WeakHashMap<World, List<Toggle>>(); // FORGE - fix vanilla MC-101233
private final boolean field_150113_a;
private boolean func_176598_a(World p_176598_1_, BlockPos p_176598_2_, boolean p_176598_3_)