Make getTrunkTexture not abstract
This commit is contained in:
parent
daa828259d
commit
b96480371e
5 changed files with 15 additions and 66 deletions
|
@ -111,7 +111,20 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto
|
||||||
|
|
||||||
public abstract ResourceLocation getChamberTexture();
|
public abstract ResourceLocation getChamberTexture();
|
||||||
|
|
||||||
public abstract ResourceLocation getTrunkTexture(EnergyStage stage);
|
public ResourceLocation getTrunkTexture(EnergyStage stage) {
|
||||||
|
switch (stage) {
|
||||||
|
case BLUE:
|
||||||
|
return TRUNK_BLUE_TEXTURE;
|
||||||
|
case GREEN:
|
||||||
|
return TRUNK_GREEN_TEXTURE;
|
||||||
|
case YELLOW:
|
||||||
|
return TRUNK_YELLOW_TEXTURE;
|
||||||
|
case RED:
|
||||||
|
return TRUNK_RED_TEXTURE;
|
||||||
|
default:
|
||||||
|
return TRUNK_RED_TEXTURE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public boolean onBlockActivated(EntityPlayer player, ForgeDirection side) {
|
public boolean onBlockActivated(EntityPlayer player, ForgeDirection side) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -64,22 +64,6 @@ public class TileEngineIron extends TileEngineWithInventory implements IFluidHan
|
||||||
return CHAMBER_TEXTURES[2];
|
return CHAMBER_TEXTURES[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public ResourceLocation getTrunkTexture(EnergyStage stage) {
|
|
||||||
switch (stage) {
|
|
||||||
case BLUE:
|
|
||||||
return TRUNK_BLUE_TEXTURE;
|
|
||||||
case GREEN:
|
|
||||||
return TRUNK_GREEN_TEXTURE;
|
|
||||||
case YELLOW:
|
|
||||||
return TRUNK_YELLOW_TEXTURE;
|
|
||||||
case RED:
|
|
||||||
return TRUNK_RED_TEXTURE;
|
|
||||||
default:
|
|
||||||
return TRUNK_RED_TEXTURE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(EntityPlayer player, ForgeDirection side) {
|
public boolean onBlockActivated(EntityPlayer player, ForgeDirection side) {
|
||||||
if (player.getCurrentEquippedItem() != null) {
|
if (player.getCurrentEquippedItem() != null) {
|
||||||
|
|
|
@ -14,7 +14,7 @@ import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is just intended to update pre 4.0 engines to the design.
|
* This class is just intended to update pre 4.0 engines to the design.
|
||||||
*
|
* <p/>
|
||||||
* It can be deleted someday.
|
* It can be deleted someday.
|
||||||
*/
|
*/
|
||||||
public class TileEngineLegacy extends TileEngine {
|
public class TileEngineLegacy extends TileEngine {
|
||||||
|
@ -50,22 +50,6 @@ public class TileEngineLegacy extends TileEngine {
|
||||||
return CHAMBER_TEXTURES[0];
|
return CHAMBER_TEXTURES[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public ResourceLocation getTrunkTexture(EnergyStage stage) {
|
|
||||||
switch (stage) {
|
|
||||||
case BLUE:
|
|
||||||
return TRUNK_BLUE_TEXTURE;
|
|
||||||
case GREEN:
|
|
||||||
return TRUNK_GREEN_TEXTURE;
|
|
||||||
case YELLOW:
|
|
||||||
return TRUNK_YELLOW_TEXTURE;
|
|
||||||
case RED:
|
|
||||||
return TRUNK_RED_TEXTURE;
|
|
||||||
default:
|
|
||||||
return TRUNK_RED_TEXTURE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double getMaxEnergy() {
|
public double getMaxEnergy() {
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -51,22 +51,6 @@ public class TileEngineStone extends TileEngineWithInventory {
|
||||||
return CHAMBER_TEXTURES[1];
|
return CHAMBER_TEXTURES[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public ResourceLocation getTrunkTexture(EnergyStage stage) {
|
|
||||||
switch (stage) {
|
|
||||||
case BLUE:
|
|
||||||
return TRUNK_BLUE_TEXTURE;
|
|
||||||
case GREEN:
|
|
||||||
return TRUNK_GREEN_TEXTURE;
|
|
||||||
case YELLOW:
|
|
||||||
return TRUNK_YELLOW_TEXTURE;
|
|
||||||
case RED:
|
|
||||||
return TRUNK_RED_TEXTURE;
|
|
||||||
default:
|
|
||||||
return TRUNK_RED_TEXTURE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(EntityPlayer player, ForgeDirection side) {
|
public boolean onBlockActivated(EntityPlayer player, ForgeDirection side) {
|
||||||
if (!worldObj.isRemote) {
|
if (!worldObj.isRemote) {
|
||||||
|
|
|
@ -27,22 +27,6 @@ public class TileEngineWood extends TileEngine {
|
||||||
return CHAMBER_TEXTURES[0];
|
return CHAMBER_TEXTURES[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public ResourceLocation getTrunkTexture(EnergyStage stage) {
|
|
||||||
switch (stage) {
|
|
||||||
case BLUE:
|
|
||||||
return TRUNK_BLUE_TEXTURE;
|
|
||||||
case GREEN:
|
|
||||||
return TRUNK_GREEN_TEXTURE;
|
|
||||||
case YELLOW:
|
|
||||||
return TRUNK_YELLOW_TEXTURE;
|
|
||||||
case RED:
|
|
||||||
return TRUNK_RED_TEXTURE;
|
|
||||||
default:
|
|
||||||
return TRUNK_RED_TEXTURE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float explosionRange() {
|
public float explosionRange() {
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in a new issue