mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-20 04:09:43 +00:00
* updateBuildScript & update dependencies * Fix fluid conduit connecting to non-fluid GT tiles * spotlessApply * one less variable
49 lines
1.5 KiB
Java
49 lines
1.5 KiB
Java
package crazypants.enderio.conduit.geom;
|
|
|
|
import net.minecraftforge.common.util.ForgeDirection;
|
|
|
|
import com.enderio.core.client.render.BoundingBox;
|
|
|
|
import crazypants.enderio.conduit.IConduit;
|
|
|
|
public class CollidableComponent {
|
|
|
|
public final Class<? extends IConduit> conduitType;
|
|
public final BoundingBox bound;
|
|
public final ForgeDirection dir;
|
|
public final Object data;
|
|
|
|
public CollidableComponent(Class<? extends IConduit> conduitType, BoundingBox bound, ForgeDirection id,
|
|
Object data) {
|
|
this.conduitType = conduitType;
|
|
this.bound = bound;
|
|
this.dir = id;
|
|
this.data = data;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "CollidableComponent [conduitType=" + conduitType + ", bound=" + bound + ", id=" + dir + "]";
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object obj) {
|
|
if (obj instanceof CollidableComponent) {
|
|
CollidableComponent other = (CollidableComponent) obj;
|
|
return conduitType == other.conduitType && bound.equals(((CollidableComponent) obj).bound)
|
|
&& dir == other.dir;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
final int prime = 31;
|
|
int result = 1;
|
|
result = prime * result + ((bound == null) ? 0 : bound.hashCode());
|
|
result = prime * result + ((conduitType == null) ? 0 : conduitType.getName().hashCode());
|
|
result = prime * result + ((dir == null) ? 0 : dir.hashCode());
|
|
return result;
|
|
}
|
|
}
|