More Rendering fixes

This commit is contained in:
Sebastian Hartte
2020-06-08 18:35:27 +02:00
parent 679ea1c332
commit b2afa0398c
44 changed files with 427 additions and 276 deletions
@@ -0,0 +1,43 @@
package appeng.tile.crafting;
import appeng.client.render.model.AEModelData;
import com.google.common.base.Preconditions;
import net.minecraft.util.Direction;
import java.util.EnumSet;
import java.util.Objects;
public class CraftingCubeModelData extends AEModelData {
// Contains information on which sides of the block are connected to other parts of a formed crafting cube
private final EnumSet<Direction> connections;
public CraftingCubeModelData(Direction up, Direction forward, EnumSet<Direction> connections) {
super(up, forward);
this.connections = Preconditions.checkNotNull(connections);
}
@Override
public boolean isCacheable() {
return false; // Too many variants
}
public EnumSet<Direction> getConnections() {
return connections;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
CraftingCubeModelData that = (CraftingCubeModelData) o;
return connections.equals(that.connections);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), connections);
}
}