diff options
author | Draknyte1 <Draknyte1@hotmail.com> | 2016-02-27 21:24:45 +1000 |
---|---|---|
committer | Draknyte1 <Draknyte1@hotmail.com> | 2016-02-27 21:24:45 +1000 |
commit | 7711c80664fdfa703b5e60e62af437655da783ae (patch) | |
tree | 1a251a5919b7c6d4f32de7efca6a36d97cef0233 /src/Java/miscutil/enderio/conduit/gas/GasOutput.java | |
parent | 707621bc6afd36856feafb052c2e65c52fe79986 (diff) | |
download | GT5-Unofficial-7711c80664fdfa703b5e60e62af437655da783ae.tar.gz GT5-Unofficial-7711c80664fdfa703b5e60e62af437655da783ae.tar.bz2 GT5-Unofficial-7711c80664fdfa703b5e60e62af437655da783ae.zip |
Added Custom GT Cables/Wire & also added a copy of EnderIO's Gas Conduit classes.
Time to combine the two, yeah?
Also stripped out a heap of constants and refactored them together.
Diffstat (limited to 'src/Java/miscutil/enderio/conduit/gas/GasOutput.java')
-rw-r--r-- | src/Java/miscutil/enderio/conduit/gas/GasOutput.java | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/src/Java/miscutil/enderio/conduit/gas/GasOutput.java b/src/Java/miscutil/enderio/conduit/gas/GasOutput.java new file mode 100644 index 0000000000..02bb4e71dd --- /dev/null +++ b/src/Java/miscutil/enderio/conduit/gas/GasOutput.java @@ -0,0 +1,57 @@ +package crazypants.enderio.conduit.gas; + +import com.enderio.core.common.util.BlockCoord; +import net.minecraftforge.common.util.ForgeDirection; + +public class GasOutput +{ + final ForgeDirection dir; + final BlockCoord location; + + public GasOutput(BlockCoord bc, ForgeDirection dir) + { + this.dir = dir; + this.location = bc; + } + + public int hashCode() + { + int prime = 31; + int result = 1; + result = 31 * result + (this.location == null ? 0 : this.location.hashCode()); + result = 31 * result + (this.dir == null ? 0 : this.dir.hashCode()); + return result; + } + + public boolean equals(Object obj) + { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + GasOutput other = (GasOutput)obj; + if (this.location == null) + { + if (other.location != null) { + return false; + } + } + else if (!this.location.equals(other.location)) { + return false; + } + if (this.dir != other.dir) { + return false; + } + return true; + } + + public String toString() + { + return "GasOutput [dir=" + this.dir + ", location=" + this.location + "]"; + } +} |