Skip to content

Commit

Permalink
Move the old smelterylogic implementation to backup classes for a com…
Browse files Browse the repository at this point in the history
…patibility config. Change most logic to take actual smeltery size into account.
  • Loading branch information
bonii-xx committed Sep 11, 2014
1 parent c0ad340 commit 9818edc
Show file tree
Hide file tree
Showing 11 changed files with 2,214 additions and 505 deletions.
2 changes: 2 additions & 0 deletions src/main/java/tconstruct/smeltery/SmelteryProxyClient.java
Expand Up @@ -117,6 +117,8 @@ public Object getClientGuiElement (int ID, EntityPlayer player, World world, int
{
if (PHConstruct.newSmeltery)
return new AdaptiveSmelteryGui(player.inventory, (AdaptiveSmelteryLogic) world.getTileEntity(x, y, z), world, x, y, z);
else if(PHConstruct.oldSmeltery)
return new SmelteryGuiOld(player.inventory, (SmelteryLogicOld) world.getTileEntity(x, y, z), world, x, y, z);
else
return new SmelteryGui(player.inventory, (SmelteryLogic) world.getTileEntity(x, y, z), world, x, y, z);
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/tconstruct/smeltery/TinkerSmeltery.java
Expand Up @@ -707,8 +707,8 @@ public void preInit (FMLPreInitializationEvent event)
}
else
{
if(PHConstruct.newerSmeltery)
GameRegistry.registerTileEntity(FlexibleSmelteryLogic.class, "TConstruct.Smeltery");
if(PHConstruct.oldSmeltery)
GameRegistry.registerTileEntity(SmelteryLogicOld.class, "TConstruct.Smeltery");
else
GameRegistry.registerTileEntity(SmelteryLogic.class, "TConstruct.Smeltery");
GameRegistry.registerTileEntity(SmelteryDrainLogic.class, "TConstruct.SmelteryDrain");
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/tconstruct/smeltery/blocks/SmelteryBlock.java
Expand Up @@ -238,9 +238,9 @@ public TileEntity createNewTileEntity (World world, int metadata)
{
case 0:
if (PHConstruct.newSmeltery)
return new FlexibleSmelteryLogic();
else if(PHConstruct.newerSmeltery)
return new FlexibleSmelteryLogic();
return new AdaptiveSmelteryLogic();
else if(PHConstruct.oldSmeltery)
return new SmelteryLogicOld();
else
return new SmelteryLogic();

Expand Down

0 comments on commit 9818edc

Please sign in to comment.