diff --git a/build.gradle b/build.gradle
index 31d5d58c3..7c10f2f37 100644
--- a/build.gradle
+++ b/build.gradle
@@ -65,6 +65,14 @@ repositories {
name 'buildcraft'
url 'https://mod-buildcraft.com/maven/'
}
+ maven {
+ name 'tterrag'
+ url 'http://maven.tterrag.com/'
+ }
+ maven {
+ name 'ic2'
+ url 'http://maven.ic2.player.to'
+ }
}
// Define properties file
@@ -96,11 +104,14 @@ dependencies {
deobfProvided "mezz.jei:jei_${config.minecraft_version}:${config.jei_version}:api"
runtime "mezz.jei:jei_${config.minecraft_version}:${config.jei_version}"
compile "net.darkhax.tesla:Tesla-${config.minecraft_version}:${config.tesla_version}"
- compile "inventory-tweaks:InventoryTweaks:${config.invtweak_version}:api" // Not updated yet
+ compile "inventory-tweaks:InventoryTweaks:${config.invtweak_version}:api"
compile "li.cil.oc:OpenComputers:MC1.11.2-${config.opencomputers_version}:api" // Not updated yet
deobfCompile "mcp.mobius.waila:Hwyla:${config.hwyla_version}"
deobfCompile "cofh:RedstoneFlux:${config.minecraft_version}-${config.redstoneflux_version}:universal"
deobfCompile "com.mod-buildcraft:buildcraft-api:${config.buildcraft_version}"
+ deobfProvided "team.chisel.ctm:CTM:MC${config.minecraft_version}-${config.ctm_version}:api"
+ runtime "team.chisel.ctm:CTM:MC${config.minecraft_version}-${config.ctm_version}"
+ compile "net.industrial-craft:industrialcraft-2:${config.ic2_version}:api"
}
processResources
@@ -113,7 +124,9 @@ processResources
}
task coreJar(type: Jar) {
- baseName = 'Mekanism'
+ archiveName = "Mekanism-${project.version}.jar"
+ dependsOn 'reobfJar'
+ classifier "core"
from('etc/core') {
include '*.info'
@@ -126,7 +139,9 @@ task coreJar(type: Jar) {
}
task toolsJar(type: Jar) {
- baseName = 'MekanismTools'
+ archiveName = "MekanismTools-${project.version}.jar"
+ dependsOn 'reobfJar'
+ classifier "tools"
from('etc/tools') {
include '*.info'
@@ -139,7 +154,9 @@ task toolsJar(type: Jar) {
}
task generatorsJar(type: Jar) {
- baseName = 'MekanismGenerators'
+ archiveName = "MekanismGenerators-${project.version}.jar"
+ dependsOn 'reobfJar'
+ classifier "generators"
from('etc/generators') {
include '*.info'
@@ -151,28 +168,64 @@ task generatorsJar(type: Jar) {
}
}
-coreJar.dependsOn('reobfJar')
-toolsJar.dependsOn('reobfJar')
-generatorsJar.dependsOn('reobfJar')
-
-task MDKZip(type: Zip) {
- baseName = 'MDK'
- from sourceSets.main.java.srcDirs
+task apiJar(type: Jar) {
+ classifier "api"
+ baseName "Mekanism"
+ dependsOn "sourceMainJava"
include 'mekanism/api/**'
+ from sourceSets.main.java.srcDirs
+ from sourceSets.main.output
}
-task releaseJars(type: Copy) {
- from coreJar
- from toolsJar
- from generatorsJar
- from MDKZip
- rename '-(.*)jar', '.jar'
- rename '-(.*)zip', '.zip'
- into '.'
+artifacts {
+ archives apiJar
+ archives coreJar
+ archives toolsJar
+ archives generatorsJar
}
task fullBuild(type: Delete) {
delete jar
+ dependsOn "build"
}
-fullBuild.dependsOn('releaseJars')
+apply plugin: 'maven'
+apply plugin: 'maven-publish'
+
+uploadArchives {
+ if(System.getenv("LOCAL_MAVEN") != null) {
+ repositories {
+ mavenDeployer {
+ repository(url: "file://"+System.getenv("LOCAL_MAVEN"))
+ pom {
+ groupId = project.group
+ version = project.version
+ if (System.getenv("MAVEN_ARTIFACT") != null) {
+ artifactId = System.getenv("MAVEN_ARTIFACT")
+ } else {
+ artifactId = "Mekanism"
+ }
+ project {
+ name "Mekanism"
+ packaging 'jar'
+ description 'Mekanism is a Minecraft add-on featuring high-tech machinery that can be used to create powerful tools, armor, and weapons.'
+ url 'http://aidancbrady.com/mekanism/'
+ scm {
+ url 'https://github.com/aidancbrady/Mekanism.git'
+ }
+ issueManagement {
+ system 'github'
+ url 'https://github.com/aidancbrady/Mekanism/issues'
+ }
+ licenses {
+ license {
+ name 'MIT'
+ distribution 'repo'
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/build.properties b/build.properties
index e4bb302eb..dc16a019f 100644
--- a/build.properties
+++ b/build.properties
@@ -3,10 +3,12 @@ mappings_version=snapshot_20170625
forge_version=14.21.1.2387
mcmp_version=2.2.1_36
jei_version=4.7.0.67
-mod_version=9.3.3
+mod_version=9.3.4
tesla_version=1.0.59
-invtweak_version=1.62+beta.89
+invtweak_version=1.63+beta.107
opencomputers_version=1.7.0.24
hwyla_version=1.8.18-B32_1.12
redstoneflux_version=2.0.0.1
buildcraft_version=7.99.6
+ctm_version=0.2.1.5
+ic2_version=2.8.9-ex112
diff --git a/src/api/java/ic2/api/crops/BaseSeed.class b/src/api/java/ic2/api/crops/BaseSeed.class
deleted file mode 100644
index 47efa3131..000000000
Binary files a/src/api/java/ic2/api/crops/BaseSeed.class and /dev/null differ
diff --git a/src/api/java/ic2/api/crops/BaseSeed.java b/src/api/java/ic2/api/crops/BaseSeed.java
deleted file mode 100644
index 5f5f4446d..000000000
--- a/src/api/java/ic2/api/crops/BaseSeed.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package ic2.api.crops;
-
-/**
- * Base agriculture seed. Used to determine the state of a plant once it is planted from an item.
- */
-public class BaseSeed {
- /**
- * Create a BaseSeed object.
- *
- * @param crop plant
- * @param size plant size
- * @param statGrowth plant growth stat
- * @param statGain plant gain stat
- * @param statResistance plant resistance stat
- * @param stackSize for internal usage only
- */
- public BaseSeed(CropCard crop, int size, int statGrowth, int statGain, int statResistance) {
- this.crop = crop;
- this.size = size;
- this.statGrowth = statGrowth;
- this.statGain = statGain;
- this.statResistance = statResistance;
- }
-
- /**
- * @deprecated use the other constructor instead
- */
- @Deprecated
- public BaseSeed(CropCard crop, int size, int statGrowth, int statGain, int statResistance, int stackSize) {
- this(crop, size, statGrowth, statGain, statResistance);
- }
-
- /**
- * Plant.
- */
- public final CropCard crop;
-
- /**
- * Plant size.
- */
- public int size;
-
- /**
- * Plant growth stat.
- */
- public int statGrowth;
-
- /**
- * Plant gain stat.
- */
- public int statGain;
-
- /**
- * Plant resistance stat.
- */
- public int statResistance;
-}
diff --git a/src/api/java/ic2/api/crops/CropCard.class b/src/api/java/ic2/api/crops/CropCard.class
deleted file mode 100644
index dab248f4b..000000000
Binary files a/src/api/java/ic2/api/crops/CropCard.class and /dev/null differ
diff --git a/src/api/java/ic2/api/crops/CropCard.java b/src/api/java/ic2/api/crops/CropCard.java
deleted file mode 100644
index 60350036e..000000000
--- a/src/api/java/ic2/api/crops/CropCard.java
+++ /dev/null
@@ -1,383 +0,0 @@
-package ic2.api.crops;
-
-import java.util.List;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.world.World;
-
-/**
- * Base agriculture crop.
- *
- * Any crop extending this can be registered using registerCrop to be added into the game.
- */
-public abstract class CropCard {
- public CropCard() {
- }
-
- /**
- * Plant id for identifying this crop within your mod.
- * Normally it's enough to listen for the neighbor update, which also happens, but using this
- * mechanism allows listening to events that are not adjacent. Mechanisms that inject energy over
- * a distance or provide compatibility with 3rd party energy may benefit from it.
- *
- * The events will be fired after validation and only for successful changes.
- *
- * WARNING: The events may (and will) be invoked from arbitrary threads. It's up to the
- * implementation of IEnergyNetEventReceiver to properly synchronize them.
- */
-public interface IEnergyNetEventReceiver {
- void onAdd(IEnergyTile tile);
- void onRemove(IEnergyTile tile);
-}
diff --git a/src/api/java/ic2/api/energy/NodeStats.class b/src/api/java/ic2/api/energy/NodeStats.class
deleted file mode 100644
index eceb34029..000000000
Binary files a/src/api/java/ic2/api/energy/NodeStats.class and /dev/null differ
diff --git a/src/api/java/ic2/api/energy/NodeStats.java b/src/api/java/ic2/api/energy/NodeStats.java
deleted file mode 100644
index db33da7df..000000000
--- a/src/api/java/ic2/api/energy/NodeStats.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package ic2.api.energy;
-
-public class NodeStats {
- public NodeStats(double energyIn, double energyOut, double voltage) {
- this.energyIn = energyIn;
- this.energyOut = energyOut;
- this.voltage = voltage;
- }
-
- public double getEnergyIn() {
- return energyIn;
- }
-
- public double getEnergyOut() {
- return energyOut;
- }
-
- public double getVoltage() {
- return voltage;
- }
-
- protected double energyIn;
- protected double energyOut;
- protected double voltage;
-}
diff --git a/src/api/java/ic2/api/energy/event/EnergyTileEvent.class b/src/api/java/ic2/api/energy/event/EnergyTileEvent.class
deleted file mode 100644
index 5d1523da6..000000000
Binary files a/src/api/java/ic2/api/energy/event/EnergyTileEvent.class and /dev/null differ
diff --git a/src/api/java/ic2/api/energy/event/EnergyTileEvent.java b/src/api/java/ic2/api/energy/event/EnergyTileEvent.java
deleted file mode 100644
index 2bb1ac960..000000000
--- a/src/api/java/ic2/api/energy/event/EnergyTileEvent.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package ic2.api.energy.event;
-
-import net.minecraftforge.event.world.WorldEvent;
-
-import ic2.api.energy.EnergyNet;
-import ic2.api.energy.tile.IEnergyTile;
-
-/**
- * Base class for energy net events, don't use it directly.
- *
- * See ic2/api/energy/usage.txt for an overall description of the energy net api.
- */
-public class EnergyTileEvent extends WorldEvent {
- public EnergyTileEvent(IEnergyTile tile) {
- super(EnergyNet.instance.getWorld(tile));
-
- if (getWorld() == null) throw new NullPointerException("world is null");
-
- this.tile = tile;
- }
-
- public final IEnergyTile tile;
-}
-
diff --git a/src/api/java/ic2/api/energy/event/EnergyTileLoadEvent.class b/src/api/java/ic2/api/energy/event/EnergyTileLoadEvent.class
deleted file mode 100644
index 9ccd40e3e..000000000
Binary files a/src/api/java/ic2/api/energy/event/EnergyTileLoadEvent.class and /dev/null differ
diff --git a/src/api/java/ic2/api/energy/event/EnergyTileLoadEvent.java b/src/api/java/ic2/api/energy/event/EnergyTileLoadEvent.java
deleted file mode 100644
index bf019ae34..000000000
--- a/src/api/java/ic2/api/energy/event/EnergyTileLoadEvent.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package ic2.api.energy.event;
-
-import ic2.api.energy.tile.IEnergyTile;
-
-/**
- * Event announcing new energy tiles.
- *
- * This event notifies subscribers of loaded energy tiles, e.g. after getting
- * loaded through the chunk they are in or after being placed down by the
- * player or another deployer mechanism.
- *
- * Every energy tile which wants to get connected to the IC2 Energy Network has
- * to either post this event or alternatively call EnergyNet.addTileEntity().
- *
- * You may use this event to build a static representation of energy tiles for
- * your own energy grid implementation if you need to. It's not required if you
- * always lookup energy paths on demand.
- *
- * See ic2/api/energy/usage.txt for an overall description of the energy net api.
- */
-public class EnergyTileLoadEvent extends EnergyTileEvent {
- public EnergyTileLoadEvent(IEnergyTile energyTile1) {
- super(energyTile1);
- }
-}
-
diff --git a/src/api/java/ic2/api/energy/event/EnergyTileUnloadEvent.class b/src/api/java/ic2/api/energy/event/EnergyTileUnloadEvent.class
deleted file mode 100644
index f5e53ae50..000000000
Binary files a/src/api/java/ic2/api/energy/event/EnergyTileUnloadEvent.class and /dev/null differ
diff --git a/src/api/java/ic2/api/energy/event/EnergyTileUnloadEvent.java b/src/api/java/ic2/api/energy/event/EnergyTileUnloadEvent.java
deleted file mode 100644
index 2b22ae31c..000000000
--- a/src/api/java/ic2/api/energy/event/EnergyTileUnloadEvent.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package ic2.api.energy.event;
-
-import ic2.api.energy.tile.IEnergyTile;
-
-/**
- * Event announcing terminated energy tiles.
- *
- * This event notifies subscribers of unloaded energy tiles, e.g. after getting
- * unloaded through the chunk they are in or after being destroyed by the
- * player or another block pick/destruction mechanism.
- *
- * Every energy tile which wants to get disconnected from the IC2 Energy
- * Network has to either post this event or alternatively call
- * EnergyNet.removeTileEntity().
- *
- * You may use this event to build a static representation of energy tiles for
- * your own energy grid implementation if you need to. It's not required if you
- * always lookup energy paths on demand.
- *
- * See ic2/api/energy/usage.txt for an overall description of the energy net api.
- */
-public class EnergyTileUnloadEvent extends EnergyTileEvent {
- public EnergyTileUnloadEvent(IEnergyTile energyTile1) {
- super(energyTile1);
- }
-}
-
diff --git a/src/api/java/ic2/api/energy/prefab/BasicEnergyTe$Sink.class b/src/api/java/ic2/api/energy/prefab/BasicEnergyTe$Sink.class
deleted file mode 100644
index 566fb3c53..000000000
Binary files a/src/api/java/ic2/api/energy/prefab/BasicEnergyTe$Sink.class and /dev/null differ
diff --git a/src/api/java/ic2/api/energy/prefab/BasicEnergyTe$Source.class b/src/api/java/ic2/api/energy/prefab/BasicEnergyTe$Source.class
deleted file mode 100644
index 69a0e5df6..000000000
Binary files a/src/api/java/ic2/api/energy/prefab/BasicEnergyTe$Source.class and /dev/null differ
diff --git a/src/api/java/ic2/api/energy/prefab/BasicEnergyTe.class b/src/api/java/ic2/api/energy/prefab/BasicEnergyTe.class
deleted file mode 100644
index c94b587ce..000000000
Binary files a/src/api/java/ic2/api/energy/prefab/BasicEnergyTe.class and /dev/null differ
diff --git a/src/api/java/ic2/api/energy/prefab/BasicEnergyTe.java b/src/api/java/ic2/api/energy/prefab/BasicEnergyTe.java
deleted file mode 100644
index 6bd775a65..000000000
--- a/src/api/java/ic2/api/energy/prefab/BasicEnergyTe.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package ic2.api.energy.prefab;
-
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-
-/**
- * BasicEnergyTe.Sink and BasicEnergyTe.Source allow integrating tile entities into the energy net
- * by using them as the super class.
- *
- * They implement the necessary forwards to make BasicSink/BasicSource work, provided the sub
- * classes always call those forwards when overriding them.
- *
- * If it's not desirable to use BasicEnergyTe, the delegates like BasicSink can also be used
- * directly, provided they receive the forwards like implemented here.
- *
- * Example usage, machine with 10k EU buffer, tier 2, 50 EU/tick, 100 tick process time:
- * It's designed to be attached to a tile entity as a delegate. Functionally BasicSink acts as a
- * one-time configurable input energy buffer, thus providing a common use case for machines.
- *
- * A simpler alternative is to use {@link BasicSinkTe.Sink}, which requires injecting into the
- * type hierarchy (using it as a super class). BasicSink however can be added to any class without
- * inheritance, but needs some forwards for keeping its state and registering with the energy net.
- *
- * The constraints set by BasicSink like the strict tank-like energy buffering should provide a
- * more easy to use and stable interface than using IEnergySink directly while aiming for
- * optimal performance.
- *
- * Using BasicSink involves the following steps: Example implementation code:
- * A subclass still has to implement acceptsEnergyFrom and emitsEnergyTo.
- */
-public abstract class BasicSinkSource extends BasicEnergyTile implements IEnergySink, IEnergySource {
- public BasicSinkSource(TileEntity parent, double capacity, int sinkTier, int sourceTier) {
- super(parent, capacity);
-
- this.sinkTier = sinkTier;
- this.sourceTier = sourceTier;
- double power = EnergyNet.instance.getPowerFromTier(sourceTier);
-
- if (getCapacity() < power) setCapacity(power);
- }
-
- public BasicSinkSource(ILocatable parent, double capacity, int sinkTier, int sourceTier) {
- super(parent, capacity);
-
- this.sinkTier = sinkTier;
- this.sourceTier = sourceTier;
- double power = EnergyNet.instance.getPowerFromTier(sourceTier);
-
- if (getCapacity() < power) setCapacity(power);
- }
-
- public BasicSinkSource(World world, BlockPos pos, double capacity, int sinkTier, int sourceTier) {
- super(world, pos, capacity);
-
- this.sinkTier = sinkTier;
- this.sourceTier = sourceTier;
- double power = EnergyNet.instance.getPowerFromTier(sourceTier);
-
- if (getCapacity() < power) setCapacity(power);
- }
-
- /**
- * Set the IC2 energy tier for this sink.
- *
- * @param tier IC2 Tier.
- */
- public void setSinkTier(int tier) {
- this.sinkTier = tier;
- }
-
- /**
- * Set the IC2 energy tier for this source.
- *
- * @param tier IC2 Tier.
- */
- public void setSourceTier(int tier) {
- double power = EnergyNet.instance.getPowerFromTier(tier);
-
- if (getCapacity() < power) setCapacity(power);
-
- this.sourceTier = tier;
- }
-
- // energy net interface >>
-
- @Override
- public double getDemandedEnergy() {
- return Math.max(0, capacity - energyStored);
- }
-
- @Override
- public double injectEnergy(EnumFacing directionFrom, double amount, double voltage) {
- energyStored += amount;
-
- return 0;
- }
-
- @Override
- public int getSinkTier() {
- return sinkTier;
- }
-
- @Override
- public double getOfferedEnergy() {
- return energyStored;
- }
-
- @Override
- public void drawEnergy(double amount) {
- energyStored -= amount;
- }
-
- @Override
- public int getSourceTier() {
- return sourceTier;
- }
-
- // << energy net interface
-
- @Override
- protected String getNbtTagName() {
- return "IC2BasicSinkSource";
- }
-
- protected int sinkTier;
- protected int sourceTier;
-}
diff --git a/src/api/java/ic2/api/energy/prefab/BasicSource.class b/src/api/java/ic2/api/energy/prefab/BasicSource.class
deleted file mode 100644
index aec40ce5d..000000000
Binary files a/src/api/java/ic2/api/energy/prefab/BasicSource.class and /dev/null differ
diff --git a/src/api/java/ic2/api/energy/prefab/BasicSource.java b/src/api/java/ic2/api/energy/prefab/BasicSource.java
deleted file mode 100644
index 9efba8de7..000000000
--- a/src/api/java/ic2/api/energy/prefab/BasicSource.java
+++ /dev/null
@@ -1,165 +0,0 @@
-package ic2.api.energy.prefab;
-
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.EnumFacing;
-import net.minecraft.util.math.BlockPos;
-import net.minecraft.world.World;
-
-import ic2.api.energy.EnergyNet;
-import ic2.api.energy.tile.IEnergyAcceptor;
-import ic2.api.energy.tile.IEnergySource;
-import ic2.api.info.ILocatable;
-
-/**
- * BasicSource is a simple delegate to add an ic2 energy source.
- *
- * It's designed to be attached to a tile entity as a delegate. Functionally BasicSource acts as a
- * one-time configurable output energy buffer, thus providing a common use case for generators.
- *
- * A simpler alternative is to use {@link BasicSinkTe.Source}, which requires injecting into the
- * type hierarchy (using it as a super class). BasicSource however can be added to any class without
- * inheritance, but needs some forwards for keeping its state and registering with the energy net.
- *
- * The constraints set by BasicSource like the strict tank-like energy buffering should provide a
- * more easy to use and stable interface than using IEnergySource directly while aiming for
- * optimal performance.
- *
- * Using BasicSource involves the following steps: Example implementation code:
- * The value will be limited to the source tier's power multiplied with the packet count
- * (see {@link IMultiEnergySource}, default 1).
- *
- * @note Modifying the energy net from this method is disallowed.
- *
- * @return Energy offered this tick
- */
- double getOfferedEnergy();
-
- /**
- * Draw energy from this source's buffer.
- *
- * If the source doesn't have a buffer, this may be a no-op.
- *
- * @param amount amount of EU to draw, may be negative
- */
- void drawEnergy(double amount);
-
- /**
- * Determine the tier of this energy source.
- * 1 = LV, 2 = MV, 3 = HV, 4 = EV etc.
- *
- * @note Modifying the energy net from this method is disallowed.
- *
- * @return tier of this energy source
- */
- int getSourceTier();
-}
-
diff --git a/src/api/java/ic2/api/energy/tile/IEnergyTile.class b/src/api/java/ic2/api/energy/tile/IEnergyTile.class
deleted file mode 100644
index 087633b0f..000000000
Binary files a/src/api/java/ic2/api/energy/tile/IEnergyTile.class and /dev/null differ
diff --git a/src/api/java/ic2/api/energy/tile/IEnergyTile.java b/src/api/java/ic2/api/energy/tile/IEnergyTile.java
deleted file mode 100644
index 3938190a4..000000000
--- a/src/api/java/ic2/api/energy/tile/IEnergyTile.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package ic2.api.energy.tile;
-
-/**
- * For internal usage only, base class for all energy tiles.
- *
- * @see IEnergySink
- * @see IEnergySource
- * @see IEnergyConductor
- *
- * See ic2/api/energy/usage.txt for an overall description of the energy net api.
- */
-public interface IEnergyTile {
- //
-}
-
diff --git a/src/api/java/ic2/api/energy/tile/IExplosionPowerOverride.class b/src/api/java/ic2/api/energy/tile/IExplosionPowerOverride.class
deleted file mode 100644
index e478add70..000000000
Binary files a/src/api/java/ic2/api/energy/tile/IExplosionPowerOverride.class and /dev/null differ
diff --git a/src/api/java/ic2/api/energy/tile/IExplosionPowerOverride.java b/src/api/java/ic2/api/energy/tile/IExplosionPowerOverride.java
deleted file mode 100644
index 02144e4f1..000000000
--- a/src/api/java/ic2/api/energy/tile/IExplosionPowerOverride.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package ic2.api.energy.tile;
-
-/**
- * Implement with an {@link IEnergySink} tile entity to change the force of the explosion when overpowered.
- */
-public interface IExplosionPowerOverride {
-
- /**
- * Checks if the electric tile should explode. If you return false here,
- * the explosion will just not happen at all and the block will stay.
- * This is NOT recommended.
- * @return Whether the block should explode.
- *
- * @note It should not be dependent on the tier of the power injected, consider {@link IOverloadHandler} if necessary.
- */
- boolean shouldExplode();
-
- /**
- * The explosion force when too much power is received.
- * @param tier The tier of power, that was injected into the energy sink, that caused it to explode.
- * @param defaultPower The default explosion power.
- * @return The explosion power
- */
- float getExplosionPower(int tier, float defaultPower);
-}
\ No newline at end of file
diff --git a/src/api/java/ic2/api/energy/tile/IHeatSource.class b/src/api/java/ic2/api/energy/tile/IHeatSource.class
deleted file mode 100644
index 34f9e1e6a..000000000
Binary files a/src/api/java/ic2/api/energy/tile/IHeatSource.class and /dev/null differ
diff --git a/src/api/java/ic2/api/energy/tile/IHeatSource.java b/src/api/java/ic2/api/energy/tile/IHeatSource.java
deleted file mode 100644
index c442d10fd..000000000
--- a/src/api/java/ic2/api/energy/tile/IHeatSource.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package ic2.api.energy.tile;
-
-import net.minecraft.util.EnumFacing;
-
-public interface IHeatSource {
-
- /*
- * Return max heat transmission peer Tick (only theoretical bandwidth not available amount)
- */
- int maxrequestHeatTick(EnumFacing directionFrom);
-
- /*
- * @param requested amount of heat to transfer
- *
- * @return transmitted amount of heat
- *
- * example: You Request 100 units of heat but the Source have only 50 units left
- *
- * requestHeat(100) : return 50 : so 50 units of heat remove from HeatSource
- */
-
- int requestHeat(EnumFacing directionFrom, int requestheat);
-}
diff --git a/src/api/java/ic2/api/energy/tile/IKineticSource.class b/src/api/java/ic2/api/energy/tile/IKineticSource.class
deleted file mode 100644
index 05257b06f..000000000
Binary files a/src/api/java/ic2/api/energy/tile/IKineticSource.class and /dev/null differ
diff --git a/src/api/java/ic2/api/energy/tile/IKineticSource.java b/src/api/java/ic2/api/energy/tile/IKineticSource.java
deleted file mode 100644
index 37b0226c8..000000000
--- a/src/api/java/ic2/api/energy/tile/IKineticSource.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package ic2.api.energy.tile;
-
-import net.minecraft.util.EnumFacing;
-
-public interface IKineticSource {
- /*
- * Return max kinetic energy transmission peer Tick (only theoretical bandwidth not available amount)
- */
- int maxrequestkineticenergyTick(EnumFacing directionFrom);
-
- /*
- * @param requested amount of kinetic energy to transfer
- *
- * @return transmitted amount of kineticenergy
- *
- * example: You Request 100 units of kinetic energy but the Source have only 50 units left
- *
- * requestkineticenergy(100) : return 50 : so 50 units of kinetic energy remove from KineticSource
- */
-
- int requestkineticenergy(EnumFacing directionFrom, int requestkineticenergy);
-}
diff --git a/src/api/java/ic2/api/energy/tile/IMetaDelegate.class b/src/api/java/ic2/api/energy/tile/IMetaDelegate.class
deleted file mode 100644
index 16e51c133..000000000
Binary files a/src/api/java/ic2/api/energy/tile/IMetaDelegate.class and /dev/null differ
diff --git a/src/api/java/ic2/api/energy/tile/IMetaDelegate.java b/src/api/java/ic2/api/energy/tile/IMetaDelegate.java
deleted file mode 100644
index 1bb9b1e92..000000000
--- a/src/api/java/ic2/api/energy/tile/IMetaDelegate.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package ic2.api.energy.tile;
-
-import java.util.List;
-
-/**
- * Interface for grouping multi-block structures to a single energy net delegate.
- *
- * The energy net uses TileEntity to refer to a specific xyz+world position. If multiple of those
- * positions should belong to the same functional structure, i.e. they consume or produce energy
- * only once for the whole multi-block instead of once per every single block, this interface
- * allows to do so.
- *
- * The tile entity implementing IMetaDelegate has to be added/removed to/from the energy net
- * instead of every single sub-TileEntity. The energy net interaction will be handled by the
- * IMetaDelegate TileEntity as well.
- *
- * The sub tile array TileEntity[] just provides optional connectivity (IEnergyAcceptor,
- * IEnergyEmitter) and mandatory position (x, y, z, World) data.
- * If the connectivity data on the sub tile is missing, the meta delegate is queried instead.
- *
- * See ic2/api/energy/usage.txt for an overall description of the energy net api.
- */
-public interface IMetaDelegate extends IEnergyTile {
- /**
- * Get the sub-Tiles belonging to this Meta Tile.
- *
- * @note The list has to be consistent between the EnergyNet Load and Unload events.
- * @note The list must have at least 1 element.
- * @note The parent tile implementing IMetaDelegate isn't automatically included.
- *
- * @return sub-Tile array
- */
- List
- * For more information such as why this event exists, when it's posted, and how to react to it properly, see {@link ITeBlock}.
- *
- * You may be asking, why would an internal interface need documenting? Well, the answer is so people can use
- * Because it allows effectively level control to IC2 itself, this gives you near total control of your tile entities:
- *
- * So that's all well and good, but what you really want is an example of how to do it properly. Good idea, let's go.
- *
- * The id has to be unique within the mod and is used for saving.
- *
- * By default this id will be also used to determine {@link #getUnlocalizedName()} and {@link #getTexturesLocation()}.
- *
- * @note changing the id or owner will cause existing crops in users' worlds to disappear.
- *
- * @return Plant id
- */
- public abstract String getId();
-
- /**
- * Determine the mod owning this crop.
- *
- * The owner serves as a name space. With every mod using a different owner, a mod only has to
- * make sure it doesn't have getId() conflicts within itself. The identifier has to be lower
- * case to ensure compatibility with future versions.
- *
- * It's recommended to hard code this to your lower case mod id as specified in the @Mod
- * annotation, as {@link #getUnlocalizedName()} will use it by default.
- *
- * Do not use IC2's mod id here.
- *
- * @note changing the id or owner will cause existing crops in users' worlds to disappear.
- *
- * @return owning mod identifier, lower case.
- */
- public abstract String getOwner();
-
- /**
- * Translation key for display to the player.
- *
- * It's recommended to specify a valid key from your language file here.
- *
- * e.g. Add "yourmod.crop.yourCropName = Your crop's name" to the language file,
- * override {@link #getId()} to return "yourCropName" and override {@link #getOwner()} to return "yourmod".
- *
- * @return Unlocalized name.
- */
- public String getUnlocalizedName() {
- return getOwner() + ".crop." + getId(); //Good enough default
- }
-
- /**
- * Your name here, will be shown in "Discovered by:" when analyzing seeds.
- *
- * @return Your name
- */
- public String getDiscoveredBy() {
- return "unknown";
- }
-
- /**
- * Description of your plant. Keep it short, a few characters per line for up to two lines.
- * Default is showing attributes of your plant, 2 per line.
- *
- * @param i line to get, starting from 0
- * @return The line
- */
- public String desc(int i) {
- String[] att = getAttributes();
-
- if (att == null || att.length == 0) return "";
-
- if (i == 0) {
- String s = att[0];
- if (att.length >= 2) {
- s += ", " + att[1];
- if (att.length >= 3) s += ",";
- }
- return s;
- }
- if (att.length < 3) return "";
- String s = att[2];
- if (att.length >= 4) s += ", " + att[3];
- return s;
- }
-
- /**
- * Crop roots length. Maximum roots length should be 5.
- * @param cropTile reference to ICropTile
- * @return roots length use in isBlockBelow
- */
- public int getRootsLength(ICropTile cropTile) {
- return 1;
- }
-
- /**
- * Object containing the crop properties info - See {@link CropProperties} for more info.
- */
- public abstract CropProperties getProperties();
-
- /**
- * Additional attributes of the plant, also influencing breeding.
- * Plants sharing stats and attributes will tend to cross-breed more often.
- *
- * @return Attributes as an array of strings
- */
- public String[] getAttributes() {
- return new String[0];
- }
-
- /**
- * Determine the max crop size.
- *
- * Currently used for texture allocation, growth and harvesting control (by default).
- */
- public abstract int getMaxSize();
-
- /**
- * Amount of growth points needed to increase the plant's size.
- * Default is 200 * tier.
- */
- public int getGrowthDuration(ICropTile cropTile) {
- return getProperties().getTier() * 200;
- }
-
- /**
- * Check whether the plant can grow further.
- *
- * Consider:
- * - Humidity, nutrients and air quality
- * - Current size
- * - Light level
- * - Special biomes or conditions, accessible through crop.worldObj
- *
- * This method will be called upon empty upgraded crops to check whether a neighboring plant can cross onto it! Don't check if the size is greater than 0 and if the ID is real.
- *
- * @param cropTile reference to ICropTile
- * @return Whether the crop can grow
- */
- public boolean canGrow(ICropTile cropTile) {
- return cropTile.getCurrentSize() < getMaxSize();
- }
-
- /**
- * Calculate the influence for the plant to grow based on humidity, nutrients and air.
- * Normal behavior is rating the three stats "normal", with each of them ranging from 0-30.
- * Basic rule: Assume everything returns 10. All together must equal 30. Add the factors to your likings, for example (humidity*0.7)+(nutrients*0.9)+(air*1.4)
- *
- * Default is humidity + nutrients + air (no factors).
- *
- * @param crop reference to ICropTile
- * @param humidity ground humidity, influenced by hydration
- * @param nutrients nutrient quality in ground, based on fertilizers
- * @param air air quality, influences by open gardens and less crops surrounding this one
- * @return 0-30
- */
- public int getWeightInfluences(ICropTile crop, int humidity, int nutrients, int air) {
- return humidity + nutrients + air;
- }
-
- /**
- * Used to determine whether the plant can crossbreed with another crop.
- * Default is allow crossbreeding if the size is greater or equal than 3.
- *
- * @param crop crop to crossbreed with
- */
- public boolean canCross(ICropTile crop) {
- return crop.getCurrentSize() >= 3;
- }
-
-
- /**
- * Called when the plant is rightclicked by a player.
- * Default action is harvesting.
- *
- * Only called Serverside.
- *
- * @param cropTile reference to ICropTile
- * @param player player rightclicking the crop
- * @return Whether the plant has changed
- */
- public boolean onRightClick(ICropTile cropTile, EntityPlayer player) {
- return cropTile.performManualHarvest();
- }
-
- /**
- * Use in Crop Harvester with insert Cropnalyzer to get best Output.
- *
- * @param cropTile reference to ICropTile
- * @return need crop size for best output.
- */
-
- public int getOptimalHarvestSize(ICropTile cropTile) {
- return getMaxSize();
- }
-
- /**
- * Check whether the crop can be harvested.
- *
- * @param cropTile reference to ICropTile
- * @return Whether the crop can be harvested in its current state.
- */
- public boolean canBeHarvested(ICropTile cropTile) {
- return cropTile.getCurrentSize() == getMaxSize();
- }
-
- /**
- * Base chance for dropping the plant's gains, specify values greater than 1 for multiple drops.
- * Default is 0.95^tier.
- *
- * @return Chance to drop the gains
- */
- public double dropGainChance() {
- return Math.pow(0.95, getProperties().getTier());
- }
-
- /**
- * Item obtained from harvesting the plant.
- *
- * @param crop reference to ICropTile
- * @return Item obtained
- */
- public abstract ItemStack getGain(ICropTile crop);
-
- /**
- * Get the size of the plant after harvesting.
- * Default is 1.
- *
- * @param cropTile reference to ICropTile
- * @return Plant size after harvesting
- */
- public int getSizeAfterHarvest(ICropTile cropTile) {
- return 1;
- }
-
-
- /**
- * Called when the plant is left clicked by a player.
- * Default action is picking the plant.
- *
- * Only called server side.
- *
- * @param cropTile reference to ICropTile
- * @param player player left clicked the crop
- * @return Whether the plant has changed
- */
- public boolean onLeftClick(ICropTile cropTile, EntityPlayer player) {
- return cropTile.pick();
- }
-
- /**
- * Base chance for dropping seeds when the plant is picked.
- * Default is 0.5*0.8^tier with a bigger chance for sizes greater than 2 and absolutely no chance for size 0.
- *
- * @param crop reference to ICropTile
- * @return Chance to drop the seeds
- */
- public float dropSeedChance(ICropTile crop) {
- if (crop.getCurrentSize() == 1) return 0;
- float base = 0.5F;
- if (crop.getCurrentSize() == 2) base /= 2F;
- for (int i = 0; i < getProperties().getTier(); i++) {
- base *= 0.8;
- }
- return base;
- }
-
- /**
- * Obtain seeds dropped when the plant is picked.
- * Multiple drops of the returned ItemStack can occur.
- * Default action is generating a seed from this crop.
- *
- * @param crop reference to ICropTile
- * @return Seeds
- */
- public ItemStack getSeeds(ICropTile crop) {
- return crop.generateSeeds(crop.getCrop(), crop.getStatGrowth(), crop.getStatGain(), crop.getStatResistance(), crop.getScanLevel());
- }
-
- /**
- * Called when a neighbor block to the crop has changed.
- *
- * @param crop reference to ICropTile
- */
- public void onNeighbourChange(ICropTile crop) {
- // NO-OP
- }
-
- /**
- * Check if the crop emits a redstone signal.
- *
- * @return Whether the crop emits a redstone signal.
- */
- public boolean isRedstoneSignalEmitter(ICropTile cropTile) {
- return false;
- }
-
- /**
- * Get the emitted redstone signal strength.
- *
- * @return The redstone signal strength.
- */
- public int getEmittedRedstoneSignal(ICropTile cropTile) {
- return 0;
- }
-
- /**
- * Called when the crop is destroyed.
- *
- * @param crop reference to ICropTile
- */
- public void onBlockDestroyed(ICropTile crop) {
- //
- }
-
- /**
- * Get the light value emitted by the plant.
- *
- * @param crop reference to ICropTile
- * @return Light value emitted
- */
- public int getEmittedLight(ICropTile crop) {
- return 0;
- }
-
- /**
- * Default is true if the entity is an EntityLiving in jumping or sprinting state.
- *
- * @param crop reference to ICropTile
- * @param entity entity colliding
- * @return Whether trampling calculation should happen, return false if the plant is no longer valid.
- */
- public boolean onEntityCollision(ICropTile crop, Entity entity) {
- return (entity instanceof EntityLivingBase && entity.isSprinting());
- }
-
-
- /**
- * Called every time the crop ticks.
- * Should be called every 256 ticks or around 13 seconds.
- *
- * @param cropTile reference to ICropTile
- */
- public void tick(ICropTile cropTile) {
- // nothing by default
- }
-
- /**
- * Check whether this plant spreads weed to surrounding tiles.
- * Default is true if the plant has a high growth stat (or is weeds) and size greater or equal than 2.
- *
- * @param cropTile reference to ICropTile
- * @return Whether the plant spreads weed
- */
- public boolean isWeed(ICropTile cropTile) {
- return cropTile.getCurrentSize() >= 2 && (cropTile.getCrop() == Crops.weed || cropTile.getStatGrowth() >= 24);
- }
-
- /**
- * Retrieve the crop world.
- * @param cropTile reference to ICropTile.
- * @return The crop world object.
- */
- public World getWorld(ICropTile cropTile) {
- return cropTile.getWorldObj();
- }
-
- public abstract List
- */
-public class BasicEnergyTe
- * public class MyMachine extends BasicEnergyTe.Sink implements ITickable {
- * public MyMachine() {
- * super(10000, 2);
- * }
- *
- * {@literal @}Override
- * public void readFromNBT(NBTTagCompound nbt) {
- * super.readFromNbt(nbt); // important: keep super call
- *
- * this.progess = nbt.getInteger("progress");
- * }
- *
- * {@literal @}Override
- * public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
- * nbt = super.writeToNBT(nbt); // important: keep super call
- *
- * nbt.setInteger("progress", progress);
- *
- * return nbt;
- * }
- *
- * {@literal @}Override
- * public void update() {
- * if (hasWork() && getEnergyBuffer().useEnergy(50) && ++progress >= 100) {
- * progress = 0;
- * doWork();
- * }
- * }
- *
- * private int progress;
- * }
- *
- *
- *
- *
- */
-public class BasicSink extends BasicEnergyTile implements IEnergySink {
- /**
- * Constructor for a new BasicSink delegate.
- *
- * @param parent TileEntity represented by this energy sink.
- * @param capacity Maximum amount of eu to store.
- * @param tier IC2 tier, 1 = LV, 2 = MV, ...
- */
- public BasicSink(TileEntity parent, double capacity, int tier) {
- super(parent, capacity);
-
- this.tier = tier;
- }
-
- public BasicSink(ILocatable parent, double capacity, int tier) {
- super(parent, capacity);
-
- this.tier = tier;
- }
-
- public BasicSink(World world, BlockPos pos, double capacity, int tier) {
- super(world, pos, capacity);
-
- this.tier = tier;
- }
-
- /**
- * Set the IC2 energy tier for this sink.
- *
- * @param tier IC2 Tier.
- */
- public void setSinkTier(int tier) {
- this.tier = tier;
- }
-
- // energy net interface >>
-
- @Override
- public boolean acceptsEnergyFrom(IEnergyEmitter emitter, EnumFacing direction) {
- return true;
- }
-
- @Override
- public double getDemandedEnergy() {
- return Math.max(0, capacity - energyStored);
- }
-
- @Override
- public double injectEnergy(EnumFacing directionFrom, double amount, double voltage) {
- energyStored += amount;
-
- return 0;
- }
-
- @Override
- public int getSinkTier() {
- return tier;
- }
-
- // << energy net interface
-
- @Override
- protected String getNbtTagName() {
- return "IC2BasicSink";
- }
-
- protected int tier;
-}
diff --git a/src/api/java/ic2/api/energy/prefab/BasicSinkSource.class b/src/api/java/ic2/api/energy/prefab/BasicSinkSource.class
deleted file mode 100644
index d81177d46..000000000
Binary files a/src/api/java/ic2/api/energy/prefab/BasicSinkSource.class and /dev/null differ
diff --git a/src/api/java/ic2/api/energy/prefab/BasicSinkSource.java b/src/api/java/ic2/api/energy/prefab/BasicSinkSource.java
deleted file mode 100644
index 3936ca843..000000000
--- a/src/api/java/ic2/api/energy/prefab/BasicSinkSource.java
+++ /dev/null
@@ -1,114 +0,0 @@
-package ic2.api.energy.prefab;
-
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.EnumFacing;
-import net.minecraft.util.math.BlockPos;
-import net.minecraft.world.World;
-
-import ic2.api.energy.EnergyNet;
-import ic2.api.energy.tile.IEnergySink;
-import ic2.api.energy.tile.IEnergySource;
-import ic2.api.info.ILocatable;
-
-/**
- * Combination of BasicSink and BasicSource, see their respective documentation for details.
- *
- *
- * public class SomeTileEntity extends TileEntity {
- * // new basic energy sink, 1000 EU buffer, tier 1 (32 EU/t, LV)
- * private BasicSink ic2EnergySink = new BasicSink(this, 1000, 1);
- *
- * {@literal @}Override
- * public void onLoad() {
- * ic2EnergySink.onLoad(); // notify the energy sink
- * ...
- * }
- *
- * {@literal @}Override
- * public void invalidate() {
- * ic2EnergySink.invalidate(); // notify the energy sink
- * ...
- * super.invalidate(); // this is important for mc!
- * }
- *
- * {@literal @}Override
- * public void onChunkUnload() {
- * ic2EnergySink.onChunkUnload(); // notify the energy sink
- * ...
- * }
- *
- * {@literal @}Override
- * public void readFromNBT(NBTTagCompound tag) {
- * super.readFromNBT(tag);
- *
- * ic2EnergySink.readFromNBT(tag);
- * ...
- * }
- *
- * {@literal @}Override
- * public void writeToNBT(NBTTagCompound tag) {
- * super.writeToNBT(tag);
- *
- * ic2EnergySink.writeToNBT(tag);
- * ...
- * }
- *
- * {@literal @}Override
- * public void update() {
- * if (ic2EnergySink.useEnergy(5)) { // use 5 eu from the sink's buffer this tick
- * ... // do something with the energy
- * }
- * ...
- * }
- *
- * ...
- * }
- *
- *
- *
- *
- */
-public class BasicSource extends BasicEnergyTile implements IEnergySource {
- /**
- * Constructor for a new BasicSource delegate.
- *
- * @param parent1 Base TileEntity represented by this energy source.
- * @param capacity1 Maximum amount of eu to store.
- * @param tier1 IC2 tier, 1 = LV, 2 = MV, ...
- */
- public BasicSource(TileEntity parent, double capacity, int tier) {
- super(parent, capacity);
-
- this.tier = tier;
- double power = EnergyNet.instance.getPowerFromTier(tier);
-
- if (getCapacity() < power) setCapacity(power);
- }
-
- public BasicSource(ILocatable parent, double capacity, int tier) {
- super(parent, capacity);
-
- this.tier = tier;
- double power = EnergyNet.instance.getPowerFromTier(tier);
-
- if (getCapacity() < power) setCapacity(power);
- }
-
- public BasicSource(World world, BlockPos pos, double capacity, int tier) {
- super(world, pos, capacity);
-
- this.tier = tier;
- double power = EnergyNet.instance.getPowerFromTier(tier);
-
- if (getCapacity() < power) setCapacity(power);
- }
-
- /**
- * Set the IC2 energy tier for this source.
- *
- * @param tier1 IC2 Tier.
- */
- public void setSourceTier(int tier) {
- double power = EnergyNet.instance.getPowerFromTier(tier);
-
- if (getCapacity() < power) setCapacity(power);
-
- this.tier = tier;
- }
-
- // energy net interface >>
-
- @Override
- public boolean emitsEnergyTo(IEnergyAcceptor receiver, EnumFacing direction) {
- return true;
- }
-
- @Override
- public double getOfferedEnergy() {
- return energyStored;
- }
-
- @Override
- public void drawEnergy(double amount) {
- energyStored -= amount;
- }
-
- @Override
- public int getSourceTier() {
- return tier;
- }
-
- // << energy net interface
-
- @Override
- protected String getNbtTagName() {
- return "IC2BasicSource";
- }
-
- protected int tier;
-}
diff --git a/src/api/java/ic2/api/energy/tile/IChargingSlot.class b/src/api/java/ic2/api/energy/tile/IChargingSlot.class
deleted file mode 100644
index 761910731..000000000
Binary files a/src/api/java/ic2/api/energy/tile/IChargingSlot.class and /dev/null differ
diff --git a/src/api/java/ic2/api/energy/tile/IChargingSlot.java b/src/api/java/ic2/api/energy/tile/IChargingSlot.java
deleted file mode 100644
index 2238326ea..000000000
--- a/src/api/java/ic2/api/energy/tile/IChargingSlot.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package ic2.api.energy.tile;
-
-/**
- * Represents a slot (or set of slots) that can have electric items in them to be charged
- *
- * @author Chocohead
- */
-public interface IChargingSlot {
- /**
- * Called when the energy component is ticked to fill the slots
- *
- * @param amount The amount of energy available for the slot(s)
- * @return The amount of energy used charging the items in the slot(s)
- */
- public double charge(double amount);
-}
\ No newline at end of file
diff --git a/src/api/java/ic2/api/energy/tile/IColoredEnergyTile.class b/src/api/java/ic2/api/energy/tile/IColoredEnergyTile.class
deleted file mode 100644
index b364517df..000000000
Binary files a/src/api/java/ic2/api/energy/tile/IColoredEnergyTile.class and /dev/null differ
diff --git a/src/api/java/ic2/api/energy/tile/IColoredEnergyTile.java b/src/api/java/ic2/api/energy/tile/IColoredEnergyTile.java
deleted file mode 100644
index 2ad9c42c8..000000000
--- a/src/api/java/ic2/api/energy/tile/IColoredEnergyTile.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package ic2.api.energy.tile;
-
-import net.minecraft.item.EnumDyeColor;
-import net.minecraft.util.EnumFacing;
-
-/**
- * Interface, that allows Blocks to be colored and have their connectivity based on that color.
- * This allows for any Energy Tile to be colored. (Conductors, Sinks, Sources)
- * @author Aroma1997
- */
-public interface IColoredEnergyTile extends IEnergyTile {
-
- /**
- * This is to get a Energy Tile's color for the given side. Mainly used for checking connectivity.
- * @param side The side you want to get the color from.
- * @return The color of the Energy Tile at the given side or null, if it's uncolored.
- */
- EnumDyeColor getColor(EnumFacing side);
-
-
-}
diff --git a/src/api/java/ic2/api/energy/tile/IDischargingSlot.class b/src/api/java/ic2/api/energy/tile/IDischargingSlot.class
deleted file mode 100644
index 06518bd86..000000000
Binary files a/src/api/java/ic2/api/energy/tile/IDischargingSlot.class and /dev/null differ
diff --git a/src/api/java/ic2/api/energy/tile/IDischargingSlot.java b/src/api/java/ic2/api/energy/tile/IDischargingSlot.java
deleted file mode 100644
index 64ea69bd8..000000000
--- a/src/api/java/ic2/api/energy/tile/IDischargingSlot.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package ic2.api.energy.tile;
-
-/**
- * Represents a slot (or set of slots) that can have electric items in them to be discharged
- *
- * @author Chocohead
- */
-public interface IDischargingSlot {
- /**
- * Called when the energy component is ticked to empty the slots
- *
- * @param space The amount of free space for energy that can be stored
- * @param ignoreLimit Whether to ignore the discharge limit of the item in the slot(s)
- * @return The amount of energy discharged from the items in the slot(s)
- */
- public double discharge(double space, boolean ignoreLimit);
-}
\ No newline at end of file
diff --git a/src/api/java/ic2/api/energy/tile/IEnergyAcceptor.class b/src/api/java/ic2/api/energy/tile/IEnergyAcceptor.class
deleted file mode 100644
index 5347aea0c..000000000
Binary files a/src/api/java/ic2/api/energy/tile/IEnergyAcceptor.class and /dev/null differ
diff --git a/src/api/java/ic2/api/energy/tile/IEnergyAcceptor.java b/src/api/java/ic2/api/energy/tile/IEnergyAcceptor.java
deleted file mode 100644
index 652330116..000000000
--- a/src/api/java/ic2/api/energy/tile/IEnergyAcceptor.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package ic2.api.energy.tile;
-
-import net.minecraft.util.EnumFacing;
-
-/**
- * For internal/multi-block usage only.
- *
- * @see IEnergySink
- * @see IEnergyConductor
- *
- * See ic2/api/energy/usage.txt for an overall description of the energy net api.
- */
-public interface IEnergyAcceptor extends IEnergyTile {
- /**
- * Determine if this acceptor can accept current from an adjacent emitter in a direction.
- *
- * The TileEntity in the emitter parameter is what was originally added to the energy net,
- * which may be normal in-world TileEntity, a delegate or an IMetaDelegate.
- *
- * @param emitter energy emitter, may also be null or an IMetaDelegate
- * @param side side the energy is being received from
- */
- boolean acceptsEnergyFrom(IEnergyEmitter emitter, EnumFacing side);
-}
-
diff --git a/src/api/java/ic2/api/energy/tile/IEnergyConductor.class b/src/api/java/ic2/api/energy/tile/IEnergyConductor.class
deleted file mode 100644
index 4b2c8f5af..000000000
Binary files a/src/api/java/ic2/api/energy/tile/IEnergyConductor.class and /dev/null differ
diff --git a/src/api/java/ic2/api/energy/tile/IEnergyConductor.java b/src/api/java/ic2/api/energy/tile/IEnergyConductor.java
deleted file mode 100644
index 08dab8896..000000000
--- a/src/api/java/ic2/api/energy/tile/IEnergyConductor.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package ic2.api.energy.tile;
-
-/**
- * Tile entities which conduct energy pulses without buffering (mostly cables) have to implement this
- * interface.
- *
- * See ic2/api/energy/usage.txt for an overall description of the energy net api.
- */
-public interface IEnergyConductor extends IEnergyAcceptor, IEnergyEmitter {
- /**
- * Energy loss for the conductor in EU per block.
- *
- * @return Energy loss
- */
- double getConductionLoss();
-
- /**
- * Amount of energy the insulation will handle before shocking nearby players and mobs.
- *
- * @return Insulation energy absorption in EU
- */
- double getInsulationEnergyAbsorption();
-
- /**
- * Amount of energy the insulation will handle before it is destroyed.
- * Ensure that this value is greater than the insulation energy absorption + 64.
- *
- * @return Insulation-destroying energy in EU
- */
- double getInsulationBreakdownEnergy();
-
- /**
- * Amount of energy the conductor will handle before it melts.
- *
- * @return Conductor-destroying energy in EU
- */
- double getConductorBreakdownEnergy();
-
- /**
- * Remove the conductor's insulation if the insulation breakdown energy was exceeded.
- *
- * @see #getInsulationBreakdownEnergy()
- */
- void removeInsulation();
-
- /**
- * Remove the conductor if the conductor breakdown energy was exceeded.
- *
- * @see #getConductorBreakdownEnergy()
- */
- void removeConductor();
-}
-
diff --git a/src/api/java/ic2/api/energy/tile/IEnergyEmitter.class b/src/api/java/ic2/api/energy/tile/IEnergyEmitter.class
deleted file mode 100644
index a7394c855..000000000
Binary files a/src/api/java/ic2/api/energy/tile/IEnergyEmitter.class and /dev/null differ
diff --git a/src/api/java/ic2/api/energy/tile/IEnergyEmitter.java b/src/api/java/ic2/api/energy/tile/IEnergyEmitter.java
deleted file mode 100644
index 10fbeabe5..000000000
--- a/src/api/java/ic2/api/energy/tile/IEnergyEmitter.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package ic2.api.energy.tile;
-
-import net.minecraft.util.EnumFacing;
-
-/**
- * For internal/multi-block usage only.
- *
- * @see IEnergySource
- * @see IEnergyConductor
- *
- * See ic2/api/energy/usage.txt for an overall description of the energy net api.
- */
-public interface IEnergyEmitter extends IEnergyTile {
- /**
- * Determine if this emitter can emit energy to an adjacent receiver.
- *
- * The TileEntity in the receiver parameter is what was originally added to the energy net,
- * which may be normal in-world TileEntity, a delegate or an IMetaDelegate.
- *
- * @param receiver receiver, may also be null or an IMetaDelegate
- * @param side side the energy is to be sent to
- * @return Whether energy should be emitted
- */
- boolean emitsEnergyTo(IEnergyAcceptor receiver, EnumFacing side);
-}
-
diff --git a/src/api/java/ic2/api/energy/tile/IEnergySink.class b/src/api/java/ic2/api/energy/tile/IEnergySink.class
deleted file mode 100644
index 0ca533026..000000000
Binary files a/src/api/java/ic2/api/energy/tile/IEnergySink.class and /dev/null differ
diff --git a/src/api/java/ic2/api/energy/tile/IEnergySink.java b/src/api/java/ic2/api/energy/tile/IEnergySink.java
deleted file mode 100644
index 827425467..000000000
--- a/src/api/java/ic2/api/energy/tile/IEnergySink.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package ic2.api.energy.tile;
-
-import net.minecraft.util.EnumFacing;
-
-/**
- * Allows a tile entity (mostly a machine) to receive energy.
- *
- * See ic2/api/energy/usage.txt for an overall description of the energy net api.
- */
-public interface IEnergySink extends IEnergyAcceptor {
- /**
- * Determine how much energy the sink accepts.
- *
- * Make sure that injectEnergy() does accepts energy if demandsEnergy() returns anything > 0.
- *
- * @note Modifying the energy net from this method is disallowed.
- *
- * @return max accepted input in eu
- */
- double getDemandedEnergy();
-
- /**
- * Determine the tier of this energy sink.
- * 1 = LV, 2 = MV, 3 = HV, 4 = EV etc.
- *
- * @note Modifying the energy net from this method is disallowed.
- * @note Return Integer.MAX_VALUE to allow any voltage.
- *
- * @return tier of this energy sink
- */
- int getSinkTier();
-
- /**
- * Transfer energy to the sink.
- *
- * It's highly recommended to accept all energy by letting the internal buffer overflow to
- * increase the performance and accuracy of the distribution simulation.
- *
- * @param directionFrom direction from which the energy comes from
- * @param amount energy to be transferred
- * @return Energy not consumed (leftover)
- */
- double injectEnergy(EnumFacing directionFrom, double amount, double voltage);
-}
-
diff --git a/src/api/java/ic2/api/energy/tile/IEnergySource.class b/src/api/java/ic2/api/energy/tile/IEnergySource.class
deleted file mode 100644
index 41ca6cff4..000000000
Binary files a/src/api/java/ic2/api/energy/tile/IEnergySource.class and /dev/null differ
diff --git a/src/api/java/ic2/api/energy/tile/IEnergySource.java b/src/api/java/ic2/api/energy/tile/IEnergySource.java
deleted file mode 100644
index 03c1ebd0f..000000000
--- a/src/api/java/ic2/api/energy/tile/IEnergySource.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package ic2.api.energy.tile;
-
-/**
- * Allows a tile entity (mostly a generator) to emit energy.
- *
- * See ic2/api/energy/usage.txt for an overall description of the energy net api.
- */
-public interface IEnergySource extends IEnergyEmitter {
- /**
- * Maximum energy output provided by the source this tick, typically the stored energy.
- *
- *
- * public class SomeTileEntity extends TileEntity {
- * // new basic energy source, 1000 EU buffer, tier 1 (32 EU/t, LV)
- * private BasicSource ic2EnergySource = new BasicSource(this, 1000, 1);
- *
- * {@literal @}Override
- * public void onLoad() {
- * ic2EnergySource.onLoad(); // notify the energy source
- * ...
- * }
- *
- * {@literal @}Override
- * public void invalidate() {
- * ic2EnergySource.invalidate(); // notify the energy source
- * ...
- * super.invalidate(); // this is important for mc!
- * }
- *
- * {@literal @}Override
- * public void onChunkUnload() {
- * ic2EnergySource.onChunkUnload(); // notify the energy source
- * ...
- * }
- *
- * {@literal @}Override
- * public void readFromNBT(NBTTagCompound tag) {
- * super.readFromNBT(tag);
- *
- * ic2EnergySource.readFromNBT(tag);
- * ...
- * }
- *
- * {@literal @}Override
- * public void writeToNBT(NBTTagCompound tag) {
- * super.writeToNBT(tag);
- *
- * ic2EnergySource.writeToNBT(tag);
- * ...
- * }
- *
- * {@literal @}Override
- * public void update() {
- * ic2EnergySource.addEnergy(5); // add 5 eu to the source's buffer this tick
- * ...
- * }
- *
- * ...
- * }
- * TileEntityBlock.
- * That class is the base for all IC2 tile entities, so by being able to use that you're level to IC2.
- * Many methods are protected in there too, as they're only designed to be called by BlockTileEntity (which is the block all IC2 tile entities will be on),
- * by being able to extend it means all those methods you can now extend and be confident they will be called correctly.
- *
- * You can pick whether each of your tile entity items show up in creative, and the order in which they do.
- * The event allows you to properly register your own version of
- * There is a proper separation between each registered ITeBlock by resource location, rather than everything being inserted into a single enum.
- * You also receive your own instance of BlockTileEntity and ItemBlockTileEntity rather than having to use IC2's own one.
- * All the language keys and blockstate file are in your own assets (which you can, and in fact have to, pick).
- * You can have custom item models with non-standard model locations.
- * TeBlock in a way that will be as fully supported as is physically possible.
- * It's not in the actual API itself as it's heavily dependent on internal classes, so you have this instead.
- * This is also probably the most documented thing in the entire IC2 API. I'm too kind really. ;)
- *
- *
- * And that's it, you now have
- *import net.minecraftforge.common.MinecraftForge;
- *import net.minecraftforge.fml.common.Mod;
- *import net.minecraftforge.fml.common.Mod.EventHandler;
- *import net.minecraftforge.fml.common.event.FMLConstructionEvent;
- *import net.minecraftforge.fml.common.event.FMLInitializationEvent;
- *import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
- *
- *import ic2.api.event.TeBlockFinalCallEvent;
- *import ic2.core.block.TeBlockRegistry;
- *
- *{@literal @}Mod(modId="ExampleIC2Addon")
- *public class ExampleIC2Addon {
- * {@literal @}EventHandler
- * public void start(FMLConstructionEvent event) {
- * MinecraftForge.EVENT_BUS.register(this);
- * }
- *
- * {@literal @}SubscribeEvent
- * public void register(TeBlockFinalCallEvent event) {
- * TeBlockRegistry.addAll(MyTeBlock.class, MyTeBlock.IDENTITY);
- *
- * MinecraftForge.EVENT_BUS.unregister(this);
- * }
- *
- * {@literal @}EventHandler
- * public void init(FMLInitializationEvent event) {
- * MyTeBlock.buildDummies();
- * }
- *}
- *
- *
- *import net.minecraft.block.material.Material;
- *import net.minecraft.creativetab.CreativeTabs;
- *import net.minecraft.item.EnumRarity;
- *import net.minecraft.item.ItemStack;
- *import net.minecraft.tileentity.TileEntity;
- *import net.minecraft.util.EnumFacing;
- *import net.minecraft.util.ResourceLocation;
- *
- *import ic2.core.block.BlockTileEntity;
- *import ic2.core.block.ITeBlock;
- *import ic2.core.block.TileEntityBlock;
- *import ic2.core.item.block.ItemBlockTileEntity;
- *import ic2.core.ref.TeBlock.DefaultDrop;
- *import ic2.core.ref.TeBlock.HarvestTool;
- *import ic2.core.ref.TeBlock.ITePlaceHandler;
- *import ic2.core.util.Util;
- *
- *public enum MyTeBlock implements ITeBlock {
- * my_machine_name(MyMachineTileEntity.class, 0, false, Util.noFacings, false, HarvestTool.Pickaxe, DefaultDrop.Machine, 5, 10, EnumRarity.UNCOMMON, Material.IRON, false);
- *
- * private MyTeBlock(Class extends TileEntityBlock> teClass, int ID,
- * boolean hasActive, Set{@literal <}EnumFacing{@literal >} possibleFacings, boolean canBeWrenched,
- * HarvestTool tool, DefaultDrop drop,
- * float hardness, float explosionResistance, EnumRarity rarity, Material material, boolean isTransparent) {
- * this.teClass = teClass;
- * this.ID = ID;
- * this.hasActive = hasActive;
- * this.possibleFacings = possibleFacings;
- * this.canBeWrenched = canBeWrenched;
- * this.tool = tool;
- * this.drop = drop;
- * this.hardness = hardness;
- * this.explosionResistance = explosionResistance;
- * this.rarity = rarity;
- * this.material = material;
- * this.isTransparent = isTransparent;
- *
- * TileEntity.addMapping(block.teClass, IDENTITY.getResourceDomain() + ':' + block.getName());
- * }
- *
- * {@literal @}Override
- * public boolean hasItem() {
- * return teClass != null && itemMeta != -1;
- * }
- *
- * {@literal @}Override
- * public String getName() {
- * return name();
- * }
- *
- * {@literal @}Override
- * public ResourceLocation getIdentifier() {
- * return IDENTITY;
- * }
- *
- * {@literal @}Override
- * public Class extends TileEntityBlock> getTeClass() {
- * return teClass;
- * }
- *
- * {@literal @}Override
- * public boolean hasActive() {
- * return hasActive;
- * }
- *
- * {@literal @}Override
- * public int getId() {
- * return ID;
- * }
- *
- * {@literal @}Override
- * public float getHardness() {
- * return hardness;
- * }
- *
- * {@literal @}Override
- * public HarvestTool getHarvestTool() {
- * return tool;
- * }
- *
- * {@literal @}Override
- * public DefaultDrop getDefaultDrop() {
- * return drop;
- * }
- *
- * {@literal @}Override
- * public float getExplosionResistance() {
- * return explosionResistance;
- * }
- *
- * {@literal @}Override
- * public boolean allowWrenchRotating() {
- * return canBeWrenched;
- * }
- *
- * {@literal @}Override
- * public Set{@literal <}EnumFacing{@literal >} getSupportedFacings() {
- * return possibleFacings;
- * }
- *
- * {@literal @}Override
- * public EnumRarity getRarity() {
- * return rarity;
- * }
- *
- * {@literal @}Override
- * public Material getMaterial() {
- * return material;
- * }
- *
- * {@literal @}Override
- * public boolean isTransparent() {
- * return isTransparent;
- * }
- *
- * {@literal @}Override
- * public void setPlaceHandler(ITePlaceHandler handler) {
- * this.placeHandler = handler;
- * }
- *
- * {@literal @}Override
- * public ITePlaceHandler getPlaceHandler() {
- * return placeHandler;
- * }
- *
- * public static void buildDummies() {
- * for (MyTeBlock block : values()) {
- * //System.out.printf("Building %s (with teClass %s)%n", block.getName(), block.teClass);
- * if (block.teClass != null) {
- * try {
- * block.dummyTe = block.teClass.newInstance();
- * } catch (Exception e) {
- * e.printStackTrace();
- * }
- * }
- * }
- * }
- *
- * {@literal @}Override
- * public TileEntityBlock getDummyTe() {
- * return dummyTe;
- * }
- *
- * private final Class extends TileEntityBlock> teClass;
- * private final int ID;
- * private final boolean hasActive;
- * private final Set{@literal <}EnumFacing{@literal >} possibleFacings;
- * private final boolean canBeWrenched;
- * private final HarvestTool tool;
- * private final DefaultDrop drop;
- * private final float hardness;
- * private final float explosionResistance;
- * private final EnumRarity rarity;
- * private final Material material;
- * private final boolean isTransparent;
- * private TileEntityBlock dummyTe;
- * private ITePlaceHandler placeHandler;
- *
- * public static final ResourceLocation IDENTITY = new ResourceLocation("ExampleIC2Addon", "machines");
- *}
- * my_machine_name registered with the MyMachineTileEntity tile entity class,
- * the language key to translate it's name being ExampleIC2Addon.machines.my_machine_name and
- * the blockstate being in machines.json file in your mod's assets.
- *
- * But hang on, what are all the parameters of our new enum and what does ITeBlock do with them? What are dummy tile entities for?
- * Don't worry, it's quite simple (once you know it at least).
- *
- * First we'll start on what {@link TeBlockFinalCallEvent} is. It's posted on the {@link MinecraftForge#EVENT_BUS} just before the blocks are built,
- * after which point any further attempts to register ITeBlocks will fail, as we can't inject them late due to the model generating.
- * It is best to hook into this to register your ITeBlocks, as it will be guaranteed to be posted at the right time.
- *
- * In terms of ITeBlock, there's quite a bit of information it needs in order to function. We'll go through each parameter (or getter method most cases too) in turn:
- *
TileEntityBlock otherwise it would miss critical methods to work.
- * If extending that is a problem then using ITeBlock isn't what you should be doing.ITeBlock an item is.
- * That's very important as the tile entity class is worked out by the ID when a block's being placed in ItemBlockTileEntity.
- * Changing this will cause everyone's items to change and there is no stopping that if you do.
- * The ID you pick should start at 0, and go up to {@link Short#MAX_VALUE}.
- * Use -1 if the tile entity doesn't have an item form (or is placed using an item other than ItemBlockTileEntity).ITeBlock.
- * The language keys, translations and internal mappings all use this, so it's best to store it as a static final variable and use that.
- * TileEntityBlock#getActive() returns true or not.
- * The models for that will be at name_active, you can check te.json for an example if you wish.EnumFacings that the block can face, used for rotating by the wrench for example.
- * IC2 has some useful constants relating to that in Util (allFacings, horizontalFacings, downSideFacings and noFacings).EnumHelper unfortunately.harvestTool, more can be added upon request.EnumRarity that the item will have for the tile entity.BlockTileEntity and ItemBlockTileEntityBlockTileEntity, use {@link TeBlockRegistry#get(ResourceLocation)}.ItemBlockTileEntity, use {@link BlockTileEntity#getItem()}.ITeBlockITeBlockSpecialItem along with ITeBlock, then the item model will be what's provided rather than the block model.ITeBlocks to creativeITeBlocks that return true for {@link ic2.core.ref.TeBlock#hasItem()}.
- * There, that should be everything you need to utilise ITeBlock to add your own tile entities using IC2's very flexible framework.
- * I'll be happy to answer any questions you have on it, your best bet is to ask me (Chocohead) on the IC2 forums,
- * although if you post in the support section other people might be able to help before I see your post.
- * I'll certainly take suggestions too, this is mostly just based on what IC2 uses/needs, so there might well be things missed that might be useful.
- *
- * Goodness I spent too long on this again...
- *
supportedFacings.
- * @see {@link ic2.core.block.TileEntityBlock} for the base tile entity.
- * @see {@link ic2.core.block.BlockTileEntity} for the base block (you'll never need to construct this yourself).
- * @see {@link ic2.core.item.block.ItemBlockTileEntity} for the base item (you shouldn't need to construct this yourself either).
- * @see {@link ITeBlockSpecialItem} for the interface used to have a custom item location.
- *
- *
- * @since IC2 2.7.14
- * @version 2.0
- *
- * @author Chocohead
- */
-public interface ITeBlock {
-}
\ No newline at end of file
diff --git a/src/api/java/ic2/api/info/Info.class b/src/api/java/ic2/api/info/Info.class
deleted file mode 100644
index 9682d4754..000000000
Binary files a/src/api/java/ic2/api/info/Info.class and /dev/null differ
diff --git a/src/api/java/ic2/api/info/Info.java b/src/api/java/ic2/api/info/Info.java
deleted file mode 100644
index 619e04e53..000000000
--- a/src/api/java/ic2/api/info/Info.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package ic2.api.info;
-
-import net.minecraft.potion.Potion;
-import net.minecraft.util.DamageSource;
-
-import net.minecraftforge.fml.common.Loader;
-import net.minecraftforge.fml.common.LoaderState;
-
-public class Info {
- public static IInfoProvider itemInfo;
- public static Object ic2ModInstance;
-
- /**
- * Damage Sources used by IC2.
- * Getting assigned in preload.
- */
- public static DamageSource DMG_ELECTRIC, DMG_NUKE_EXPLOSION, DMG_RADIATION;
-
- /**
- * Potions used by IC2.
- * Getting assigned in preload.
- */
- public static Potion POTION_RADIATION;
-
- public static boolean isIc2Available() {
- if (ic2Available != null) return ic2Available;
-
- boolean loaded = Loader.isModLoaded(MOD_ID);
-
- if (Loader.instance().hasReachedState(LoaderState.CONSTRUCTING)) {
- ic2Available = loaded;
- }
-
- return loaded;
- }
-
- public static String MOD_ID = "ic2";
- private static Boolean ic2Available = null;
-}
\ No newline at end of file
diff --git a/src/api/java/ic2/api/item/ElectricItem.class b/src/api/java/ic2/api/item/ElectricItem.class
deleted file mode 100644
index ad45f925c..000000000
Binary files a/src/api/java/ic2/api/item/ElectricItem.class and /dev/null differ
diff --git a/src/api/java/ic2/api/item/ElectricItem.java b/src/api/java/ic2/api/item/ElectricItem.java
deleted file mode 100644
index 19e5fc1b9..000000000
--- a/src/api/java/ic2/api/item/ElectricItem.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package ic2.api.item;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import net.minecraft.item.ItemStack;
-
-/**
- * Allows for charging, discharging and using electric items (IElectricItem).
- */
-public final class ElectricItem {
- /**
- * IElectricItemManager to use for interacting with IElectricItem ItemStacks.
- *
- * This manager will act as a gateway and delegate the tasks to the final implementation
- * (rawManager or a custom one) as necessary.
- */
- public static IElectricItemManager manager;
-
- /**
- * Standard IElectricItemManager implementation, only call it directly from another
- * IElectricItemManager. Use manager instead.
- */
- public static IElectricItemManager rawManager;
-
- /**
- * Register an electric item manager for items not implementing IElectricItem.
- *
- * This method is only designed for special purposes, implementing IElectricItem or
- * ISpecialElectricItem instead of using this is faster.
- *
- * Managers used with ISpecialElectricItem shouldn't be registered.
- *
- * @param manager Manager to register.
- */
- public static void registerBackupManager(IBackupElectricItemManager manager) {
- backupManagers.add(manager);
- }
-
- /**
- * Get the electric item manager suitable for the supplied item stack.
- *
- * This method is for internal use only.
- *
- * @param stack ItemStack to be handled.
- * @return First suitable electric item manager.
- */
- public static IBackupElectricItemManager getBackupManager(ItemStack stack) {
- for (IBackupElectricItemManager manager : backupManagers) {
- if (manager.handles(stack)) return manager;
- }
-
- return null;
- }
-
-
- private static final ListAdds info to {@link IItemHudProvider}s for the given stack. - * Return an empty list not null if no info is given.
- * - *
- * {@literal @}override
- * public List{@literal <}String{@literal >} getHudInfo(ItemStack stack, boolean advanced) {
- * List{@literal <}String{@literal >} info = new LinkedList{@literal <}String{@literal >}();
- * info.add("I am a cool item");
- * info.add("and have cool info.");
- * return info;
- * }
- *
- *
- * @param stack The stack to get information for
- * @param advanced Whether the HUD is in extended or advanced display mode
- * @return A list of strings to draw in the overlay
- */
- public ListOverride the percent shown by the HUD overlay for the applied item.
- * - *By default, {@link IElectricItem}s have the percentage charged shown, - * damageable items have their {@link Item#getDurabilityForDisplay(ItemStack)} values shown - * and items that don't apply to either aren't shown at all.
- * - * @author Chocohead - */ - public static interface IItemHudBarProvider { - /** - * Get the percent to show in the overlay HUD for the given stack. - * - * @param stack The stack to get the percent for. - * @return A number between 0 and 100, less than 0 will not render the item at all. - */ - int getBarPercent(ItemStack stack); - } -} \ No newline at end of file diff --git a/src/api/java/ic2/api/item/IKineticRotor$GearboxType.class b/src/api/java/ic2/api/item/IKineticRotor$GearboxType.class deleted file mode 100644 index 4c6ab9db6..000000000 Binary files a/src/api/java/ic2/api/item/IKineticRotor$GearboxType.class and /dev/null differ diff --git a/src/api/java/ic2/api/item/IKineticRotor.class b/src/api/java/ic2/api/item/IKineticRotor.class deleted file mode 100644 index 4bba1ebde..000000000 Binary files a/src/api/java/ic2/api/item/IKineticRotor.class and /dev/null differ diff --git a/src/api/java/ic2/api/item/IKineticRotor.java b/src/api/java/ic2/api/item/IKineticRotor.java deleted file mode 100644 index a61d1622c..000000000 --- a/src/api/java/ic2/api/item/IKineticRotor.java +++ /dev/null @@ -1,23 +0,0 @@ -package ic2.api.item; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; - -public interface IKineticRotor { - int getDiameter(ItemStack stack); - - ResourceLocation getRotorRenderTexture(ItemStack stack); - - float getEfficiency(ItemStack stack); - - int getMinWindStrength(ItemStack stack); - - int getMaxWindStrength(ItemStack stack); - - boolean isAcceptedType(ItemStack stack, GearboxType type); - - public static enum GearboxType { - WATER, - WIND, - } -} diff --git a/src/api/java/ic2/api/item/IMetalArmor.class b/src/api/java/ic2/api/item/IMetalArmor.class deleted file mode 100644 index 426278ae3..000000000 Binary files a/src/api/java/ic2/api/item/IMetalArmor.class and /dev/null differ diff --git a/src/api/java/ic2/api/item/IMetalArmor.java b/src/api/java/ic2/api/item/IMetalArmor.java deleted file mode 100644 index 16ffd24e5..000000000 --- a/src/api/java/ic2/api/item/IMetalArmor.java +++ /dev/null @@ -1,20 +0,0 @@ -package ic2.api.item; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -/** - * Armor items implementing this can be considered metal armor. - * - * Currently used for determining which boots can be used to slide up a magnetic pole. - */ -public interface IMetalArmor { - /** - * Determine if the given armor piece is metal armor. - * - * @param itemstack Armor piece as worn by the player - * @param player The player - * @return Whether the armor piece is metal armor - */ - public boolean isMetalArmor(ItemStack itemstack, EntityPlayer player); -} diff --git a/src/api/java/ic2/api/item/ISpecialElectricItem.class b/src/api/java/ic2/api/item/ISpecialElectricItem.class deleted file mode 100644 index b21e26d12..000000000 Binary files a/src/api/java/ic2/api/item/ISpecialElectricItem.class and /dev/null differ diff --git a/src/api/java/ic2/api/item/ISpecialElectricItem.java b/src/api/java/ic2/api/item/ISpecialElectricItem.java deleted file mode 100644 index 14218d8c1..000000000 --- a/src/api/java/ic2/api/item/ISpecialElectricItem.java +++ /dev/null @@ -1,13 +0,0 @@ -package ic2.api.item; - -import net.minecraft.item.ItemStack; - -public interface ISpecialElectricItem { - /** - * Supply a custom IElectricItemManager. - * - * @param stack ItemStack to get the manager for - * @return IElectricItemManager instance - */ - IElectricItemManager getManager(ItemStack stack); -} diff --git a/src/api/java/ic2/api/item/ITeBlockSpecialItem.class b/src/api/java/ic2/api/item/ITeBlockSpecialItem.class deleted file mode 100644 index 5d2b1a280..000000000 Binary files a/src/api/java/ic2/api/item/ITeBlockSpecialItem.class and /dev/null differ diff --git a/src/api/java/ic2/api/item/ITeBlockSpecialItem.java b/src/api/java/ic2/api/item/ITeBlockSpecialItem.java deleted file mode 100644 index 7d9ca63eb..000000000 --- a/src/api/java/ic2/api/item/ITeBlockSpecialItem.java +++ /dev/null @@ -1,35 +0,0 @@ -package ic2.api.item; - -import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.item.ItemStack; - -import ic2.api.info.ITeBlock; - -/** - * Change the default icon for an {@link ITeBlock} by implementing this. - * - * @since IC2 2.6.85 - * @version 1.0 - * - * @see {@link ITeBlock} for more information - * - * @author Chocohead - */ -public interface ITeBlockSpecialItem { - /** - * Should the model be delegated to the {@link ITeBlock} or the default used? - * - * @param stack The itemstack being rendered - * @return Whether the {@link ITeBlock} will return an {@link ModelResourceLocation} - */ - boolean doesOverrideDefault(ItemStack stack); - - /** - * The {@link ModelResourceLocation} for the given stack. - * Will still use the default even if {@link #doesOverrideDefault(ItemStack)} returns true if this returns null. - * - * @param stack The itemstack being rendered - * @return The model location to be used - */ - ModelResourceLocation getModelLocation(ItemStack stack); -} \ No newline at end of file diff --git a/src/api/java/ic2/api/item/ITerraformingBP.class b/src/api/java/ic2/api/item/ITerraformingBP.class deleted file mode 100644 index d244d1fc5..000000000 Binary files a/src/api/java/ic2/api/item/ITerraformingBP.class and /dev/null differ diff --git a/src/api/java/ic2/api/item/ITerraformingBP.java b/src/api/java/ic2/api/item/ITerraformingBP.java deleted file mode 100644 index 9b27279fe..000000000 --- a/src/api/java/ic2/api/item/ITerraformingBP.java +++ /dev/null @@ -1,42 +0,0 @@ -package ic2.api.item; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -/** - * Allows an item to act as a terraformer blueprint. - */ -public interface ITerraformingBP { - /** - * Get the energy consumption per operation of the blueprint. - * @param stack TODO - * - * @return Energy consumption in EU - */ - double getConsume(ItemStack stack); - - /** - * Get the maximum range of the blueprint. - * Should be a divisor of 5. - * @param stack TODO - * - * @return Maximum range in blocks - */ - int getRange(ItemStack stack); - - boolean canInsert(ItemStack stack, EntityPlayer player, World world, BlockPos pos); - - /** - * Perform the terraforming operation. - * @param stack TODO - * @param world world to terraform - * @param x X position to terraform - * @param z Z position to terraform - * @param yCoord Y position of the terraformer - * - * @return Whether the operation was successful and the terraformer should consume energy. - */ - boolean terraform(ItemStack stack, World world, BlockPos pos); -} diff --git a/src/api/java/ic2/api/item/ItemWrapper.class b/src/api/java/ic2/api/item/ItemWrapper.class deleted file mode 100644 index 5454f5eff..000000000 Binary files a/src/api/java/ic2/api/item/ItemWrapper.class and /dev/null differ diff --git a/src/api/java/ic2/api/item/ItemWrapper.java b/src/api/java/ic2/api/item/ItemWrapper.java deleted file mode 100644 index 6859d29c1..000000000 --- a/src/api/java/ic2/api/item/ItemWrapper.java +++ /dev/null @@ -1,50 +0,0 @@ -package ic2.api.item; - -import com.google.common.collect.ArrayListMultimap; -import com.google.common.collect.Multimap; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -/** - * Wrapper for inserting interfaces into items you don't own. - * - * @author Richard - */ -public class ItemWrapper { - private static final Multimapfalse the type accesses the world or otherwise requires to be run on the main thread,
- * true if it doesn't.
- */
- boolean isThreadSafe();
-}
\ No newline at end of file
diff --git a/src/api/java/ic2/api/network/INetworkDataProvider.class b/src/api/java/ic2/api/network/INetworkDataProvider.class
deleted file mode 100644
index e0773c476..000000000
Binary files a/src/api/java/ic2/api/network/INetworkDataProvider.class and /dev/null differ
diff --git a/src/api/java/ic2/api/network/INetworkDataProvider.java b/src/api/java/ic2/api/network/INetworkDataProvider.java
deleted file mode 100644
index f5a3d24b9..000000000
--- a/src/api/java/ic2/api/network/INetworkDataProvider.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package ic2.api.network;
-
-import java.util.List;
-
-/**
- * Tile entities which want to synchronized specific fields between client and server have to implement this.
- *
- * The fields don't update themselves, a field update must be sent every time a synchronized field changes.
- */
-public interface INetworkDataProvider {
- /**
- * Get the list of synchronized fields.
- *
- * If a name contains =, the name will be split into the actual name and the value, avoiding a
- * field read.
- *
- * @return Names of the synchronized fields
- */
- Listtrue if the chamber is a reactor wall opposed to an actual chamber of items
- * false, but {@link TileEntityReactorVessel} returns true
- *
- * @return If the chamber is a wall or not
- */
- public boolean isWall();
-}
\ No newline at end of file
diff --git a/src/api/java/ic2/api/reactor/IReactorComponent.class b/src/api/java/ic2/api/reactor/IReactorComponent.class
deleted file mode 100644
index 8a7a6fccd..000000000
Binary files a/src/api/java/ic2/api/reactor/IReactorComponent.class and /dev/null differ
diff --git a/src/api/java/ic2/api/reactor/IReactorComponent.java b/src/api/java/ic2/api/reactor/IReactorComponent.java
deleted file mode 100644
index 7916cc17b..000000000
--- a/src/api/java/ic2/api/reactor/IReactorComponent.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package ic2.api.reactor;
-
-import net.minecraft.item.ItemStack;
-
-/**
- * Design custom Reactor components by implementing this Interface
- * Items implementing the interface will not be ejected from Reactors in their clean-up
- * and can/will be interacted with by other elements, f.e. Uranium Cells.
- *
- * All IC2 ReactorComponents implement and use this Interface
- *
- */
-public interface IReactorComponent extends IBaseReactorComponent {
- /**
- * Called by reactor upon iterating through it's inventory (every cycle).
- * Perform all necessary calculation/interaction here
- *
- * @param stack Reference to the specific instance of called ItemStack
- * @param reactor Reference to the Reactor
- * @param x X-coordinate of the stack in the grid
- * @param y Y-coordinate of the stack in the grid
- * @param heatrun every Stack will cycle 2 time (true, false) first run for heat, sec for Eu calculation
- */
- public void processChamber(ItemStack stack, IReactor reactor, int x, int y, boolean heatrun);
-
- /**
- * Can be called by Uranium-Components who attempt to generate energy by pulsing to other components.
- * Uranium-Uranium interaction (f.e.) uses this method.
- * @param stack Reference to the specific instance of called ItemStack
- * @param reactor Reference to the Reactor
- * @param pulsingStack Reference to the specific instance of pulsing ItemStack
- * @param youX X-coordinate of your stack in the grid
- * @param youY Y-coordinate of your stack in the grid
- * @param pulseX X-coordinate of pulsing stack in the grid
- * @param pulseY Y-coordinate of pulsing stack in the grid
- * @param heatrun true for only create heat not EU, false for only EU not heat
- * @return true if this component reacts to the pulse (and pulse is therefore meant to produce heat)
- */
- public boolean acceptUraniumPulse(ItemStack stack, IReactor reactor, ItemStack pulsingStack, int youX, int youY, int pulseX, int pulseY, boolean heatrun);
-
- /**
- * Called by components to determine whether your component can be heated.
- * @param stack Reference to the specific instance of iterated ItemStack
- * @param reactor Reference to the Reactor
- * @param x X-coordinate of the stack in the grid
- * @param y Y-coordinate of the stack in the grid
- * @return true if your component can take heat
- */
- public boolean canStoreHeat(ItemStack stack, IReactor reactor, int x, int y);
-
- /**
- * Called by heat-switches to determine how much heat to distribute into which direction.
- * Please return the maximum capacity of your heat-containing component here.
- * @param stack Reference to the specific instance of iterated ItemStack
- * @param reactor Reference to the Reactor
- * @param x X-coordinate of the stack in the grid
- * @param y Y-coordinate of the stack in the grid
- * @return Maximum heat
- */
- public int getMaxHeat(ItemStack stack, IReactor reactor, int x, int y);
-
- /**
- * Called by heat-switches to determine how much heat to distribute into which direction.
- * Please return the current amount of heat stored in this component
- * @param stack Reference to the specific instance of iterated ItemStack
- * @param reactor Reference to the Reactor
- * @param x X-coordinate of the stack in the grid
- * @param y Y-coordinate of the stack in the grid
- * @return Current Heat
- */
- public int getCurrentHeat(ItemStack stack, IReactor reactor, int x, int y);
-
- /**
- * Called by components to distribute heat to your component.
- * Perform heating-calculations and increase your heat (dmg) level accordingly.
- * This method will as well be called to REDUCE heat, by providing a negative amount.
- *
- * @param stack Reference to the specific instance of iterated ItemStack
- * @param reactor Reference to the Reactor
- * @param x X-coordinate of the stack in the grid
- * @param y Y-coordinate of the stack in the grid
- * @param heat Amount of heat to be added (may be negative to subtract heat)
- * @return 0 if the 'order' was accepted, return >0 to indicate the 'remaining' heat which couldn't be absorbed (and vice versa for <0)
- */
- public int alterHeat(ItemStack stack, IReactor reactor, int x, int y, int heat);
-
- /**
- * Called upon reactor explosion
- * Alter the explosion size.
- * Returning a float 0 < f < 1 will be counted as multiplier.
- * Anything else will be counted as a flat addition (in case of <0 = reduction).
- *
- * @param stack Reference to the specific instance of iterated ItemStack
- * @param reactor Reference to the Reactor
- * @return your explosion modifier
- */
- public float influenceExplosion(ItemStack stack, IReactor reactor);
-}
diff --git a/src/api/java/ic2/api/recipe/IBasicMachineRecipeManager.class b/src/api/java/ic2/api/recipe/IBasicMachineRecipeManager.class
deleted file mode 100644
index 31608e783..000000000
Binary files a/src/api/java/ic2/api/recipe/IBasicMachineRecipeManager.class and /dev/null differ
diff --git a/src/api/java/ic2/api/recipe/IBasicMachineRecipeManager.java b/src/api/java/ic2/api/recipe/IBasicMachineRecipeManager.java
deleted file mode 100644
index 86e725c0e..000000000
--- a/src/api/java/ic2/api/recipe/IBasicMachineRecipeManager.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package ic2.api.recipe;
-
-import java.util.Collection;
-
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-
-public interface IBasicMachineRecipeManager extends IMachineRecipeManagerIMachineRecipeManager.addRecipe takes a metadata parameter, the expected contents are specified - * below as "recipe meta". The metadata NBT itself should be null for "no recipe meta" or a - * NBTTagCompound with keys matching the names and value types mentioned below. - * - *
Example: Compressor recipe, Sand -> Glass: - *
{@code
- * Recipes.compressor.addRecipe(new RecipeInputItemStack(new ItemStack(Blocks.SAND)), null, false, new ItemStack(Blocks.GLASS));
- * }
- *
- * Example: Metal former rolling recipe, Platinum ingot (oredict) -> Platinum plate: - *
{@code
- * Recipes.metalformerRolling.addRecipe(new RecipeInputOreDict("ingotPlatinum"), null, false, myPlatinumPlateStack)
- * }
- *
- * Example: Mass fabricator amplifier, nether stars amplifying 1M EU: - *
{@code
- * NBTTagCompound meta = new NBTTagCompound();
- * meta.setInteger("amplification", 1000000);
- * Recipes.matterAmplifier.addRecipe(new RecipeInputItemStack(new ItemStack(Items.NETHER_STAR)), meta, false);
- * }
- *
- */
-public class Recipes {
- /**
- * Convenience factory for various recipe input variants.
- */
- public static IRecipeInputFactory inputFactory;
-
- /**
- * Recipe manager for furnace recipes.
- *
- * Recipe meta: - *
No recipe meta. - */ - public static IBasicMachineRecipeManager macerator; - - /** - * Recipe manager for extractor recipes. - * - *
No recipe meta. - */ - public static IBasicMachineRecipeManager extractor; - - /** - * Recipe manager for compressor recipes. - * - *
No recipe meta. - */ - public static IBasicMachineRecipeManager compressor; - - /** - * Recipe manager for thermal centrifuge recipes. - * - *
Recipe meta: - *
Recipe meta: - *
Recipe meta: - *
No recipe meta. - * - * @note the implementation is currently immutable, any non-blacklisted item will be accepted, - * chance checking is up to the caller. - */ - public static IBasicMachineRecipeManager recycler; - - /** - * Recipe manager for metal former extrusion mode recipes. - * - *
No recipe meta. - */ - public static IBasicMachineRecipeManager metalformerExtruding; - - /** - * Recipe manager for metal former cutting mode recipes. - * - *
No recipe meta. - */ - public static IBasicMachineRecipeManager metalformerCutting; - - /** - * Recipe manager for metal former rolling mode recipes. - * - *
No recipe meta. - */ - public static IBasicMachineRecipeManager metalformerRolling; - - /** - * Recipe manager for ore washing plant recipes. - * - *
Recipe meta: - *
No recipe meta. - * - *
Reference values: - *
- * combining { 18, 13, 9, 16 }, we can generate a texture connected to the right! - *- * ┌─────────────────┐ ┌────────────────────────────────┐ - * │ texture.png │ │ texture-ctm.png │ - * │ ╔══════╤══════╗ │ │ ──────┼────── ║ ─────┼───── ║ │ - * │ ║ │ ║ │ │ │ │ │║ │ ║ │ - * │ ║ 16 │ 17 ║ │ │ │ 0 │ 1 │║ 2 │ 3 ║ │ - * │ ╟──────┼──────╢ │ │ ┼──────┼──────┼╟──────┼──────╢ │ - * │ ║ │ ║ │ │ │ │ │║ │ ║ │ - * │ ║ 18 │ 19 ║ │ │ │ 4 │ 5 │║ 6 │ 7 ║ │ - * │ ╚══════╧══════╝ │ │ ──────┼────── ║ ─────┼───── ║ │ - * └─────────────────┘ │ ═══════╤═══════╝ ─────┼───── ╚ │ - * │ │ │ ││ │ │ │ - * │ │ 8 │ 9 ││ 10 │ 11 │ │ - * │ ┼──────┼──────┼┼──────┼──────┼ │ - * │ │ │ ││ │ │ │ - * │ │ 12 │ 13 ││ 14 │ 15 │ │ - * │ ═══════╧═══════╗ ─────┼───── ╔ │ - * └────────────────────────────────┘ - *
- * - * combining { 18, 13, 11, 2 }, we can generate a texture, in the shape of an L (connected to the right, and up - *- * ╔══════╤═══════ - * ║ │ │ - * ║ 16 │ 9 │ - * ╟──────┼──────┼ - * ║ │ │ - * ║ 18 │ 13 │ - * ╚══════╧═══════ - *
- * - * HAVE FUN! - * -CptRageToaster- - */ -public class CTM { - public static int REQUIRED_TEXTURES = 2; - public static int QUADS_PER_SIDE = 4; - - /** - * The Uvs for the specific "magic number" value - */ - public static final ISubmap[] uvs = new ISubmap[]{ - //Ctm texture - new Submap(4, 4, 0, 0), // 0 - new Submap(4, 4, 4, 0), // 1 - new Submap(4, 4, 8, 0), // 2 - new Submap(4, 4, 12, 0), // 3 - new Submap(4, 4, 0, 4), // 4 - new Submap(4, 4, 4, 4), // 5 - new Submap(4, 4, 8, 4), // 6 - new Submap(4, 4, 12, 4), // 7 - new Submap(4, 4, 0, 8), // 8 - new Submap(4, 4, 4, 8), // 9 - new Submap(4, 4, 8, 8), // 10 - new Submap(4, 4, 12, 8), // 11 - new Submap(4, 4, 0, 12), // 12 - new Submap(4, 4, 4, 12), // 13 - new Submap(4, 4, 8, 12), // 14 - new Submap(4, 4, 12, 12), // 15 - // Default texture - new Submap(8, 8, 0, 0), // 16 - new Submap(8, 8, 8, 0), // 17 - new Submap(8, 8, 0, 8), // 18 - new Submap(8, 8, 8, 8) // 19 - }; - - public static final ISubmap FULL_TEXTURE = new Submap(16, 16, 0, 0); - - // @formatter:on - - /** Some hardcoded offset values for the different corner indeces */ - protected static int[] submapOffsets = { 4, 5, 1, 0 }; - /** For use via the Chisel 2 config only, altering this could cause unintended behavior */ - public static boolean disableObscuredFaceCheckConfig = false; - - public Optional- * ║ ─────┼───── ╚ - * ║ │ │ - * ║ 2 │ 11 │ - * ╟──────┼──────┼ - * ║ │ │ - * ║ 18 │ 13 │ - * ╚══════╧═══════ - *
- * It represents the eight different directions a face of a block can connect with CTM, and contains the logic for determining if a block is indeed connected in that direction. - *
- * Note that, for example, {@link #TOP_RIGHT} does not mean connected to the {@link #TOP} and {@link #RIGHT}, but connected in the diagonal direction represented by {@link #TOP_RIGHT}. This is used
- * for inner corner rendering.
- */
-public enum Dir {
- // @formatter:off
- TOP(UP),
- TOP_RIGHT(UP, EAST),
- RIGHT(EAST),
- BOTTOM_RIGHT(DOWN, EAST),
- BOTTOM(DOWN),
- BOTTOM_LEFT(DOWN, WEST),
- LEFT(WEST),
- TOP_LEFT(UP, WEST);
- // @formatter:on
-
- /**
- * All values of this enum, used to prevent unnecessary allocation via {@link #values()}.
- */
- public static final Dir[] VALUES = values();
- private static final EnumFacing NORMAL = SOUTH;
-
- private EnumFacing[] dirs;
-
- private Dir(EnumFacing... dirs) {
- this.dirs = dirs;
- }
-
- /**
- * Finds if this block is connected for the given side in this Dir.
- *
- * @param inst
- * The CTM instance to use for logic.
- * @param world
- * The world the block is in.
- * @param pos
- * The position of your block.
- * @param side
- * The side of the current face.
- * @return True if the block is connected in the given Dir, false otherwise.
- */
- public boolean isConnected(CTM ctm, IBlockAccess world, BlockPos pos, EnumFacing side) {
- return ctm.isConnected(world, pos, getConnection(pos, side), side);
- }
-
- /**
- * Finds if this block is connected for the given side in this Dir.
- *
- * @param inst
- * The CTM instance to use for logic.
- * @param world
- * The world the block is in.
- * @param pos
- * The position of your block.
- * @param side
- * The side of the current face.
- * @param side
- * The state to check for connection with.
- * @return True if the block is connected in the given Dir, false otherwise.
- */
- public boolean isConnected(CTM ctm, IBlockAccess world, BlockPos pos, EnumFacing side, IBlockState state) {
- return ctm.isConnected(world, pos, getConnection(pos, side), side, state);
- }
-
- private BlockPos getConnection(BlockPos pos, EnumFacing side) {
- EnumFacing[] dirs = getNormalizedDirs(side);
- BlockPos connection = pos;
- for (EnumFacing dir : dirs) {
- connection = connection.offset(dir);
- }
- return connection;
- }
-
- public EnumFacing[] getNormalizedDirs(EnumFacing normal) {
- if (normal == NORMAL) {
- return dirs;
- } else if (normal == NORMAL.getOpposite()) {
- // If this is the opposite direction of the default normal, we
- // need to mirror the dirs
- // A mirror version does not affect y+ and y- so we ignore those
- EnumFacing[] ret = new EnumFacing[dirs.length];
- for (int i = 0; i < ret.length; i++) {
- ret[i] = dirs[i].getFrontOffsetY() != 0 ? dirs[i] : dirs[i].getOpposite();
- }
- return ret;
- } else {
- EnumFacing axis = null;
- // Next, we need different a different rotation axis depending
- // on if this is up/down or not
- if (normal.getFrontOffsetY() == 0) {
- // If it is not up/down, pick either the left or right-hand
- // rotation
- axis = normal == NORMAL.rotateY() ? UP : DOWN;
- } else {
- // If it is up/down, pick either the up or down rotation.
- axis = normal == UP ? NORMAL.rotateYCCW() : NORMAL.rotateY();
- }
- EnumFacing[] ret = new EnumFacing[dirs.length];
- // Finally apply all the rotations
- for (int i = 0; i < ret.length; i++) {
- ret[i] = rotate(dirs[i], axis);
- }
- return ret;
- }
- }
-
- // God why
-
- private static final int[] FACING_LOOKUP = new int[EnumFacing.values().length];
- static {
- FACING_LOOKUP[NORTH.ordinal()] = 1;
- FACING_LOOKUP[EAST.ordinal()] = 2;
- FACING_LOOKUP[SOUTH.ordinal()] = 3;
- FACING_LOOKUP[WEST.ordinal()] = 4;
- FACING_LOOKUP[UP.ordinal()] = 5;
- FACING_LOOKUP[DOWN.ordinal()] = 6;
- }
-
- private EnumFacing rotate(EnumFacing facing, EnumFacing axisFacing) {
- Axis axis = axisFacing.getAxis();
- AxisDirection axisDir = axisFacing.getAxisDirection();
-
- if (axisDir == AxisDirection.POSITIVE) {
- return facing.rotateAround(axis);
- }
-
- if (facing.getAxis() != axis) {
- switch (axis) {
- case X:
- // I did some manual testing and this is what worked...I don't get it either
- switch (FACING_LOOKUP[facing.ordinal()]) {
- case 1:
- return NORTH;
- case 2:
- case 4:
- default:
- return facing; // Invalid but ignored
- case 3:
- return SOUTH;
- case 5:
- return SOUTH;
- case 6:
- return NORTH;
- }
- case Y:
- return facing.rotateYCCW();
- case Z:
- switch (FACING_LOOKUP[facing.ordinal()]) {
- case 2:
- return EAST;
- case 3:
- default:
- return facing; // invalid but ignored
- case 4:
- return WEST;
- case 5:
- return DOWN;
- case 6:
- return UP;
- }
- }
- }
-
- return facing;
- }
-}
\ No newline at end of file
diff --git a/src/main/java/mekanism/client/render/ctm/ICTMBlock.java b/src/main/java/mekanism/client/render/ctm/ICTMBlock.java
deleted file mode 100644
index e7c9a7303..000000000
--- a/src/main/java/mekanism/client/render/ctm/ICTMBlock.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package mekanism.client.render.ctm;
-
-import net.minecraft.block.properties.PropertyEnum;
-import net.minecraft.block.state.IBlockState;
-import net.minecraft.util.EnumFacing;
-import net.minecraft.util.IStringSerializable;
-
-public interface ICTMBlock