mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-20 03:59:37 +00:00
Fixed Teleporter localization, fixed balloons placing on non-solid sides, added AE processing recipes, improve tele porter efficiency
This commit is contained in:
1 parent
a24bd2e7ad
commit
146d974479
6 files changed
+75
-36
No files matched your search
@@ -41,7 +41,7 @@ public class GuiTeleporter extends GuiMekanism
|
||||
|
||||
fontRendererObj.drawString(tileEntity.getInventoryName(), 45, 6, 0x404040);
|
||||
fontRendererObj.drawString(MekanismUtils.localize("container.inventory"), 8, (ySize - 96) + 2, 0x404040);
|
||||
fontRendererObj.drawString(tileEntity.status, 66, 19, 0x00CD00);
|
||||
fontRendererObj.drawString(tileEntity.getStatusDisplay(), 66, 19, 0x00CD00);
|
||||
|
||||
if(xAxis >= 165 && xAxis <= 169 && yAxis >= 17 && yAxis <= 69)
|
||||
{
|
||||
|
||||
@@ -307,6 +307,46 @@ public final class OreDictManager
|
||||
} catch(Exception e) {}
|
||||
}
|
||||
|
||||
for(ItemStack ore : OreDictionary.getOres("oreCertusQuartz"))
|
||||
{
|
||||
try {
|
||||
RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), StackUtils.size(OreDictionary.getOres("dustCertusQuartz").get(0), 4));
|
||||
} catch(Exception e) {}
|
||||
}
|
||||
|
||||
for(ItemStack ore : OreDictionary.getOres("crystalCertusQuartz"))
|
||||
{
|
||||
try {
|
||||
RecipeHandler.addCrusherRecipe(MekanismUtils.size(ore, 1), StackUtils.size(OreDictionary.getOres("dustCertusQuartz").get(0), 1));
|
||||
} catch(Exception e) {}
|
||||
}
|
||||
|
||||
for(ItemStack ore : OreDictionary.getOres("dustCertusQuartz"))
|
||||
{
|
||||
try {
|
||||
RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), StackUtils.size(OreDictionary.getOres("crystalCertusQuartz").get(0), 1));
|
||||
} catch(Exception e) {}
|
||||
}
|
||||
|
||||
for(ItemStack ore : OreDictionary.getOres("gemQuartz"))
|
||||
{
|
||||
try {
|
||||
RecipeHandler.addCrusherRecipe(MekanismUtils.size(ore, 1), StackUtils.size(OreDictionary.getOres("dustNetherQuartz").get(0), 1));
|
||||
} catch(Exception e) {}
|
||||
}
|
||||
|
||||
for(ItemStack ore : OreDictionary.getOres("dustNetherQuartz"))
|
||||
{
|
||||
try {
|
||||
RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), StackUtils.size(OreDictionary.getOres("gemQuartz").get(0), 1));
|
||||
} catch(Exception e) {}
|
||||
}
|
||||
|
||||
for(ItemStack ore : OreDictionary.getOres("oreQuartz"))
|
||||
{
|
||||
RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Items.quartz, 6));
|
||||
}
|
||||
|
||||
for(ItemStack ore : OreDictionary.getOres("ingotCopper"))
|
||||
{
|
||||
RecipeHandler.addCrusherRecipe(MekanismUtils.size(ore, 1), new ItemStack(Mekanism.Dust, 1, 6));
|
||||
|
||||
@@ -104,6 +104,11 @@ public class ItemBalloon extends ItemMekanism
|
||||
{
|
||||
obj.yCoord--;
|
||||
}
|
||||
|
||||
if(!world.isSideSolid(x, y, z, ForgeDirection.UP))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if(canReplace(world, obj.xCoord, obj.yCoord+1, obj.zCoord) && canReplace(world, obj.xCoord, obj.yCoord+2, obj.zCoord))
|
||||
{
|
||||
|
||||
@@ -56,7 +56,7 @@ public class ItemPortableTeleporter extends ItemEnergized
|
||||
case 2:
|
||||
return EnumColor.DARK_RED + MekanismUtils.localize("gui.teleporter.needsEnergy");
|
||||
case 3:
|
||||
return EnumColor.DARK_RED + MekanismUtils.localize("gui.teleporter.linksCapacity");
|
||||
return EnumColor.DARK_RED + MekanismUtils.localize("gui.teleporter.exceeds");
|
||||
case 4:
|
||||
return EnumColor.DARK_RED + MekanismUtils.localize("gui.teleporter.noLink");
|
||||
default:
|
||||
|
||||
@@ -58,7 +58,7 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements IPe
|
||||
public boolean prevShouldRender;
|
||||
|
||||
/** This teleporter's current status. */
|
||||
public String status = (EnumColor.DARK_RED + MekanismUtils.localize("gui.teleporter.notReady"));
|
||||
public byte status = 0;
|
||||
|
||||
public TileEntityTeleporter()
|
||||
{
|
||||
@@ -96,30 +96,10 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements IPe
|
||||
newCoords.add(Coord4D.get(this));
|
||||
Mekanism.teleporters.put(code, newCoords);
|
||||
}
|
||||
|
||||
status = canTeleport();
|
||||
|
||||
switch(canTeleport())
|
||||
{
|
||||
case 1:
|
||||
status = EnumColor.DARK_GREEN + MekanismUtils.localize("gui.teleporter.ready");
|
||||
break;
|
||||
case 2:
|
||||
status = EnumColor.DARK_RED + MekanismUtils.localize("gui.teleporter.noFrame");
|
||||
break;
|
||||
case 3:
|
||||
status = EnumColor.DARK_RED + MekanismUtils.localize("gui.teleporter.noLink");
|
||||
break;
|
||||
case 4:
|
||||
status = EnumColor.DARK_RED + MekanismUtils.localize("gui.teleporter.exceeds");
|
||||
break;
|
||||
case 5:
|
||||
status = EnumColor.DARK_RED + MekanismUtils.localize("gui.teleporter.needsEnergy");
|
||||
break;
|
||||
case 6:
|
||||
status = EnumColor.DARK_GREEN + MekanismUtils.localize("gui.teleporter.idle");
|
||||
break;
|
||||
}
|
||||
|
||||
if(canTeleport() == 1 && teleDelay == 0)
|
||||
if(status == 1 && teleDelay == 0)
|
||||
{
|
||||
teleport();
|
||||
}
|
||||
@@ -129,8 +109,7 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements IPe
|
||||
cleanTeleportCache();
|
||||
}
|
||||
|
||||
byte b = canTeleport();
|
||||
shouldRender = b == 1 || b > 4;
|
||||
shouldRender = status == 1 || status > 4;
|
||||
|
||||
if(shouldRender != prevShouldRender)
|
||||
{
|
||||
@@ -144,6 +123,27 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements IPe
|
||||
|
||||
ChargeUtils.discharge(0, this);
|
||||
}
|
||||
|
||||
public String getStatusDisplay()
|
||||
{
|
||||
switch(status)
|
||||
{
|
||||
case 1:
|
||||
return EnumColor.DARK_GREEN + MekanismUtils.localize("gui.teleporter.ready");
|
||||
case 2:
|
||||
return EnumColor.DARK_RED + MekanismUtils.localize("gui.teleporter.noFrame");
|
||||
case 3:
|
||||
return EnumColor.DARK_RED + MekanismUtils.localize("gui.teleporter.noLink");
|
||||
case 4:
|
||||
return EnumColor.DARK_RED + MekanismUtils.localize("gui.teleporter.exceeds");
|
||||
case 5:
|
||||
return EnumColor.DARK_RED + MekanismUtils.localize("gui.teleporter.needsEnergy");
|
||||
case 6:
|
||||
return EnumColor.DARK_GREEN + MekanismUtils.localize("gui.idle");
|
||||
}
|
||||
|
||||
return EnumColor.DARK_RED + MekanismUtils.localize("gui.teleporter.noLink");
|
||||
}
|
||||
|
||||
public void cleanTeleportCache()
|
||||
{
|
||||
@@ -488,12 +488,13 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements IPe
|
||||
{
|
||||
code.digitFour = dataStream.readInt();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
super.handlePacketData(dataStream);
|
||||
|
||||
status = PacketHandler.readString(dataStream).trim();
|
||||
status = dataStream.readByte();
|
||||
code.digitOne = dataStream.readInt();
|
||||
code.digitTwo = dataStream.readInt();
|
||||
code.digitThree = dataStream.readInt();
|
||||
|
||||
Reference in new issue
Block a user