Implemented facade rendering on the cable bus.

This commit is contained in:
Sebastian Hartte
2016-09-21 00:11:03 +02:00
parent 71396637e3
commit 2de1842445
11 changed files with 619 additions and 64 deletions
@@ -19,12 +19,14 @@
package appeng.client.render.cablebus;
import java.util.ArrayList;
import java.util.EnumMap;
import java.util.EnumSet;
import java.util.List;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.AxisAlignedBB;
import appeng.api.util.AECableType;
import appeng.api.util.AEColor;
@@ -63,6 +65,13 @@ public class CableBusRenderState
// For each attachment, this contains the distance from the edge until which a cable connection should be drawn
private EnumMap<EnumFacing, Integer> attachmentConnections = new EnumMap<>( EnumFacing.class );
// Contains the facade to use for each side that has a facade attached
private EnumMap<EnumFacing, FacadeRenderState> facades = new EnumMap<>( EnumFacing.class );
// Contains the bounding boxes of all parts on the cable bus to allow facades to cut out holes for the parts. This list is only populated if there are
// facades on this cable bus
private List<AxisAlignedBB> boundingBoxes = new ArrayList<>();
public CableCoreType getCoreType()
{
return coreType;
@@ -133,4 +142,14 @@ public class CableBusRenderState
return attachmentConnections;
}
public EnumMap<EnumFacing, FacadeRenderState> getFacades()
{
return facades;
}
public List<AxisAlignedBB> getBoundingBoxes()
{
return boundingBoxes;
}
}