Small Cleanup (#68)

Co-authored-by: Martin Robertz <[email protected]>
This commit is contained in:
glowredmanandMartin Robertz authored and GitHub committed 2025-01-13 00:13:56 -06:00
1 parent f5a21fe41e
commit e8fb04df37
196 files changed
+887 -543

No files matched your search

@@ -46,12 +46,12 @@ import cpw.mods.fml.common.gameevent.TickEvent.Type;
public class BlockPistonRelay extends BlockMod implements IWandable, ILexiconable {
public static Map<String, String> playerPositions = new HashMap();
public static Map<String, String> mappedPositions = new HashMap();
public static Map<String, String> playerPositions = new HashMap<>();
public static Map<String, String> mappedPositions = new HashMap<>();
static List<String> removeThese = new ArrayList();
static List<String> checkedCoords = new ArrayList();
static Map<String, Integer> coordsToCheck = new HashMap();
static List<String> removeThese = new ArrayList<>();
static List<String> checkedCoords = new ArrayList<>();
static Map<String, Integer> coordsToCheck = new HashMap<>();
public BlockPistonRelay() {
super(Material.gourd);
@@ -197,7 +197,7 @@ public class BlockPistonRelay extends BlockMod implements IWandable, ILexiconabl
@SubscribeEvent
public void tickEnd(TickEvent event) {
if(event.type == Type.SERVER && event.phase == Phase.END) {
List<String> coordsToCheckCopy = new ArrayList(coordsToCheck.keySet());
List<String> coordsToCheckCopy = new ArrayList<>(coordsToCheck.keySet());
for(String s : coordsToCheckCopy) {
decrCoords(s);
if(checkedCoords.contains(s))
@@ -259,7 +259,7 @@ public class BlockPistonRelay extends BlockMod implements IWandable, ILexiconabl
}
// ConcurrentModificationException failsafe
ArrayList<String> remove = new ArrayList(removeThese);
ArrayList<String> remove = new ArrayList<>(removeThese);
for(String s : remove) {
coordsToCheck.remove(s);
if(checkedCoords.contains(s))