Fixes API compilation problem.
This commit is contained in:
@@ -24,38 +24,32 @@
|
||||
package appeng.api.util;
|
||||
|
||||
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import appeng.client.render.cablebus.CableCoreType;
|
||||
import appeng.core.AppEng;
|
||||
|
||||
|
||||
public enum AECableType
|
||||
{
|
||||
/**
|
||||
* No Cable present.
|
||||
*/
|
||||
NONE( null, 0, null, null ),
|
||||
NONE,
|
||||
|
||||
/**
|
||||
* Connections to this block should render as glass.
|
||||
*/
|
||||
GLASS( "glass", 0, CableCoreType.GLASS, "parts/cable/glass/" ),
|
||||
GLASS,
|
||||
|
||||
/**
|
||||
* Connections to this block should render as covered.
|
||||
*/
|
||||
COVERED( "covered", 0, CableCoreType.COVERED, "parts/cable/covered/" ),
|
||||
COVERED,
|
||||
|
||||
/**
|
||||
* Connections to this block should render as smart.
|
||||
*/
|
||||
SMART( "smart", 8, CableCoreType.COVERED, "parts/cable/smart/" ),
|
||||
SMART,
|
||||
|
||||
/**
|
||||
* Dense Cable, represents a tier 2 block that can carry 32 channels.
|
||||
*/
|
||||
DENSE( "dense", 32, CableCoreType.DENSE, "parts/cable/dense/" );
|
||||
DENSE;
|
||||
|
||||
public static final AECableType[] VALIDCABLES = {
|
||||
GLASS,
|
||||
@@ -64,60 +58,4 @@ public enum AECableType
|
||||
DENSE
|
||||
};
|
||||
|
||||
private final CableCoreType coreType;
|
||||
private final String type;
|
||||
private final int displayedChannels;
|
||||
private final ResourceLocation model;
|
||||
private final ResourceLocation connectionModel;
|
||||
private final ResourceLocation straightModel;
|
||||
private final String textureFolder;
|
||||
|
||||
private AECableType( String type, int displayedChannels, CableCoreType coreType, String textureFolder )
|
||||
{
|
||||
this.type = type;
|
||||
this.displayedChannels = displayedChannels;
|
||||
this.model = new ResourceLocation( "appliedenergistics2", "part/cable/" + type + "/center" );
|
||||
this.connectionModel = new ResourceLocation( "appliedenergistics2", "part/cable/" + type + "/connection" );
|
||||
this.straightModel = new ResourceLocation( "appliedenergistics2", "part/cable/" + type + "/straight" );
|
||||
this.coreType = coreType;
|
||||
this.textureFolder = textureFolder;
|
||||
}
|
||||
|
||||
public int displayedChannels()
|
||||
{
|
||||
return displayedChannels;
|
||||
}
|
||||
|
||||
public ResourceLocation getModel()
|
||||
{
|
||||
return model;
|
||||
}
|
||||
|
||||
public ResourceLocation getConnectionModel()
|
||||
{
|
||||
return connectionModel;
|
||||
}
|
||||
|
||||
public ResourceLocation getStraightModel()
|
||||
{
|
||||
return straightModel;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The type of core that should be rendered when this cable isn't straight and needs to have a core to attach connections to. Is null for the NULL
|
||||
* cable.
|
||||
*/
|
||||
public CableCoreType getCoreType()
|
||||
{
|
||||
return coreType;
|
||||
}
|
||||
|
||||
public ResourceLocation getConnectionTexture( AEColor color )
|
||||
{
|
||||
if ( textureFolder == null ) {
|
||||
throw new IllegalStateException( "Cable type " + name() + " does not support connections." );
|
||||
}
|
||||
return new ResourceLocation( AppEng.MOD_ID, textureFolder + color.name().toLowerCase() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user