Merge branch 'master' into configurable-anchor-snap-angle

This commit is contained in:
Wilhelm Schuster authored and GitHub committed 2026-07-22 13:45:25 +02:00
commit 7c0528ffe1
286 files changed
+1022 -828

No files matched your search

+20 -18
View File
@@ -1,26 +1,27 @@
// Add your dependencies here
dependencies {
api('com.github.GTNewHorizons:EnderCore:0.5.7:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:ForestryMC:4.11.4:dev')
compileOnly('com.github.GTNewHorizons:NotEnoughItems:2.8.60-GTNH:dev')
api("com.github.GTNewHorizons:GTNHLib:0.9.10:dev")
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.55:dev')
api('com.github.GTNewHorizons:EnderCore:0.5.14:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:ForestryMC:4.11.30:dev')
compileOnly('com.github.GTNewHorizons:NotEnoughItems:2.8.110-GTNH:dev')
api("com.github.GTNewHorizons:GTNHLib:0.11.30:dev")
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.61:dev')
api('curse.maven:cofh-lib-220333:2388748') // https://www.curseforge.com/minecraft/mc-mods/cofh-lib/files/2388748
shadowImplementation('cglib:cglib-nodep:3.3.0')
api("com.github.GTNewHorizons:TinkersConstruct:1.14.27-GTNH:dev")
api("com.github.GTNewHorizons:TinkersConstruct:1.14.93-GTNH:dev")
devOnlyNonPublishable('com.github.GTNewHorizons:waila:1.19.22:dev') {transitive = false}
devOnlyNonPublishable('com.github.GTNewHorizons:waila:1.19.30:dev') {transitive = false}
compileOnly('ganymedes01.etfuturum:Et-Futurum-Requiem:2.6.48-GTNH:dev') {transitive = false}
runtimeOnlyNonPublishable('com.github.GTNewHorizons:WAILAPlugins:0.7.2:dev') {transitive = false}
compileOnly("com.github.GTNewHorizons:Backhand:1.8.4:dev") { transitive = false }
compileOnly('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-812-GTNH:api') {transitive = false}
compileOnly('com.github.GTNewHorizons:Baubles-Expanded:2.2.6-GTNH:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.52.261:dev') {transitive = false}
compileOnly("com.github.GTNewHorizons:ModularUI2:2.3.37-1.7.10:dev") {transitive = false}
compileOnly('com.github.GTNewHorizons:Railcraft:9.17.17:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:StorageDrawers:2.2.9-GTNH:api') {transitive = false}
compileOnly('com.github.GTNewHorizons:Chisel:2.17.14-GTNH:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:OpenComputers:1.12.16-GTNH:api') {transitive = false}
compileOnly("com.github.GTNewHorizons:Backhand:1.8.11:dev") { transitive = false }
compileOnly('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-997-GTNH:api') {transitive = false}
compileOnly('com.github.GTNewHorizons:Baubles-Expanded:2.2.21-GTNH:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.54.14:dev') {transitive = false}
compileOnly("com.github.GTNewHorizons:ModularUI2:2.3.79-1.7.10:dev") {transitive = false}
compileOnly('com.github.GTNewHorizons:Railcraft:9.17.28:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:StorageDrawers:2.2.26-GTNH:api') {transitive = false}
compileOnly('com.github.GTNewHorizons:Chisel:2.17.26-GTNH:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:OpenComputers:1.12.48-GTNH:api') {transitive = false}
compileOnly('curse.maven:minefactory-reloaded-66672:2366150') // https://www.curseforge.com/minecraft/mc-mods/minefactory-reloaded/files/2366150
compileOnly('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
compileOnly('curse.maven:ee3-65509:2305023') // https://www.curseforge.com/minecraft/mc-mods/ee3/files/2305023
@@ -28,6 +29,7 @@ dependencies {
compileOnly(rfg.deobf('curse.maven:mekanism-268560:2475797')) // https://www.curseforge.com/minecraft/mc-mods/mekanism/files/2475797
compileOnly(rfg.deobf('maven.modrinth:immibis-microblocks:59.1.2')) // https://modrinth.com/mod/immibis-microblocks/version/59.1.2
compileOnlyApi('com.github.GTNewHorizons:Angelica:1.0.0-beta66a:api') {transitive = false}
compileOnly("com.github.GTNewHorizons:Hodgepodge:2.7.58:dev")
compileOnlyApi('com.github.GTNewHorizons:Angelica:2.1.49:api') {transitive = false}
compileOnly("com.github.GTNewHorizons:Hodgepodge:2.7.166:dev")
compileOnly('curse.maven:automagy-222153:2285272')
}
+10 -10
View File
@@ -1,12 +1,12 @@
#This file is generated by updateDaemonJvm
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/df211d3c3eefdc408b462041881bc575/redirect
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/b41931cf1e70bc8e08d7dd19c343ef00/redirect
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/df211d3c3eefdc408b462041881bc575/redirect
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/b41931cf1e70bc8e08d7dd19c343ef00/redirect
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/46949723aaa20c7b64d7ecfed7207034/redirect
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/d6690dfd71c4c91e08577437b5b2beb0/redirect
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/df211d3c3eefdc408b462041881bc575/redirect
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/b41931cf1e70bc8e08d7dd19c343ef00/redirect
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/3cd7045fca9a72cd9bc7d14a385e594c/redirect
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/552c7bffe0370c66410a51c55985b511/redirect
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/cf726b4a1c84b50457225f9bba6d7650/redirect
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/cf726b4a1c84b50457225f9bba6d7650/redirect
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c2dd35c9d0aaf0ba6ad0791320f99dfc/redirect
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/e5810bd7fd1f8a586644409d395a7e55/redirect
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/cf726b4a1c84b50457225f9bba6d7650/redirect
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/7b3c4877c0749019e6805bb61e421497/redirect
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/d76df094a9cbbabd3b08251f9e61444a/redirect
toolchainVersion=25
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Vendored
+1 -1
View File
@@ -57,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/b631911858264c0b6e4d6603d677ff5218766cee/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
+1 -1
View File
@@ -17,7 +17,7 @@ pluginManagement {
}
plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.19'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.26'
}
@@ -262,7 +262,7 @@ public class ClientProxy extends CommonProxy {
BlockObeliskAbstract.defaultObeliskRenderId = RenderingRegistry.getNextAvailableRenderId();
RenderingRegistry.registerBlockHandler(defaultObeliskRenderer);
ObeliskSpecialRenderer<TileAttractor> attRen = new ObeliskSpecialRenderer<TileAttractor>(
ObeliskSpecialRenderer<TileAttractor> attRen = new ObeliskSpecialRenderer<>(
new ItemStack(EnderIO.itemMaterial, 1, Material.ATTRACTOR_CRYSTAL.ordinal()),
defaultObeliskRenderer);
ClientRegistry.bindTileEntitySpecialRenderer(TileAttractor.class, attRen);
@@ -272,7 +272,7 @@ public class ClientProxy extends CommonProxy {
ClientRegistry.bindTileEntitySpecialRenderer(TileAversionObelisk.class, sgr);
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(EnderIO.blockSpawnGuard), sgr);
ObeliskSpecialRenderer<TileExperienceObelisk> eor = new ObeliskSpecialRenderer<TileExperienceObelisk>(
ObeliskSpecialRenderer<TileExperienceObelisk> eor = new ObeliskSpecialRenderer<>(
new ItemStack(EnderIO.itemXpTransfer),
defaultObeliskRenderer);
ClientRegistry.bindTileEntitySpecialRenderer(TileExperienceObelisk.class, eor);
@@ -285,7 +285,7 @@ public class ClientProxy extends CommonProxy {
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(EnderIO.blockWeatherObelisk), twr);
BlockCombustionGenerator.renderId = RenderingRegistry.getNextAvailableRenderId();
TechneMachineRenderer<TileCombustionGenerator> cr = new TechneMachineRenderer<TileCombustionGenerator>(
TechneMachineRenderer<TileCombustionGenerator> cr = new TechneMachineRenderer<>(
EnderIO.blockCombustionGenerator,
"models/combustionGen");
RenderingRegistry.registerBlockHandler(cr);
@@ -301,7 +301,7 @@ public class ClientProxy extends CommonProxy {
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(EnderIO.blockKillerJoe), kjr);
BlockVat.renderId = RenderingRegistry.getNextAvailableRenderId();
TechneMachineRenderer<TileVat> vr = new TechneMachineRenderer<TileVat>(EnderIO.blockVat, "models/vat");
TechneMachineRenderer<TileVat> vr = new TechneMachineRenderer<>(EnderIO.blockVat, "models/vat");
RenderingRegistry.registerBlockHandler(vr);
FusedQuartzFrameRenderer fqfr = new FusedQuartzFrameRenderer();
@@ -184,7 +184,7 @@ import crazypants.util.EE3Util;
@Mod(modid = MODID, name = MOD_NAME, version = VERSION, dependencies = """
required-after:CoFHLib@[1.7.10R1.0.3B3,);\
required-after:endercore;\
required-after:gtnhlib@[0.2.10,);\
required-after:gtnhlib@[0.9.47,);\
after:MineFactoryReloaded;\
after:Forestry;\
after:Waila@[1.5.8,);\
@@ -214,7 +214,9 @@ public class EnderIO {
public static final boolean hasLwjgl3 = Loader.isModLoaded("lwjgl3ify");
public static final boolean hasGT5 = Loader.isModLoaded("gregtech") && !Loader.isModLoaded("gregapi");
public static final boolean hasHP = Loader.isModLoaded("hodgepodge");
public static final boolean hasEtFuturum = Loader.isModLoaded("etfuturum");
public static final boolean hasWailaPlugins = Loader.isModLoaded("wailaplugins");
public static final boolean hasAutomagy = Loader.isModLoaded("Automagy");
// Materials
public static ItemCapacitor itemBasicCapacitor;
@@ -60,7 +60,7 @@ public class GuiHandler implements IGuiHandler {
public static final int GUI_ID_CAP_BANK = 142; // leave room for more machines
protected final Map<Integer, IGuiHandler> guiHandlers = new HashMap<Integer, IGuiHandler>();
protected final Map<Integer, IGuiHandler> guiHandlers = new HashMap<>();
public void registerGuiHandler(int id, IGuiHandler handler) {
guiHandlers.put(id, handler);
@@ -16,12 +16,9 @@ import crazypants.enderio.config.Config;
public class ContainerDarkSteelAnvil extends ContainerRepair {
private int x, y, z;
private final Field _outputSlot = ReflectionHelper.findField(ContainerRepair.class, "outputSlot", "field_82852_f");
private final Field _inputSlots = ReflectionHelper.findField(ContainerRepair.class, "inputSlots", "field_82853_g");
private final Field _materialCost = ReflectionHelper
.findField(ContainerRepair.class, "materialCost", "stackSizeToBeUsedInRepair", "field_82856_l");
private final int x;
private final int y;
private final int z;
public ContainerDarkSteelAnvil(InventoryPlayer playerInv, final World world, final int x, final int y, final int z,
EntityPlayer player) {
@@ -31,8 +28,12 @@ public class ContainerDarkSteelAnvil extends ContainerRepair {
final int materialCost;
try {
Field _outputSlot = ReflectionHelper.findField(ContainerRepair.class, "outputSlot", "field_82852_f");
outputSlot = (IInventory) _outputSlot.get(this);
Field _inputSlots = ReflectionHelper.findField(ContainerRepair.class, "inputSlots", "field_82853_g");
inputSlots = (IInventory) _inputSlots.get(this);
Field _materialCost = ReflectionHelper
.findField(ContainerRepair.class, "materialCost", "stackSizeToBeUsedInRepair", "field_82856_l");
materialCost = _materialCost.getInt(this);
} catch (Exception e) {
throw new RuntimeException(e);
@@ -73,8 +73,7 @@ public abstract class AbstractConduit implements IConduit {
protected List<CollidableComponent> collidables;
protected final EnumMap<ForgeDirection, ConnectionMode> conectionModes = new EnumMap<ForgeDirection, ConnectionMode>(
ForgeDirection.class);
protected final EnumMap<ForgeDirection, ConnectionMode> conectionModes = new EnumMap<>(ForgeDirection.class);
protected boolean collidablesDirty = true;
@@ -454,7 +453,7 @@ public abstract class AbstractConduit implements IConduit {
needUpdateConnections = false;
boolean externalConnectionsChanged = false;
List<ForgeDirection> copy = new ArrayList<ForgeDirection>(externalConnections);
List<ForgeDirection> copy = new ArrayList<>(externalConnections);
// remove any no longer valid connections
for (ForgeDirection dir : copy) {
if (!canConnectToExternal(dir, false)) {
@@ -634,7 +633,7 @@ public abstract class AbstractConduit implements IConduit {
return collidables;
}
List<CollidableComponent> result = new ArrayList<CollidableComponent>();
List<CollidableComponent> result = new ArrayList<>();
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
Collection<CollidableComponent> col = getCollidables(dir);
if (col != null) {
@@ -12,7 +12,7 @@ import crazypants.enderio.EnderIO;
// I=base type, I is the base class of the implementations accepted by the network
public abstract class AbstractConduitNetwork<T extends IConduit, I extends T> {
protected final List<I> conduits = new ArrayList<I>();
protected final List<I> conduits = new ArrayList<>();
protected final Class<I> implClass;
protected final Class<T> baseConduitClass;
@@ -480,7 +480,7 @@ public class BlockConduitBundle extends BlockEio
IConduitBundle te = (IConduitBundle) rte;
boolean breakBlock = true;
List<ItemStack> drop = new ArrayList<ItemStack>();
List<ItemStack> drop = new ArrayList<>();
if (ConduitUtil.isSolidFacadeRendered(te, player)) {
breakBlock = false;
ItemStack fac = new ItemStack(EnderIO.itemConduitFacade, 1, te.getFacadeType().ordinal());
@@ -538,7 +538,7 @@ public class BlockConduitBundle extends BlockEio
if (type == null) {
// broke a conector so drop any conduits with no connections as there
// is no other way to remove these
List<IConduit> cons = new ArrayList<IConduit>(te.getConduits());
List<IConduit> cons = new ArrayList<>(te.getConduits());
boolean droppedUnconected = false;
for (IConduit con : cons) {
if (con.getConduitConnections().isEmpty() && con.getExternalConnections().isEmpty()
@@ -1035,7 +1035,7 @@ public class BlockConduitBundle extends BlockEio
return null;
}
IConduitBundle bundle = (IConduitBundle) te;
List<RaytraceResult> hits = new ArrayList<RaytraceResult>();
List<RaytraceResult> hits = new ArrayList<>();
if (player == null) {
player = EnderIO.proxy.getClientPlayer();
@@ -1052,8 +1052,7 @@ public class BlockConduitBundle extends BlockEio
}
} else {
ConduitDisplayMode mode = ConduitUtil.getDisplayMode(player);
Collection<CollidableComponent> components = new ArrayList<CollidableComponent>(
bundle.getCollidableComponents());
Collection<CollidableComponent> components = new ArrayList<>(bundle.getCollidableComponents());
for (CollidableComponent component : components) {
if ((component.conduitType != null || mode == ConduitDisplayMode.ALL)
&& ConduitUtil.renderConduit(player, component.conduitType)) {
@@ -196,7 +196,7 @@ public class ConduitDisplayMode {
}
public static Iterable<ConduitDisplayMode> getRenderableModes() {
return FluentIterable.from(registrar).filter(new Predicate<ConduitDisplayMode>() {
return FluentIterable.from(registrar).filter(new Predicate<>() {
@Override
public boolean apply(ConduitDisplayMode input) {
@@ -254,7 +254,7 @@ public class ConduitUtil {
if (!(te instanceof IConduitBundle)) {
return Collections.emptyList();
}
List<T> result = new ArrayList<T>();
List<T> result = new ArrayList<>();
IConduitBundle root = (IConduitBundle) te;
T con = root.getConduit(type);
if (con != null) {
@@ -363,7 +363,7 @@ public class ConduitUtil {
return;
}
IConduitBundle cb = (IConduitBundle) te;
Set<ForgeDirection> cons = new HashSet<ForgeDirection>();
Set<ForgeDirection> cons = new HashSet<>();
boolean hasInsulated = false;
for (IConduit con : cb.getConduits()) {
cons.addAll(con.getExternalConnections());
@@ -33,7 +33,7 @@ public class RaytraceResult {
if (origin == null || toSort == null) {
return;
}
Collections.sort(toSort, new Comparator<RaytraceResult>() {
Collections.sort(toSort, new Comparator<>() {
@Override
public int compare(RaytraceResult o1, RaytraceResult o2) {
@@ -564,7 +564,7 @@ public class TileConduitBundle extends TileEntityEio implements IConduitBundle {
cachedConnectors.clear();
// TODO: What an unholly mess! (and it doesn't even work correctly...)
List<CollidableComponent> coreBounds = new ArrayList<CollidableComponent>();
List<CollidableComponent> coreBounds = new ArrayList<>();
for (IConduit con : conduits) {
addConduitCores(coreBounds, con);
}
@@ -572,13 +572,13 @@ public class TileConduitBundle extends TileEntityEio implements IConduitBundle {
result.addAll(coreBounds);
// 1st algorithm
List<CollidableComponent> conduitsBounds = new ArrayList<CollidableComponent>();
List<CollidableComponent> conduitsBounds = new ArrayList<>();
for (IConduit con : conduits) {
conduitsBounds.addAll(con.getCollidableComponents());
addConduitCores(conduitsBounds, con);
}
Set<Class<IConduit>> collidingTypes = new HashSet<Class<IConduit>>();
Set<Class<IConduit>> collidingTypes = new HashSet<>();
for (CollidableComponent conCC : conduitsBounds) {
for (CollidableComponent innerCC : conduitsBounds) {
if (!InsulatedRedstoneConduit.COLOR_CONTROLLER_ID.equals(innerCC.data)
@@ -592,7 +592,7 @@ public class TileConduitBundle extends TileEntityEio implements IConduitBundle {
// TODO: Remove the core geometries covered up by this as no point in rendering these
if (!collidingTypes.isEmpty()) {
List<CollidableComponent> colCores = new ArrayList<CollidableComponent>();
List<CollidableComponent> colCores = new ArrayList<>();
for (Class<IConduit> c : collidingTypes) {
IConduit con = getConduit(c);
if (con != null) {
@@ -624,7 +624,7 @@ public class TileConduitBundle extends TileEntityEio implements IConduitBundle {
for (IConduit con : conduits) {
if (con.hasConnections()) {
List<CollidableComponent> cores = new ArrayList<CollidableComponent>();
List<CollidableComponent> cores = new ArrayList<>();
addConduitCores(cores, con);
if (cores.size() > 1) {
BoundingBox bb = cores.get(0).bound;
@@ -140,7 +140,7 @@ public class BlockConduitFacade extends BlockEio implements IPaintedBlock, Clone
return new Mimic(id, meta);
}
class Mimic {
static class Mimic {
int meta;
Block block;
@@ -25,12 +25,10 @@ import mekanism.api.gas.IGasHandler;
public abstract class AbstractGasConduit extends AbstractConduit implements IGasConduit {
protected final EnumMap<ForgeDirection, RedstoneControlMode> extractionModes = new EnumMap<ForgeDirection, RedstoneControlMode>(
ForgeDirection.class);
protected final EnumMap<ForgeDirection, DyeColor> extractionColors = new EnumMap<ForgeDirection, DyeColor>(
ForgeDirection.class);
protected final EnumMap<ForgeDirection, RedstoneControlMode> extractionModes = new EnumMap<>(ForgeDirection.class);
protected final EnumMap<ForgeDirection, DyeColor> extractionColors = new EnumMap<>(ForgeDirection.class);
protected final Map<ForgeDirection, Integer> externalRedstoneSignals = new HashMap<ForgeDirection, Integer>();
protected final Map<ForgeDirection, Integer> externalRedstoneSignals = new HashMap<>();
protected boolean redstoneStateDirty = true;
@Method(modid = GasUtil.API_NAME)
@@ -18,7 +18,7 @@ public class GasConduitNetwork extends AbstractGasTankConduitNetwork<GasConduit>
private final ConduitGasTank tank = new ConduitGasTank(0);
private final Set<GasOutput> outputs = new HashSet<GasOutput>();
private final Set<GasOutput> outputs = new HashSet<>();
private Iterator<GasOutput> outputIterator;
@@ -21,7 +21,7 @@ import crazypants.enderio.gui.IconEIO;
public class ItemGasConduit extends AbstractItemConduit implements IAdvancedTooltipProvider {
private static ItemConduitSubtype[] subtypes = new ItemConduitSubtype[] {
private static final ItemConduitSubtype[] subtypes = new ItemConduitSubtype[] {
new ItemConduitSubtype(ModObject.itemGasConduit.name(), "enderio:itemGasConduit"), };
public static ItemGasConduit create() {
@@ -12,7 +12,7 @@ public class CollidableCache {
public static final CollidableCache instance = new CollidableCache();
private final Map<CacheKey, Collection<CollidableComponent>> cache = new HashMap<CollidableCache.CacheKey, Collection<CollidableComponent>>();
private final Map<CacheKey, Collection<CollidableComponent>> cache = new HashMap<>();
public CacheKey createKey(Class<? extends IConduit> baseType, Offset offset, ForgeDirection dir, boolean isStub) {
return new CacheKey(baseType, offset, dir, isStub);
@@ -33,7 +33,7 @@ public class ConduitGeometryUtil {
public static final float CONNECTOR_DEPTH = 0.05f;
private static Map<ForgeDirection, BoundingBox[]> EXTERNAL_CONNECTOR_BOUNDS = new HashMap<ForgeDirection, BoundingBox[]>();
private static final Map<ForgeDirection, BoundingBox[]> EXTERNAL_CONNECTOR_BOUNDS = new HashMap<>();
static {
setupBounds(0.5f);
@@ -106,9 +106,9 @@ public class ConduitGeometryUtil {
return val < 0 ? 1 + val : val;
}
private Map<GeometryKey, BoundingBox> boundsCache = new HashMap<GeometryKey, BoundingBox>();
private final Map<GeometryKey, BoundingBox> boundsCache = new HashMap<>();
private EnumMap<ConduitConnectorType, BoundingBox> connectorBounds = new EnumMap<ConduitConnectorType, BoundingBox>(
private final EnumMap<ConduitConnectorType, BoundingBox> connectorBounds = new EnumMap<>(
ConduitConnectorType.class);
private ConduitGeometryUtil() {}
@@ -21,8 +21,7 @@ import com.enderio.core.common.vecmath.Vertex;
public class ConnectionModeGeometry {
private static final EnumMap<ForgeDirection, List<Vertex>> VERTS = new EnumMap<ForgeDirection, List<Vertex>>(
ForgeDirection.class);
private static final EnumMap<ForgeDirection, List<Vertex>> VERTS = new EnumMap<>(ForgeDirection.class);
static {
float scale = 0.9f;
@@ -84,7 +83,7 @@ public class ConnectionModeGeometry {
}
private static List<Vertex> createVerticesForDir(BoundingBox refBB, VertexTransform xform) {
List<Vertex> result = new ArrayList<Vertex>(24);
List<Vertex> result = new ArrayList<>(24);
for (ForgeDirection face : ForgeDirection.VALID_DIRECTIONS) {
result.addAll(refBB.getCornersWithUvForFace(face));
}
@@ -16,7 +16,7 @@ import crazypants.enderio.conduit.redstone.IRedstoneConduit;
public class Offsets {
private static Map<OffsetKey, Offset> OFFSETS = new HashMap<OffsetKey, Offset>();
private static final Map<OffsetKey, Offset> OFFSETS = new HashMap<>();
static {
OFFSETS.put(key(IRedstoneConduit.class, Axis.NONE), Offset.UP);
@@ -31,7 +31,7 @@ public class BaseSettingsPanel implements ITabPanel {
static final int ID_EXTRACT_ENABLED = 328;
protected static final int ID_INSERT_FILTER_OPTIONS = 329;
protected static final int ID_EXTRACT_FILTER_OPTIONS = 330;
protected final int ID_ENABLED = 331;
protected static final int ID_ENABLED = 331;
protected final @Nonnull IWidgetIcon icon;
protected final @Nonnull GuiExternalConnection gui;
@@ -41,8 +41,8 @@ public class BaseSettingsPanel implements ITabPanel {
protected ConnectionMode oldConnectionMode;
private @Nonnull String inputHeading;
private @Nonnull String outputHeading;
private final @Nonnull String inputHeading;
private final @Nonnull String outputHeading;
private boolean insertEnabled = false;
private boolean extractEnabled = false;
@@ -142,7 +142,7 @@ public class BaseSettingsPanel implements ITabPanel {
}
};
ArrayList<String> funcUpgradeTips = new ArrayList<String>();
ArrayList<String> funcUpgradeTips = new ArrayList<>();
SpecialTooltipHandler.addTooltipFromResources(funcUpgradeTips, "enderio.gui.conduit.item.functionupgrade.line");
for (FunctionUpgrade upgrade : FunctionUpgrade.values()) {
funcUpgradeTips.add(EnderIO.lang.localizeExact(upgrade.unlocName.concat(".name")));
@@ -28,13 +28,13 @@ public class GasSettings extends BaseSettingsPanel {
private static final int ID_COLOR_BUTTON = GuiExternalConnection.nextButtonId();
private RedstoneModeButton rsB;
private final RedstoneModeButton rsB;
private ColorButton colorB;
private final ColorButton colorB;
private String autoExtractStr = EnderIO.lang.localize("gui.conduit.gas.autoExtract");
private final String autoExtractStr = EnderIO.lang.localize("gui.conduit.gas.autoExtract");
private IGasConduit conduit;
private final IGasConduit conduit;
protected GasSettings(final GuiExternalConnection gui, IConduit con) {
super(IconEIO.WRENCH_OVERLAY_GAS, EnderIO.lang.localize("itemGasConduit.name"), gui, con);
@@ -50,7 +50,7 @@ public class GuiExternalConnection extends GuiContainerBaseEIO {
return id;
}
private static final Map<Class<? extends IConduit>, Integer> TAB_ORDER = new HashMap<Class<? extends IConduit>, Integer>();
private static final Map<Class<? extends IConduit>, Integer> TAB_ORDER = new HashMap<>();
static {
TAB_ORDER.put(IItemConduit.class, 0);
@@ -66,11 +66,11 @@ public class GuiExternalConnection extends GuiContainerBaseEIO {
final IConduitBundle bundle;
private final ForgeDirection dir;
private final List<IConduit> conduits = new ArrayList<IConduit>();
private final List<ITabPanel> tabs = new ArrayList<ITabPanel>();
private final List<IConduit> conduits = new ArrayList<>();
private final List<ITabPanel> tabs = new ArrayList<>();
private int activeTab = 0;
private int tabYOffset = 4;
private static final int tabYOffset = 4;
private final ExternalConnectionContainer container;
@@ -86,8 +86,8 @@ public class GuiExternalConnection extends GuiContainerBaseEIO {
container.setInoutSlotsVisible(false, false);
List<IConduit> cons = new ArrayList<IConduit>(bundle.getConduits());
Collections.sort(cons, new Comparator<IConduit>() {
List<IConduit> cons = new ArrayList<>(bundle.getConduits());
Collections.sort(cons, new Comparator<>() {
@Override
public int compare(IConduit o1, IConduit o2) {
@@ -34,7 +34,7 @@ public class GuiExternalConnectionSelector extends GuiScreen {
public GuiExternalConnectionSelector(IConduitBundle cb) {
this.cb = cb;
cons = new HashSet<ForgeDirection>();
cons = new HashSet<>();
for (IConduit con : cb.getConduits()) {
if (con instanceof IInsulatedRedstoneConduit) {
Set<ForgeDirection> conCons = con.getConduitConnections();
@@ -62,7 +62,7 @@ public class LiquidSettings extends BaseSettingsPanel {
private final ILiquidConduit conduit;
private AbstractEnderLiquidConduit eConduit;
private boolean isEnder;
private final boolean isEnder;
private static final int filterIX = 4;
private static final int filterEX = 104;
private static final int filterY = 63;
@@ -70,7 +70,7 @@ public class LiquidSettings extends BaseSettingsPanel {
private static final Rectangle extractFilterBounds = new Rectangle(filterEX, filterY, 90, 18);
private GuiToolTip[] filterToolTips;
private boolean inOutShowIn = true;
private static final boolean inOutShowIn = true;
private IconButton insertWhiteListB;
private IconButton extractWhiteListB;
@@ -18,9 +18,9 @@ import crazypants.enderio.network.PacketHandler;
public class OCSettings extends BaseSettingsPanel {
private static final int ID_COLOR_BUTTON = GuiExternalConnection.nextButtonId();
private ColorButton cb;
private final ColorButton cb;
private String signalColorStr = EnderIO.lang.localize("gui.conduit.redstone.color");
private final String signalColorStr = EnderIO.lang.localize("gui.conduit.redstone.color");
private final IOCConduit occon;
public OCSettings(GuiExternalConnection gui, IConduit con) {
@@ -21,9 +21,9 @@ public class PowerSettings extends BaseSettingsPanel {
private static final int ID_COLOR_BUTTON = GuiExternalConnection.nextButtonId();
private IPowerConduit conduit;
private RedstoneModeButton rsB;
private ColorButton colorB;
private final IPowerConduit conduit;
private final RedstoneModeButton rsB;
private final ColorButton colorB;
protected PowerSettings(final GuiExternalConnection gui, IConduit con) {
super(IconEIO.WRENCH_OVERLAY_POWER, EnderIO.lang.localize("itemPowerConduit.name"), gui, con);
@@ -25,8 +25,8 @@ public class RedstoneSettings extends BaseSettingsPanel {
private CheckBox strongCB;
private String signalColorStr = EnderIO.lang.localize("gui.conduit.redstone.color");
private String signalStringthStr = EnderIO.lang.localize("gui.conduit.redstone.signalStrengh");
private final String signalColorStr = EnderIO.lang.localize("gui.conduit.redstone.color");
private final String signalStringthStr = EnderIO.lang.localize("gui.conduit.redstone.signalStrengh");
private IInsulatedRedstoneConduit insCon;
private int stongLabelX;
@@ -39,11 +39,11 @@ public class BasicItemFilterGui implements IItemFilterGui {
private final IItemFilterContainer filterContainer;
private final ItemFilter filter;
private int buttonIdOffset;
private int xOffset;
private int yOffset;
private final int buttonIdOffset;
private final int xOffset;
private final int yOffset;
private boolean isInput;
private final boolean isInput;
public BasicItemFilterGui(GuiContainerBaseEIO gui, IItemFilterContainer filterContainer,
boolean isStickyModeAvailable, boolean isInput) {
@@ -39,7 +39,7 @@ public class BigItemFilterGui implements IItemFilterGui {
private final IItemFilterContainer filterContainer;
private final ItemFilter filter;
private int buttonIdOffset;
private final int buttonIdOffset;
private int xOffset;
private int yOffset;
@@ -38,26 +38,26 @@ public class ExistingItemFilterGui implements IItemFilterGui {
private static final int ID_SHOW = GuiExternalConnection.nextButtonId();
private static final int ID_MERGE = GuiExternalConnection.nextButtonId();
private IItemConduit itemConduit;
private GuiExternalConnection gui;
private final IItemConduit itemConduit;
private final GuiExternalConnection gui;
private ToggleButton useMetaB;
private ToggleButton useNbtB;
private ToggleButton useOreDictB;
private ToggleButton stickyB;
private final ToggleButton useMetaB;
private final ToggleButton useNbtB;
private final ToggleButton useOreDictB;
private final ToggleButton stickyB;
private final IconButton whiteListB;
private GuiButton snapshotB;
private GuiButton clearB;
private GuiButton showB;
private GuiButton mergeB;
private SnapshotOverlay snapshotOverlay;
private final GuiButton snapshotB;
private final GuiButton clearB;
private final GuiButton showB;
private final GuiButton mergeB;
private final SnapshotOverlay snapshotOverlay;
boolean isInput;
private int buttonIdOffset = 0;
private ExistingItemFilter filter;
private final ExistingItemFilter filter;
public ExistingItemFilterGui(GuiExternalConnection gui, IItemConduit itemConduit, boolean isInput) {
this.gui = gui;
@@ -9,9 +9,9 @@ import crazypants.enderio.network.PacketHandler;
public class ItemConduitFilterContainer implements IItemFilterContainer {
private IItemConduit itemConduit;
private ForgeDirection dir;
private boolean isInput;
private final IItemConduit itemConduit;
private final ForgeDirection dir;
private final boolean isInput;
public ItemConduitFilterContainer(IItemConduit itemConduit, ForgeDirection dir, boolean isInput) {
this.itemConduit = itemConduit;
@@ -31,6 +31,7 @@ import crazypants.enderio.gui.RedstoneModeButton;
import crazypants.enderio.machine.IRedstoneModeControlable;
import crazypants.enderio.machine.RedstoneControlMode;
import crazypants.enderio.network.PacketHandler;
import crazypants.util.ColorUtils;
public class ItemSettings extends BaseSettingsPanel {
@@ -43,7 +44,7 @@ public class ItemSettings extends BaseSettingsPanel {
private static final int ID_INSERT_CHANNEL = 23;
private static final int ID_EXTRACT_CHANNEL = 27;
private @Nonnull IItemConduit itemConduit;
private final @Nonnull IItemConduit itemConduit;
private final ToggleButton loopB;
private final ToggleButton roundRobinB;
@@ -54,11 +55,11 @@ public class ItemSettings extends BaseSettingsPanel {
private final RedstoneModeButton rsB;
private final @Nonnull ColorButton colorB;
private ColorButton insertChannelB;
private ColorButton extractChannelB;
private final ColorButton insertChannelB;
private final ColorButton extractChannelB;
private int priLeft = 46;
private int priWidth = 32;
private static final int priLeft = 46;
private static final int priWidth = 32;
private IItemFilterGui insertFilterGui;
private IItemFilterGui extractFilterGui;
@@ -239,7 +240,7 @@ public class ItemSettings extends BaseSettingsPanel {
String priority = EnderIO.lang.localize("gui.conduit.item.priority");
fr.drawString(priority, left + 12, top1 + 25, ColorUtil.getRGB(Color.black));
fr.drawString(str, left + priLeft + priWidth - sw - gap, top1 + 25, ColorUtil.getRGB(Color.black));
fr.drawString(str, left + priLeft + priWidth - sw - gap, top1 + 25, ColorUtils.priorityString.getColor());
if (insertFilterGui != null) insertFilterGui.renderCustomOptions(top1, par1, par2, par3);
if (extractFilterGui != null) extractFilterGui.renderCustomOptions(top1, par1, par2, par3);
@@ -35,11 +35,11 @@ public class LimitedItemFilterGui implements IItemFilterGui {
private final IItemFilterContainer filterContainer;
private final ItemFilter filter;
private int buttonIdOffset;
private int xOffset;
private int yOffset;
private final int buttonIdOffset;
private final int xOffset;
private final int yOffset;
final boolean isStickyModeAvailable;
private boolean isInput;
private final boolean isInput;
public LimitedItemFilterGui(GuiContainerBaseEIO gui, IItemFilterContainer filterContainer,
boolean isStickyModeAvailable, boolean isInput) {
@@ -37,7 +37,6 @@ public class ModItemFilterGui implements IItemFilterGui {
private final IconButton whiteListB;
private final int inputOffsetX;
private final int tfWidth;
private final int tfTextureX;
private final int tfTextureY;
@@ -56,13 +55,12 @@ public class ModItemFilterGui implements IItemFilterGui {
} else {
filter = (ModItemFilter) itemConduit.getOutputFilter(gui.getDir());
}
inputOffsetX = x;
tfWidth = 52;
tfTextureX = 120;
tfTextureY = 214;
inputBounds = new Rectangle[] { new Rectangle(inputOffsetX, y, 16, 16),
new Rectangle(inputOffsetX, y + 18, 16, 16), new Rectangle(inputOffsetX, y + 36, 16, 16) };
inputBounds = new Rectangle[] { new Rectangle(x, y, 16, 16), new Rectangle(x, y + 18, 16, 16),
new Rectangle(x, y + 36, 16, 16) };
deleteButs = new IconButton[inputBounds.length];
for (int i = 0; i < deleteButs.length; i++) {
@@ -60,7 +60,7 @@ public class ItemConduit extends AbstractConduit implements IItemConduit {
public static final String ICON_KEY_ENDER = "enderio:ender_still";
static final Map<String, IIcon> ICONS = new HashMap<String, IIcon>();
static final Map<String, IIcon> ICONS = new HashMap<>();
public static void initIcons() {
IconUtil.addIconProvider(new IconUtil.IIconProvider() {
@@ -87,37 +87,24 @@ public class ItemConduit extends AbstractConduit implements IItemConduit {
ItemConduitNetwork network;
protected final EnumMap<ForgeDirection, RedstoneControlMode> extractionModes = new EnumMap<ForgeDirection, RedstoneControlMode>(
ForgeDirection.class);
protected final EnumMap<ForgeDirection, DyeColor> extractionColors = new EnumMap<ForgeDirection, DyeColor>(
ForgeDirection.class);
protected final EnumMap<ForgeDirection, RedstoneControlMode> extractionModes = new EnumMap<>(ForgeDirection.class);
protected final EnumMap<ForgeDirection, DyeColor> extractionColors = new EnumMap<>(ForgeDirection.class);
protected final EnumMap<ForgeDirection, IItemFilter> outputFilters = new EnumMap<ForgeDirection, IItemFilter>(
ForgeDirection.class);
protected final EnumMap<ForgeDirection, IItemFilter> inputFilters = new EnumMap<ForgeDirection, IItemFilter>(
ForgeDirection.class);
protected final EnumMap<ForgeDirection, ItemStack> outputFilterUpgrades = new EnumMap<ForgeDirection, ItemStack>(
ForgeDirection.class);
protected final EnumMap<ForgeDirection, ItemStack> inputFilterUpgrades = new EnumMap<ForgeDirection, ItemStack>(
ForgeDirection.class);
protected final EnumMap<ForgeDirection, ItemStack> speedUpgrades = new EnumMap<ForgeDirection, ItemStack>(
ForgeDirection.class);
protected final EnumMap<ForgeDirection, ItemStack> functionUpgrades = new EnumMap<ForgeDirection, ItemStack>(
ForgeDirection.class);
protected final EnumMap<ForgeDirection, IItemFilter> outputFilters = new EnumMap<>(ForgeDirection.class);
protected final EnumMap<ForgeDirection, IItemFilter> inputFilters = new EnumMap<>(ForgeDirection.class);
protected final EnumMap<ForgeDirection, ItemStack> outputFilterUpgrades = new EnumMap<>(ForgeDirection.class);
protected final EnumMap<ForgeDirection, ItemStack> inputFilterUpgrades = new EnumMap<>(ForgeDirection.class);
protected final EnumMap<ForgeDirection, ItemStack> speedUpgrades = new EnumMap<>(ForgeDirection.class);
protected final EnumMap<ForgeDirection, ItemStack> functionUpgrades = new EnumMap<>(ForgeDirection.class);
protected final EnumMap<ForgeDirection, Boolean> selfFeed = new EnumMap<ForgeDirection, Boolean>(
ForgeDirection.class);
protected final EnumMap<ForgeDirection, Boolean> selfFeed = new EnumMap<>(ForgeDirection.class);
protected final EnumMap<ForgeDirection, Boolean> roundRobin = new EnumMap<ForgeDirection, Boolean>(
ForgeDirection.class);
protected final EnumMap<ForgeDirection, Boolean> roundRobin = new EnumMap<>(ForgeDirection.class);
protected final EnumMap<ForgeDirection, Integer> priority = new EnumMap<ForgeDirection, Integer>(
ForgeDirection.class);
protected final EnumMap<ForgeDirection, Integer> priority = new EnumMap<>(ForgeDirection.class);
protected final EnumMap<ForgeDirection, DyeColor> outputColors = new EnumMap<ForgeDirection, DyeColor>(
ForgeDirection.class);
protected final EnumMap<ForgeDirection, DyeColor> inputColors = new EnumMap<ForgeDirection, DyeColor>(
ForgeDirection.class);
protected final EnumMap<ForgeDirection, DyeColor> outputColors = new EnumMap<>(ForgeDirection.class);
protected final EnumMap<ForgeDirection, DyeColor> inputColors = new EnumMap<>(ForgeDirection.class);
private int metaData;
@@ -146,7 +133,7 @@ public class ItemConduit extends AbstractConduit implements IItemConduit {
metaData = 0;
}
Map<ForgeDirection, ItemStack> converted = new HashMap<ForgeDirection, ItemStack>();
Map<ForgeDirection, ItemStack> converted = new HashMap<>();
convertToItemUpgrades(filterMeta, converted, inputFilters);
for (Entry<ForgeDirection, ItemStack> entry : converted.entrySet()) {
@@ -198,7 +185,7 @@ public class ItemConduit extends AbstractConduit implements IItemConduit {
@Override
public List<ItemStack> getDrops() {
List<ItemStack> res = new ArrayList<ItemStack>();
List<ItemStack> res = new ArrayList<>();
res.add(createItem());
for (ItemStack stack : speedUpgrades.values()) {
res.add(stack);
@@ -19,10 +19,10 @@ import crazypants.enderio.machine.invpanel.server.InventoryDatabaseServer;
public class ItemConduitNetwork extends AbstractConduitNetwork<IItemConduit, IItemConduit> {
final List<NetworkedInventory> inventories = new ArrayList<NetworkedInventory>();
private final Map<BlockCoord, List<NetworkedInventory>> invMap = new HashMap<BlockCoord, List<NetworkedInventory>>();
final List<NetworkedInventory> inventories = new ArrayList<>();
private final Map<BlockCoord, List<NetworkedInventory>> invMap = new HashMap<>();
final Map<BlockCoord, IItemConduit> conMap = new HashMap<BlockCoord, IItemConduit>();
final Map<BlockCoord, IItemConduit> conMap = new HashMap<>();
private boolean requiresSort = true;
@@ -77,7 +77,7 @@ public class ItemConduitNetwork extends AbstractConduitNetwork<IItemConduit, IIt
}
public List<NetworkedInventory> getInventoryPanelSources() {
ArrayList<NetworkedInventory> res = new ArrayList<NetworkedInventory>();
ArrayList<NetworkedInventory> res = new ArrayList<>();
for (NetworkedInventory inv : inventories) {
if (inv.con.hasInventoryPanelUpgrade(inv.conDir)) {
res.add(inv);
@@ -89,7 +89,7 @@ public class ItemConduitNetwork extends AbstractConduitNetwork<IItemConduit, IIt
private List<NetworkedInventory> getOrCreate(BlockCoord bc) {
List<NetworkedInventory> res = invMap.get(bc);
if (res == null) {
res = new ArrayList<NetworkedInventory>();
res = new ArrayList<>();
invMap.put(bc, res);
}
return res;
@@ -177,7 +177,7 @@ public class ItemConduitNetwork extends AbstractConduitNetwork<IItemConduit, IIt
}
public List<String> getTargetsForExtraction(BlockCoord extractFrom, IItemConduit con, ItemStack input) {
List<String> result = new ArrayList<String>();
List<String> result = new ArrayList<>();
List<NetworkedInventory> invs = getOrCreate(extractFrom);
for (NetworkedInventory source : invs) {
@@ -203,7 +203,7 @@ public class ItemConduitNetwork extends AbstractConduitNetwork<IItemConduit, IIt
}
public List<String> getInputSourcesFor(IItemConduit con, ForgeDirection dir, ItemStack input) {
List<String> result = new ArrayList<String>();
List<String> result = new ArrayList<>();
for (NetworkedInventory inv : inventories) {
if (inv.hasTarget(con, dir)) {
IItemFilter f = inv.con.getInputFilter(inv.conDir);
@@ -14,7 +14,7 @@ public class ItemItemConduit extends AbstractItemConduit {
// new ItemConduitSubtype(ModObject.itemItemConduit.name(), "enderio:itemItemConduit"),
// new ItemConduitSubtype(ModObject.itemItemConduit.name() + "Empowered", "enderio:itemItemConduitAdvanced")
// };
private static ItemConduitSubtype[] subtypes = new ItemConduitSubtype[] {
private static final ItemConduitSubtype[] subtypes = new ItemConduitSubtype[] {
new ItemConduitSubtype(ModObject.itemItemConduit.name(), "enderio:itemItemConduit") };
public static ItemItemConduit create() {
@@ -34,8 +34,8 @@ public class NetworkedInventory {
BlockCoord location;
int inventorySide;
List<Target> sendPriority = new ArrayList<Target>();
RoundRobinIterator<Target> rrIter = new RoundRobinIterator<Target>(sendPriority);
List<Target> sendPriority = new ArrayList<>();
RoundRobinIterator<Target> rrIter = new RoundRobinIterator<>(sendPriority);
private int extractFromSlot = -1;
@@ -336,7 +336,7 @@ public class NetworkedInventory {
if (!canExtract()) {
return;
}
List<Target> result = new ArrayList<NetworkedInventory.Target>();
List<Target> result = new ArrayList<>();
for (NetworkedInventory other : network.inventories) {
if ((con.isSelfFeedEnabled(conDir) || (other != this)) && other.canInsert()
@@ -354,8 +354,8 @@ public class NetworkedInventory {
Collections.sort(sendPriority);
} else {
if (!result.isEmpty()) {
Map<BlockCoord, Integer> visited = new HashMap<BlockCoord, Integer>();
List<BlockCoord> steps = new ArrayList<BlockCoord>();
Map<BlockCoord, Integer> visited = new HashMap<>();
List<BlockCoord> steps = new ArrayList<>();
steps.add(con.getLocation());
calculateDistances(result, visited, steps, 0);
@@ -372,7 +372,7 @@ public class NetworkedInventory {
return;
}
ArrayList<BlockCoord> nextSteps = new ArrayList<BlockCoord>();
ArrayList<BlockCoord> nextSteps = new ArrayList<>();
for (BlockCoord bc : steps) {
IItemConduit con = network.conMap.get(bc);
if (con != null) {
@@ -107,13 +107,13 @@ public class ExistingItemFilter implements IItemFilter {
}
public void setSnapshot(NetworkedInventory ni) {
snapshot = new ArrayList<ItemStack>();
snapshot = new ArrayList<>();
mergeSnapshot(ni);
}
public void mergeSnapshot(NetworkedInventory ni) {
if (snapshot == null) {
snapshot = new ArrayList<ItemStack>();
snapshot = new ArrayList<>();
}
int[] slots = ni.getInventory().getAccessibleSlotsFromSide(ni.getInventorySide());
for (int i = 0; i < slots.length; i++) {
@@ -126,7 +126,7 @@ public class ExistingItemFilter implements IItemFilter {
public boolean mergeSnapshot(IInventory inventory) {
if (snapshot == null) {
snapshot = new ArrayList<ItemStack>();
snapshot = new ArrayList<>();
}
int size = inventory.getSizeInventory();
boolean added = false;
@@ -200,7 +200,7 @@ public class ExistingItemFilter implements IItemFilter {
readSettingsFromNBT(nbtRoot);
if (nbtRoot.hasKey("snapshot")) {
snapshot = new ArrayList<ItemStack>();
snapshot = new ArrayList<>();
NBTTagList itemList = (NBTTagList) nbtRoot.getTag("snapshot");
for (int i = 0; i < itemList.tagCount(); i++) {
NBTTagCompound itemTag = itemList.getCompoundTagAt(i);
@@ -274,7 +274,7 @@ public class ExistingItemFilter implements IItemFilter {
snapshot = null;
return;
}
snapshot = new ArrayList<ItemStack>(numItems);
snapshot = new ArrayList<>(numItems);
for (int i = 0; i < numItems; i++) {
NBTTagCompound itemTag = NetworkUtil.readNBTTagCompound(buf);
ItemStack item = ItemStack.loadItemStackFromNBT(itemTag);
@@ -75,7 +75,7 @@ public class ItemFilter implements IInventory, IItemFilter {
this.isAdvanced = isAdvanced;
this.numItems = numItems;
items = new ItemStack[numItems];
oreIds = new ArrayList<int[]>(numItems);
oreIds = new ArrayList<>(numItems);
for (int i = 0; i < numItems; i++) {
oreIds.add(null);
}
@@ -109,15 +109,11 @@ public abstract class AbstractEnderLiquidConduit extends AbstractLiquidConduit {
private EnderLiquidConduitNetwork network;
private int ticksSinceFailedExtract;
private final EnumMap<ForgeDirection, FluidFilter> outputFilters = new EnumMap<ForgeDirection, FluidFilter>(
ForgeDirection.class);
private final EnumMap<ForgeDirection, FluidFilter> inputFilters = new EnumMap<ForgeDirection, FluidFilter>(
ForgeDirection.class);
private final EnumMap<ForgeDirection, FluidFilter> outputFilters = new EnumMap<>(ForgeDirection.class);
private final EnumMap<ForgeDirection, FluidFilter> inputFilters = new EnumMap<>(ForgeDirection.class);
protected final EnumMap<ForgeDirection, DyeColor> outputColors = new EnumMap<ForgeDirection, DyeColor>(
ForgeDirection.class);
protected final EnumMap<ForgeDirection, DyeColor> inputColors = new EnumMap<ForgeDirection, DyeColor>(
ForgeDirection.class);
protected final EnumMap<ForgeDirection, DyeColor> outputColors = new EnumMap<>(ForgeDirection.class);
protected final EnumMap<ForgeDirection, DyeColor> inputColors = new EnumMap<>(ForgeDirection.class);
private int roundRobin = 0;
@@ -29,12 +29,10 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
public abstract class AbstractLiquidConduit extends AbstractConduit implements ILiquidConduit {
protected final EnumMap<ForgeDirection, RedstoneControlMode> extractionModes = new EnumMap<ForgeDirection, RedstoneControlMode>(
ForgeDirection.class);
protected final EnumMap<ForgeDirection, DyeColor> extractionColors = new EnumMap<ForgeDirection, DyeColor>(
ForgeDirection.class);
protected final EnumMap<ForgeDirection, RedstoneControlMode> extractionModes = new EnumMap<>(ForgeDirection.class);
protected final EnumMap<ForgeDirection, DyeColor> extractionColors = new EnumMap<>(ForgeDirection.class);
protected final Map<ForgeDirection, Integer> externalRedstoneSignals = new HashMap<ForgeDirection, Integer>();
protected final Map<ForgeDirection, Integer> externalRedstoneSignals = new HashMap<>();
protected boolean redstoneStateDirty = true;
public static IFluidHandler getExternalFluidHandler(IBlockAccess world, BlockCoord bc) {
@@ -19,7 +19,7 @@ public class AdvancedLiquidConduitNetwork extends AbstractTankConduitNetwork<Adv
private final ConduitTank tank = new ConduitTank(0);
private final Set<LiquidOutput> outputs = new HashSet<LiquidOutput>();
private final Set<LiquidOutput> outputs = new HashSet<>();
private Iterator<LiquidOutput> outputIterator;
@@ -58,8 +58,8 @@ public class EnderLiquidConduitNetwork extends AbstractConduitNetwork<ILiquidCon
private final AbstractEnderLiquidConduit.Type type;
List<NetworkTank> tanks = new ArrayList<NetworkTank>();
Map<NetworkTankKey, NetworkTank> tankMap = new HashMap<NetworkTankKey, NetworkTank>();
List<NetworkTank> tanks = new ArrayList<>();
Map<NetworkTankKey, NetworkTank> tankMap = new HashMap<>();
Map<NetworkTank, TankIterator> iterators;
@@ -203,7 +203,7 @@ public class EnderLiquidConduitNetwork extends AbstractConduitNetwork<ILiquidCon
}
public FluidTankInfo[] getTankInfo(AbstractEnderLiquidConduit con, ForgeDirection conDir) {
List<FluidTankInfo> res = new ArrayList<FluidTankInfo>(tanks.size());
List<FluidTankInfo> res = new ArrayList<>(tanks.size());
NetworkTank tank = getTank(con, conDir);
for (NetworkTank target : tanks) {
if (!target.equals(tank) && target.isValid()) {
@@ -19,7 +19,7 @@ import crazypants.enderio.config.Config;
public class ItemLiquidConduit extends AbstractItemConduit implements IAdvancedTooltipProvider {
private static ItemConduitSubtype[] subtypes = new ItemConduitSubtype[] {
private static final ItemConduitSubtype[] subtypes = new ItemConduitSubtype[] {
new ItemConduitSubtype(ModObject.itemLiquidConduit.name(), "enderio:itemLiquidConduit"),
new ItemConduitSubtype(
ModObject.itemLiquidConduit.name() + "Advanced",
@@ -21,10 +21,10 @@ public class LiquidConduitNetwork extends AbstractTankConduitNetwork<LiquidCondu
private int ticksEmpty = 0;
private int maxFlowsPerTick = 10;
private static final int maxFlowsPerTick = 10;
private int lastFlowIndex = 0;
private boolean printFlowTiming = false;
private static final boolean printFlowTiming = false;
private int lastPushToken = 0;
@@ -100,7 +100,7 @@ public class LiquidConduitNetwork extends AbstractTankConduitNetwork<LiquidCondu
private boolean doFlow() {
int pushToken = getNextPushToken();
List<FlowAction> actions = new ArrayList<FlowAction>();
List<FlowAction> actions = new ArrayList<>();
for (int i = 0; i < Math.min(maxFlowsPerTick, conduits.size()); i++) {
if (lastFlowIndex >= conduits.size()) {
@@ -116,7 +116,7 @@ public class LiquidConduitNetwork extends AbstractTankConduitNetwork<LiquidCondu
boolean result = !actions.isEmpty();
// Flush any tanks with a tiny bit left
List<LiquidConduit> toEmpty = new ArrayList<LiquidConduit>();
List<LiquidConduit> toEmpty = new ArrayList<>();
for (LiquidConduit con : conduits) {
if (con != null && con.getTank().getFluidAmount() < 10) {
toEmpty.add(con);
@@ -129,7 +129,7 @@ public class LiquidConduitNetwork extends AbstractTankConduitNetwork<LiquidCondu
return result;
}
List<LocatedFluidHandler> externals = new ArrayList<LocatedFluidHandler>();
List<LocatedFluidHandler> externals = new ArrayList<>();
for (AbstractTankConduit con : conduits) {
Set<ForgeDirection> extCons = con.getExternalConnections();
@@ -13,7 +13,7 @@ import crazypants.enderio.gui.IconEIO;
public class ItemMEConduit extends AbstractItemConduit {
private static ItemConduitSubtype[] subtypes = new ItemConduitSubtype[] {
private static final ItemConduitSubtype[] subtypes = new ItemConduitSubtype[] {
new ItemConduitSubtype(ModObject.itemMEConduit.name(), "enderio:itemMeConduit"),
new ItemConduitSubtype(ModObject.itemMEConduit.name() + "Dense", "enderio:itemMeConduitDense") };
@@ -12,7 +12,7 @@ import crazypants.enderio.gui.IconEIO;
public class ItemOCConduit extends AbstractItemConduit {
private static ItemConduitSubtype[] subtypes = new ItemConduitSubtype[] {
private static final ItemConduitSubtype[] subtypes = new ItemConduitSubtype[] {
new ItemConduitSubtype(ModObject.itemOCConduit.name(), "enderio:itemOCConduit") };
public static ItemOCConduit create() {
@@ -49,7 +49,7 @@ public class OCConduit extends AbstractConduit implements IOCConduit {
protected OCConduitNetwork network;
private Map<ForgeDirection, DyeColor> signalColors = new HashMap<ForgeDirection, DyeColor>();
private final Map<ForgeDirection, DyeColor> signalColors = new HashMap<>();
public static IIcon[] coreTextures;
public static IIcon[] longTextures;
@@ -113,7 +113,7 @@ public class OCConduit extends AbstractConduit implements IOCConduit {
BoundingBox bb = ConduitGeometryUtil.instance.createBoundsForConnectionController(key.dir, key.offset);
CollidableComponent cc = new CollidableComponent(IOCConduit.class, bb, key.dir, COLOR_CONTROLLER_ID);
List<CollidableComponent> result = new ArrayList<CollidableComponent>();
List<CollidableComponent> result = new ArrayList<>();
result.addAll(baseCollidables);
result.add(cc);
@@ -351,7 +351,7 @@ public class OCConduit extends AbstractConduit implements IOCConduit {
World world = getBundle().getWorld();
EnumSet<ForgeDirection> conns = getConnections();
for (DyeColor color : DyeColor.VALUES) {
Set<Node> should = new HashSet<Node>();
Set<Node> should = new HashSet<>();
for (ForgeDirection direction : conns) {
if (getSignalColor(direction) == color) {
TileEntity te = getLocation().getLocation(direction).getTileEntity(world);
@@ -417,7 +417,7 @@ public class OCConduit extends AbstractConduit implements IOCConduit {
// we need to check if that node has another way of connecting to our
// network. First find out which of our neighbor(s) it belongs to. May
// be just one, may be many.
List<TileEntity> toCheck = new ArrayList<TileEntity>();
List<TileEntity> toCheck = new ArrayList<>();
if (otherHost instanceof TileEntity) {
TileEntity otherTe = (TileEntity) otherHost;
toCheck.add(otherTe);
@@ -26,17 +26,17 @@ public class NetworkPowerManager {
int maxEnergyStored;
int energyStored;
private int updateRenderTicks = 10;
private int inactiveTicks = 100;
private static final int updateRenderTicks = 10;
private static final int inactiveTicks = 100;
private final List<ReceptorEntry> receptors = new ArrayList<PowerConduitNetwork.ReceptorEntry>();
private final List<ReceptorEntry> receptors = new ArrayList<>();
private ListIterator<ReceptorEntry> receptorIterator = receptors.listIterator();
private final List<ReceptorEntry> storageReceptors = new ArrayList<ReceptorEntry>();
private final List<ReceptorEntry> storageReceptors = new ArrayList<>();
private boolean receptorsDirty = true;
private final Map<IPowerConduit, PowerTracker> powerTrackers = new HashMap<IPowerConduit, PowerTracker>();
private final Map<IPowerConduit, PowerTracker> powerTrackers = new HashMap<>();
private final PowerTracker networkPowerTracker = new PowerTracker();
@@ -79,7 +79,7 @@ public class NetworkPowerManager {
public long getPowerInReceptors() {
long result = 0;
Set<Object> done = new HashSet<Object>();
Set<Object> done = new HashSet<>();
for (ReceptorEntry re : receptors) {
if (!re.emmiter.getConnectionsDirty()) {
IPowerInterface powerReceptor = re.powerInterface;
@@ -94,7 +94,7 @@ public class NetworkPowerManager {
public long getMaxPowerInReceptors() {
long result = 0;
Set<Object> done = new HashSet<Object>();
Set<Object> done = new HashSet<>();
for (ReceptorEntry re : receptors) {
if (!re.emmiter.getConnectionsDirty()) {
IPowerInterface powerReceptor = re.powerInterface;
@@ -346,13 +346,13 @@ public class NetworkPowerManager {
int canExtract;
int canFill;
Set<IPowerStorage> capBanks = new HashSet<IPowerStorage>();
Set<IPowerStorage> capBanks = new HashSet<>();
double filledRatio;
long stored = 0;
long maxCap = 0;
List<CapBankSupplyEntry> enteries = new ArrayList<NetworkPowerManager.CapBankSupplyEntry>();
List<CapBankSupplyEntry> enteries = new ArrayList<>();
CapBankSupply() {}
@@ -46,7 +46,7 @@ import crazypants.enderio.tool.ToolUtil;
public class PowerConduit extends AbstractConduit implements IPowerConduit {
static final Map<String, IIcon> ICONS = new HashMap<String, IIcon>();
static final Map<String, IIcon> ICONS = new HashMap<>();
private static ICapacitor[] capacitors;
@@ -106,14 +106,12 @@ public class PowerConduit extends AbstractConduit implements IPowerConduit {
private int subtype;
protected final EnumMap<ForgeDirection, RedstoneControlMode> rsModes = new EnumMap<ForgeDirection, RedstoneControlMode>(
ForgeDirection.class);
protected final EnumMap<ForgeDirection, DyeColor> rsColors = new EnumMap<ForgeDirection, DyeColor>(
ForgeDirection.class);
protected final EnumMap<ForgeDirection, RedstoneControlMode> rsModes = new EnumMap<>(ForgeDirection.class);
protected final EnumMap<ForgeDirection, DyeColor> rsColors = new EnumMap<>(ForgeDirection.class);
protected EnumMap<ForgeDirection, Long> recievedTicks;
private final Map<ForgeDirection, Integer> externalRedstoneSignals = new HashMap<ForgeDirection, Integer>();
private final Map<ForgeDirection, Integer> externalRedstoneSignals = new HashMap<>();
private boolean redstoneStateDirty = true;
@@ -388,7 +386,7 @@ public class PowerConduit extends AbstractConduit implements IPowerConduit {
if (getBundle() != null) {
if (recievedTicks == null) {
recievedTicks = new EnumMap<ForgeDirection, Long>(ForgeDirection.class);
recievedTicks = new EnumMap<>(ForgeDirection.class);
}
recievedTicks.put(from, getBundle().getWorld().getTotalWorldTime());
}
@@ -544,7 +542,7 @@ public class PowerConduit extends AbstractConduit implements IPowerConduit {
BoundingBox bb = ConduitGeometryUtil.instance.createBoundsForConnectionController(key.dir, key.offset);
CollidableComponent cc = new CollidableComponent(IPowerConduit.class, bb, key.dir, COLOR_CONTROLLER_ID);
List<CollidableComponent> result = new ArrayList<CollidableComponent>();
List<CollidableComponent> result = new ArrayList<>();
result.addAll(baseCollidables);
result.add(cc);
@@ -23,7 +23,7 @@ public class PowerConduitNetwork extends AbstractConduitNetwork<IPowerConduit, I
public NetworkPowerManager powerManager;
private final Map<ReceptorKey, ReceptorEntry> powerReceptors = new HashMap<ReceptorKey, ReceptorEntry>();
private final Map<ReceptorKey, ReceptorEntry> powerReceptors = new HashMap<>();
public PowerConduitNetwork() {
super(IPowerConduit.class, IPowerConduit.class);
@@ -92,7 +92,7 @@ public class PowerConduitNetwork extends AbstractConduitNetwork<IPowerConduit, I
public void powerReceptorRemoved(int x, int y, int z) {
BlockCoord bc = new BlockCoord(x, y, z);
List<ReceptorKey> remove = new ArrayList<ReceptorKey>();
List<ReceptorKey> remove = new ArrayList<>();
for (ReceptorKey key : powerReceptors.keySet()) {
if (key != null && key.coord.equals(bc)) {
remove.add(key);
@@ -19,7 +19,7 @@ import crazypants.enderio.power.ICapacitor;
public class PowerConduitEndergy extends PowerConduit {
static final Map<String, IIcon> ICONS = new HashMap<String, IIcon>();
static final Map<String, IIcon> ICONS = new HashMap<>();
private static ICapacitor[] capacitors;
@@ -43,7 +43,7 @@ import crazypants.enderio.tool.ToolUtil;
public class InsulatedRedstoneConduit extends RedstoneConduit implements IInsulatedRedstoneConduit {
static final Map<String, IIcon> ICONS = new HashMap<String, IIcon>();
static final Map<String, IIcon> ICONS = new HashMap<>();
@SideOnly(Side.CLIENT)
public static void initIcons() {
@@ -130,7 +130,7 @@ public class InsulatedRedstoneConduit extends RedstoneConduit implements IInsula
private static Map<Class<?>, Boolean> getConnectableInterfaces() {
if (CONNECTABLE_CLASSES == null) {
CONNECTABLE_CLASSES = new HashMap<Class<?>, Boolean>();
CONNECTABLE_CLASSES = new HashMap<>();
CONNECTABLE_CLASSES.put(IRedstoneControl.class, false);
try {
Class<?> conInterface = Class
@@ -149,11 +149,11 @@ public class InsulatedRedstoneConduit extends RedstoneConduit implements IInsula
return CONNECTABLE_CLASSES;
}
private Map<ForgeDirection, ConnectionMode> forcedConnections = new HashMap<ForgeDirection, ConnectionMode>();
private final Map<ForgeDirection, ConnectionMode> forcedConnections = new HashMap<>();
private Map<ForgeDirection, DyeColor> signalColors = new HashMap<ForgeDirection, DyeColor>();
private final Map<ForgeDirection, DyeColor> signalColors = new HashMap<>();
private Map<ForgeDirection, Boolean> signalStrengths = new HashMap<ForgeDirection, Boolean>();
private final Map<ForgeDirection, Boolean> signalStrengths = new HashMap<>();
@Override
public boolean onBlockActivated(EntityPlayer player, RaytraceResult res, List<RaytraceResult> all) {
@@ -460,7 +460,7 @@ public class InsulatedRedstoneConduit extends RedstoneConduit implements IInsula
}
DyeColor col = getSignalColor(side);
Set<Signal> result = new HashSet<Signal>();
Set<Signal> result = new HashSet<>();
for (Signal signal : allSigs) {
if (signal.color == col) {
result.add(signal);
@@ -494,7 +494,7 @@ public class InsulatedRedstoneConduit extends RedstoneConduit implements IInsula
BoundingBox bb = ConduitGeometryUtil.instance.createBoundsForConnectionController(key.dir, key.offset);
CollidableComponent cc = new CollidableComponent(IRedstoneConduit.class, bb, key.dir, COLOR_CONTROLLER_ID);
List<CollidableComponent> result = new ArrayList<CollidableComponent>();
List<CollidableComponent> result = new ArrayList<>();
result.addAll(baseCollidables);
result.add(cc);
@@ -10,7 +10,7 @@ import crazypants.enderio.conduit.ItemConduitSubtype;
public class ItemRedstoneConduit extends AbstractItemConduit {
private static ItemConduitSubtype[] subtypes = new ItemConduitSubtype[] {
private static final ItemConduitSubtype[] subtypes = new ItemConduitSubtype[] {
new ItemConduitSubtype(ModObject.itemRedstoneConduit.name(), "enderio:itemRedstoneConduit"),
new ItemConduitSubtype(ModObject.itemRedstoneConduit.name() + "Switch", "enderio:itemRedstoneSwitch"),
new ItemConduitSubtype(
@@ -68,7 +68,7 @@ public class RedstoneConduit extends AbstractConduit implements IRedstoneConduit
protected RedstoneConduitNetwork network;
protected final List<Set<Signal>> externalSignals = new ArrayList<Set<Signal>>();
protected final List<Set<Signal>> externalSignals = new ArrayList<>();
protected boolean neighbourDirty = true;
@@ -140,7 +140,7 @@ public class RedstoneConduit extends AbstractConduit implements IRedstoneConduit
network.setNetworkEnabled(false);
}
Set<Signal> res = new HashSet<Signal>();
Set<Signal> res = new HashSet<>();
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
if ((side == null || dir == side) && acceptSignalsForDir(dir)) {
int input = getExternalPowerLevel(dir);
@@ -20,7 +20,7 @@ import crazypants.enderio.conduit.IConduitBundle;
public class RedstoneConduitNetwork extends AbstractConduitNetwork<IRedstoneConduit, IRedstoneConduit> {
private final Set<Signal> signals = new HashSet<Signal>();
private final Set<Signal> signals = new HashSet<>();
boolean updatingNetwork = false;
@@ -45,7 +45,7 @@ public class RedstoneConduitNetwork extends AbstractConduitNetwork<IRedstoneCond
con.setActive(false);
}
// Notify neighbours that all signals have been lost
List<Signal> copy = new ArrayList<Signal>(signals);
List<Signal> copy = new ArrayList<>(signals);
signals.clear();
for (Signal s : copy) {
notifyNeigborsOfSignalUpdate(s);
@@ -172,7 +172,7 @@ public class RedstoneConduitNetwork extends AbstractConduitNetwork<IRedstoneCond
}
public void notifyNeigborsOfSignalUpdate(Signal signal) {
ArrayList<IRedstoneConduit> conduitsCopy = new ArrayList<IRedstoneConduit>(conduits);
ArrayList<IRedstoneConduit> conduitsCopy = new ArrayList<>(conduits);
for (IRedstoneConduit con : conduitsCopy) {
notifyConduitNeighbours(con, signal);
}
@@ -77,7 +77,7 @@ public class SignalSource {
}
public static Set<SignalSource> fromIntArray(int[] enc) {
Set<SignalSource> result = new HashSet<SignalSource>();
Set<SignalSource> result = new HashSet<>();
for (int i = 0; i < enc.length; i += 5) {
// Signal sig = new Signal(enc[i], enc[i + 1], enc[i + 2], enc[i + 3], ForgeDirection.UNKNOWN,14,
// SignalColor.values()[enc[i + 4]]);
@@ -22,9 +22,9 @@ import crazypants.enderio.conduit.geom.Offsets.Axis;
public class RoundedSegmentRenderer {
private static final int NUM_VERTICES = 16;
private static Vertex[][] DIR_COORDS = new Vertex[ForgeDirection.VALID_DIRECTIONS.length][];
private static Vertex[][] DIR_STUB_COORDS = new Vertex[ForgeDirection.VALID_DIRECTIONS.length][];
private static Vertex[][] DIR_STUB_CAPS = new Vertex[ForgeDirection.VALID_DIRECTIONS.length][];
private static final Vertex[][] DIR_COORDS = new Vertex[ForgeDirection.VALID_DIRECTIONS.length][];
private static final Vertex[][] DIR_STUB_COORDS = new Vertex[ForgeDirection.VALID_DIRECTIONS.length][];
private static final Vertex[][] DIR_STUB_CAPS = new Vertex[ForgeDirection.VALID_DIRECTIONS.length][];
private static final Vector3d REF_TRANS = new Vector3d(0.5, 0.5, 0.5);
@@ -48,7 +48,7 @@ public final class Config {
public static final List<Section> sections;
static {
sections = new ArrayList<Section>();
sections = new ArrayList<>();
}
public static Configuration config;
@@ -389,7 +389,7 @@ public final class Config {
"ThermalFoundation:tool.hoeSilver", "ThermalFoundation:tool.hoeElectrum", "ThermalFoundation:tool.hoeTin",
"ThermalFoundation:tool.hoeLead", "ThermalFoundation:tool.hoeNickel", "ThermalFoundation:tool.hoePlatinum",
"TwilightForest:item.steeleafHoe", "TwilightForest:item.ironwoodHoe", "IC2:itemToolBronzeHoe" };
public static List<ItemStack> farmHoes = new ArrayList<ItemStack>();
public static List<ItemStack> farmHoes = new ArrayList<>();
public static int farmSaplingReserveAmount = 8;
public static double farmParticlesMaxRange = 64;
public static int farmParticlesCount = 15;
@@ -28,7 +28,7 @@ public class GuiConfigFactoryEIO extends GuiConfig {
}
private static List<IConfigElement> getConfigElements(GuiScreen parent) {
List<IConfigElement> list = new ArrayList<IConfigElement>();
List<IConfigElement> list = new ArrayList<>();
String prefix = EnderIO.lang.addPrefix("config.");
for (Section section : Config.sections) {
@@ -21,7 +21,7 @@ public enum EnderIOController {
INSTANCE;
private TObjectIntMap<UUID> openedContainers = new TObjectIntHashMap<UUID>();
private final TObjectIntMap<UUID> openedContainers = new TObjectIntHashMap<>();
private int clientWindowId;
private boolean locked = false;
@@ -27,7 +27,7 @@ import crazypants.enderio.teleport.anchor.TravelEntitySpecialRenderer;
@SideOnly(Side.CLIENT)
public class EnderIoRenderer extends TileEntitySpecialRenderer implements IItemRenderer {
private TravelEntitySpecialRenderer selectionRenderer = new TravelEntitySpecialRenderer() {
private final TravelEntitySpecialRenderer selectionRenderer = new TravelEntitySpecialRenderer() {
protected void renderBlock() {}
@@ -53,9 +53,9 @@ public class GuiEnderface extends GuiScreen {
private final int ioX;
private final int ioY;
private final int ioZ;
private boolean chunkLoaded;
private final boolean chunkLoaded;
private List<ViewableBlocks> blocks = new ArrayList<ViewableBlocks>();
private final List<ViewableBlocks> blocks = new ArrayList<>();
private int gw;
private int gh;
@@ -77,8 +77,6 @@ public class GuiEnderface extends GuiScreen {
private float scaleAnimX;
private int range;
boolean dragging = false;
private double distance;
@@ -92,7 +90,7 @@ public class GuiEnderface extends GuiScreen {
this.ioY = ioY;
this.ioZ = ioZ;
range = Config.enderIoRange;
int range = Config.enderIoRange;
distance = 10 + (range * 2);
TileEntity te = world.getTileEntity(ioX, ioY, ioZ);
@@ -0,0 +1,22 @@
package crazypants.enderio.etfuturum;
import net.minecraft.entity.player.EntityPlayer;
import crazypants.enderio.EnderIO;
import ganymedes01.etfuturum.elytra.IElytraPlayer;
public final class EtFuturumCompat {
private EtFuturumCompat() {}
public static boolean isElytraFlying(EntityPlayer player) {
return EnderIO.hasEtFuturum && player instanceof IElytraPlayer
&& ((IElytraPlayer) player).etfu$isElytraFlying();
}
public static void stopElytraFlying(EntityPlayer player) {
if (EnderIO.hasEtFuturum && player instanceof IElytraPlayer) {
((IElytraPlayer) player).etfu$setElytraFlying(false);
}
}
}
@@ -23,7 +23,7 @@ public class BucketHandler {
MinecraftForge.EVENT_BUS.register(instance);
}
private Map<Block, Item> buckets = new HashMap<Block, Item>();
private final Map<Block, Item> buckets = new HashMap<>();
private BucketHandler() {}
@@ -22,10 +22,10 @@ public class FluidFuelRegister implements IFluidRegister {
private static final String KEY_TOTAL_BURN_TIME = "totalBurnTime";
private static final String KEY_COOLING_PER_MB = "coolingPerMb";
private final Map<String, IFluidCoolant> coolants = new HashMap<String, IFluidCoolant>();
private final Map<String, IFluidFuel> fuels = new HashMap<String, IFluidFuel>();
private final Map<String, IFluidCoolant> coolants = new HashMap<>();
private final Map<String, IFluidFuel> fuels = new HashMap<>();
private final List<IFluidRegister> otherRegisters = new ArrayList<IFluidRegister>();
private final List<IFluidRegister> otherRegisters = new ArrayList<>();
private FluidFuelRegister() {
addCoolant(FluidRegistry.WATER, 0.0023f);
@@ -25,7 +25,7 @@ public class ItemBucketEio extends ItemBucket {
return b;
}
private String fluidName;
private final String fluidName;
protected ItemBucketEio(Block block, String fluidName) {
super(block);
@@ -16,7 +16,7 @@ public abstract class GuiContainerBaseEIO extends GuiContainerBase {
private static final String TEXTURE_PATH = ":textures/gui/23/";
private static final String TEXTURE_EXT = ".png";
private final List<ResourceLocation> guiTextures = new ArrayList<ResourceLocation>();
private final List<ResourceLocation> guiTextures = new ArrayList<>();
public GuiContainerBaseEIO(Container par1Container, String... guiTexture) {
super(par1Container);
@@ -53,16 +53,16 @@ import crazypants.util.RenderPassHelper;
public class IoConfigRenderer {
protected static final RenderBlocks RB = new RenderBlocks();
protected final RenderBlocks RB = new RenderBlocks();
private boolean dragging = false;
private float pitch = 0;
private float yaw = 0;
private float pitch;
private float yaw;
private double distance;
private long initTime;
private Minecraft mc = Minecraft.getMinecraft();
private World world = mc.thePlayer.worldObj;
private final Minecraft mc = Minecraft.getMinecraft();
private final World world;
private final Vector3d origin = new Vector3d();
private final Vector3d eye = new Vector3d();
@@ -72,8 +72,8 @@ public class IoConfigRenderer {
public BlockCoord originBC;
private List<BlockCoord> configurables = new ArrayList<BlockCoord>();
private List<BlockCoord> neighbours = new ArrayList<BlockCoord>();
private final List<BlockCoord> configurables = new ArrayList<>();
private final List<BlockCoord> neighbours = new ArrayList<>();
private SelectedFace selection;
@@ -191,7 +191,7 @@ public class IoConfigRenderer {
private void updateSelection(Vector3d start, Vector3d end) {
start.add(origin);
end.add(origin);
List<MovingObjectPosition> hits = new ArrayList<MovingObjectPosition>();
List<MovingObjectPosition> hits = new ArrayList<>();
for (BlockCoord bc : configurables) {
Block block = world.getBlock(bc.x, bc.y, bc.z);
@@ -12,9 +12,9 @@ import crazypants.enderio.network.PacketHandler;
public class RedstoneModeButton extends CycleButton<RedstoneControlMode> {
private IRedstoneModeControlable model;
private final IRedstoneModeControlable model;
private BlockCoord bc;
private final BlockCoord bc;
private String tooltipKey = "enderio.gui.tooltip.redstoneControlMode";
@@ -31,8 +31,8 @@ public class ItemEnderFood extends ItemFood implements IResourceTooltipProvider
@SideOnly(Side.CLIENT)
public class SpecialFont extends FontRenderer {
private FontRenderer wrapped;
private ItemStack stack = EnderFood.ENDERIOS.getStack();
private final FontRenderer wrapped;
private final ItemStack stack = EnderFood.ENDERIOS.getStack();
private int inARow = 0;
public SpecialFont(FontRenderer wrapped) {
@@ -49,13 +49,13 @@ public class ItemSoulVessel extends Item implements IResourceTooltipProvider {
private IIcon filledIcon;
private List<String> blackList;
private final List<String> blackList;
protected ItemSoulVessel() {
setCreativeTab(EnderIOTab.tabEnderIO);
setUnlocalizedName(ModObject.itemSoulVessel.unlocalisedName);
setMaxStackSize(64);
blackList = new ArrayList<String>();
blackList = new ArrayList<>();
for (String ent : Config.soulVesselBlackList) {
blackList.add(ent);
}
@@ -198,7 +198,7 @@ public class ItemYetaWrench extends Item
@Override
public void addDetailedEntries(ItemStack itemstack, EntityPlayer entityplayer, List<String> list, boolean flag) {
ArrayList<String> tmp = new ArrayList<String>();
ArrayList<String> tmp = new ArrayList<>();
SpecialTooltipHandler.addDetailedTooltipFromResources(tmp, getUnlocalizedName());
String keyName = Keyboard.getKeyName(KeyTracker.instance.getYetaWrenchMode().getKeyCode());
for (String line : tmp) {
@@ -328,8 +328,10 @@ public class KeyTracker {
}
private void handleGlide() {
if (glideKey.isPressed()
&& DarkSteelController.instance.isGliderUpgradeEquipped(Minecraft.getMinecraft().thePlayer)) {
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
if (glideKey.isPressed() && DarkSteelController.instance.isGliderUpgradeEquipped(player)
&& (DarkSteelController.instance.isGlideActive(player)
|| DarkSteelController.instance.canActivateGlide(player))) {
toggleDarkSteelController(Type.GLIDE, "darksteel.upgrade.glider");
}
}
@@ -108,7 +108,7 @@ public class MagnetController {
private static List<Item> blacklist = null;
private static void initBlacklist() {
blacklist = new ArrayList<Item>();
blacklist = new ArrayList<>();
for (String name : Config.magnetBlacklist) {
String[] parts = name.split(":");
if (parts.length == 2) {
@@ -161,8 +161,7 @@ public class MagnetController {
}
if (gotOne) {
if (arraylist == null) {
arraylist = new ArrayList<Entity>(
Config.magnetMaxItems > 0 ? Config.magnetMaxItems : 20);
arraylist = new ArrayList<>(Config.magnetMaxItems > 0 ? Config.magnetMaxItems : 20);
}
arraylist.add(entity);
if (itemsRemaining-- <= 0) {
@@ -41,6 +41,7 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import crazypants.enderio.EnderIO;
import crazypants.enderio.config.Config;
import crazypants.enderio.etfuturum.EtFuturumCompat;
import crazypants.enderio.item.darksteel.PacketUpgradeState.Type;
import crazypants.enderio.item.darksteel.upgrade.EnergyUpgrade;
import crazypants.enderio.item.darksteel.upgrade.GliderUpgrade;
@@ -104,7 +105,7 @@ public class DarkSteelController {
private static final EnumSet<Type> DEFAULT_ACTIVE = EnumSet.of(Type.SPEED, Type.STEP_ASSIST, Type.JUMP);
private final Map<UUID, EnumSet<Type>> allActive = new HashMap<UUID, EnumSet<Type>>();
private final Map<UUID, EnumSet<Type>> allActive = new HashMap<>();
private boolean nightVisionActive = false;
private boolean removeNightvision = false;
@@ -146,6 +147,8 @@ public class DarkSteelController {
}
public void setActive(EntityPlayer player, Type type, boolean isActive) {
if (type == Type.GLIDE && isActive && !canActivateGlide(player)) return;
EnumSet<Type> set = getActiveSet(player);
if (isActive) {
set.add(type);
@@ -158,6 +161,10 @@ public class DarkSteelController {
return isActive(player, Type.GLIDE);
}
public boolean canActivateGlide(EntityPlayer player) {
return !EtFuturumCompat.isElytraFlying(player);
}
public boolean isSpeedActive(EntityPlayer player) {
return isActive(player, Type.SPEED);
}
@@ -246,8 +253,10 @@ public class DarkSteelController {
}
private void updateGlide(EntityPlayer player) {
if (!isGlideActive(player) || !isGliderUpgradeEquipped(player)) {
return;
if (!isGlideActive(player) || !isGliderUpgradeEquipped(player)) return;
if (EtFuturumCompat.isElytraFlying(player)) {
EtFuturumCompat.stopElytraFlying(player);
}
if (!player.onGround && player.motionY < 0 && !player.isSneaking() && !player.isInWater()) {
@@ -43,7 +43,7 @@ public class DarkSteelRecipeManager {
public static DarkSteelRecipeManager instance = new DarkSteelRecipeManager();
private List<IDarkSteelUpgrade> upgrades = new ArrayList<IDarkSteelUpgrade>();
private final List<IDarkSteelUpgrade> upgrades = new ArrayList<>();
public DarkSteelRecipeManager() {
upgrades.add(EnergyUpgrade.EMPOWERED);
@@ -207,7 +207,7 @@ public class DarkSteelRecipeManager {
public void addAdvancedTooltipEntries(ItemStack itemstack, EntityPlayer entityplayer, List<String> list,
boolean flag) {
List<IDarkSteelUpgrade> applyableUpgrades = new ArrayList<IDarkSteelUpgrade>();
List<IDarkSteelUpgrade> applyableUpgrades = new ArrayList<>();
for (IDarkSteelUpgrade upgrade : upgrades) {
if (upgrade.hasUpgrade(itemstack)) {
upgrade.addDetailedEntries(itemstack, entityplayer, list, flag);
@@ -5,9 +5,9 @@ import net.minecraft.nbt.NBTTagCompound;
public class EnergyContainer {
private int capacityRF;
private int maxReceiveRF;
private int maxExtractRF;
private final int capacityRF;
private final int maxReceiveRF;
private final int maxExtractRF;
public EnergyContainer(int capacityRF, int maxReceiveRF, int maxExtractRF) {
this.capacityRF = capacityRF;
@@ -123,7 +123,7 @@ public class ItemDarkSteelAxe extends ItemAxe
BlockCoord bc = new BlockCoord(X, Y, Z);
harvester.harvest(player.worldObj, bc, res);
List<BlockCoord> sortedTargets = new ArrayList<BlockCoord>(res.getHarvestedBlocks());
List<BlockCoord> sortedTargets = new ArrayList<>(res.getHarvestedBlocks());
harvestComparator.refPoint = bc;
Collections.sort(sortedTargets, harvestComparator);
@@ -122,12 +122,13 @@ public class ItemDarkSteelShears extends ItemShears
BlockCoord bc = new BlockCoord(x, y, z);
HarvestResult res = new HarvestResult(null, bc);
for (int dx = -Config.darkSteelShearsBlockAreaBoostWhenPowered; dx
<= Config.darkSteelShearsBlockAreaBoostWhenPowered; dx++) {
for (int dy = -Config.darkSteelShearsBlockAreaBoostWhenPowered; dy
<= Config.darkSteelShearsBlockAreaBoostWhenPowered; dy++) {
for (int dz = -Config.darkSteelShearsBlockAreaBoostWhenPowered; dz
<= Config.darkSteelShearsBlockAreaBoostWhenPowered; dz++) {
int range = Config.darkSteelShearsBlockAreaBoostWhenPowered;
for (int dx = -range; dx <= range; dx++) {
for (int dy = -range; dy <= range; dy++) {
for (int dz = -range; dz <= range; dz++) {
// Skip center block, already added via HarvestResult constructor
if (dx == 0 && dy == 0 && dz == 0) continue;
Block block2 = player.worldObj.getBlock(x + dx, y + dy, z + dz);
if (block2 instanceof IShearable && ((IShearable) block2)
.isShearable(itemstack, player.worldObj, x + dx, y + dy, z + dz)) {
@@ -137,16 +138,19 @@ public class ItemDarkSteelShears extends ItemShears
}
}
List<BlockCoord> sortedTargets = new ArrayList<BlockCoord>(res.getHarvestedBlocks());
List<BlockCoord> sortedTargets = new ArrayList<>(res.getHarvestedBlocks());
harvestComparator.refPoint = bc;
Collections.sort(sortedTargets, harvestComparator);
int maxBlocks = Math.min(sortedTargets.size(), powerStored / Config.darkSteelShearsPowerUsePerDamagePoint);
for (int i = 0; i < maxBlocks; i++) {
BlockCoord bc2 = sortedTargets.get(i);
super.onBlockStartBreak(itemstack, bc2.x, bc2.y, bc2.z, player);
if (bc2 != bc) {
player.worldObj.setBlockToAir(bc2.x, bc2.y, bc2.z);
Block target = player.worldObj.getBlock(bc2.x, bc2.y, bc2.z);
if (target instanceof IShearable
&& ((IShearable) target).isShearable(itemstack, player.worldObj, bc2.x, bc2.y, bc2.z)) {
if (!super.onBlockStartBreak(itemstack, bc2.x, bc2.y, bc2.z, player)) {
player.worldObj.setBlockToAir(bc2.x, bc2.y, bc2.z);
}
}
}
}
@@ -85,6 +85,6 @@ public class ItemEndSteelArmor extends ItemDarkSteelArmor implements IEndSteelIt
@Optional.Method(modid = "gregtech_nh")
@Override
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
return true;
return Hazard.STANDARD_HAZARDS.contains(hazard);
}
}
@@ -20,7 +20,7 @@ import crazypants.enderio.item.darksteel.upgrade.EnergyUpgrade;
public class PoweredItemRenderer implements IItemRenderer {
private RenderItem ri = new RenderItem();
private final RenderItem ri = new RenderItem();
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
@@ -25,10 +25,9 @@ public class SoundDetector {
public static SoundDetector instance = new SoundDetector();
private List<SoundSource> sounds;
private ArrayBlockingQueue<SoundSource> soundQueue = new ArrayBlockingQueue<SoundSource>(MAX_ENTITIES);
private final ArrayBlockingQueue<SoundSource> soundQueue = new ArrayBlockingQueue<>(MAX_ENTITIES);
private Minecraft mc = Minecraft.getMinecraft();
private final Minecraft mc = Minecraft.getMinecraft();
boolean enabled = false;
@@ -63,7 +62,7 @@ public class SoundDetector {
return;
}
sounds = new ArrayList<SoundSource>(MAX_ENTITIES);
List<SoundSource> sounds = new ArrayList<>(MAX_ENTITIES);
soundQueue.drainTo(sounds);
try {
@@ -11,7 +11,7 @@ import crazypants.enderio.item.darksteel.ItemDarkSteelArmor;
public class ApiaristArmorUpgrade extends AbstractUpgrade {
private static String UPGRADE_NAME = "apiaristArmor";
private static final String UPGRADE_NAME = "apiaristArmor";
private static final String forestryItemNames[] = { "apiaristHelmet", "apiaristChest", "apiaristLegs",
"apiaristBoots" };
@@ -218,7 +218,7 @@ public class EnergyUpgrade extends AbstractUpgrade {
@SideOnly(Side.CLIENT)
public void addDetailedEntries(ItemStack itemstack, EntityPlayer entityplayer, List<String> list, boolean flag) {
List<String> upgradeStr = new ArrayList<String>();
List<String> upgradeStr = new ArrayList<>();
upgradeStr.add(EnumChatFormatting.DARK_AQUA + EnderIO.lang.localizeExact(getUnlocalizedName() + ".name"));
SpecialTooltipHandler.addDetailedTooltipFromResources(upgradeStr, getUnlocalizedName());
@@ -2,7 +2,6 @@ package crazypants.enderio.item.darksteel.upgrade;
import static org.lwjgl.opengl.GL11.glDepthMask;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.ItemStack;
@@ -21,7 +20,7 @@ import crazypants.enderio.item.darksteel.DarkSteelItems;
public class GliderUpgrade extends AbstractUpgrade {
private static String UPGRADE_NAME = "glide";
private static final String UPGRADE_NAME = "glide";
public static final GliderUpgrade INSTANCE = new GliderUpgrade();
@@ -75,13 +74,13 @@ public class GliderUpgrade extends AbstractUpgrade {
public void writeUpgradeToNBT(NBTTagCompound upgradeRoot) {}
@SideOnly(Side.CLIENT)
private class Render implements IRenderUpgrade {
private static class Render implements IRenderUpgrade {
private EntityItem item = new EntityItem(Minecraft.getMinecraft().theWorld);
private ItemStack glider = new ItemStack(DarkSteelItems.itemGliderWing, 1, 1);
private final EntityItem item;
private Render() {
item.setEntityItemStack(glider);
ItemStack glider = new ItemStack(DarkSteelItems.itemGliderWing, 1, 1);
item = new EntityItem(null, 0, 0, 0, glider);
}
@Override
@@ -94,7 +93,12 @@ public class GliderUpgrade extends AbstractUpgrade {
GL11.glTranslatef(-0, 1, 0.25f);
GL11.glRotatef(180, 1, 0, 0);
GL11.glScalef(3, 3, 3);
RenderManager.instance.renderEntityWithPosYaw(item, 0, 0, 0, 0, 0);
try {
item.setWorld(event.entityPlayer.worldObj);
RenderManager.instance.renderEntityWithPosYaw(item, 0, 0, 0, 0, 0);
} finally {
item.setWorld(null);
}
}
}
}
@@ -12,7 +12,7 @@ public class JumpUpgrade extends AbstractUpgrade {
private static final String KEY_LEVEL = "level";
private static String UPGRADE_NAME = "jumpBoost";
private static final String UPGRADE_NAME = "jumpBoost";
public static JumpUpgrade JUMP_ONE = new JumpUpgrade(
"enderio.darksteel.upgrade.jump_one",
@@ -27,7 +27,7 @@ public class JumpUpgrade extends AbstractUpgrade {
3,
Config.darkSteelJumpThreeCost);
private short level;
private final short level;
public static boolean isEquipped(EntityPlayer player) {
ItemStack boots = player.getEquipmentInSlot(1);
@@ -11,7 +11,7 @@ import crazypants.enderio.item.darksteel.DarkSteelItems;
public class NaturalistEyeUpgrade extends AbstractUpgrade {
private static String UPGRADE_NAME = "naturalistEye";
private static final String UPGRADE_NAME = "naturalistEye";
public static final NaturalistEyeUpgrade INSTANCE = new NaturalistEyeUpgrade();
@@ -10,7 +10,7 @@ import crazypants.enderio.item.darksteel.DarkSteelItems;
public class NightVisionUpgrade extends AbstractUpgrade {
private static String UPGRADE_NAME = "nightVision";
private static final String UPGRADE_NAME = "nightVision";
public static final NightVisionUpgrade INSTANCE = new NightVisionUpgrade();
@@ -2,7 +2,6 @@ package crazypants.enderio.item.darksteel.upgrade;
import static org.lwjgl.opengl.GL11.glDepthMask;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.ItemStack;
@@ -57,7 +56,7 @@ public class SolarUpgrade extends AbstractUpgrade {
return new ItemStack(EnderIO.blockSolarPanel, 1, level - 1);
}
private byte level;
private final byte level;
public SolarUpgrade(NBTTagCompound tag) {
super(UPGRADE_NAME, tag);
@@ -117,9 +116,9 @@ public class SolarUpgrade extends AbstractUpgrade {
}
@SideOnly(Side.CLIENT)
private class Render implements IRenderUpgrade {
private static class Render implements IRenderUpgrade {
private EntityItem item = new EntityItem(Minecraft.getMinecraft().theWorld);
private final EntityItem item = new EntityItem(null);
@Override
public void render(RenderPlayerEvent event, ItemStack stack, boolean head) {
@@ -132,8 +131,13 @@ public class SolarUpgrade extends AbstractUpgrade {
GL11.glRotated(180, 1, 0, 0);
GL11.glScalef(2.1f, 2.1f, 2.1f);
byte level = loadFromItem(stack).level;
item.setEntityItemStack(new ItemStack(EnderIO.blockSolarPanel, 1, level - 1));
RenderManager.instance.renderEntityWithPosYaw(item, 0, 0, 0, 0, 0);
try {
item.setWorld(event.entityPlayer.worldObj);
item.setEntityItemStack(new ItemStack(EnderIO.blockSolarPanel, 1, level - 1));
RenderManager.instance.renderEntityWithPosYaw(item, 0, 0, 0, 0, 0);
} finally {
item.setWorld(null);
}
}
}
}
@@ -9,7 +9,7 @@ import crazypants.enderio.item.darksteel.DarkSteelItems;
public class SoundDetectorUpgrade extends AbstractUpgrade {
private static String UPGRADE_NAME = "soundDetector";
private static final String UPGRADE_NAME = "soundDetector";
public static final SoundDetectorUpgrade INSTANCE = new SoundDetectorUpgrade();
@@ -15,7 +15,7 @@ public class SpeedUpgrade extends AbstractUpgrade {
private static final String KEY_MULTIPLIER = "multiplier";
private static String UPGRADE_NAME = "speedBoost";
private static final String UPGRADE_NAME = "speedBoost";
public static float[] WALK_MULTIPLIERS = new float[] { Config.darkSteelSpeedOneWalkModifier,
Config.darkSteelSpeedTwoWalkMultiplier, Config.darkSteelSpeedThreeWalkMultiplier };
@@ -36,7 +36,7 @@ public class SpeedUpgrade extends AbstractUpgrade {
3,
Config.darkSteelSpeedThreeCost);
private short level;
private final short level;
private float walkMultiplier;
protected float sprintMultiplier;
@@ -9,7 +9,7 @@ import crazypants.enderio.item.darksteel.DarkSteelItems;
public class SpoonUpgrade extends AbstractUpgrade {
private static String UPGRADE_NAME = "spoon";
private static final String UPGRADE_NAME = "spoon";
public static final SpoonUpgrade INSTANCE = new SpoonUpgrade();
Loaded 100 of 286 files, more files were not shown because too many files have changed in this diff. Show more