diff --git a/src/main/java/mekanism/api/gas/GasNetwork.java b/src/main/java/mekanism/api/gas/GasNetwork.java index 8ad11c02f..207c587c8 100644 --- a/src/main/java/mekanism/api/gas/GasNetwork.java +++ b/src/main/java/mekanism/api/gas/GasNetwork.java @@ -8,10 +8,11 @@ import java.util.HashSet; import java.util.List; import java.util.Set; +import com.google.common.collect.Lists; + import mekanism.api.Coord4D; import mekanism.api.transmitters.DynamicNetwork; import mekanism.api.transmitters.IGridTransmitter; - import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.ForgeDirection; @@ -137,7 +138,7 @@ public class GasNetwork extends DynamicNetwork public int tickEmit(GasStack stack) { - List availableAcceptors = new ArrayList<>(); + List availableAcceptors = Lists.newArrayList(); availableAcceptors.addAll(getAcceptors(stack.getGas())); diff --git a/src/main/java/mekanism/api/transmitters/DynamicNetwork.java b/src/main/java/mekanism/api/transmitters/DynamicNetwork.java index e227637fb..d0320988a 100644 --- a/src/main/java/mekanism/api/transmitters/DynamicNetwork.java +++ b/src/main/java/mekanism/api/transmitters/DynamicNetwork.java @@ -9,10 +9,13 @@ import java.util.LinkedHashSet; import java.util.Map.Entry; import java.util.Set; +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; +import com.google.common.collect.Sets; + import mekanism.api.Coord4D; import mekanism.api.IClientTicker; import mekanism.api.Range4D; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; @@ -23,13 +26,13 @@ import cpw.mods.fml.common.eventhandler.Event; public abstract class DynamicNetwork> implements IClientTicker, INetworkDataHandler { - public LinkedHashSet> transmitters = new LinkedHashSet<>(); - public LinkedHashSet> transmittersToAdd = new LinkedHashSet<>(); - public LinkedHashSet> transmittersAdded = new LinkedHashSet<>(); + public LinkedHashSet> transmitters = Sets.newLinkedHashSet(); + public LinkedHashSet> transmittersToAdd = Sets.newLinkedHashSet(); + public LinkedHashSet> transmittersAdded = Sets.newLinkedHashSet(); public HashMap possibleAcceptors = new HashMap(); public HashMap> acceptorDirections = new HashMap>(); - public HashMap, EnumSet> changedAcceptors = new HashMap<>(); + public HashMap, EnumSet> changedAcceptors = Maps.newHashMap(); private Set updateQueue = new LinkedHashSet(); @@ -75,7 +78,7 @@ public abstract class DynamicNetwork> implemen updateCapacity(); clampBuffer(); - queueClientUpdate(new ArrayList<>(transmittersToAdd)); + queueClientUpdate(Lists.newArrayList(transmittersToAdd)); transmittersToAdd.clear(); } diff --git a/src/main/java/mekanism/api/transmitters/TransmitterNetworkRegistry.java b/src/main/java/mekanism/api/transmitters/TransmitterNetworkRegistry.java index e544c2a56..1e72b1de5 100644 --- a/src/main/java/mekanism/api/transmitters/TransmitterNetworkRegistry.java +++ b/src/main/java/mekanism/api/transmitters/TransmitterNetworkRegistry.java @@ -10,6 +10,9 @@ import net.minecraftforge.common.util.ForgeDirection; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import com.google.common.collect.Maps; +import com.google.common.collect.Sets; + import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent.Phase; @@ -21,11 +24,11 @@ public class TransmitterNetworkRegistry private static TransmitterNetworkRegistry INSTANCE = new TransmitterNetworkRegistry(); private static boolean loaderRegistered = false; - private HashSet networks = new HashSet<>(); - private HashSet networksToChange = new HashSet<>(); + private HashSet networks = Sets.newHashSet(); + private HashSet networksToChange = Sets.newHashSet(); - private HashSet invalidTransmitters = new HashSet<>(); - private HashMap orphanTransmitters = new HashMap<>(); + private HashSet invalidTransmitters = Sets.newHashSet(); + private HashMap orphanTransmitters = Maps.newHashMap(); private Logger logger = LogManager.getLogger("MekanismTransmitters"); @@ -151,7 +154,7 @@ public class TransmitterNetworkRegistry { if(startOrphan.isValid() && startOrphan.isOrphan()) { - OrphanPathFinder finder = new OrphanPathFinder<>(startOrphan); + OrphanPathFinder finder = new OrphanPathFinder(startOrphan); finder.start(); N network; @@ -225,10 +228,10 @@ public class TransmitterNetworkRegistry { public IGridTransmitter startPoint; - public HashSet iterated = new HashSet<>(); + public HashSet iterated = Sets.newHashSet(); - public HashSet> connectedTransmitters = new HashSet<>(); - public HashSet networksFound = new HashSet<>(); + public HashSet> connectedTransmitters = Sets.newHashSet(); + public HashSet networksFound = Sets.newHashSet(); public OrphanPathFinder(IGridTransmitter start) { diff --git a/src/main/java/mekanism/client/gui/GuiPasswordEnter.java b/src/main/java/mekanism/client/gui/GuiPasswordEnter.java index e2268ed32..f561849c0 100644 --- a/src/main/java/mekanism/client/gui/GuiPasswordEnter.java +++ b/src/main/java/mekanism/client/gui/GuiPasswordEnter.java @@ -161,6 +161,8 @@ public class GuiPasswordEnter extends GuiScreen @Override public void drawScreen(int mouseX, int mouseY, float partialTick) { + drawDefaultBackground(); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.GUI, "GuiPasswordEnter.png")); diff --git a/src/main/java/mekanism/client/gui/GuiPasswordModify.java b/src/main/java/mekanism/client/gui/GuiPasswordModify.java index 873ab6cde..2876146f5 100644 --- a/src/main/java/mekanism/client/gui/GuiPasswordModify.java +++ b/src/main/java/mekanism/client/gui/GuiPasswordModify.java @@ -187,6 +187,8 @@ public class GuiPasswordModify extends GuiScreen @Override public void drawScreen(int mouseX, int mouseY, float partialTick) { + drawDefaultBackground(); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.GUI, "GuiPasswordModify.png"));