Autocleanup
parent
6bd97b22f6
commit
f6cb61f08b
|
@ -25,7 +25,8 @@ public interface IChiselable
|
|||
public Block getChiseledVariant();
|
||||
|
||||
/**
|
||||
* @return the metadata of the block created when our chisel is used on this block
|
||||
* @return the metadata of the block created when our chisel is used on this
|
||||
* block
|
||||
*/
|
||||
public int getChiseledVariantMeta();
|
||||
}
|
||||
|
|
|
@ -20,7 +20,8 @@ public interface IHammerable
|
|||
{
|
||||
|
||||
/**
|
||||
* Gets the output when the Drop Hammer (NYI) is used on the implementing Block
|
||||
* Gets the output when the Drop Hammer (NYI) is used on the implementing
|
||||
* Block
|
||||
*
|
||||
* @param meta
|
||||
* the meta
|
||||
|
|
|
@ -36,12 +36,11 @@ public interface IArmorModule extends IModule
|
|||
public static enum EnumArmorEffectType
|
||||
{
|
||||
/** Called every tick while the armor is worn, server and clientside. */
|
||||
ONTICK,
|
||||
/** See @link IDefensiveArmorModule for more info on this */
|
||||
DEFENSIVE,
|
||||
/** Clientside. Allows you to display on the player's screen */
|
||||
HUD,
|
||||
/** SC2 Use Only! */
|
||||
ONTICK, /** See @link IDefensiveArmorModule for more info on this */
|
||||
DEFENSIVE, /**
|
||||
* Clientside. Allows you to display on the player's screen
|
||||
*/
|
||||
HUD, /** SC2 Use Only! */
|
||||
SPECIAL
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,8 @@ package steamcraft.api.item;
|
|||
/**
|
||||
* The Interface IDefensiveArmorModule.
|
||||
*
|
||||
* {@link EnumArmorEffectType} should always return DEFENSIVE when using this interface
|
||||
* {@link EnumArmorEffectType} should always return DEFENSIVE when using this
|
||||
* interface
|
||||
*
|
||||
* @author warlordjones
|
||||
*/
|
||||
|
|
|
@ -34,8 +34,7 @@ public interface IFistModule extends IModule
|
|||
{
|
||||
|
||||
/** The rightclick. */
|
||||
RIGHTCLICK,
|
||||
/** The attack. */
|
||||
RIGHTCLICK, /** The attack. */
|
||||
ATTACK
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,21 +8,22 @@
|
|||
*/
|
||||
package steamcraft.api.item;
|
||||
|
||||
import buildcraft.api.tools.IToolWrench;
|
||||
import cofh.api.item.IToolHammer;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
|
||||
import buildcraft.api.tools.IToolWrench;
|
||||
|
||||
import cofh.api.item.IToolHammer;
|
||||
import mods.railcraft.api.core.items.IToolCrowbar;
|
||||
|
||||
/**
|
||||
* The Interface IUniversalWrench. Helper interface - implementing items will be compatible with Railcraft, MFR, BC and TE wrenches as well as Steamcraft's
|
||||
* The Interface IUniversalWrench. Helper interface - implementing items will be
|
||||
* compatible with Railcraft, MFR, BC and TE wrenches as well as Steamcraft's
|
||||
* spanner
|
||||
*
|
||||
* @author warlordjones
|
||||
*/
|
||||
@Optional.InterfaceList({
|
||||
@Optional.Interface(iface = "buildcraft.api.tools.IToolWrench", modid = "BuildCraft|Core"),
|
||||
@Optional.Interface(iface = "mods.railcraft.api.core.items.IToolCrowbar", modid = "Railcraft")
|
||||
})
|
||||
@Optional.InterfaceList({ @Optional.Interface(iface = "buildcraft.api.tools.IToolWrench", modid = "BuildCraft|Core"),
|
||||
@Optional.Interface(iface = "mods.railcraft.api.core.items.IToolCrowbar", modid = "Railcraft") })
|
||||
public interface IUniversalWrench extends IToolHammer, IToolWrench, IToolCrowbar
|
||||
{
|
||||
|
||||
|
|
|
@ -8,13 +8,15 @@
|
|||
*/
|
||||
package steamcraft.api.item;
|
||||
|
||||
import boilerplate.common.baseclasses.items.RootItem;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityMinecart;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
|
||||
import boilerplate.common.baseclasses.items.RootItem;
|
||||
|
||||
/**
|
||||
* @author decebaldecebal
|
||||
*
|
||||
|
@ -81,7 +83,7 @@ public abstract class UniversalWrench extends RootItem implements IUniversalWren
|
|||
@Optional.Method(modid = "Railcraft")
|
||||
public boolean canBoost(EntityPlayer player, ItemStack crowbar, EntityMinecart cart)
|
||||
{
|
||||
return !canLink(player, crowbar, cart);
|
||||
return !this.canLink(player, crowbar, cart);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -2,4 +2,3 @@
|
|||
package steamcraft.api;
|
||||
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
|
|
|
@ -18,19 +18,12 @@ public enum EnumVanityType
|
|||
{
|
||||
|
||||
/** The hat. */
|
||||
HAT,
|
||||
/** The tunic. */
|
||||
TUNIC,
|
||||
/** The leggings. */
|
||||
LEGGINGS,
|
||||
/** The boots. */
|
||||
BOOTS,
|
||||
/** The HA t1. */
|
||||
HAT1,
|
||||
/** The TUNI c1. */
|
||||
TUNIC1,
|
||||
/** The LEGGING s1. */
|
||||
LEGGINGS1,
|
||||
/** The BOOT s1. */
|
||||
HAT, /** The tunic. */
|
||||
TUNIC, /** The leggings. */
|
||||
LEGGINGS, /** The boots. */
|
||||
BOOTS, /** The HA t1. */
|
||||
HAT1, /** The TUNI c1. */
|
||||
TUNIC1, /** The LEGGING s1. */
|
||||
LEGGINGS1, /** The BOOT s1. */
|
||||
BOOTS1
|
||||
}
|
||||
|
|
|
@ -57,10 +57,8 @@ public class GuiBattery extends BaseContainerGui
|
|||
protected void drawGuiContainerForegroundLayer(int x, int y)
|
||||
{
|
||||
this.drawString(this.fontRendererObj, "Energy: ", 26, 10, -1);
|
||||
this.drawString(
|
||||
this.fontRendererObj,
|
||||
this.getEnergyUnits(this.battery.getEnergyStored(ForgeDirection.UNKNOWN)) + "/"
|
||||
+ this.getEnergyUnits(this.battery.getMaxEnergyStored(ForgeDirection.UNKNOWN)) + " RF", 30, 20, -1);
|
||||
this.drawString(this.fontRendererObj, this.getEnergyUnits(this.battery.getEnergyStored(ForgeDirection.UNKNOWN)) + "/"
|
||||
+ this.getEnergyUnits(this.battery.getMaxEnergyStored(ForgeDirection.UNKNOWN)) + " RF", 30, 20, -1);
|
||||
|
||||
this.drawString(this.fontRendererObj, "Transfer: ", 26, 30, -1);
|
||||
this.drawString(this.fontRendererObj, this.battery.transferRate + " RF", 30, 40, -1);
|
||||
|
@ -70,7 +68,7 @@ public class GuiBattery extends BaseContainerGui
|
|||
{
|
||||
number /= 1000;
|
||||
|
||||
if(number >= 1000)
|
||||
if (number >= 1000)
|
||||
{
|
||||
number /= 1000;
|
||||
return number + "M";
|
||||
|
|
|
@ -55,7 +55,7 @@ public class GuiBloomery extends BaseContainerGui
|
|||
|
||||
int i1;
|
||||
|
||||
if(this.tileFurnace.isBurning())
|
||||
if (this.tileFurnace.isBurning())
|
||||
{
|
||||
i1 = this.tileFurnace.getBurnTimeRemainingScaled(12);
|
||||
this.drawTexturedModalRect(this.guiLeft + 46, (this.guiTop + 36 + 12) - i1, 176, 12 - i1, 14, i1 + 2);
|
||||
|
|
|
@ -57,10 +57,8 @@ public class GuiCapacitor extends BaseContainerGui
|
|||
protected void drawGuiContainerForegroundLayer(int x, int y)
|
||||
{
|
||||
this.drawString(this.fontRendererObj, "Energy: ", 26, 10, -1);
|
||||
this.drawString(
|
||||
this.fontRendererObj,
|
||||
this.getEnergyUnits(this.battery.getEnergyStored(ForgeDirection.UNKNOWN)) + "/"
|
||||
+ this.getEnergyUnits(this.battery.getMaxEnergyStored(ForgeDirection.UNKNOWN)) + " RF", 30, 20, -1);
|
||||
this.drawString(this.fontRendererObj, this.getEnergyUnits(this.battery.getEnergyStored(ForgeDirection.UNKNOWN)) + "/"
|
||||
+ this.getEnergyUnits(this.battery.getMaxEnergyStored(ForgeDirection.UNKNOWN)) + " RF", 30, 20, -1);
|
||||
|
||||
this.drawString(this.fontRendererObj, "Transfer: ", 26, 30, -1);
|
||||
this.drawString(this.fontRendererObj, TileCapacitor.transferRate + " RF", 30, 40, -1);
|
||||
|
@ -70,7 +68,7 @@ public class GuiCapacitor extends BaseContainerGui
|
|||
{
|
||||
number /= 1000;
|
||||
|
||||
if(number >= 1000)
|
||||
if (number >= 1000)
|
||||
{
|
||||
number /= 1000;
|
||||
return number + "M";
|
||||
|
|
|
@ -48,7 +48,7 @@ public class GuiCharger extends BaseContainerGui
|
|||
|
||||
this.mc.renderEngine.bindTexture(guitexture);
|
||||
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
|
||||
|
||||
|
||||
int var8 = this.charger.getEnergyScaled(17);
|
||||
this.drawTexturedModalRect(this.guiLeft + 12, (this.guiTop + 64) - var8, 176, 56 - var8, 16, var8 + 1);
|
||||
}
|
||||
|
@ -57,10 +57,8 @@ public class GuiCharger extends BaseContainerGui
|
|||
protected void drawGuiContainerForegroundLayer(int x, int y)
|
||||
{
|
||||
this.drawString(this.fontRendererObj, "Energy: ", 26, 10, -1);
|
||||
this.drawString(
|
||||
this.fontRendererObj,
|
||||
this.getEnergyUnits(this.charger.getEnergyStored(ForgeDirection.UNKNOWN)) + "/"
|
||||
+ this.getEnergyUnits(this.charger.getMaxEnergyStored(ForgeDirection.UNKNOWN)) + " RF", 30, 20, -1);
|
||||
this.drawString(this.fontRendererObj, this.getEnergyUnits(this.charger.getEnergyStored(ForgeDirection.UNKNOWN)) + "/"
|
||||
+ this.getEnergyUnits(this.charger.getMaxEnergyStored(ForgeDirection.UNKNOWN)) + " RF", 30, 20, -1);
|
||||
|
||||
this.drawString(this.fontRendererObj, "Transfer: ", 26, 30, -1);
|
||||
this.drawString(this.fontRendererObj, TileCharger.transferRate + " RF", 30, 40, -1);
|
||||
|
@ -70,7 +68,7 @@ public class GuiCharger extends BaseContainerGui
|
|||
{
|
||||
number /= 1000;
|
||||
|
||||
if(number >= 1000)
|
||||
if (number >= 1000)
|
||||
{
|
||||
number /= 1000;
|
||||
return number + "M";
|
||||
|
|
|
@ -24,14 +24,14 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import steamcraft.common.items.ItemHandbook;
|
||||
import steamcraft.common.lib.ModInfo;
|
||||
import boilerplate.common.utils.StringUtils;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import boilerplate.common.utils.StringUtils;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import steamcraft.common.items.ItemHandbook;
|
||||
import steamcraft.common.lib.ModInfo;
|
||||
|
||||
public class GuiHandbook extends GuiScreen
|
||||
{
|
||||
/**
|
||||
|
@ -104,15 +104,17 @@ public class GuiHandbook extends GuiScreen
|
|||
this.buttonList.add(this.buttonLast = new GuiButton(4, i + 185, b0 + 30, 50, 20, "Previous"));
|
||||
|
||||
// Manually added pages
|
||||
this.pages
|
||||
.add(new HandbookPage(StatCollector.translateToLocal("handbook.intro.title"), StatCollector.translateToLocal("handbook.intro.documentation")));
|
||||
/*
|
||||
* this.pages .add(new HandbookPage(StatCollector.translateToLocal("handbook.gettingstarted.title"), StatCollector
|
||||
* .translateToLocal("handbook.gettingstarted.documentation")));
|
||||
*/
|
||||
this.pages.add(new HandbookPage(StatCollector.translateToLocal("handbook.intro.title"),
|
||||
StatCollector.translateToLocal("handbook.intro.documentation")));
|
||||
/*
|
||||
* this.pages .add(new
|
||||
* HandbookPage(StatCollector.translateToLocal(
|
||||
* "handbook.gettingstarted.title"), StatCollector
|
||||
* .translateToLocal("handbook.gettingstarted.documentation")));
|
||||
*/
|
||||
|
||||
// Auto Add pages for items
|
||||
for(int itemsize = 0; itemsize < modItems.size(); itemsize++)
|
||||
for (int itemsize = 0; itemsize < modItems.size(); itemsize++)
|
||||
{
|
||||
ItemStack stack = (ItemStack) modItems.get(itemsize);
|
||||
Item item = stack.getItem();
|
||||
|
@ -121,7 +123,7 @@ public class GuiHandbook extends GuiScreen
|
|||
this.pages.add(new HandbookPage(name, docs));
|
||||
}
|
||||
// Auto Add pages for blocks
|
||||
for(int itemsize = 0; itemsize < modBlocks.size(); itemsize++)
|
||||
for (int itemsize = 0; itemsize < modBlocks.size(); itemsize++)
|
||||
{
|
||||
ItemStack stack = (ItemStack) modBlocks.get(itemsize);
|
||||
Block block = Block.getBlockFromItem(stack.getItem());
|
||||
|
@ -148,7 +150,7 @@ public class GuiHandbook extends GuiScreen
|
|||
HandbookPage page = ((HandbookPage) this.pages.get(this.currPage));
|
||||
this.fontRendererObj.drawString("\u00A7l" + page.getTitle(), k + 35, 15, 0x00000000);
|
||||
String[] wrappedDesc = StringUtils.wrap(page.getDocs(), 25);
|
||||
for(int i = 0; i < wrappedDesc.length; i++)
|
||||
for (int i = 0; i < wrappedDesc.length; i++)
|
||||
this.fontRendererObj.drawString(wrappedDesc[i], k + 35, 30 + (i * 10), 0x00000000);
|
||||
|
||||
super.drawScreen(x, y, p_73863_3_);
|
||||
|
@ -163,32 +165,32 @@ public class GuiHandbook extends GuiScreen
|
|||
@Override
|
||||
protected void actionPerformed(GuiButton button)
|
||||
{
|
||||
if(button.enabled)
|
||||
if (button.enabled)
|
||||
{
|
||||
this.prevPage = this.currPage;
|
||||
|
||||
if(button.id == 1)
|
||||
if (button.id == 1)
|
||||
{
|
||||
if(this.currPage < (this.pages.size() - 1))
|
||||
if (this.currPage < (this.pages.size() - 1))
|
||||
{
|
||||
++this.currPage;
|
||||
}
|
||||
}
|
||||
else if(button.id == 2)
|
||||
else if (button.id == 2)
|
||||
{
|
||||
if(this.currPage > 0)
|
||||
if (this.currPage > 0)
|
||||
{
|
||||
--this.currPage;
|
||||
}
|
||||
}
|
||||
else if(button.id == 3)
|
||||
else if (button.id == 3)
|
||||
{
|
||||
if(this.currPage > 0)
|
||||
if (this.currPage > 0)
|
||||
{
|
||||
this.currPage = 0;
|
||||
}
|
||||
}
|
||||
else if(button.id == 4)
|
||||
else if (button.id == 4)
|
||||
{
|
||||
this.currPage = this.prevPage;
|
||||
}
|
||||
|
@ -198,7 +200,8 @@ public class GuiHandbook extends GuiScreen
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns true if this GUI should pause the game when it is displayed in single-player
|
||||
* Returns true if this GUI should pause the game when it is displayed in
|
||||
* single-player
|
||||
*/
|
||||
@Override
|
||||
public boolean doesGuiPauseGame()
|
||||
|
@ -251,7 +254,7 @@ public class GuiHandbook extends GuiScreen
|
|||
@Override
|
||||
public void drawButton(Minecraft p_146112_1_, int p_146112_2_, int p_146112_3_)
|
||||
{
|
||||
if(this.visible)
|
||||
if (this.visible)
|
||||
{
|
||||
boolean flag = (p_146112_2_ >= this.xPosition) && (p_146112_3_ >= this.yPosition) && (p_146112_2_ < (this.xPosition + this.width))
|
||||
&& (p_146112_3_ < (this.yPosition + this.height));
|
||||
|
@ -260,12 +263,12 @@ public class GuiHandbook extends GuiScreen
|
|||
int k = 0;
|
||||
int l = 192;
|
||||
|
||||
if(flag)
|
||||
if (flag)
|
||||
{
|
||||
k += 23;
|
||||
}
|
||||
|
||||
if(!this.field_146151_o)
|
||||
if (!this.field_146151_o)
|
||||
{
|
||||
l += 13;
|
||||
}
|
||||
|
@ -277,10 +280,10 @@ public class GuiHandbook extends GuiScreen
|
|||
|
||||
public int getPageIndexFromTitle(String string)
|
||||
{
|
||||
for(int x = 0; x < this.pages.size(); x++)
|
||||
for (int x = 0; x < this.pages.size(); x++)
|
||||
{
|
||||
String title = ((HandbookPage) this.pages.get(x)).getTitle();
|
||||
if(string.equals(title))
|
||||
if (string.equals(title))
|
||||
return x;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -49,14 +49,16 @@ public class GuiNuclearBoiler extends BaseContainerGui
|
|||
this.mc.renderEngine.bindTexture(guitexture);
|
||||
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
|
||||
|
||||
if(this.boiler.isBurning())
|
||||
if (this.boiler.isBurning())
|
||||
{
|
||||
int burnTime = this.boiler.getBurnTimeRemainingScaled(12);
|
||||
this.drawTexturedModalRect(this.guiLeft + 43, (this.guiTop + 48) - burnTime, 176, 12 - burnTime, 14, burnTime + 2);
|
||||
}
|
||||
|
||||
this.drawFluid(new FluidStack(FluidRegistry.getFluid("water"), 0), this.boiler.getScaledWaterLevel(60), this.guiLeft + 8, this.guiTop + 18, 20, 60);
|
||||
this.drawFluid(new FluidStack(FluidRegistry.getFluid("steam"), 0), this.boiler.getScaledSteamLevel(60), this.guiLeft + 74, this.guiTop + 18, 32, 60);
|
||||
this.drawFluid(new FluidStack(FluidRegistry.getFluid("water"), 0), this.boiler.getScaledWaterLevel(60), this.guiLeft + 8, this.guiTop + 18,
|
||||
20, 60);
|
||||
this.drawFluid(new FluidStack(FluidRegistry.getFluid("steam"), 0), this.boiler.getScaledSteamLevel(60), this.guiLeft + 74, this.guiTop + 18,
|
||||
32, 60);
|
||||
|
||||
this.mc.renderEngine.bindTexture(guitexture);
|
||||
this.drawTexturedModalRect(this.guiLeft + 8, this.guiTop + 24, 176, 14, 20, 49);
|
||||
|
@ -66,10 +68,10 @@ public class GuiNuclearBoiler extends BaseContainerGui
|
|||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int x, int y)
|
||||
{
|
||||
if(((y - this.guiTop) >= 18) && ((y - this.guiTop) <= 78))
|
||||
if(((x - this.guiLeft) >= 8) && ((x - this.guiLeft) <= 28))
|
||||
if (((y - this.guiTop) >= 18) && ((y - this.guiTop) <= 78))
|
||||
if (((x - this.guiLeft) >= 8) && ((x - this.guiLeft) <= 28))
|
||||
this.drawFluidInfo(this.boiler.waterTank, x, y);
|
||||
else if(((x - this.guiLeft) >= 74) && ((x - this.guiLeft) <= 106))
|
||||
else if (((x - this.guiLeft) >= 74) && ((x - this.guiLeft) <= 106))
|
||||
this.drawFluidInfo(this.boiler.steamTank, x, y);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@ import net.minecraft.client.gui.inventory.GuiContainer;
|
|||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import steamcraft.common.lib.ModInfo;
|
||||
import steamcraft.common.tiles.container.ContainerPocket;
|
||||
|
||||
|
|
|
@ -49,14 +49,16 @@ public class GuiSteamBoiler extends BaseContainerGui
|
|||
this.mc.renderEngine.bindTexture(guitexture);
|
||||
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
|
||||
|
||||
if(this.boiler.isBurning())
|
||||
if (this.boiler.isBurning())
|
||||
{
|
||||
int burnTime = this.boiler.getBurnTimeRemainingScaled(12);
|
||||
this.drawTexturedModalRect(this.guiLeft + 43, (this.guiTop + 48) - burnTime, 176, 12 - burnTime, 14, burnTime + 2);
|
||||
}
|
||||
|
||||
this.drawFluid(new FluidStack(FluidRegistry.getFluid("water"), 0), this.boiler.getScaledWaterLevel(60), this.guiLeft + 8, this.guiTop + 18, 20, 60);
|
||||
this.drawFluid(new FluidStack(FluidRegistry.getFluid("steam"), 0), this.boiler.getScaledSteamLevel(60), this.guiLeft + 74, this.guiTop + 18, 32, 60);
|
||||
this.drawFluid(new FluidStack(FluidRegistry.getFluid("water"), 0), this.boiler.getScaledWaterLevel(60), this.guiLeft + 8, this.guiTop + 18,
|
||||
20, 60);
|
||||
this.drawFluid(new FluidStack(FluidRegistry.getFluid("steam"), 0), this.boiler.getScaledSteamLevel(60), this.guiLeft + 74, this.guiTop + 18,
|
||||
32, 60);
|
||||
|
||||
this.mc.renderEngine.bindTexture(guitexture);
|
||||
this.drawTexturedModalRect(this.guiLeft + 8, this.guiTop + 24, 176, 14, 20, 49);
|
||||
|
@ -66,10 +68,10 @@ public class GuiSteamBoiler extends BaseContainerGui
|
|||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int x, int y)
|
||||
{
|
||||
if(((y - this.guiTop) >= 18) && ((y - this.guiTop) <= 78))
|
||||
if(((x - this.guiLeft) >= 8) && ((x - this.guiLeft) <= 28))
|
||||
if (((y - this.guiTop) >= 18) && ((y - this.guiTop) <= 78))
|
||||
if (((x - this.guiLeft) >= 8) && ((x - this.guiLeft) <= 28))
|
||||
this.drawFluidInfo(this.boiler.waterTank, x, y);
|
||||
else if(((x - this.guiLeft) >= 74) && ((x - this.guiLeft) <= 106))
|
||||
else if (((x - this.guiLeft) >= 74) && ((x - this.guiLeft) <= 106))
|
||||
this.drawFluidInfo(this.boiler.steamTank, x, y);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -88,10 +88,10 @@ public class GuiTimeBomb extends BaseContainerGui
|
|||
@Override
|
||||
public void keyTyped(char c, int pos)
|
||||
{
|
||||
if(!Character.isDigit(c))
|
||||
if (!Character.isDigit(c))
|
||||
this.text.setText("");
|
||||
|
||||
if(this.text.textboxKeyTyped(c, pos))
|
||||
if (this.text.textboxKeyTyped(c, pos))
|
||||
this.updateTime();
|
||||
|
||||
super.keyTyped(c, pos);
|
||||
|
@ -101,11 +101,11 @@ public class GuiTimeBomb extends BaseContainerGui
|
|||
{
|
||||
String s = "0000";
|
||||
|
||||
if(this.text != null)
|
||||
if (this.text != null)
|
||||
s = this.text.getText();
|
||||
if(s.length() == 4)
|
||||
InitPackets.network.sendToServer(new TimeBombPacket(Integer.parseInt(s), this.bomb.xCoord, this.bomb.yCoord, this.bomb.zCoord,
|
||||
this.player.dimension));
|
||||
if (s.length() == 4)
|
||||
InitPackets.network.sendToServer(
|
||||
new TimeBombPacket(Integer.parseInt(s), this.bomb.xCoord, this.bomb.yCoord, this.bomb.zCoord, this.player.dimension));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -25,23 +25,23 @@ public class BlockCastIronGateRenderer implements ISimpleBlockRenderingHandler
|
|||
renderer.setRenderBoundsFromBlock(block);
|
||||
int k;
|
||||
|
||||
for(k = 0; k < 3; ++k)
|
||||
for (k = 0; k < 3; ++k)
|
||||
{
|
||||
i = 0.0625F;
|
||||
|
||||
if(k == 0)
|
||||
if (k == 0)
|
||||
{
|
||||
renderer.setRenderBounds(0.5F - i, 0.30000001192092896D, 0.0D, 0.5F + i, 1.0D, i * 2.0F);
|
||||
}
|
||||
|
||||
if(k == 1)
|
||||
if (k == 1)
|
||||
{
|
||||
renderer.setRenderBounds(0.5F - i, 0.30000001192092896D, 1.0F - (i * 2.0F), 0.5F + i, 1.0D, 1.0D);
|
||||
}
|
||||
|
||||
i = 0.0625F;
|
||||
|
||||
if(k == 2)
|
||||
if (k == 2)
|
||||
{
|
||||
renderer.setRenderBounds(0.5F - i, 0.5D, 0.0D, 0.5F + i, 1.0F - i, 1.0D);
|
||||
}
|
||||
|
@ -76,8 +76,7 @@ public class BlockCastIronGateRenderer implements ISimpleBlockRenderingHandler
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelID,
|
||||
RenderBlocks renderer)
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelID, RenderBlocks renderer)
|
||||
{
|
||||
boolean flag = true;
|
||||
int l = renderer.blockAccess.getBlockMetadata(x, y, z);
|
||||
|
@ -90,9 +89,9 @@ public class BlockCastIronGateRenderer implements ISimpleBlockRenderingHandler
|
|||
float f4 = 0.3125F;
|
||||
float f5 = 1.0F;
|
||||
|
||||
if((((i1 == 2) || (i1 == 0)) && (renderer.blockAccess.getBlock(x - 1, y, z) == Blocks.cobblestone_wall)
|
||||
&& (renderer.blockAccess.getBlock(x - 1, y, z) == Blocks.cobblestone_wall)) || (((i1 == 3) || (i1 == 1))
|
||||
&& (renderer.blockAccess.getBlock(x, y, z - 1) == Blocks.cobblestone_wall)
|
||||
if ((((i1 == 2) || (i1 == 0)) && (renderer.blockAccess.getBlock(x - 1, y, z) == Blocks.cobblestone_wall)
|
||||
&& (renderer.blockAccess.getBlock(x - 1, y, z) == Blocks.cobblestone_wall))
|
||||
|| (((i1 == 3) || (i1 == 1)) && (renderer.blockAccess.getBlock(x, y, z - 1) == Blocks.cobblestone_wall)
|
||||
&& (renderer.blockAccess.getBlock(x, y, z + 1) == Blocks.cobblestone_wall)))
|
||||
{
|
||||
f -= 0.1875F;
|
||||
|
@ -109,7 +108,7 @@ public class BlockCastIronGateRenderer implements ISimpleBlockRenderingHandler
|
|||
float f8;
|
||||
float f9;
|
||||
|
||||
if((i1 != 3) && (i1 != 1))
|
||||
if ((i1 != 3) && (i1 != 1))
|
||||
{
|
||||
f6 = 0.0F;
|
||||
f7 = 0.125F;
|
||||
|
@ -138,14 +137,14 @@ public class BlockCastIronGateRenderer implements ISimpleBlockRenderingHandler
|
|||
renderer.uvRotateTop = 0;
|
||||
}
|
||||
|
||||
if(flag1)
|
||||
if (flag1)
|
||||
{
|
||||
if((i1 == 2) || (i1 == 0))
|
||||
if ((i1 == 2) || (i1 == 0))
|
||||
{
|
||||
renderer.uvRotateTop = 1;
|
||||
}
|
||||
|
||||
if(i1 == 3)
|
||||
if (i1 == 3)
|
||||
{
|
||||
f6 = 0.0F;
|
||||
f7 = 0.125F;
|
||||
|
@ -164,7 +163,7 @@ public class BlockCastIronGateRenderer implements ISimpleBlockRenderingHandler
|
|||
renderer.setRenderBounds(0.5625D, f2, 0.875D, 0.8125D, f3, 1.0D);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
else if(i1 == 1)
|
||||
else if (i1 == 1)
|
||||
{
|
||||
f6 = 0.0F;
|
||||
f7 = 0.125F;
|
||||
|
@ -183,7 +182,7 @@ public class BlockCastIronGateRenderer implements ISimpleBlockRenderingHandler
|
|||
renderer.setRenderBounds(0.1875D, f2, 0.875D, 0.4375D, f3, 1.0D);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
else if(i1 == 0)
|
||||
else if (i1 == 0)
|
||||
{
|
||||
f6 = 0.0F;
|
||||
f7 = 0.125F;
|
||||
|
@ -202,7 +201,7 @@ public class BlockCastIronGateRenderer implements ISimpleBlockRenderingHandler
|
|||
renderer.setRenderBounds(0.875D, f2, 0.5625D, 1.0D, f3, 0.8125D);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
else if(i1 == 2)
|
||||
else if (i1 == 2)
|
||||
{
|
||||
f6 = 0.0F;
|
||||
f7 = 0.125F;
|
||||
|
@ -222,7 +221,7 @@ public class BlockCastIronGateRenderer implements ISimpleBlockRenderingHandler
|
|||
renderer.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
}
|
||||
else if((i1 != 3) && (i1 != 1))
|
||||
else if ((i1 != 3) && (i1 != 1))
|
||||
{
|
||||
f6 = 0.375F;
|
||||
f7 = 0.5F;
|
||||
|
|
|
@ -17,12 +17,12 @@ import net.minecraft.client.renderer.RenderBlocks;
|
|||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import steamcraft.client.lib.RenderIDs;
|
||||
import steamcraft.common.tiles.EmptyTiles;
|
||||
import steamcraft.common.tiles.EmptyTiles.TileCastIronLamp;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
|
||||
/**
|
||||
* @author Surseance
|
||||
|
|
|
@ -54,7 +54,7 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
float f1 = ((i1 >> 8) & 255) / 255.0F;
|
||||
float f2 = (i1 & 255) / 255.0F;
|
||||
|
||||
if(EntityRenderer.anaglyphEnable)
|
||||
if (EntityRenderer.anaglyphEnable)
|
||||
{
|
||||
float f3 = ((f * 30.0F) + (f1 * 59.0F) + (f2 * 11.0F)) / 100.0F;
|
||||
float f4 = ((f * 30.0F) + (f1 * 70.0F)) / 100.0F;
|
||||
|
@ -95,9 +95,9 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
boolean flag4 = railing.shouldSideBeRendered(world, x, y + 1, z, 1);
|
||||
boolean flag5 = railing.shouldSideBeRendered(world, x, y - 1, z, 0);
|
||||
|
||||
if((!flag2 || !flag3) && (flag2 || flag3 || flag || flag1))
|
||||
if ((!flag2 || !flag3) && (flag2 || flag3 || flag || flag1))
|
||||
{
|
||||
if(flag2 && !flag3)
|
||||
if (flag2 && !flag3)
|
||||
{
|
||||
tessellator.addVertexWithUV(d9, y + 1, d13, d21, d2);
|
||||
tessellator.addVertexWithUV(d9, y + 0, d13, d21, d3);
|
||||
|
@ -108,7 +108,7 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
tessellator.addVertexWithUV(d9, y + 0, d13, d0, d3);
|
||||
tessellator.addVertexWithUV(d9, y + 1, d13, d0, d2);
|
||||
|
||||
if(!flag1 && !flag)
|
||||
if (!flag1 && !flag)
|
||||
{
|
||||
tessellator.addVertexWithUV(d10, y + 1, d18, d4, d6);
|
||||
tessellator.addVertexWithUV(d10, y + 0, d18, d4, d8);
|
||||
|
@ -120,7 +120,7 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
tessellator.addVertexWithUV(d10, y + 1, d18, d5, d6);
|
||||
}
|
||||
|
||||
if(flag4 || ((y < (l - 1)) && world.isAirBlock(x - 1, y + 1, z)))
|
||||
if (flag4 || ((y < (l - 1)) && world.isAirBlock(x - 1, y + 1, z)))
|
||||
{
|
||||
tessellator.addVertexWithUV(d9, y + 1 + 0.01D, d18, d5, d7);
|
||||
tessellator.addVertexWithUV(d10, y + 1 + 0.01D, d18, d5, d8);
|
||||
|
@ -132,7 +132,7 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
tessellator.addVertexWithUV(d10, y + 1 + 0.01D, d17, d4, d7);
|
||||
}
|
||||
|
||||
if(flag5 || ((y > 1) && world.isAirBlock(x - 1, y - 1, z)))
|
||||
if (flag5 || ((y > 1) && world.isAirBlock(x - 1, y - 1, z)))
|
||||
{
|
||||
tessellator.addVertexWithUV(d9, y - 0.01D, d18, d5, d7);
|
||||
tessellator.addVertexWithUV(d10, y - 0.01D, d18, d5, d8);
|
||||
|
@ -144,7 +144,7 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
tessellator.addVertexWithUV(d10, y - 0.01D, d17, d4, d7);
|
||||
}
|
||||
}
|
||||
else if(!flag2 && flag3)
|
||||
else if (!flag2 && flag3)
|
||||
{
|
||||
tessellator.addVertexWithUV(d10, y + 1, d13, d0, d2);
|
||||
tessellator.addVertexWithUV(d10, y + 0, d13, d0, d3);
|
||||
|
@ -155,7 +155,7 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
tessellator.addVertexWithUV(d10, y + 0, d13, d1, d3);
|
||||
tessellator.addVertexWithUV(d10, y + 1, d13, d1, d2);
|
||||
|
||||
if(!flag1 && !flag)
|
||||
if (!flag1 && !flag)
|
||||
{
|
||||
tessellator.addVertexWithUV(d10, y + 1, d17, d4, d6);
|
||||
tessellator.addVertexWithUV(d10, y + 0, d17, d4, d8);
|
||||
|
@ -167,7 +167,7 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
tessellator.addVertexWithUV(d10, y + 1, d17, d5, d6);
|
||||
}
|
||||
|
||||
if(flag4 || ((y < (l - 1)) && world.isAirBlock(x + 1, y + 1, z)))
|
||||
if (flag4 || ((y < (l - 1)) && world.isAirBlock(x + 1, y + 1, z)))
|
||||
{
|
||||
tessellator.addVertexWithUV(d10, y + 1 + 0.01D, d18, d5, d6);
|
||||
tessellator.addVertexWithUV(d11, y + 1 + 0.01D, d18, d5, d7);
|
||||
|
@ -179,7 +179,7 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
tessellator.addVertexWithUV(d11, y + 1 + 0.01D, d17, d4, d6);
|
||||
}
|
||||
|
||||
if(flag5 || ((y > 1) && world.isAirBlock(x + 1, y - 1, z)))
|
||||
if (flag5 || ((y > 1) && world.isAirBlock(x + 1, y - 1, z)))
|
||||
{
|
||||
tessellator.addVertexWithUV(d10, y - 0.01D, d18, d5, d6);
|
||||
tessellator.addVertexWithUV(d11, y - 0.01D, d18, d5, d7);
|
||||
|
@ -203,7 +203,7 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
tessellator.addVertexWithUV(d9, y + 0, d13, d1, d3);
|
||||
tessellator.addVertexWithUV(d9, y + 1, d13, d1, d2);
|
||||
|
||||
if(flag4)
|
||||
if (flag4)
|
||||
{
|
||||
tessellator.addVertexWithUV(d9, y + 1 + 0.01D, d18, d5, d8);
|
||||
tessellator.addVertexWithUV(d11, y + 1 + 0.01D, d18, d5, d6);
|
||||
|
@ -216,7 +216,7 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
}
|
||||
else
|
||||
{
|
||||
if((y < (l - 1)) && world.isAirBlock(x - 1, y + 1, z))
|
||||
if ((y < (l - 1)) && world.isAirBlock(x - 1, y + 1, z))
|
||||
{
|
||||
tessellator.addVertexWithUV(d9, y + 1 + 0.01D, d18, d5, d7);
|
||||
tessellator.addVertexWithUV(d10, y + 1 + 0.01D, d18, d5, d8);
|
||||
|
@ -228,7 +228,7 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
tessellator.addVertexWithUV(d10, y + 1 + 0.01D, d17, d4, d7);
|
||||
}
|
||||
|
||||
if((y < (l - 1)) && world.isAirBlock(x + 1, y + 1, z))
|
||||
if ((y < (l - 1)) && world.isAirBlock(x + 1, y + 1, z))
|
||||
{
|
||||
tessellator.addVertexWithUV(d10, y + 1 + 0.01D, d18, d5, d6);
|
||||
tessellator.addVertexWithUV(d11, y + 1 + 0.01D, d18, d5, d7);
|
||||
|
@ -241,7 +241,7 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
}
|
||||
}
|
||||
|
||||
if(flag5)
|
||||
if (flag5)
|
||||
{
|
||||
tessellator.addVertexWithUV(d9, y - 0.01D, d18, d5, d8);
|
||||
tessellator.addVertexWithUV(d11, y - 0.01D, d18, d5, d6);
|
||||
|
@ -254,7 +254,7 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
}
|
||||
else
|
||||
{
|
||||
if((y > 1) && world.isAirBlock(x - 1, y - 1, z))
|
||||
if ((y > 1) && world.isAirBlock(x - 1, y - 1, z))
|
||||
{
|
||||
tessellator.addVertexWithUV(d9, y - 0.01D, d18, d5, d7);
|
||||
tessellator.addVertexWithUV(d10, y - 0.01D, d18, d5, d8);
|
||||
|
@ -266,7 +266,7 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
tessellator.addVertexWithUV(d10, y - 0.01D, d17, d4, d7);
|
||||
}
|
||||
|
||||
if((y > 1) && world.isAirBlock(x + 1, y - 1, z))
|
||||
if ((y > 1) && world.isAirBlock(x + 1, y - 1, z))
|
||||
{
|
||||
tessellator.addVertexWithUV(d10, y - 0.01D, d18, d5, d6);
|
||||
tessellator.addVertexWithUV(d11, y - 0.01D, d18, d5, d7);
|
||||
|
@ -280,9 +280,9 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
}
|
||||
}
|
||||
|
||||
if((!flag || !flag1) && (flag2 || flag3 || flag || flag1))
|
||||
if ((!flag || !flag1) && (flag2 || flag3 || flag || flag1))
|
||||
{
|
||||
if(flag && !flag1)
|
||||
if (flag && !flag1)
|
||||
{
|
||||
tessellator.addVertexWithUV(d10, y + 1, d12, d21, d2);
|
||||
tessellator.addVertexWithUV(d10, y + 0, d12, d21, d3);
|
||||
|
@ -293,7 +293,7 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
tessellator.addVertexWithUV(d10, y + 0, d12, d0, d3);
|
||||
tessellator.addVertexWithUV(d10, y + 1, d12, d0, d2);
|
||||
|
||||
if(!flag3 && !flag2)
|
||||
if (!flag3 && !flag2)
|
||||
{
|
||||
tessellator.addVertexWithUV(d15, y + 1, d13, d4, d6);
|
||||
tessellator.addVertexWithUV(d15, y + 0, d13, d4, d8);
|
||||
|
@ -305,7 +305,7 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
tessellator.addVertexWithUV(d15, y + 1, d13, d5, d6);
|
||||
}
|
||||
|
||||
if(flag4 || ((y < (l - 1)) && world.isAirBlock(x, y + 1, z - 1)))
|
||||
if (flag4 || ((y < (l - 1)) && world.isAirBlock(x, y + 1, z - 1)))
|
||||
{
|
||||
tessellator.addVertexWithUV(d15, y + 1 + 0.005D, d12, d5, d6);
|
||||
tessellator.addVertexWithUV(d15, y + 1 + 0.005D, d13, d5, d7);
|
||||
|
@ -317,7 +317,7 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
tessellator.addVertexWithUV(d16, y + 1 + 0.005D, d13, d4, d6);
|
||||
}
|
||||
|
||||
if(flag5 || ((y > 1) && world.isAirBlock(x, y - 1, z - 1)))
|
||||
if (flag5 || ((y > 1) && world.isAirBlock(x, y - 1, z - 1)))
|
||||
{
|
||||
tessellator.addVertexWithUV(d15, y - 0.005D, d12, d5, d6);
|
||||
tessellator.addVertexWithUV(d15, y - 0.005D, d13, d5, d7);
|
||||
|
@ -329,7 +329,7 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
tessellator.addVertexWithUV(d16, y - 0.005D, d13, d4, d6);
|
||||
}
|
||||
}
|
||||
else if(!flag && flag1)
|
||||
else if (!flag && flag1)
|
||||
{
|
||||
tessellator.addVertexWithUV(d10, y + 1, d13, d0, d2);
|
||||
tessellator.addVertexWithUV(d10, y + 0, d13, d0, d3);
|
||||
|
@ -340,7 +340,7 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
tessellator.addVertexWithUV(d10, y + 0, d13, d1, d3);
|
||||
tessellator.addVertexWithUV(d10, y + 1, d13, d1, d2);
|
||||
|
||||
if(!flag3 && !flag2)
|
||||
if (!flag3 && !flag2)
|
||||
{
|
||||
tessellator.addVertexWithUV(d16, y + 1, d13, d4, d6);
|
||||
tessellator.addVertexWithUV(d16, y + 0, d13, d4, d8);
|
||||
|
@ -352,7 +352,7 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
tessellator.addVertexWithUV(d16, y + 1, d13, d5, d6);
|
||||
}
|
||||
|
||||
if(flag4 || ((y < (l - 1)) && world.isAirBlock(x, y + 1, z + 1)))
|
||||
if (flag4 || ((y < (l - 1)) && world.isAirBlock(x, y + 1, z + 1)))
|
||||
{
|
||||
tessellator.addVertexWithUV(d15, y + 1 + 0.005D, d13, d4, d7);
|
||||
tessellator.addVertexWithUV(d15, y + 1 + 0.005D, d14, d4, d8);
|
||||
|
@ -364,7 +364,7 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
tessellator.addVertexWithUV(d16, y + 1 + 0.005D, d14, d5, d7);
|
||||
}
|
||||
|
||||
if(flag5 || ((y > 1) && world.isAirBlock(x, y - 1, z + 1)))
|
||||
if (flag5 || ((y > 1) && world.isAirBlock(x, y - 1, z + 1)))
|
||||
{
|
||||
tessellator.addVertexWithUV(d15, y - 0.005D, d13, d4, d7);
|
||||
tessellator.addVertexWithUV(d15, y - 0.005D, d14, d4, d8);
|
||||
|
@ -388,7 +388,7 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
tessellator.addVertexWithUV(d10, y + 0, d14, d1, d3);
|
||||
tessellator.addVertexWithUV(d10, y + 1, d14, d1, d2);
|
||||
|
||||
if(flag4)
|
||||
if (flag4)
|
||||
{
|
||||
tessellator.addVertexWithUV(d16, y + 1 + 0.005D, d14, d5, d8);
|
||||
tessellator.addVertexWithUV(d16, y + 1 + 0.005D, d12, d5, d6);
|
||||
|
@ -401,7 +401,7 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
}
|
||||
else
|
||||
{
|
||||
if((y < (l - 1)) && world.isAirBlock(x, y + 1, z - 1))
|
||||
if ((y < (l - 1)) && world.isAirBlock(x, y + 1, z - 1))
|
||||
{
|
||||
tessellator.addVertexWithUV(d15, y + 1 + 0.005D, d12, d5, d6);
|
||||
tessellator.addVertexWithUV(d15, y + 1 + 0.005D, d13, d5, d7);
|
||||
|
@ -413,7 +413,7 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
tessellator.addVertexWithUV(d16, y + 1 + 0.005D, d13, d4, d6);
|
||||
}
|
||||
|
||||
if((y < (l - 1)) && world.isAirBlock(x, y + 1, z + 1))
|
||||
if ((y < (l - 1)) && world.isAirBlock(x, y + 1, z + 1))
|
||||
{
|
||||
tessellator.addVertexWithUV(d15, y + 1 + 0.005D, d13, d4, d7);
|
||||
tessellator.addVertexWithUV(d15, y + 1 + 0.005D, d14, d4, d8);
|
||||
|
@ -426,7 +426,7 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
}
|
||||
}
|
||||
|
||||
if(flag5)
|
||||
if (flag5)
|
||||
{
|
||||
tessellator.addVertexWithUV(d16, y - 0.005D, d14, d5, d8);
|
||||
tessellator.addVertexWithUV(d16, y - 0.005D, d12, d5, d6);
|
||||
|
@ -439,7 +439,7 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
}
|
||||
else
|
||||
{
|
||||
if((y > 1) && world.isAirBlock(x, y - 1, z - 1))
|
||||
if ((y > 1) && world.isAirBlock(x, y - 1, z - 1))
|
||||
{
|
||||
tessellator.addVertexWithUV(d15, y - 0.005D, d12, d5, d6);
|
||||
tessellator.addVertexWithUV(d15, y - 0.005D, d13, d5, d7);
|
||||
|
@ -451,7 +451,7 @@ public class BlockCastIronRailingRenderer implements ISimpleBlockRenderingHandle
|
|||
tessellator.addVertexWithUV(d16, y - 0.005D, d13, d4, d6);
|
||||
}
|
||||
|
||||
if((y > 1) && world.isAirBlock(x, y - 1, z + 1))
|
||||
if ((y > 1) && world.isAirBlock(x, y - 1, z + 1))
|
||||
{
|
||||
tessellator.addVertexWithUV(d15, y - 0.005D, d13, d4, d7);
|
||||
tessellator.addVertexWithUV(d15, y - 0.005D, d14, d4, d8);
|
||||
|
|
|
@ -40,7 +40,7 @@ public class BlockCopperPipeRenderer implements ISimpleBlockRenderingHandler
|
|||
TileCopperPipe te = new TileCopperPipe();
|
||||
|
||||
System.arraycopy(ForgeDirection.VALID_DIRECTIONS, 0, te.connections, 0, ForgeDirection.VALID_DIRECTIONS.length);
|
||||
|
||||
|
||||
te.blockMetadata = metadata;
|
||||
|
||||
TileEntityRendererDispatcher.instance.renderTileEntityAt(te, 0.0D, 0.0D, 0.0D, 0.0F);
|
||||
|
@ -48,8 +48,7 @@ public class BlockCopperPipeRenderer implements ISimpleBlockRenderingHandler
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelID,
|
||||
RenderBlocks renderer)
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelID, RenderBlocks renderer)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -17,11 +17,11 @@ import net.minecraft.client.renderer.RenderBlocks;
|
|||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import steamcraft.client.lib.RenderIDs;
|
||||
import steamcraft.common.tiles.TileCopperTank;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
|
||||
/**
|
||||
* @author Decebaldecebal
|
||||
|
@ -36,7 +36,7 @@ public class BlockCopperTankRenderer implements ISimpleBlockRenderingHandler
|
|||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
|
||||
TileCopperTank te = new TileCopperTank();
|
||||
|
||||
|
||||
te.blockType = block;
|
||||
te.blockMetadata = metadata;
|
||||
|
||||
|
@ -45,8 +45,7 @@ public class BlockCopperTankRenderer implements ISimpleBlockRenderingHandler
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelID,
|
||||
RenderBlocks renderer)
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelID, RenderBlocks renderer)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -49,8 +49,7 @@ public class BlockCopperWireRenderer implements ISimpleBlockRenderingHandler
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelID,
|
||||
RenderBlocks renderer)
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelID, RenderBlocks renderer)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -20,51 +20,51 @@ public class BlockSpiderEggRenderer implements ISimpleBlockRenderingHandler
|
|||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
tessellator.startDrawingQuads();
|
||||
|
||||
for(int l = 0; l < 8; ++l)
|
||||
for (int l = 0; l < 8; ++l)
|
||||
{
|
||||
byte b0 = 0;
|
||||
byte b1 = 1;
|
||||
|
||||
if(l == 0)
|
||||
if (l == 0)
|
||||
{
|
||||
b0 = 2;
|
||||
}
|
||||
|
||||
if(l == 1)
|
||||
if (l == 1)
|
||||
{
|
||||
b0 = 3;
|
||||
}
|
||||
|
||||
if(l == 2)
|
||||
if (l == 2)
|
||||
{
|
||||
b0 = 4;
|
||||
}
|
||||
|
||||
if(l == 3)
|
||||
if (l == 3)
|
||||
{
|
||||
b0 = 5;
|
||||
b1 = 2;
|
||||
}
|
||||
|
||||
if(l == 4)
|
||||
if (l == 4)
|
||||
{
|
||||
b0 = 6;
|
||||
b1 = 3;
|
||||
}
|
||||
|
||||
if(l == 5)
|
||||
if (l == 5)
|
||||
{
|
||||
b0 = 7;
|
||||
b1 = 5;
|
||||
}
|
||||
|
||||
if(l == 6)
|
||||
if (l == 6)
|
||||
{
|
||||
b0 = 6;
|
||||
b1 = 2;
|
||||
}
|
||||
|
||||
if(l == 7)
|
||||
if (l == 7)
|
||||
{
|
||||
b0 = 3;
|
||||
}
|
||||
|
@ -94,57 +94,56 @@ public class BlockSpiderEggRenderer implements ISimpleBlockRenderingHandler
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelID,
|
||||
RenderBlocks renderer)
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelID, RenderBlocks renderer)
|
||||
{
|
||||
boolean flag = false;
|
||||
int l = 0;
|
||||
|
||||
for(int i1 = 0; i1 < 8; i1++)
|
||||
for (int i1 = 0; i1 < 8; i1++)
|
||||
{
|
||||
byte b0 = 0;
|
||||
byte b1 = 1;
|
||||
|
||||
if(i1 == 0)
|
||||
if (i1 == 0)
|
||||
{
|
||||
b0 = 2;
|
||||
}
|
||||
|
||||
if(i1 == 1)
|
||||
if (i1 == 1)
|
||||
{
|
||||
b0 = 3;
|
||||
}
|
||||
|
||||
if(i1 == 2)
|
||||
if (i1 == 2)
|
||||
{
|
||||
b0 = 4;
|
||||
}
|
||||
|
||||
if(i1 == 3)
|
||||
if (i1 == 3)
|
||||
{
|
||||
b0 = 5;
|
||||
b1 = 2;
|
||||
}
|
||||
|
||||
if(i1 == 4)
|
||||
if (i1 == 4)
|
||||
{
|
||||
b0 = 6;
|
||||
b1 = 3;
|
||||
}
|
||||
|
||||
if(i1 == 5)
|
||||
if (i1 == 5)
|
||||
{
|
||||
b0 = 7;
|
||||
b1 = 5;
|
||||
}
|
||||
|
||||
if(i1 == 6)
|
||||
if (i1 == 6)
|
||||
{
|
||||
b0 = 6;
|
||||
b1 = 2;
|
||||
}
|
||||
|
||||
if(i1 == 7)
|
||||
if (i1 == 7)
|
||||
{
|
||||
b0 = 3;
|
||||
}
|
||||
|
|
|
@ -16,13 +16,14 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import steamcraft.client.lib.RenderIDs;
|
||||
import steamcraft.common.tiles.TileSteelPipe;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
|
||||
/**
|
||||
* @author Surseance
|
||||
|
@ -39,7 +40,7 @@ public class BlockSteelPipeRenderer implements ISimpleBlockRenderingHandler
|
|||
TileSteelPipe te = new TileSteelPipe();
|
||||
|
||||
System.arraycopy(ForgeDirection.VALID_DIRECTIONS, 0, te.connections, 0, ForgeDirection.VALID_DIRECTIONS.length);
|
||||
|
||||
|
||||
te.blockMetadata = metadata;
|
||||
|
||||
TileEntityRendererDispatcher.instance.renderTileEntityAt(te, 0.0D, 0.0D, 0.0D, 0.0F);
|
||||
|
@ -47,8 +48,7 @@ public class BlockSteelPipeRenderer implements ISimpleBlockRenderingHandler
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelID,
|
||||
RenderBlocks renderer)
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelID, RenderBlocks renderer)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -49,8 +49,7 @@ public class BlockSteelWireRenderer implements ISimpleBlockRenderingHandler
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelID,
|
||||
RenderBlocks renderer)
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelID, RenderBlocks renderer)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -9,12 +9,12 @@ import net.minecraft.util.MathHelper;
|
|||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import steamcraft.common.entities.EntityFallingBoulder;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import steamcraft.common.entities.EntityFallingBoulder;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RenderFallingBoulder extends Render
|
||||
{
|
||||
|
@ -26,9 +26,12 @@ public class RenderFallingBoulder extends Render
|
|||
}
|
||||
|
||||
/**
|
||||
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then handing it off to a worker function
|
||||
* which does the actual work. In all probabilty, the class Render is generic (Render<T extends Entity) and this method has signature public void
|
||||
* func_76986_a(T entity, double d, double d1, double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
|
||||
* Actually renders the given argument. This is a synthetic bridge method,
|
||||
* always casting down its argument and then handing it off to a worker
|
||||
* function which does the actual work. In all probabilty, the class Render
|
||||
* is generic (Render<T extends Entity) and this method has signature public
|
||||
* void func_76986_a(T entity, double d, double d1, double d2, float f,
|
||||
* float f1). But JAD is pre 1.5 so doesn't do that.
|
||||
*/
|
||||
public void doRender(EntityFallingBoulder p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
|
||||
{
|
||||
|
@ -38,13 +41,13 @@ public class RenderFallingBoulder extends Render
|
|||
int j = MathHelper.floor_double(p_76986_1_.posY);
|
||||
int k = MathHelper.floor_double(p_76986_1_.posZ);
|
||||
|
||||
if((block != null) && (block != world.getBlock(i, j, k)))
|
||||
if ((block != null) && (block != world.getBlock(i, j, k)))
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) p_76986_2_, (float) p_76986_4_, (float) p_76986_6_);
|
||||
this.bindEntityTexture(p_76986_1_);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
|
||||
|
||||
this.field_147920_a.setRenderBoundsFromBlock(block);
|
||||
this.field_147920_a.renderBlockSandFalling(block, world, i, j, k, p_76986_1_.field_145814_a);
|
||||
|
||||
|
@ -54,7 +57,8 @@ public class RenderFallingBoulder extends Render
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
|
||||
* Returns the location of an entity's texture. Doesn't seem to be called
|
||||
* unless you call Render.bindEntityTexture.
|
||||
*/
|
||||
protected ResourceLocation getEntityTexture(EntityFallingBoulder p_110775_1_)
|
||||
{
|
||||
|
@ -62,7 +66,8 @@ public class RenderFallingBoulder extends Render
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
|
||||
* Returns the location of an entity's texture. Doesn't seem to be called
|
||||
* unless you call Render.bindEntityTexture.
|
||||
*/
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity p_110775_1_)
|
||||
|
@ -71,9 +76,12 @@ public class RenderFallingBoulder extends Render
|
|||
}
|
||||
|
||||
/**
|
||||
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then handing it off to a worker function
|
||||
* which does the actual work. In all probabilty, the class Render is generic (Render<T extends Entity) and this method has signature public void
|
||||
* func_76986_a(T entity, double d, double d1, double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
|
||||
* Actually renders the given argument. This is a synthetic bridge method,
|
||||
* always casting down its argument and then handing it off to a worker
|
||||
* function which does the actual work. In all probabilty, the class Render
|
||||
* is generic (Render<T extends Entity) and this method has signature public
|
||||
* void func_76986_a(T entity, double d, double d1, double d2, float f,
|
||||
* float f1). But JAD is pre 1.5 so doesn't do that.
|
||||
*/
|
||||
@Override
|
||||
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
|
||||
|
|
|
@ -41,7 +41,7 @@ public class RenderGhostSpider extends RenderLiving
|
|||
|
||||
protected int shouldRenderPass(EntitySpider p_77032_1_, int p_77032_2_, float p_77032_3_)
|
||||
{
|
||||
if(p_77032_2_ != 0)
|
||||
if (p_77032_2_ != 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ public class RenderGhostSpider extends RenderLiving
|
|||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
|
||||
|
||||
if(p_77032_1_.isInvisible())
|
||||
if (p_77032_1_.isInvisible())
|
||||
{
|
||||
GL11.glDepthMask(false);
|
||||
}
|
||||
|
@ -91,7 +91,8 @@ public class RenderGhostSpider extends RenderLiving
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
|
||||
* Returns the location of an entity's texture. Doesn't seem to be called
|
||||
* unless you call Render.bindEntityTexture.
|
||||
*/
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity p_110775_1_)
|
||||
|
|
|
@ -41,7 +41,7 @@ public class RenderGiantSpider extends RenderLiving
|
|||
|
||||
protected int shouldRenderPass(EntitySpider p_77032_1_, int p_77032_2_, float p_77032_3_)
|
||||
{
|
||||
if(p_77032_2_ != 0)
|
||||
if (p_77032_2_ != 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ public class RenderGiantSpider extends RenderLiving
|
|||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
|
||||
|
||||
if(p_77032_1_.isInvisible())
|
||||
if (p_77032_1_.isInvisible())
|
||||
{
|
||||
GL11.glDepthMask(false);
|
||||
}
|
||||
|
@ -91,7 +91,8 @@ public class RenderGiantSpider extends RenderLiving
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
|
||||
* Returns the location of an entity's texture. Doesn't seem to be called
|
||||
* unless you call Render.bindEntityTexture.
|
||||
*/
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity p_110775_1_)
|
||||
|
|
|
@ -34,7 +34,7 @@ public class RenderGrapplingHook extends Render
|
|||
{
|
||||
this.bindEntityTexture(entity);
|
||||
|
||||
if((entity.prevRotationYaw == 0.0F) && (entity.prevRotationPitch == 0.0F))
|
||||
if ((entity.prevRotationYaw == 0.0F) && (entity.prevRotationPitch == 0.0F))
|
||||
return;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
@ -55,7 +55,7 @@ public class RenderGrapplingHook extends Render
|
|||
GL11.glEnable(32826 /* GL_RESCALE_NORMAL_EXT */);
|
||||
float f11 = 1.0F - frotP;
|
||||
|
||||
if(f11 > 0.0F)
|
||||
if (f11 > 0.0F)
|
||||
{
|
||||
float f12 = -MathHelper.sin(f11 * 3F) * f11;
|
||||
GL11.glRotatef(f12, 0.0F, 0.0F, 1.0F);
|
||||
|
@ -79,7 +79,7 @@ public class RenderGrapplingHook extends Render
|
|||
tessellator.addVertexWithUV(-7D, -2D, -2D, f6, f9);
|
||||
tessellator.draw();
|
||||
|
||||
for(int j = 0; j < 4; j++)
|
||||
for (int j = 0; j < 4; j++)
|
||||
{
|
||||
GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glNormal3f(0.0F, 0.0F, f10);
|
||||
|
|
|
@ -43,7 +43,7 @@ public class RenderSpiderQueen extends RenderLiving
|
|||
|
||||
protected int shouldRenderPass(EntitySpider p_77032_1_, int p_77032_2_, float p_77032_3_)
|
||||
{
|
||||
if(p_77032_2_ != 0)
|
||||
if (p_77032_2_ != 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ public class RenderSpiderQueen extends RenderLiving
|
|||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
|
||||
|
||||
if(p_77032_1_.isInvisible())
|
||||
if (p_77032_1_.isInvisible())
|
||||
{
|
||||
GL11.glDepthMask(false);
|
||||
}
|
||||
|
@ -93,7 +93,8 @@ public class RenderSpiderQueen extends RenderLiving
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
|
||||
* Returns the location of an entity's texture. Doesn't seem to be called
|
||||
* unless you call Render.bindEntityTexture.
|
||||
*/
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity p_110775_1_)
|
||||
|
|
|
@ -28,7 +28,9 @@ public class RenderVampireBat extends RenderLiving
|
|||
{
|
||||
private static final ResourceLocation batTextures = new ResourceLocation(ModInfo.PREFIX + "textures/models/mobs/vampirebat.png");
|
||||
/**
|
||||
* not actually sure this is size, is not used as of now, but the model would be recreated if the value changed and it seems a good match for a bats size
|
||||
* not actually sure this is size, is not used as of now, but the model
|
||||
* would be recreated if the value changed and it seems a good match for a
|
||||
* bats size
|
||||
*/
|
||||
private int renderedBatSize;
|
||||
|
||||
|
@ -39,15 +41,18 @@ public class RenderVampireBat extends RenderLiving
|
|||
}
|
||||
|
||||
/**
|
||||
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then handing it off to a worker function
|
||||
* which does the actual work. In all probabilty, the class Render is generic (Render<T extends Entity) and this method has signature public void
|
||||
* func_76986_a(T entity, double d, double d1, double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
|
||||
* Actually renders the given argument. This is a synthetic bridge method,
|
||||
* always casting down its argument and then handing it off to a worker
|
||||
* function which does the actual work. In all probabilty, the class Render
|
||||
* is generic (Render<T extends Entity) and this method has signature public
|
||||
* void func_76986_a(T entity, double d, double d1, double d2, float f,
|
||||
* float f1). But JAD is pre 1.5 so doesn't do that.
|
||||
*/
|
||||
private void doRender(EntityVampireBat p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
|
||||
{
|
||||
int i = ((ModelVampireBat) this.mainModel).getBatSize();
|
||||
|
||||
if(i != this.renderedBatSize)
|
||||
if (i != this.renderedBatSize)
|
||||
{
|
||||
this.renderedBatSize = i;
|
||||
this.mainModel = new ModelVampireBat();
|
||||
|
@ -57,7 +62,8 @@ public class RenderVampireBat extends RenderLiving
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
|
||||
* Returns the location of an entity's texture. Doesn't seem to be called
|
||||
* unless you call Render.bindEntityTexture.
|
||||
*/
|
||||
private ResourceLocation getEntityTexture(EntityVampireBat p_110775_1_)
|
||||
{
|
||||
|
@ -65,7 +71,8 @@ public class RenderVampireBat extends RenderLiving
|
|||
}
|
||||
|
||||
/**
|
||||
* Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args: entityLiving, partialTickTime
|
||||
* Allows the render to do any OpenGL state modifications necessary before
|
||||
* the model is rendered. Args: entityLiving, partialTickTime
|
||||
*/
|
||||
private void preRenderCallback(EntityVampireBat p_77041_1_, float p_77041_2_)
|
||||
{
|
||||
|
@ -82,7 +89,7 @@ public class RenderVampireBat extends RenderLiving
|
|||
|
||||
private void rotateCorpse(EntityVampireBat p_77043_1_, float p_77043_2_, float p_77043_3_, float p_77043_4_)
|
||||
{
|
||||
if(!p_77043_1_.getIsBatHanging())
|
||||
if (!p_77043_1_.getIsBatHanging())
|
||||
{
|
||||
GL11.glTranslatef(0.0F, MathHelper.cos(p_77043_2_ * 0.3F) * 0.1F, 0.0F);
|
||||
}
|
||||
|
@ -95,9 +102,12 @@ public class RenderVampireBat extends RenderLiving
|
|||
}
|
||||
|
||||
/**
|
||||
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then handing it off to a worker function
|
||||
* which does the actual work. In all probabilty, the class Render is generic (Render<T extends Entity) and this method has signature public void
|
||||
* func_76986_a(T entity, double d, double d1, double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
|
||||
* Actually renders the given argument. This is a synthetic bridge method,
|
||||
* always casting down its argument and then handing it off to a worker
|
||||
* function which does the actual work. In all probabilty, the class Render
|
||||
* is generic (Render<T extends Entity) and this method has signature public
|
||||
* void func_76986_a(T entity, double d, double d1, double d2, float f,
|
||||
* float f1). But JAD is pre 1.5 so doesn't do that.
|
||||
*/
|
||||
@Override
|
||||
public void doRender(EntityLiving p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
|
||||
|
@ -106,7 +116,8 @@ public class RenderVampireBat extends RenderLiving
|
|||
}
|
||||
|
||||
/**
|
||||
* Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args: entityLiving, partialTickTime
|
||||
* Allows the render to do any OpenGL state modifications necessary before
|
||||
* the model is rendered. Args: entityLiving, partialTickTime
|
||||
*/
|
||||
@Override
|
||||
protected void preRenderCallback(EntityLivingBase p_77041_1_, float p_77041_2_)
|
||||
|
@ -130,9 +141,12 @@ public class RenderVampireBat extends RenderLiving
|
|||
}
|
||||
|
||||
/**
|
||||
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then handing it off to a worker function
|
||||
* which does the actual work. In all probabilty, the class Render is generic (Render<T extends Entity) and this method has signature public void
|
||||
* func_76986_a(T entity, double d, double d1, double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
|
||||
* Actually renders the given argument. This is a synthetic bridge method,
|
||||
* always casting down its argument and then handing it off to a worker
|
||||
* function which does the actual work. In all probabilty, the class Render
|
||||
* is generic (Render<T extends Entity) and this method has signature public
|
||||
* void func_76986_a(T entity, double d, double d1, double d2, float f,
|
||||
* float f1). But JAD is pre 1.5 so doesn't do that.
|
||||
*/
|
||||
@Override
|
||||
public void doRender(EntityLivingBase p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
|
||||
|
@ -141,7 +155,8 @@ public class RenderVampireBat extends RenderLiving
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
|
||||
* Returns the location of an entity's texture. Doesn't seem to be called
|
||||
* unless you call Render.bindEntityTexture.
|
||||
*/
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity p_110775_1_)
|
||||
|
@ -150,9 +165,12 @@ public class RenderVampireBat extends RenderLiving
|
|||
}
|
||||
|
||||
/**
|
||||
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then handing it off to a worker function
|
||||
* which does the actual work. In all probabilty, the class Render is generic (Render<T extends Entity) and this method has signature public void
|
||||
* func_76986_a(T entity, double d, double d1, double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
|
||||
* Actually renders the given argument. This is a synthetic bridge method,
|
||||
* always casting down its argument and then handing it off to a worker
|
||||
* function which does the actual work. In all probabilty, the class Render
|
||||
* is generic (Render<T extends Entity) and this method has signature public
|
||||
* void func_76986_a(T entity, double d, double d1, double d2, float f,
|
||||
* float f1). But JAD is pre 1.5 so doesn't do that.
|
||||
*/
|
||||
@Override
|
||||
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
|
||||
|
|
|
@ -64,13 +64,10 @@ public class ModelJetpack extends ModelBiped
|
|||
}
|
||||
|
||||
/*
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
*/
|
||||
* private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
* { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z;
|
||||
* }
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
|
||||
|
|
|
@ -16,8 +16,10 @@ import net.minecraft.client.model.ModelBase;
|
|||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import steamcraft.common.entities.living.EntityVampireBat;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
@ -70,7 +72,9 @@ public class ModelVampireBat extends ModelBase
|
|||
}
|
||||
|
||||
/**
|
||||
* not actually sure this is size, is not used as of now, but the model would be recreated if the value changed and it seems a good match for a bats size
|
||||
* not actually sure this is size, is not used as of now, but the model
|
||||
* would be recreated if the value changed and it seems a good match for a
|
||||
* bats size
|
||||
*/
|
||||
public int getBatSize()
|
||||
{
|
||||
|
@ -87,7 +91,7 @@ public class ModelVampireBat extends ModelBase
|
|||
EntityVampireBat EntityVampireBat = (EntityVampireBat) p_78088_1_;
|
||||
float f6;
|
||||
|
||||
if(EntityVampireBat.getIsBatHanging())
|
||||
if (EntityVampireBat.getIsBatHanging())
|
||||
{
|
||||
f6 = (180F / (float) Math.PI);
|
||||
this.batHead.rotateAngleX = p_78088_6_ / (180F / (float) Math.PI);
|
||||
|
|
|
@ -27,7 +27,7 @@ public class ModelWhale extends ModelBase
|
|||
this.flipper1 = new ModelRenderer(this, 0, 64);
|
||||
this.flipper1.setRotationPoint(13.0F, 11.0F, -11.0F);
|
||||
this.flipper1.addBox(0.0F, 0.0F, 0.0F, 12, 2, 8);
|
||||
this.setRotateAngle(flipper1, 0.5462880730628967F, 0.31869712471961975F, 0.5009095072746276F);
|
||||
this.setRotateAngle(this.flipper1, 0.5462880730628967F, 0.31869712471961975F, 0.5009095072746276F);
|
||||
this.head = new ModelRenderer(this, 52, 50);
|
||||
this.head.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
this.head.addBox(0.0F, 0.0F, 0.0F, 15, 10, 15);
|
||||
|
@ -43,11 +43,11 @@ public class ModelWhale extends ModelBase
|
|||
this.mouth = new ModelRenderer(this, 0, 48);
|
||||
this.mouth.setRotationPoint(1.0F, 8.0F, 0.0F);
|
||||
this.mouth.addBox(0.0F, 0.0F, 0.0F, 13, 3, 13);
|
||||
this.setRotateAngle(mouth, -0.22759093344211578F, 0.0F, 0.0F);
|
||||
this.setRotateAngle(this.mouth, -0.22759093344211578F, 0.0F, 0.0F);
|
||||
this.flipper = new ModelRenderer(this, 0, 65);
|
||||
this.flipper.setRotationPoint(-12.0F, 11.0F, -11.0F);
|
||||
this.flipper.addBox(0.0F, 0.0F, 0.0F, 12, 2, 8);
|
||||
this.setRotateAngle(flipper, -0.5462880730628967F, -0.31869712471961975F, -0.5009095072746276F);
|
||||
this.setRotateAngle(this.flipper, -0.5462880730628967F, -0.31869712471961975F, -0.5009095072746276F);
|
||||
this.tail = new ModelRenderer(this, 0, 74);
|
||||
this.tail.setRotationPoint(0.0F, -2.0F, -48.0F);
|
||||
this.tail.addBox(0.0F, 0.0F, 0.0F, 15, 10, 15);
|
||||
|
|
|
@ -16,12 +16,12 @@ import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import boilerplate.client.ClientHelper;
|
||||
import boilerplate.client.renderers.RenderFloatingItem;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import steamcraft.client.renderers.models.ModelArmorEditor;
|
||||
import steamcraft.common.lib.ModInfo;
|
||||
import steamcraft.common.tiles.TileArmorEditor;
|
||||
import boilerplate.client.ClientHelper;
|
||||
import boilerplate.client.renderers.RenderFloatingItem;
|
||||
|
||||
/**
|
||||
* @author Surseance
|
||||
|
@ -52,7 +52,7 @@ public class TileArmorEditorRenderer extends TileEntitySpecialRenderer
|
|||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
if(tile.inventory[0] != null)
|
||||
if (tile.inventory[0] != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
RenderFloatingItem.render(dx + 0.5F, dy + 0.8F, dz + 0.15F, 90, 0, 0, 2F, 2F, 2F, tile.inventory[0]);
|
||||
|
|
|
@ -17,12 +17,12 @@ import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import boilerplate.client.ClientHelper;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import steamcraft.client.renderers.models.ModelCastIronLampSide;
|
||||
import steamcraft.client.renderers.models.ModelCastIronLampTop;
|
||||
import steamcraft.common.init.InitBlocks;
|
||||
import steamcraft.common.lib.ModInfo;
|
||||
import boilerplate.client.ClientHelper;
|
||||
|
||||
/**
|
||||
* @author Surseance
|
||||
|
@ -50,17 +50,17 @@ public class TileCastIronLampRenderer extends TileEntitySpecialRenderer
|
|||
float f1 = 0.6666667F;
|
||||
float f2 = 0.0F;
|
||||
|
||||
if((metadata == 1) || (metadata == 4))
|
||||
if ((metadata == 1) || (metadata == 4))
|
||||
{
|
||||
f2 = 180F;
|
||||
}
|
||||
|
||||
if(metadata == 2)
|
||||
if (metadata == 2)
|
||||
{
|
||||
f2 = 90F;
|
||||
}
|
||||
|
||||
if(metadata == 3)
|
||||
if (metadata == 3)
|
||||
{
|
||||
f2 = -90F;
|
||||
}
|
||||
|
@ -70,11 +70,11 @@ public class TileCastIronLampRenderer extends TileEntitySpecialRenderer
|
|||
|
||||
GL11.glTranslatef(0.0F, -0.3125F, -0.4375F);
|
||||
|
||||
if((block == InitBlocks.blockCastIronLampOn) || (block == InitBlocks.blockInvertedCastIronLamp))
|
||||
if ((block == InitBlocks.blockCastIronLampOn) || (block == InitBlocks.blockInvertedCastIronLamp))
|
||||
{
|
||||
ClientHelper.textureManager().bindTexture(lampOn);
|
||||
}
|
||||
else if((block == InitBlocks.blockCastIronLamp) || (block == InitBlocks.blockInvertedCastIronLampOff))
|
||||
else if ((block == InitBlocks.blockCastIronLamp) || (block == InitBlocks.blockInvertedCastIronLampOff))
|
||||
{
|
||||
ClientHelper.textureManager().bindTexture(lampOff);
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ public class TileCastIronLampRenderer extends TileEntitySpecialRenderer
|
|||
GL11.glPushMatrix();
|
||||
GL11.glScalef(f1, -f1, -f1);
|
||||
|
||||
if((metadata == 0) || (metadata == 1))
|
||||
if ((metadata == 0) || (metadata == 1))
|
||||
{
|
||||
this.lampModelTop.renderLamp();
|
||||
}
|
||||
|
|
|
@ -16,12 +16,12 @@ import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import boilerplate.client.ClientHelper;
|
||||
import boilerplate.client.renderers.RenderFloatingItem;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import steamcraft.client.renderers.models.ModelCharger;
|
||||
import steamcraft.common.lib.ModInfo;
|
||||
import steamcraft.common.tiles.energy.TileCharger;
|
||||
import boilerplate.client.ClientHelper;
|
||||
import boilerplate.client.renderers.RenderFloatingItem;
|
||||
|
||||
/**
|
||||
* @author Surseance
|
||||
|
@ -52,7 +52,7 @@ public class TileChargerRenderer extends TileEntitySpecialRenderer
|
|||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
if(tile.inventory[0] != null)
|
||||
if (tile.inventory[0] != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
RenderFloatingItem.render(dx + 0.5F, dy + 0.3F, dz + 0.5F, 0, 0, 0, tile.inventory[0]);
|
||||
|
|
|
@ -52,15 +52,15 @@ public class TileCopperPipeRenderer extends TileEntitySpecialRenderer
|
|||
|
||||
ForgeDirection opposite = pipe.onlyOneOpposite();
|
||||
|
||||
if((opposite != null) && (pipe.extract == null) && pipe.isPipe(opposite) && pipe.isPipe(opposite.getOpposite()))
|
||||
if ((opposite != null) && (pipe.extract == null) && pipe.isPipe(opposite) && pipe.isPipe(opposite.getOpposite()))
|
||||
this.drawStraightConnection(opposite, pipe);
|
||||
else
|
||||
{
|
||||
this.drawCore(pipe);
|
||||
|
||||
for(ForgeDirection dir : pipe.connections)
|
||||
if(dir != null)
|
||||
if(pipe.extract == dir)
|
||||
for (ForgeDirection dir : pipe.connections)
|
||||
if (dir != null)
|
||||
if (pipe.extract == dir)
|
||||
this.drawAlternateConnection(dir, pipe);
|
||||
else
|
||||
this.drawConnection(dir, pipe);
|
||||
|
@ -81,11 +81,11 @@ public class TileCopperPipeRenderer extends TileEntitySpecialRenderer
|
|||
{
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
|
||||
if((dir == ForgeDirection.SOUTH) || (dir == ForgeDirection.NORTH))
|
||||
if ((dir == ForgeDirection.SOUTH) || (dir == ForgeDirection.NORTH))
|
||||
{
|
||||
GL11.glRotatef(90, 1, 0, 0);
|
||||
}
|
||||
else if((dir == ForgeDirection.WEST) || (dir == ForgeDirection.EAST))
|
||||
else if ((dir == ForgeDirection.WEST) || (dir == ForgeDirection.EAST))
|
||||
{
|
||||
GL11.glRotatef(90, 0, 0, 1);
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ public class TileCopperPipeRenderer extends TileEntitySpecialRenderer
|
|||
tess.addVertexWithUV(12 * pixel, 1, 12 * pixel, 27 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(12 * pixel, 0, 12 * pixel, 11 * tPixel, 0 * tPixel);
|
||||
|
||||
if(ConfigGeneral.drawInside)
|
||||
if (ConfigGeneral.drawInside)
|
||||
{
|
||||
tess.addVertexWithUV(12 * pixel, 0, 1 - (12 * pixel), 11 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(12 * pixel, 1, 1 - (12 * pixel), 27 * tPixel, 0 * tPixel);
|
||||
|
@ -137,14 +137,14 @@ public class TileCopperPipeRenderer extends TileEntitySpecialRenderer
|
|||
}
|
||||
tess.draw();
|
||||
|
||||
if(ConfigGeneral.drawFluid)
|
||||
if (ConfigGeneral.drawFluid)
|
||||
{
|
||||
float level = pipe.fluidScaled;
|
||||
|
||||
if((pipe.fluidInPipe != null) && (level > 0))
|
||||
if ((pipe.fluidInPipe != null) && (level > 0))
|
||||
{
|
||||
IIcon icon = pipe.fluidInPipe.getIcon();
|
||||
|
||||
|
||||
if (icon == null)
|
||||
icon = pipe.fluidInPipe.getBlock().getIcon(0, 0);
|
||||
if (icon != null)
|
||||
|
@ -158,24 +158,24 @@ public class TileCopperPipeRenderer extends TileEntitySpecialRenderer
|
|||
tess.addVertexWithUV((1 - (15 * pixel)) + level, 1, (1 - (15 * pixel)) + level, icon.getMaxU(), icon.getMaxV());
|
||||
tess.addVertexWithUV((15 * pixel) - level, 1, (1 - (15 * pixel)) + level, icon.getMaxU(), icon.getMinV());
|
||||
tess.addVertexWithUV((15 * pixel) - level, 0, (1 - (15 * pixel)) + level, icon.getMinU(), icon.getMinV());
|
||||
|
||||
|
||||
tess.addVertexWithUV((15 * pixel) - level, 0, (15 * pixel) - level, icon.getMinU(), icon.getMinV());
|
||||
tess.addVertexWithUV((15 * pixel) - level, 1, (15 * pixel) - level, icon.getMaxU(), icon.getMinV());
|
||||
tess.addVertexWithUV((1 - (15 * pixel)) + level, 1, (15 * pixel) - level, icon.getMaxU(), icon.getMaxV());
|
||||
tess.addVertexWithUV((1 - (15 * pixel)) + level, 0, (15 * pixel) - level, icon.getMinU(), icon.getMaxV());
|
||||
|
||||
|
||||
tess.addVertexWithUV((1 - (15 * pixel)) + level, 0, (15 * pixel) - level, icon.getMinU(), icon.getMinV());
|
||||
tess.addVertexWithUV((1 - (15 * pixel)) + level, 1, (15 * pixel) - level, icon.getMaxU(), icon.getMinV());
|
||||
tess.addVertexWithUV((1 - (15 * pixel)) + level, 1, (1 - (15 * pixel)) + level, icon.getMaxU(), icon.getMaxV());
|
||||
tess.addVertexWithUV((1 - (15 * pixel)) + level, 0, (1 - (15 * pixel)) + level, icon.getMinU(), icon.getMaxV());
|
||||
|
||||
|
||||
tess.addVertexWithUV((15 * pixel) - level, 0, (1 - (15 * pixel)) + level, icon.getMinU(), icon.getMaxV());
|
||||
tess.addVertexWithUV((15 * pixel) - level, 1, (1 - (15 * pixel)) + level, icon.getMaxU(), icon.getMaxV());
|
||||
tess.addVertexWithUV((15 * pixel) - level, 1, (15 * pixel) - level, icon.getMaxU(), icon.getMinV());
|
||||
tess.addVertexWithUV((15 * pixel) - level, 0, (15 * pixel) - level, icon.getMinU(), icon.getMinV());
|
||||
}
|
||||
tess.draw();
|
||||
|
||||
|
||||
this.bindTexture(this.texture);
|
||||
}
|
||||
}
|
||||
|
@ -183,11 +183,11 @@ public class TileCopperPipeRenderer extends TileEntitySpecialRenderer
|
|||
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
|
||||
if((dir == ForgeDirection.SOUTH) || (dir == ForgeDirection.NORTH))
|
||||
if ((dir == ForgeDirection.SOUTH) || (dir == ForgeDirection.NORTH))
|
||||
{
|
||||
GL11.glRotatef(-90, 1, 0, 0);
|
||||
}
|
||||
else if((dir == ForgeDirection.WEST) || (dir == ForgeDirection.EAST))
|
||||
else if ((dir == ForgeDirection.WEST) || (dir == ForgeDirection.EAST))
|
||||
{
|
||||
GL11.glRotatef(-90, 0, 0, 1);
|
||||
}
|
||||
|
@ -202,27 +202,27 @@ public class TileCopperPipeRenderer extends TileEntitySpecialRenderer
|
|||
tess.startDrawingQuads();
|
||||
{
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
if(dir == ForgeDirection.UP)
|
||||
if (dir == ForgeDirection.UP)
|
||||
{
|
||||
// ROTATE
|
||||
}
|
||||
else if(dir == ForgeDirection.DOWN)
|
||||
else if (dir == ForgeDirection.DOWN)
|
||||
{
|
||||
GL11.glRotatef(180, 1, 0, 0);
|
||||
}
|
||||
else if(dir == ForgeDirection.SOUTH)
|
||||
else if (dir == ForgeDirection.SOUTH)
|
||||
{
|
||||
GL11.glRotatef(90, 1, 0, 0);
|
||||
}
|
||||
else if(dir == ForgeDirection.NORTH)
|
||||
else if (dir == ForgeDirection.NORTH)
|
||||
{
|
||||
GL11.glRotatef(270, 1, 0, 0);
|
||||
}
|
||||
else if(dir == ForgeDirection.WEST)
|
||||
else if (dir == ForgeDirection.WEST)
|
||||
{
|
||||
GL11.glRotatef(90, 0, 0, 1);
|
||||
}
|
||||
else if(dir == ForgeDirection.EAST)
|
||||
else if (dir == ForgeDirection.EAST)
|
||||
{
|
||||
GL11.glRotatef(270, 0, 0, 1);
|
||||
}
|
||||
|
@ -279,7 +279,7 @@ public class TileCopperPipeRenderer extends TileEntitySpecialRenderer
|
|||
tess.addVertexWithUV(1 - (10 * pixel), 1 - (2 * pixel), 10 * pixel, 0 * tPixel, 10 * tPixel);
|
||||
tess.addVertexWithUV(1 - (10 * pixel), 1, 10 * pixel, 0 * tPixel, 8 * tPixel);
|
||||
|
||||
if(ConfigGeneral.drawInside)
|
||||
if (ConfigGeneral.drawInside)
|
||||
{
|
||||
tess.addVertexWithUV(12 * pixel, 1 - (12 * pixel), 1 - (12 * pixel), 0 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(12 * pixel, 1 - (2 * pixel), 1 - (12 * pixel), 6 * tPixel, 0 * tPixel);
|
||||
|
@ -305,27 +305,27 @@ public class TileCopperPipeRenderer extends TileEntitySpecialRenderer
|
|||
tess.draw();
|
||||
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
if(dir == ForgeDirection.UP)
|
||||
if (dir == ForgeDirection.UP)
|
||||
{
|
||||
// ROTATE
|
||||
}
|
||||
else if(dir == ForgeDirection.DOWN)
|
||||
else if (dir == ForgeDirection.DOWN)
|
||||
{
|
||||
GL11.glRotatef(-180, 1, 0, 0);
|
||||
}
|
||||
else if(dir == ForgeDirection.SOUTH)
|
||||
else if (dir == ForgeDirection.SOUTH)
|
||||
{
|
||||
GL11.glRotatef(-90, 1, 0, 0);
|
||||
}
|
||||
else if(dir == ForgeDirection.NORTH)
|
||||
else if (dir == ForgeDirection.NORTH)
|
||||
{
|
||||
GL11.glRotatef(-270, 1, 0, 0);
|
||||
}
|
||||
else if(dir == ForgeDirection.WEST)
|
||||
else if (dir == ForgeDirection.WEST)
|
||||
{
|
||||
GL11.glRotatef(-90, 0, 0, 1);
|
||||
}
|
||||
else if(dir == ForgeDirection.EAST)
|
||||
else if (dir == ForgeDirection.EAST)
|
||||
{
|
||||
GL11.glRotatef(-270, 0, 0, 1);
|
||||
}
|
||||
|
@ -339,33 +339,33 @@ public class TileCopperPipeRenderer extends TileEntitySpecialRenderer
|
|||
tess.startDrawingQuads();
|
||||
{
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
if(dir == ForgeDirection.UP)
|
||||
if (dir == ForgeDirection.UP)
|
||||
{
|
||||
// ROTATE
|
||||
}
|
||||
else if(dir == ForgeDirection.DOWN)
|
||||
else if (dir == ForgeDirection.DOWN)
|
||||
{
|
||||
GL11.glRotatef(180, 1, 0, 0);
|
||||
}
|
||||
else if(dir == ForgeDirection.SOUTH)
|
||||
else if (dir == ForgeDirection.SOUTH)
|
||||
{
|
||||
GL11.glRotatef(90, 1, 0, 0);
|
||||
}
|
||||
else if(dir == ForgeDirection.NORTH)
|
||||
else if (dir == ForgeDirection.NORTH)
|
||||
{
|
||||
GL11.glRotatef(270, 1, 0, 0);
|
||||
}
|
||||
else if(dir == ForgeDirection.WEST)
|
||||
else if (dir == ForgeDirection.WEST)
|
||||
{
|
||||
GL11.glRotatef(90, 0, 0, 1);
|
||||
}
|
||||
else if(dir == ForgeDirection.EAST)
|
||||
else if (dir == ForgeDirection.EAST)
|
||||
{
|
||||
GL11.glRotatef(270, 0, 0, 1);
|
||||
}
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
|
||||
if (pipe.blockType == null || pipe.isPipe(dir))
|
||||
if ((pipe.blockType == null) || pipe.isPipe(dir))
|
||||
{
|
||||
tess.addVertexWithUV(1 - (12 * pixel), 1 - (12 * pixel), 1 - (12 * pixel), 6 * tPixel, 6 * tPixel);
|
||||
tess.addVertexWithUV(1 - (12 * pixel), 1, 1 - (12 * pixel), 11 * tPixel, 6 * tPixel);
|
||||
|
@ -387,7 +387,7 @@ public class TileCopperPipeRenderer extends TileEntitySpecialRenderer
|
|||
tess.addVertexWithUV(12 * pixel, 1, 12 * pixel, 11 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(12 * pixel, 1 - (12 * pixel), 12 * pixel, 6 * tPixel, 0 * tPixel);
|
||||
|
||||
if(ConfigGeneral.drawInside)
|
||||
if (ConfigGeneral.drawInside)
|
||||
{
|
||||
tess.addVertexWithUV(12 * pixel, 1 - (12 * pixel), 1 - (12 * pixel), 6 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(12 * pixel, 1, 1 - (12 * pixel), 11 * tPixel, 0 * tPixel);
|
||||
|
@ -409,7 +409,7 @@ public class TileCopperPipeRenderer extends TileEntitySpecialRenderer
|
|||
tess.addVertexWithUV(12 * pixel, 1, 1 - (12 * pixel), 11 * tPixel, 6 * tPixel);
|
||||
tess.addVertexWithUV(12 * pixel, 1 - (12 * pixel), 1 - (12 * pixel), 6 * tPixel, 6 * tPixel);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -433,7 +433,7 @@ public class TileCopperPipeRenderer extends TileEntitySpecialRenderer
|
|||
tess.addVertexWithUV(12 * pixel, 1 - (2 * pixel), 12 * pixel, 11 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(12 * pixel, 1 - (12 * pixel), 12 * pixel, 6 * tPixel, 0 * tPixel);
|
||||
|
||||
if(ConfigGeneral.drawInside)
|
||||
if (ConfigGeneral.drawInside)
|
||||
{
|
||||
tess.addVertexWithUV(12 * pixel, 1 - (12 * pixel), 1 - (12 * pixel), 6 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(12 * pixel, 1 - (2 * pixel), 1 - (12 * pixel), 11 * tPixel, 0 * tPixel);
|
||||
|
@ -490,11 +490,11 @@ public class TileCopperPipeRenderer extends TileEntitySpecialRenderer
|
|||
}
|
||||
tess.draw();
|
||||
|
||||
if(ConfigGeneral.drawFluid)
|
||||
if (ConfigGeneral.drawFluid)
|
||||
{
|
||||
float level = pipe.fluidScaled;
|
||||
|
||||
if((pipe.fluidInPipe != null) && (level > 0))
|
||||
if ((pipe.fluidInPipe != null) && (level > 0))
|
||||
{
|
||||
IIcon icon = pipe.fluidInPipe.getIcon();
|
||||
if (icon == null)
|
||||
|
@ -502,24 +502,26 @@ public class TileCopperPipeRenderer extends TileEntitySpecialRenderer
|
|||
if (icon != null)
|
||||
{
|
||||
this.bindTexture(TextureMap.locationBlocksTexture);
|
||||
|
||||
|
||||
tess.startDrawingQuads();
|
||||
{
|
||||
tess.addVertexWithUV((1 - (15 * pixel)) + level, 1 - (15 * pixel), (1 - (15 * pixel)) + level, icon.getMinU(), icon.getMaxV());
|
||||
tess.addVertexWithUV((1 - (15 * pixel)) + level, 1 - (15 * pixel), (1 - (15 * pixel)) + level, icon.getMinU(),
|
||||
icon.getMaxV());
|
||||
tess.addVertexWithUV((1 - (15 * pixel)) + level, 1, (1 - (15 * pixel)) + level, icon.getMaxU(), icon.getMaxV());
|
||||
tess.addVertexWithUV((15 * pixel) - level, 1, (1 - (15 * pixel)) + level, icon.getMaxU(), icon.getMinV());
|
||||
tess.addVertexWithUV((15 * pixel) - level, 1 - (15 * pixel), (1 - (15 * pixel)) + level, icon.getMinU(), icon.getMinV());
|
||||
|
||||
|
||||
tess.addVertexWithUV((15 * pixel) - level, 1 - (15 * pixel), (15 * pixel) - level, icon.getMinU(), icon.getMinV());
|
||||
tess.addVertexWithUV((15 * pixel) - level, 1, (15 * pixel) - level, icon.getMaxU(), icon.getMinV());
|
||||
tess.addVertexWithUV((1 - (15 * pixel)) + level, 1, (15 * pixel) - level, icon.getMaxU(), icon.getMaxV());
|
||||
tess.addVertexWithUV((1 - (15 * pixel)) + level, 1 - (15 * pixel), (15 * pixel) - level, icon.getMinU(), icon.getMaxV());
|
||||
|
||||
|
||||
tess.addVertexWithUV((1 - (15 * pixel)) + level, 1 - (15 * pixel), (15 * pixel) - level, icon.getMinU(), icon.getMinV());
|
||||
tess.addVertexWithUV((1 - (15 * pixel)) + level, 1, (15 * pixel) - level, icon.getMaxU(), icon.getMinV());
|
||||
tess.addVertexWithUV((1 - (15 * pixel)) + level, 1, (1 - (15 * pixel)) + level, icon.getMaxU(), icon.getMaxV());
|
||||
tess.addVertexWithUV((1 - (15 * pixel)) + level, 1 - (15 * pixel), (1 - (15 * pixel)) + level, icon.getMinU(), icon.getMaxV());
|
||||
|
||||
tess.addVertexWithUV((1 - (15 * pixel)) + level, 1 - (15 * pixel), (1 - (15 * pixel)) + level, icon.getMinU(),
|
||||
icon.getMaxV());
|
||||
|
||||
tess.addVertexWithUV((15 * pixel) - level, 1 - (15 * pixel), (1 - (15 * pixel)) + level, icon.getMinU(), icon.getMaxV());
|
||||
tess.addVertexWithUV((15 * pixel) - level, 1, (1 - (15 * pixel)) + level, icon.getMaxU(), icon.getMaxV());
|
||||
tess.addVertexWithUV((15 * pixel) - level, 1, (15 * pixel) - level, icon.getMaxU(), icon.getMinV());
|
||||
|
@ -533,27 +535,27 @@ public class TileCopperPipeRenderer extends TileEntitySpecialRenderer
|
|||
}
|
||||
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
if(dir == ForgeDirection.UP)
|
||||
if (dir == ForgeDirection.UP)
|
||||
{
|
||||
// ROTATE
|
||||
}
|
||||
else if(dir == ForgeDirection.DOWN)
|
||||
else if (dir == ForgeDirection.DOWN)
|
||||
{
|
||||
GL11.glRotatef(-180, 1, 0, 0);
|
||||
}
|
||||
else if(dir == ForgeDirection.SOUTH)
|
||||
else if (dir == ForgeDirection.SOUTH)
|
||||
{
|
||||
GL11.glRotatef(-90, 1, 0, 0);
|
||||
}
|
||||
else if(dir == ForgeDirection.NORTH)
|
||||
else if (dir == ForgeDirection.NORTH)
|
||||
{
|
||||
GL11.glRotatef(-270, 1, 0, 0);
|
||||
}
|
||||
else if(dir == ForgeDirection.WEST)
|
||||
else if (dir == ForgeDirection.WEST)
|
||||
{
|
||||
GL11.glRotatef(-90, 0, 0, 1);
|
||||
}
|
||||
else if(dir == ForgeDirection.EAST)
|
||||
else if (dir == ForgeDirection.EAST)
|
||||
{
|
||||
GL11.glRotatef(-270, 0, 0, 1);
|
||||
}
|
||||
|
@ -566,14 +568,14 @@ public class TileCopperPipeRenderer extends TileEntitySpecialRenderer
|
|||
|
||||
tess.startDrawingQuads();
|
||||
{
|
||||
if(tile.connections[0] == null)
|
||||
if (tile.connections[0] == null)
|
||||
{
|
||||
tess.addVertexWithUV(12 * pixel, 12 * pixel, 1 - (12 * pixel), 6 * tPixel, 6 * tPixel);
|
||||
tess.addVertexWithUV(12 * pixel, 12 * pixel, 12 * pixel, 6 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (12 * pixel), 12 * pixel, 12 * pixel, 0 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (12 * pixel), 12 * pixel, 1 - (12 * pixel), 0 * tPixel, 6 * tPixel);
|
||||
|
||||
if(ConfigGeneral.drawInside)
|
||||
if (ConfigGeneral.drawInside)
|
||||
{
|
||||
tess.addVertexWithUV(1 - (12 * pixel), 12 * pixel, 1 - (12 * pixel), 0 * tPixel, 6 * tPixel);
|
||||
tess.addVertexWithUV(1 - (12 * pixel), 12 * pixel, 12 * pixel, 0 * tPixel, 0 * tPixel);
|
||||
|
@ -582,14 +584,14 @@ public class TileCopperPipeRenderer extends TileEntitySpecialRenderer
|
|||
}
|
||||
}
|
||||
|
||||
if(tile.connections[1] == null)
|
||||
if (tile.connections[1] == null)
|
||||
{
|
||||
tess.addVertexWithUV(1 - (12 * pixel), 1 - (12 * pixel), 1 - (12 * pixel), 6 * tPixel, 6 * tPixel);
|
||||
tess.addVertexWithUV(1 - (12 * pixel), 1 - (12 * pixel), 12 * pixel, 6 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(12 * pixel, 1 - (12 * pixel), 12 * pixel, 0 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(12 * pixel, 1 - (12 * pixel), 1 - (12 * pixel), 0 * tPixel, 6 * tPixel);
|
||||
|
||||
if(ConfigGeneral.drawInside)
|
||||
if (ConfigGeneral.drawInside)
|
||||
{
|
||||
tess.addVertexWithUV(12 * pixel, 1 - (12 * pixel), 1 - (12 * pixel), 0 * tPixel, 6 * tPixel);
|
||||
tess.addVertexWithUV(12 * pixel, 1 - (12 * pixel), 12 * pixel, 0 * tPixel, 0 * tPixel);
|
||||
|
@ -598,14 +600,14 @@ public class TileCopperPipeRenderer extends TileEntitySpecialRenderer
|
|||
}
|
||||
}
|
||||
|
||||
if(tile.connections[2] == null)
|
||||
if (tile.connections[2] == null)
|
||||
{
|
||||
tess.addVertexWithUV(12 * pixel, 12 * pixel, 12 * pixel, 6 * tPixel, 6 * tPixel);
|
||||
tess.addVertexWithUV(12 * pixel, 1 - (12 * pixel), 12 * pixel, 6 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (12 * pixel), 1 - (12 * pixel), 12 * pixel, 0 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (12 * pixel), 12 * pixel, 12 * pixel, 0 * tPixel, 6 * tPixel);
|
||||
|
||||
if(ConfigGeneral.drawInside)
|
||||
if (ConfigGeneral.drawInside)
|
||||
{
|
||||
tess.addVertexWithUV(1 - (12 * pixel), 12 * pixel, 12 * pixel, 0 * tPixel, 6 * tPixel);
|
||||
tess.addVertexWithUV(1 - (12 * pixel), 1 - (12 * pixel), 12 * pixel, 0 * tPixel, 0 * tPixel);
|
||||
|
@ -614,14 +616,14 @@ public class TileCopperPipeRenderer extends TileEntitySpecialRenderer
|
|||
}
|
||||
}
|
||||
|
||||
if(tile.connections[3] == null)
|
||||
if (tile.connections[3] == null)
|
||||
{
|
||||
tess.addVertexWithUV(1 - (12 * pixel), 12 * pixel, 1 - (12 * pixel), 6 * tPixel, 6 * tPixel);
|
||||
tess.addVertexWithUV(1 - (12 * pixel), 1 - (12 * pixel), 1 - (12 * pixel), 6 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(12 * pixel, 1 - (12 * pixel), 1 - (12 * pixel), 0 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(12 * pixel, 12 * pixel, 1 - (12 * pixel), 0 * tPixel, 6 * tPixel);
|
||||
|
||||
if(ConfigGeneral.drawInside)
|
||||
if (ConfigGeneral.drawInside)
|
||||
{
|
||||
tess.addVertexWithUV(12 * pixel, 12 * pixel, 1 - (12 * pixel), 0 * tPixel, 6 * tPixel);
|
||||
tess.addVertexWithUV(12 * pixel, 1 - (12 * pixel), 1 - (12 * pixel), 0 * tPixel, 0 * tPixel);
|
||||
|
@ -630,14 +632,14 @@ public class TileCopperPipeRenderer extends TileEntitySpecialRenderer
|
|||
}
|
||||
}
|
||||
|
||||
if(tile.connections[4] == null)
|
||||
if (tile.connections[4] == null)
|
||||
{
|
||||
tess.addVertexWithUV(12 * pixel, 12 * pixel, 1 - (12 * pixel), 6 * tPixel, 6 * tPixel);
|
||||
tess.addVertexWithUV(12 * pixel, 1 - (12 * pixel), 1 - (12 * pixel), 6 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(12 * pixel, 1 - (12 * pixel), 12 * pixel, 0 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(12 * pixel, 12 * pixel, 12 * pixel, 0 * tPixel, 6 * tPixel);
|
||||
|
||||
if(ConfigGeneral.drawInside)
|
||||
if (ConfigGeneral.drawInside)
|
||||
{
|
||||
tess.addVertexWithUV(12 * pixel, 12 * pixel, 12 * pixel, 0 * tPixel, 6 * tPixel);
|
||||
tess.addVertexWithUV(12 * pixel, 1 - (12 * pixel), 12 * pixel, 0 * tPixel, 0 * tPixel);
|
||||
|
@ -646,14 +648,14 @@ public class TileCopperPipeRenderer extends TileEntitySpecialRenderer
|
|||
}
|
||||
}
|
||||
|
||||
if(tile.connections[5] == null)
|
||||
if (tile.connections[5] == null)
|
||||
{
|
||||
tess.addVertexWithUV(1 - (12 * pixel), 12 * pixel, 12 * pixel, 6 * tPixel, 6 * tPixel);
|
||||
tess.addVertexWithUV(1 - (12 * pixel), 1 - (12 * pixel), 12 * pixel, 6 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (12 * pixel), 1 - (12 * pixel), 1 - (12 * pixel), 0 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (12 * pixel), 12 * pixel, 1 - (12 * pixel), 0 * tPixel, 6 * tPixel);
|
||||
|
||||
if(ConfigGeneral.drawInside)
|
||||
if (ConfigGeneral.drawInside)
|
||||
{
|
||||
tess.addVertexWithUV(1 - (12 * pixel), 12 * pixel, 1 - (12 * pixel), 0 * tPixel, 6 * tPixel);
|
||||
tess.addVertexWithUV(1 - (12 * pixel), 1 - (12 * pixel), 1 - (12 * pixel), 0 * tPixel, 0 * tPixel);
|
||||
|
|
|
@ -18,10 +18,10 @@ import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import net.minecraftforge.fluids.FluidTank;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import steamcraft.common.config.ConfigGeneral;
|
||||
import steamcraft.common.lib.LibInfo;
|
||||
import steamcraft.common.lib.ModInfo;
|
||||
|
@ -66,118 +66,118 @@ public class TileCopperTankRenderer extends TileEntitySpecialRenderer
|
|||
|
||||
tess.startDrawingQuads();
|
||||
{
|
||||
tess.addVertexWithUV(4 * pixel, 0, 1 - (4 * pixel), 24 * tPixel, 12 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 0, 4 * pixel, 24 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 0, 4 * pixel, 12 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 0 , 1 - (4 * pixel), 12 * tPixel, 12 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 0, 1 - (4 * pixel), 24 * tPixel, 12 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 0, 4 * pixel, 24 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 0, 4 * pixel, 12 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 0, 1 - (4 * pixel), 12 * tPixel, 12 * tPixel);
|
||||
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 1, 1 - (4 * pixel), 24 * tPixel, 12 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 1, 4 * pixel, 24 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 1, 4 * pixel, 12 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 1, 1 - (4 * pixel), 12 * tPixel, 12 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 1, 1 - (4 * pixel), 24 * tPixel, 12 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 1, 4 * pixel, 24 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 1, 4 * pixel, 12 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 1, 1 - (4 * pixel), 12 * tPixel, 12 * tPixel);
|
||||
|
||||
tess.addVertexWithUV(4 * pixel, 0, 4 * pixel, 12 * tPixel, 16 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 1, 4 * pixel, 12 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 1, 4 * pixel, 0 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 0, 4 * pixel, 0 * tPixel, 16 * tPixel);
|
||||
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 0, 1 - (4 * pixel), 12 * tPixel, 16 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 1, 1 - (4 * pixel), 12 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 1, 1 - (4 * pixel), 0 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 0, 1 - (4 * pixel), 0 * tPixel, 16 * tPixel);
|
||||
|
||||
tess.addVertexWithUV(4 * pixel, 0, 1 - (4 * pixel), 12 * tPixel, 16 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 1, 1 - (4 * pixel), 12 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 1, 4 * pixel, 0 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 0, 4 * pixel, 0 * tPixel, 16 * tPixel);
|
||||
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 0, 4 * pixel, 12 * tPixel, 16 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 1, 4 * pixel, 12 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 1, 1 - (4 * pixel), 0 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 0, 1 - (4 * pixel), 0 * tPixel, 16 * tPixel);
|
||||
|
||||
if (ConfigGeneral.drawInside)
|
||||
{
|
||||
tess.addVertexWithUV(1 - (4 * pixel), pixel, 1 - (4 * pixel), 12 * tPixel, 12 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), pixel, 4 * pixel, 12 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, pixel, 4 * pixel, 24 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, pixel, 1 - (4 * pixel), 24 * tPixel, 12 * tPixel);
|
||||
|
||||
tess.addVertexWithUV(4 * pixel, 1 - pixel, 1 - (4 * pixel), 12 * tPixel, 12 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 1 - pixel, 4 * pixel, 12 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 1 - pixel, 4 * pixel, 24 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 1 - pixel, 1 - (4 * pixel), 24 * tPixel, 12 * tPixel);
|
||||
|
||||
tess.addVertexWithUV(4 * pixel, 0, 4 * pixel, 12 * tPixel, 16 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 1, 4 * pixel, 12 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 1, 4 * pixel, 0 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 0, 4 * pixel, 0 * tPixel, 16 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 1, 4 * pixel, 0 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 1, 4 * pixel, 12 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 0, 4 * pixel, 12 * tPixel, 16 * tPixel);
|
||||
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 0, 1 - (4 * pixel), 12 * tPixel, 16 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 1, 1 - (4 * pixel), 12 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 1, 1 - (4 * pixel), 0 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 0, 1 - (4 * pixel), 0 * tPixel, 16 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 1, 1 - (4 * pixel), 0 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 1, 1 - (4 * pixel), 12 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 0, 1 - (4 * pixel), 12 * tPixel, 16 * tPixel);
|
||||
|
||||
tess.addVertexWithUV(4 * pixel, 0, 1 - (4 * pixel), 12 * tPixel, 16 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 1, 1 - (4 * pixel), 12 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 1, 4 * pixel, 0 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 0, 4 * pixel, 0 * tPixel, 16 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 1, 4 * pixel, 0 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 1, 1 - (4 * pixel), 12 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 0, 1 - (4 * pixel), 12 * tPixel, 16 * tPixel);
|
||||
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 0, 4 * pixel, 12 * tPixel, 16 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 1, 4 * pixel, 12 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 1, 1 - (4 * pixel), 0 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 0, 1 - (4 * pixel), 0 * tPixel, 16 * tPixel);
|
||||
|
||||
if(ConfigGeneral.drawInside)
|
||||
{
|
||||
tess.addVertexWithUV(1 - (4 * pixel), pixel, 1 - (4 * pixel), 12 * tPixel, 12 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), pixel, 4 * pixel, 12 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, pixel, 4 * pixel, 24 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, pixel, 1 - (4 * pixel), 24 * tPixel, 12 * tPixel);
|
||||
|
||||
tess.addVertexWithUV(4 * pixel, 1 - pixel, 1 - (4 * pixel), 12 * tPixel, 12 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 1 - pixel, 4 * pixel, 12 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 1 - pixel, 4 * pixel, 24 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 1 - pixel, 1 - (4 * pixel), 24 * tPixel, 12 * tPixel);
|
||||
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 0, 4 * pixel, 0 * tPixel, 16 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 1, 4 * pixel, 0 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 1, 4 * pixel, 12 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 0, 4 * pixel, 12 * tPixel, 16 * tPixel);
|
||||
|
||||
tess.addVertexWithUV(4 * pixel, 0, 1 - (4 * pixel), 0 * tPixel, 16 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 1, 1 - (4 * pixel), 0 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 1, 1 - (4 * pixel), 12 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 0, 1 - (4 * pixel), 12 * tPixel, 16 * tPixel);
|
||||
|
||||
tess.addVertexWithUV(4 * pixel, 0, 4 * pixel, 0 * tPixel, 16 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 1, 4 * pixel, 0 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 1, 1 - (4 * pixel), 12 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(4 * pixel, 0, 1 - (4 * pixel), 12 * tPixel, 16 * tPixel);
|
||||
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 0, 1 - (4 * pixel), 0 * tPixel, 16 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 1, 1 - (4 * pixel), 0 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 1, 4 * pixel, 12 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 0, 4 * pixel, 12 * tPixel, 16 * tPixel);
|
||||
}
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 1, 1 - (4 * pixel), 0 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 1, 4 * pixel, 12 * tPixel, 0 * tPixel);
|
||||
tess.addVertexWithUV(1 - (4 * pixel), 0, 4 * pixel, 12 * tPixel, 16 * tPixel);
|
||||
}
|
||||
}
|
||||
tess.draw();
|
||||
tess.draw();
|
||||
}
|
||||
|
||||
|
||||
private void drawFluid(TileCopperTank tank)
|
||||
{
|
||||
FluidTank ft = tank.tank;
|
||||
|
||||
if((ft != null) && ft.getFluid() != null && tank.fluidScaled > 0)
|
||||
|
||||
if ((ft != null) && (ft.getFluid() != null) && (tank.fluidScaled > 0))
|
||||
{
|
||||
float level = tank.fluidScaled;
|
||||
IIcon icon = ft.getFluid().getFluid().getIcon();
|
||||
|
||||
|
||||
if (icon == null)
|
||||
icon = ft.getFluid().getFluid().getBlock().getIcon(0, 0);
|
||||
if (icon != null)
|
||||
{
|
||||
Tessellator tess = Tessellator.instance;
|
||||
this.bindTexture(TextureMap.locationBlocksTexture);
|
||||
|
||||
|
||||
tess.startDrawingQuads();
|
||||
{
|
||||
{
|
||||
tess.addVertexWithUV(6 * pixel, pixel, 1 - (6 * pixel), icon.getMaxU(), icon.getMaxV());
|
||||
tess.addVertexWithUV(6 * pixel, pixel, 6 * pixel, icon.getMaxU(), icon.getMinV());
|
||||
tess.addVertexWithUV(1 - (6 * pixel), pixel, 6 * pixel, icon.getMinU(), icon.getMinV());
|
||||
tess.addVertexWithUV(1 - (6 * pixel), pixel, 1 - (6 * pixel), icon.getMinU(), icon.getMaxV());
|
||||
|
||||
tess.addVertexWithUV(1 - (6 * pixel), pixel + 15 * level, 1 - (6 * pixel), icon.getMaxU(), icon.getMaxV());
|
||||
tess.addVertexWithUV(1 - (6 * pixel), pixel + 15 * level, 6 * pixel, icon.getMaxU(), icon.getMinV());
|
||||
tess.addVertexWithUV(6 * pixel, pixel + 15 * level, 6 * pixel, icon.getMinU(), icon.getMinV());
|
||||
tess.addVertexWithUV(6 * pixel, pixel + 15 * level , 1 - (6 * pixel), icon.getMinU(), icon.getMaxV());
|
||||
|
||||
|
||||
tess.addVertexWithUV(1 - (6 * pixel), pixel + (15 * level), 1 - (6 * pixel), icon.getMaxU(), icon.getMaxV());
|
||||
tess.addVertexWithUV(1 - (6 * pixel), pixel + (15 * level), 6 * pixel, icon.getMaxU(), icon.getMinV());
|
||||
tess.addVertexWithUV(6 * pixel, pixel + (15 * level), 6 * pixel, icon.getMinU(), icon.getMinV());
|
||||
tess.addVertexWithUV(6 * pixel, pixel + (15 * level), 1 - (6 * pixel), icon.getMinU(), icon.getMaxV());
|
||||
|
||||
tess.addVertexWithUV(6 * pixel, pixel, 6 * pixel, icon.getMaxU(), icon.getMaxV());
|
||||
tess.addVertexWithUV(6 * pixel, pixel + 15 * level, 6 * pixel, icon.getMaxU(), icon.getMinV());
|
||||
tess.addVertexWithUV(1 - (6 * pixel), pixel + 15 * level, 6 * pixel, icon.getMinU(), icon.getMinV());
|
||||
tess.addVertexWithUV(1 -(6 * pixel), pixel, 6 * pixel, icon.getMinU(), icon.getMaxV());
|
||||
|
||||
tess.addVertexWithUV(6 * pixel, pixel + (15 * level), 6 * pixel, icon.getMaxU(), icon.getMinV());
|
||||
tess.addVertexWithUV(1 - (6 * pixel), pixel + (15 * level), 6 * pixel, icon.getMinU(), icon.getMinV());
|
||||
tess.addVertexWithUV(1 - (6 * pixel), pixel, 6 * pixel, icon.getMinU(), icon.getMaxV());
|
||||
|
||||
tess.addVertexWithUV(1 - (6 * pixel), pixel, 1 - (6 * pixel), icon.getMaxU(), icon.getMaxV());
|
||||
tess.addVertexWithUV(1 - (6 * pixel), pixel + 15 * level, 1 - (6 * pixel), icon.getMaxU(), icon.getMinV());
|
||||
tess.addVertexWithUV(6 * pixel, pixel + 15 * level, 1 - (6 * pixel), icon.getMinU(), icon.getMinV());
|
||||
tess.addVertexWithUV(1 - (6 * pixel), pixel + (15 * level), 1 - (6 * pixel), icon.getMaxU(), icon.getMinV());
|
||||
tess.addVertexWithUV(6 * pixel, pixel + (15 * level), 1 - (6 * pixel), icon.getMinU(), icon.getMinV());
|
||||
tess.addVertexWithUV(6 * pixel, pixel, 1 - (6 * pixel), icon.getMinU(), icon.getMaxV());
|
||||
|
||||
|
||||
tess.addVertexWithUV(6 * pixel, pixel, 1 - (6 * pixel), icon.getMaxU(), icon.getMaxV());
|
||||
tess.addVertexWithUV(6 * pixel, pixel + 15 * level, 1 - (6 * pixel), icon.getMaxU(), icon.getMinV());
|
||||
tess.addVertexWithUV(6 * pixel, pixel + 15 * level, 6 * pixel, icon.getMinU(), icon.getMinV());
|
||||
tess.addVertexWithUV(6 * pixel, pixel + (15 * level), 1 - (6 * pixel), icon.getMaxU(), icon.getMinV());
|
||||
tess.addVertexWithUV(6 * pixel, pixel + (15 * level), 6 * pixel, icon.getMinU(), icon.getMinV());
|
||||
tess.addVertexWithUV(6 * pixel, pixel, 6 * pixel, icon.getMinU(), icon.getMaxV());
|
||||
|
||||
|
||||
tess.addVertexWithUV(1 - (6 * pixel), pixel, 6 * pixel, icon.getMaxU(), icon.getMaxV());
|
||||
tess.addVertexWithUV(1 - (6 * pixel), pixel + 15 * level, 6 * pixel, icon.getMaxU(), icon.getMinV());
|
||||
tess.addVertexWithUV(1 - (6 * pixel), pixel + 15 * level, 1 - (6 * pixel), icon.getMinU(), icon.getMinV());
|
||||
tess.addVertexWithUV(1 - (6 * pixel), pixel + (15 * level), 6 * pixel, icon.getMaxU(), icon.getMinV());
|
||||
tess.addVertexWithUV(1 - (6 * pixel), pixel + (15 * level), 1 - (6 * pixel), icon.getMinU(), icon.getMinV());
|
||||
tess.addVertexWithUV(1 - (6 * pixel), pixel, 1 - (6 * pixel), icon.getMinU(), icon.getMaxV());
|
||||
}
|
||||
tess.draw();
|
||||
|
|
|
@ -32,10 +32,10 @@ public class TileCopperWireRenderer extends TileEntitySpecialRenderer
|
|||
{
|
||||
private static float pixel = LibInfo.pixel;
|
||||
private static float tPixel = LibInfo.tPixel;
|
||||
|
||||
|
||||
protected ResourceLocation texture = new ResourceLocation(ModInfo.PREFIX + "textures/blocks/blockCopperWire.png");
|
||||
protected ResourceLocation texture1 = new ResourceLocation(ModInfo.PREFIX + "textures/blocks/blockInsulatedCopperWire.png");
|
||||
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double transX, double transY, double transZ, float f)
|
||||
{
|
||||
|
@ -46,15 +46,15 @@ public class TileCopperWireRenderer extends TileEntitySpecialRenderer
|
|||
|
||||
TileCopperWire wire = (TileCopperWire) tile;
|
||||
|
||||
if(tile.getBlockMetadata() == 0)
|
||||
this.bindTexture(texture);
|
||||
if (tile.getBlockMetadata() == 0)
|
||||
this.bindTexture(this.texture);
|
||||
else
|
||||
this.bindTexture(texture1);
|
||||
this.bindTexture(this.texture1);
|
||||
this.drawCore(wire);
|
||||
|
||||
for(ForgeDirection dir : wire.connections)
|
||||
if(dir != null)
|
||||
if(wire.extract == dir)
|
||||
for (ForgeDirection dir : wire.connections)
|
||||
if (dir != null)
|
||||
if (wire.extract == dir)
|
||||
this.drawAlternateConnection(dir, wire);
|
||||
else
|
||||
this.drawConnection(dir, wire);
|
||||
|
@ -73,19 +73,19 @@ public class TileCopperWireRenderer extends TileEntitySpecialRenderer
|
|||
tess.startDrawingQuads();
|
||||
{
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
if(dir == ForgeDirection.UP)
|
||||
if (dir == ForgeDirection.UP)
|
||||
{
|
||||
// ROTATE
|
||||
}
|
||||
else if(dir == ForgeDirection.DOWN)
|
||||
else if (dir == ForgeDirection.DOWN)
|
||||
GL11.glRotatef(180, 1, 0, 0);
|
||||
else if(dir == ForgeDirection.SOUTH)
|
||||
else if (dir == ForgeDirection.SOUTH)
|
||||
GL11.glRotatef(90, 1, 0, 0);
|
||||
else if(dir == ForgeDirection.NORTH)
|
||||
else if (dir == ForgeDirection.NORTH)
|
||||
GL11.glRotatef(270, 1, 0, 0);
|
||||
else if(dir == ForgeDirection.WEST)
|
||||
else if (dir == ForgeDirection.WEST)
|
||||
GL11.glRotatef(90, 0, 0, 1);
|
||||
else if(dir == ForgeDirection.EAST)
|
||||
else if (dir == ForgeDirection.EAST)
|
||||
GL11.glRotatef(270, 0, 0, 1);
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
|
||||
|
@ -143,19 +143,19 @@ public class TileCopperWireRenderer extends TileEntitySpecialRenderer
|
|||
tess.draw();
|
||||
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
if(dir == ForgeDirection.UP)
|
||||
if (dir == ForgeDirection.UP)
|
||||
{
|
||||
// ROTATE
|
||||
}
|
||||
else if(dir == ForgeDirection.DOWN)
|
||||
else if (dir == ForgeDirection.DOWN)
|
||||
GL11.glRotatef(-180, 1, 0, 0);
|
||||
else if(dir == ForgeDirection.SOUTH)
|
||||
else if (dir == ForgeDirection.SOUTH)
|
||||
GL11.glRotatef(-90, 1, 0, 0);
|
||||
else if(dir == ForgeDirection.NORTH)
|
||||
else if (dir == ForgeDirection.NORTH)
|
||||
GL11.glRotatef(-270, 1, 0, 0);
|
||||
else if(dir == ForgeDirection.WEST)
|
||||
else if (dir == ForgeDirection.WEST)
|
||||
GL11.glRotatef(-90, 0, 0, 1);
|
||||
else if(dir == ForgeDirection.EAST)
|
||||
else if (dir == ForgeDirection.EAST)
|
||||
GL11.glRotatef(-270, 0, 0, 1);
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
}
|
||||
|
@ -167,19 +167,19 @@ public class TileCopperWireRenderer extends TileEntitySpecialRenderer
|
|||
tess.startDrawingQuads();
|
||||
{
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
if(dir == ForgeDirection.UP)
|
||||
if (dir == ForgeDirection.UP)
|
||||
{
|
||||
// ROTATE
|
||||
}
|
||||
else if(dir == ForgeDirection.DOWN)
|
||||
else if (dir == ForgeDirection.DOWN)
|
||||
GL11.glRotatef(180, 1, 0, 0);
|
||||
else if(dir == ForgeDirection.SOUTH)
|
||||
else if (dir == ForgeDirection.SOUTH)
|
||||
GL11.glRotatef(90, 1, 0, 0);
|
||||
else if(dir == ForgeDirection.NORTH)
|
||||
else if (dir == ForgeDirection.NORTH)
|
||||
GL11.glRotatef(270, 1, 0, 0);
|
||||
else if(dir == ForgeDirection.WEST)
|
||||
else if (dir == ForgeDirection.WEST)
|
||||
GL11.glRotatef(90, 0, 0, 1);
|
||||
else if(dir == ForgeDirection.EAST)
|
||||
else if (dir == ForgeDirection.EAST)
|
||||
GL11.glRotatef(270, 0, 0, 1);
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
|
||||
|
@ -206,19 +206,19 @@ public class TileCopperWireRenderer extends TileEntitySpecialRenderer
|
|||
tess.draw();
|
||||
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
if(dir == ForgeDirection.UP)
|
||||
if (dir == ForgeDirection.UP)
|
||||
{
|
||||
// ROTATE
|
||||
}
|
||||
else if(dir == ForgeDirection.DOWN)
|
||||
else if (dir == ForgeDirection.DOWN)
|
||||
GL11.glRotatef(-180, 1, 0, 0);
|
||||
else if(dir == ForgeDirection.SOUTH)
|
||||
else if (dir == ForgeDirection.SOUTH)
|
||||
GL11.glRotatef(-90, 1, 0, 0);
|
||||
else if(dir == ForgeDirection.NORTH)
|
||||
else if (dir == ForgeDirection.NORTH)
|
||||
GL11.glRotatef(-270, 1, 0, 0);
|
||||
else if(dir == ForgeDirection.WEST)
|
||||
else if (dir == ForgeDirection.WEST)
|
||||
GL11.glRotatef(-90, 0, 0, 1);
|
||||
else if(dir == ForgeDirection.EAST)
|
||||
else if (dir == ForgeDirection.EAST)
|
||||
GL11.glRotatef(-270, 0, 0, 1);
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
}
|
||||
|
@ -229,7 +229,7 @@ public class TileCopperWireRenderer extends TileEntitySpecialRenderer
|
|||
|
||||
tess.startDrawingQuads();
|
||||
{
|
||||
if(tile.connections[0] == null)
|
||||
if (tile.connections[0] == null)
|
||||
{
|
||||
tess.addVertexWithUV(12 * pixel, 12 * pixel, 1 - (12 * pixel), 6 * tPixel, 6 * tPixel);
|
||||
tess.addVertexWithUV(12 * pixel, 12 * pixel, 12 * pixel, 6 * tPixel, 0 * tPixel);
|
||||
|
@ -237,7 +237,7 @@ public class TileCopperWireRenderer extends TileEntitySpecialRenderer
|
|||
tess.addVertexWithUV(1 - (12 * pixel), 12 * pixel, 1 - (12 * pixel), 0 * tPixel, 6 * tPixel);
|
||||
}
|
||||
|
||||
if(tile.connections[1] == null)
|
||||
if (tile.connections[1] == null)
|
||||
{
|
||||
tess.addVertexWithUV(1 - (12 * pixel), 1 - (12 * pixel), 1 - (12 * pixel), 6 * tPixel, 6 * tPixel);
|
||||
tess.addVertexWithUV(1 - (12 * pixel), 1 - (12 * pixel), 12 * pixel, 6 * tPixel, 0 * tPixel);
|
||||
|
@ -245,7 +245,7 @@ public class TileCopperWireRenderer extends TileEntitySpecialRenderer
|
|||
tess.addVertexWithUV(12 * pixel, 1 - (12 * pixel), 1 - (12 * pixel), 0 * tPixel, 6 * tPixel);
|
||||
}
|
||||
|
||||
if(tile.connections[2] == null)
|
||||
if (tile.connections[2] == null)
|
||||
{
|
||||
tess.addVertexWithUV(12 * pixel, 12 * pixel, 12 * pixel, 6 * tPixel, 6 * tPixel);
|
||||
tess.addVertexWithUV(12 * pixel, 1 - (12 * pixel), 12 * pixel, 6 * tPixel, 0 * tPixel);
|
||||
|
@ -253,7 +253,7 @@ public class TileCopperWireRenderer extends TileEntitySpecialRenderer
|
|||
tess.addVertexWithUV(1 - (12 * pixel), 12 * pixel, 12 * pixel, 0 * tPixel, 6 * tPixel);
|
||||
}
|
||||
|
||||
if(tile.connections[3] == null)
|
||||
if (tile.connections[3] == null)
|
||||
{
|
||||
tess.addVertexWithUV(1 - (12 * pixel), 12 * pixel, 1 - (12 * pixel), 6 * tPixel, 6 * tPixel);
|
||||
tess.addVertexWithUV(1 - (12 * pixel), 1 - (12 * pixel), 1 - (12 * pixel), 6 * tPixel, 0 * tPixel);
|
||||
|
@ -261,7 +261,7 @@ public class TileCopperWireRenderer extends TileEntitySpecialRenderer
|
|||
tess.addVertexWithUV(12 * pixel, 12 * pixel, 1 - (12 * pixel), 0 * tPixel, 6 * tPixel);
|
||||
}
|
||||
|
||||
if(tile.connections[4] == null)
|
||||
if (tile.connections[4] == null)
|
||||
{
|
||||
tess.addVertexWithUV(12 * pixel, 12 * pixel, 1 - (12 * pixel), 6 * tPixel, 6 * tPixel);
|
||||
tess.addVertexWithUV(12 * pixel, 1 - (12 * pixel), 1 - (12 * pixel), 6 * tPixel, 0 * tPixel);
|
||||
|
@ -269,7 +269,7 @@ public class TileCopperWireRenderer extends TileEntitySpecialRenderer
|
|||
tess.addVertexWithUV(12 * pixel, 12 * pixel, 12 * pixel, 0 * tPixel, 6 * tPixel);
|
||||
}
|
||||
|
||||
if(tile.connections[5] == null)
|
||||
if (tile.connections[5] == null)
|
||||
{
|
||||
tess.addVertexWithUV(1 - (12 * pixel), 12 * pixel, 12 * pixel, 6 * tPixel, 6 * tPixel);
|
||||
tess.addVertexWithUV(1 - (12 * pixel), 1 - (12 * pixel), 12 * pixel, 6 * tPixel, 0 * tPixel);
|
||||
|
|
|
@ -17,10 +17,10 @@ import net.minecraft.entity.Entity;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import boilerplate.client.ClientHelper;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import steamcraft.client.renderers.models.ModelLightningRod;
|
||||
import steamcraft.common.lib.ModInfo;
|
||||
import boilerplate.client.ClientHelper;
|
||||
|
||||
/**
|
||||
* @author Surseance
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
package steamcraft.client.renderers.tile;
|
||||
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import steamcraft.common.lib.ModInfo;
|
||||
|
||||
/**
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
package steamcraft.client.renderers.tile;
|
||||
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import steamcraft.common.lib.ModInfo;
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,10 +17,10 @@ import net.minecraft.entity.Entity;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import boilerplate.client.ClientHelper;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import steamcraft.client.renderers.models.ModelTeslaCoil;
|
||||
import steamcraft.common.lib.ModInfo;
|
||||
import boilerplate.client.ClientHelper;
|
||||
|
||||
public class TileTeslaCoilRenderer extends TileEntitySpecialRenderer
|
||||
{
|
||||
|
|
|
@ -31,7 +31,7 @@ public class TileTrunkRenderer extends TileEntitySpecialRenderer
|
|||
{
|
||||
int i;
|
||||
|
||||
if(!p_147500_1_.hasWorldObj())
|
||||
if (!p_147500_1_.hasWorldObj())
|
||||
{
|
||||
i = 0;
|
||||
}
|
||||
|
@ -40,15 +40,15 @@ public class TileTrunkRenderer extends TileEntitySpecialRenderer
|
|||
Block block = p_147500_1_.getBlockType();
|
||||
i = p_147500_1_.getBlockMetadata();
|
||||
|
||||
if((block instanceof BlockTrunk) && (i == 0))
|
||||
if ((block instanceof BlockTrunk) && (i == 0))
|
||||
{
|
||||
try
|
||||
{
|
||||
((BlockTrunk) block).func_149954_e(p_147500_1_.getWorldObj(), p_147500_1_.xCoord, p_147500_1_.yCoord, p_147500_1_.zCoord);
|
||||
}
|
||||
catch(ClassCastException e)
|
||||
} catch (ClassCastException e)
|
||||
{
|
||||
FMLLog.severe("Attempted to render a chest at %d, %d, %d that was not a chest", p_147500_1_.xCoord, p_147500_1_.yCoord, p_147500_1_.zCoord);
|
||||
FMLLog.severe("Attempted to render a chest at %d, %d, %d that was not a chest", p_147500_1_.xCoord, p_147500_1_.yCoord,
|
||||
p_147500_1_.zCoord);
|
||||
}
|
||||
i = p_147500_1_.getBlockMetadata();
|
||||
}
|
||||
|
@ -56,11 +56,11 @@ public class TileTrunkRenderer extends TileEntitySpecialRenderer
|
|||
p_147500_1_.checkForAdjacentChests();
|
||||
}
|
||||
|
||||
if((p_147500_1_.adjacentChestZNeg == null) && (p_147500_1_.adjacentChestXNeg == null))
|
||||
if ((p_147500_1_.adjacentChestZNeg == null) && (p_147500_1_.adjacentChestXNeg == null))
|
||||
{
|
||||
ModelChest modelchest;
|
||||
|
||||
if((p_147500_1_.adjacentChestXPos == null) && (p_147500_1_.adjacentChestZPos == null))
|
||||
if ((p_147500_1_.adjacentChestXPos == null) && (p_147500_1_.adjacentChestZPos == null))
|
||||
{
|
||||
modelchest = this.field_147510_h;
|
||||
|
||||
|
@ -82,32 +82,32 @@ public class TileTrunkRenderer extends TileEntitySpecialRenderer
|
|||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
short short1 = 0;
|
||||
|
||||
if(i == 2)
|
||||
if (i == 2)
|
||||
{
|
||||
short1 = 180;
|
||||
}
|
||||
|
||||
if(i == 3)
|
||||
if (i == 3)
|
||||
{
|
||||
short1 = 0;
|
||||
}
|
||||
|
||||
if(i == 4)
|
||||
if (i == 4)
|
||||
{
|
||||
short1 = 90;
|
||||
}
|
||||
|
||||
if(i == 5)
|
||||
if (i == 5)
|
||||
{
|
||||
short1 = -90;
|
||||
}
|
||||
|
||||
if((i == 2) && (p_147500_1_.adjacentChestXPos != null))
|
||||
if ((i == 2) && (p_147500_1_.adjacentChestXPos != null))
|
||||
{
|
||||
GL11.glTranslatef(1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
if((i == 5) && (p_147500_1_.adjacentChestZPos != null))
|
||||
if ((i == 5) && (p_147500_1_.adjacentChestZPos != null))
|
||||
{
|
||||
GL11.glTranslatef(0.0F, 0.0F, -1.0F);
|
||||
}
|
||||
|
@ -117,23 +117,23 @@ public class TileTrunkRenderer extends TileEntitySpecialRenderer
|
|||
float f1 = p_147500_1_.prevLidAngle + ((p_147500_1_.lidAngle - p_147500_1_.prevLidAngle) * p_147500_8_);
|
||||
float f2;
|
||||
|
||||
if(p_147500_1_.adjacentChestZNeg != null)
|
||||
if (p_147500_1_.adjacentChestZNeg != null)
|
||||
{
|
||||
f2 = p_147500_1_.adjacentChestZNeg.prevLidAngle + ((p_147500_1_.adjacentChestZNeg.lidAngle - p_147500_1_.adjacentChestZNeg.prevLidAngle)
|
||||
* p_147500_8_);
|
||||
f2 = p_147500_1_.adjacentChestZNeg.prevLidAngle
|
||||
+ ((p_147500_1_.adjacentChestZNeg.lidAngle - p_147500_1_.adjacentChestZNeg.prevLidAngle) * p_147500_8_);
|
||||
|
||||
if(f2 > f1)
|
||||
if (f2 > f1)
|
||||
{
|
||||
f1 = f2;
|
||||
}
|
||||
}
|
||||
|
||||
if(p_147500_1_.adjacentChestXNeg != null)
|
||||
if (p_147500_1_.adjacentChestXNeg != null)
|
||||
{
|
||||
f2 = p_147500_1_.adjacentChestXNeg.prevLidAngle + ((p_147500_1_.adjacentChestXNeg.lidAngle - p_147500_1_.adjacentChestXNeg.prevLidAngle)
|
||||
* p_147500_8_);
|
||||
f2 = p_147500_1_.adjacentChestXNeg.prevLidAngle
|
||||
+ ((p_147500_1_.adjacentChestXNeg.lidAngle - p_147500_1_.adjacentChestXNeg.prevLidAngle) * p_147500_8_);
|
||||
|
||||
if(f2 > f1)
|
||||
if (f2 > f1)
|
||||
{
|
||||
f1 = f2;
|
||||
}
|
||||
|
|
|
@ -158,11 +158,11 @@ public class Steamcraft
|
|||
/*
|
||||
* if(event.getSide() == Side.CLIENT) { // Autopopulate item/block lists
|
||||
* from creative tab Iterator iterator = Item.itemRegistry.iterator();
|
||||
*
|
||||
*
|
||||
* while(iterator.hasNext()) { Item item = (Item) iterator.next();
|
||||
*
|
||||
*
|
||||
* if(item == null) { continue; }
|
||||
*
|
||||
*
|
||||
* for(CreativeTabs tab : item.getCreativeTabs()) { if(tab == tabSC2) {
|
||||
* if(item instanceof ItemBlock) item.getSubItems(item, tabSC2,
|
||||
* GuiHandbook.modBlocks); else item.getSubItems(item, tabSC2,
|
||||
|
|
|
@ -31,8 +31,9 @@ public class BlockBoulder extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are their own) Args: x, y, z, neighbor
|
||||
* Block
|
||||
* Lets the block know when one of its neighbor changes. Doesn't know which
|
||||
* neighbor changed (coordinates passed are their own) Args: x, y, z,
|
||||
* neighbor Block
|
||||
*/
|
||||
@Override
|
||||
public void onNeighborBlockChange(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_)
|
||||
|
@ -46,7 +47,7 @@ public class BlockBoulder extends BaseBlock
|
|||
@Override
|
||||
public void updateTick(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_)
|
||||
{
|
||||
if(!p_149674_1_.isRemote)
|
||||
if (!p_149674_1_.isRemote)
|
||||
{
|
||||
this.func_149830_m(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_);
|
||||
}
|
||||
|
@ -54,14 +55,14 @@ public class BlockBoulder extends BaseBlock
|
|||
|
||||
private void func_149830_m(World p_149830_1_, int p_149830_2_, int p_149830_3_, int p_149830_4_)
|
||||
{
|
||||
if(func_149831_e(p_149830_1_, p_149830_2_, p_149830_3_ - 1, p_149830_4_) && (p_149830_3_ >= 0))
|
||||
if (func_149831_e(p_149830_1_, p_149830_2_, p_149830_3_ - 1, p_149830_4_) && (p_149830_3_ >= 0))
|
||||
{
|
||||
byte b0 = 32;
|
||||
|
||||
if(!fallInstantly
|
||||
&& p_149830_1_.checkChunksExist(p_149830_2_ - b0, p_149830_3_ - b0, p_149830_4_ - b0, p_149830_2_ + b0, p_149830_3_ + b0, p_149830_4_ + b0))
|
||||
if (!fallInstantly && p_149830_1_.checkChunksExist(p_149830_2_ - b0, p_149830_3_ - b0, p_149830_4_ - b0, p_149830_2_ + b0,
|
||||
p_149830_3_ + b0, p_149830_4_ + b0))
|
||||
{
|
||||
if(!p_149830_1_.isRemote)
|
||||
if (!p_149830_1_.isRemote)
|
||||
{
|
||||
EntityFallingBoulder EntityFallingBoulder = new EntityFallingBoulder(p_149830_1_, p_149830_2_ + 0.5F, p_149830_3_ + 0.5F,
|
||||
p_149830_4_ + 0.5F);
|
||||
|
@ -73,12 +74,12 @@ public class BlockBoulder extends BaseBlock
|
|||
{
|
||||
p_149830_1_.setBlockToAir(p_149830_2_, p_149830_3_, p_149830_4_);
|
||||
|
||||
while(func_149831_e(p_149830_1_, p_149830_2_, p_149830_3_ - 1, p_149830_4_) && (p_149830_3_ > 0))
|
||||
while (func_149831_e(p_149830_1_, p_149830_2_, p_149830_3_ - 1, p_149830_4_) && (p_149830_3_ > 0))
|
||||
{
|
||||
--p_149830_3_;
|
||||
}
|
||||
|
||||
if(p_149830_3_ > 0)
|
||||
if (p_149830_3_ > 0)
|
||||
{
|
||||
p_149830_1_.setBlock(p_149830_2_, p_149830_3_, p_149830_4_, this);
|
||||
}
|
||||
|
@ -104,11 +105,11 @@ public class BlockBoulder extends BaseBlock
|
|||
{
|
||||
Block block = p_149831_0_.getBlock(p_149831_1_, p_149831_2_, p_149831_3_);
|
||||
|
||||
if(block.isAir(p_149831_0_, p_149831_1_, p_149831_2_, p_149831_3_))
|
||||
if (block.isAir(p_149831_0_, p_149831_1_, p_149831_2_, p_149831_3_))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if(block == Blocks.fire)
|
||||
else if (block == Blocks.fire)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ public class BlockBrassLeaves extends BaseBlock
|
|||
{
|
||||
ArrayList<ItemStack> drop = new ArrayList<ItemStack>();
|
||||
|
||||
if(world.rand.nextInt(30) == 0)
|
||||
if (world.rand.nextInt(30) == 0)
|
||||
{
|
||||
drop.add(new ItemStack(InitItems.itemIngot, 1 + fortune, 4));
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ public class BlockCastIronFence extends BlockCustomFence
|
|||
{
|
||||
final Block block = world.getBlock(x, y, z);
|
||||
|
||||
if((block != this) && (block != InitBlocks.blockCastIronGate))
|
||||
if ((block != this) && (block != InitBlocks.blockCastIronGate))
|
||||
return (block != null) && block.getMaterial().isOpaque() && block.renderAsNormalBlock() && (block.getMaterial() != Material.cactus);
|
||||
else
|
||||
return true;
|
||||
|
|
|
@ -55,17 +55,19 @@ public class BlockCastIronGate extends BlockDirectional
|
|||
}
|
||||
|
||||
/**
|
||||
* Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z
|
||||
* Checks to see if its valid to put this block at the specified
|
||||
* coordinates. Args: world, x, y, z
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
|
||||
{
|
||||
return !p_149742_1_.getBlock(p_149742_2_, p_149742_3_ - 1, p_149742_4_).getMaterial().isSolid() ? false : super.canPlaceBlockAt(p_149742_1_,
|
||||
p_149742_2_, p_149742_3_, p_149742_4_);
|
||||
return !p_149742_1_.getBlock(p_149742_2_, p_149742_3_ - 1, p_149742_4_).getMaterial().isSolid() ? false
|
||||
: super.canPlaceBlockAt(p_149742_1_, p_149742_2_, p_149742_3_, p_149742_4_);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been cleared to be reused)
|
||||
* Returns a bounding box from the pool of bounding boxes (this means this
|
||||
* box can change after the pool has been cleared to be reused)
|
||||
*/
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_)
|
||||
|
@ -74,20 +76,24 @@ public class BlockCastIronGate extends BlockDirectional
|
|||
/**
|
||||
* Returns if the fence gate is open according to its metadata.
|
||||
*/
|
||||
return isFenceGateOpen(l) ? null : ((l != 2) && (l != 0) ? AxisAlignedBB.getBoundingBox(p_149668_2_ + 0.375F, p_149668_3_, p_149668_4_,
|
||||
p_149668_2_ + 0.625F, p_149668_3_ + 1.5F, p_149668_4_ + 1) : AxisAlignedBB.getBoundingBox(p_149668_2_, p_149668_3_, p_149668_4_ + 0.375F,
|
||||
p_149668_2_ + 1, p_149668_3_ + 1.5F, p_149668_4_ + 0.625F));
|
||||
return isFenceGateOpen(l) ? null
|
||||
: ((l != 2) && (l != 0)
|
||||
? AxisAlignedBB.getBoundingBox(p_149668_2_ + 0.375F, p_149668_3_, p_149668_4_, p_149668_2_ + 0.625F, p_149668_3_ + 1.5F,
|
||||
p_149668_4_ + 1)
|
||||
: AxisAlignedBB.getBoundingBox(p_149668_2_, p_149668_3_, p_149668_4_ + 0.375F, p_149668_2_ + 1, p_149668_3_ + 1.5F,
|
||||
p_149668_4_ + 0.625F));
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the blocks bounds based on its current state. Args: world, x, y, z
|
||||
* Updates the blocks bounds based on its current state. Args: world, x, y,
|
||||
* z
|
||||
*/
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_)
|
||||
{
|
||||
int l = getDirection(p_149719_1_.getBlockMetadata(p_149719_2_, p_149719_3_, p_149719_4_));
|
||||
|
||||
if((l != 2) && (l != 0))
|
||||
if ((l != 2) && (l != 0))
|
||||
{
|
||||
this.setBlockBounds(0.375F, 0.0F, 0.0F, 0.625F, 1.0F, 1.0F);
|
||||
}
|
||||
|
@ -98,8 +104,9 @@ public class BlockCastIronGate extends BlockDirectional
|
|||
}
|
||||
|
||||
/**
|
||||
* Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two adjacent blocks and also whether the
|
||||
* player can attach torches, redstone wire, etc to this block.
|
||||
* Is this block (a) opaque and (b) a full 1m cube? This determines whether
|
||||
* or not to render the shared face of two adjacent blocks and also whether
|
||||
* the player can attach torches, redstone wire, etc to this block.
|
||||
*/
|
||||
@Override
|
||||
public boolean isOpaqueCube()
|
||||
|
@ -108,7 +115,8 @@ public class BlockCastIronGate extends BlockDirectional
|
|||
}
|
||||
|
||||
/**
|
||||
* If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
|
||||
* If this block doesn't render as an ordinary block it will return False
|
||||
* (examples: signs, buttons, stairs, etc)
|
||||
*/
|
||||
@Override
|
||||
public boolean renderAsNormalBlock()
|
||||
|
@ -138,7 +146,8 @@ public class BlockCastIronGate extends BlockDirectional
|
|||
* Called when the block is placed in the world.
|
||||
*/
|
||||
@Override
|
||||
public void onBlockPlacedBy(World p_149689_1_, int p_149689_2_, int p_149689_3_, int p_149689_4_, EntityLivingBase p_149689_5_, ItemStack p_149689_6_)
|
||||
public void onBlockPlacedBy(World p_149689_1_, int p_149689_2_, int p_149689_3_, int p_149689_4_, EntityLivingBase p_149689_5_,
|
||||
ItemStack p_149689_6_)
|
||||
{
|
||||
int l = (MathHelper.floor_double(((p_149689_5_.rotationYaw * 4.0F) / 360.0F) + 0.5D) & 3) % 4;
|
||||
p_149689_1_.setBlockMetadataWithNotify(p_149689_2_, p_149689_3_, p_149689_4_, l, 2);
|
||||
|
@ -153,7 +162,7 @@ public class BlockCastIronGate extends BlockDirectional
|
|||
{
|
||||
int i1 = p_149727_1_.getBlockMetadata(p_149727_2_, p_149727_3_, p_149727_4_);
|
||||
|
||||
if(isFenceGateOpen(i1))
|
||||
if (isFenceGateOpen(i1))
|
||||
{
|
||||
p_149727_1_.setBlockMetadataWithNotify(p_149727_2_, p_149727_3_, p_149727_4_, i1 & -5, 2);
|
||||
}
|
||||
|
@ -162,7 +171,7 @@ public class BlockCastIronGate extends BlockDirectional
|
|||
int j1 = (MathHelper.floor_double(((p_149727_5_.rotationYaw * 4.0F) / 360.0F) + 0.5D) & 3) % 4;
|
||||
int k1 = getDirection(i1);
|
||||
|
||||
if(k1 == ((j1 + 2) % 4))
|
||||
if (k1 == ((j1 + 2) % 4))
|
||||
{
|
||||
i1 = j1;
|
||||
}
|
||||
|
@ -175,25 +184,26 @@ public class BlockCastIronGate extends BlockDirectional
|
|||
}
|
||||
|
||||
/**
|
||||
* Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are their own) Args: x, y, z, neighbor
|
||||
* Block
|
||||
* Lets the block know when one of its neighbor changes. Doesn't know which
|
||||
* neighbor changed (coordinates passed are their own) Args: x, y, z,
|
||||
* neighbor Block
|
||||
*/
|
||||
@Override
|
||||
public void onNeighborBlockChange(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_)
|
||||
{
|
||||
if(!p_149695_1_.isRemote)
|
||||
if (!p_149695_1_.isRemote)
|
||||
{
|
||||
int l = p_149695_1_.getBlockMetadata(p_149695_2_, p_149695_3_, p_149695_4_);
|
||||
boolean flag = p_149695_1_.isBlockIndirectlyGettingPowered(p_149695_2_, p_149695_3_, p_149695_4_);
|
||||
|
||||
if(flag || p_149695_5_.canProvidePower())
|
||||
if (flag || p_149695_5_.canProvidePower())
|
||||
{
|
||||
if(flag && !isFenceGateOpen(l))
|
||||
if (flag && !isFenceGateOpen(l))
|
||||
{
|
||||
p_149695_1_.setBlockMetadataWithNotify(p_149695_2_, p_149695_3_, p_149695_4_, l | 4, 2);
|
||||
p_149695_1_.playAuxSFXAtEntity((EntityPlayer) null, 1003, p_149695_2_, p_149695_3_, p_149695_4_, 0);
|
||||
}
|
||||
else if(!flag && isFenceGateOpen(l))
|
||||
else if (!flag && isFenceGateOpen(l))
|
||||
{
|
||||
p_149695_1_.setBlockMetadataWithNotify(p_149695_2_, p_149695_3_, p_149695_4_, l & -5, 2);
|
||||
p_149695_1_.playAuxSFXAtEntity((EntityPlayer) null, 1003, p_149695_2_, p_149695_3_, p_149695_4_, 0);
|
||||
|
@ -211,7 +221,9 @@ public class BlockCastIronGate extends BlockDirectional
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns true if the given side of this block type should be rendered, if the adjacent block is at the given coordinates. Args: blockAccess, x, y, z, side
|
||||
* Returns true if the given side of this block type should be rendered, if
|
||||
* the adjacent block is at the given coordinates. Args: blockAccess, x, y,
|
||||
* z, side
|
||||
*/
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
|
|
@ -20,12 +20,14 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import steamcraft.client.lib.RenderIDs;
|
||||
import steamcraft.common.Steamcraft;
|
||||
import steamcraft.common.init.InitBlocks;
|
||||
import steamcraft.common.tiles.EmptyTiles;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* @author Surseance
|
||||
|
@ -45,12 +47,12 @@ public class BlockCastIronLamp extends BlockContainer
|
|||
this.disableStats();
|
||||
float f = 0.25F;
|
||||
this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 1.0F, 0.5F + f);
|
||||
if(!powered && !(this instanceof BlockInvertedCastIronLamp))
|
||||
if (!powered && !(this instanceof BlockInvertedCastIronLamp))
|
||||
this.setCreativeTab(Steamcraft.tabSC2);
|
||||
else if(powered && this instanceof BlockInvertedCastIronLamp)
|
||||
else if (powered && (this instanceof BlockInvertedCastIronLamp))
|
||||
this.setCreativeTab(Steamcraft.tabSC2);
|
||||
|
||||
if(powered)
|
||||
if (powered)
|
||||
this.setLightLevel(1.0F);
|
||||
}
|
||||
|
||||
|
@ -79,16 +81,15 @@ public class BlockCastIronLamp extends BlockContainer
|
|||
}
|
||||
|
||||
@Override
|
||||
public int onBlockPlaced(World world, int x, int y, int z, int metadata, float hitX, float hitY,
|
||||
float hitZ, int side)
|
||||
public int onBlockPlaced(World world, int x, int y, int z, int metadata, float hitX, float hitY, float hitZ, int side)
|
||||
{
|
||||
if((side == 1) || (side == 3))
|
||||
if ((side == 1) || (side == 3))
|
||||
world.setBlockMetadataWithNotify(x, y, z, 0, 2);
|
||||
if(side == 2)
|
||||
if (side == 2)
|
||||
world.setBlockMetadataWithNotify(x, y, z, 1, 2);
|
||||
if(side == 4)
|
||||
if (side == 4)
|
||||
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
if(side == 5)
|
||||
if (side == 5)
|
||||
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
return metadata;
|
||||
}
|
||||
|
@ -96,14 +97,14 @@ public class BlockCastIronLamp extends BlockContainer
|
|||
@Override
|
||||
public void onBlockAdded(World world, int x, int y, int z)
|
||||
{
|
||||
if(!world.isRemote)
|
||||
if (!world.isRemote)
|
||||
{
|
||||
if(this.powered && !world.isBlockIndirectlyGettingPowered(x, y, z))
|
||||
if (this.powered && !world.isBlockIndirectlyGettingPowered(x, y, z))
|
||||
{
|
||||
world.scheduleBlockUpdate(x, y, z, this, 4);
|
||||
world.setBlock(x, y, z, InitBlocks.blockCastIronLamp, world.getBlockMetadata(x, y, z), 2);
|
||||
}
|
||||
else if(!this.powered && world.isBlockIndirectlyGettingPowered(x, y, z))
|
||||
else if (!this.powered && world.isBlockIndirectlyGettingPowered(x, y, z))
|
||||
world.setBlock(x, y, z, InitBlocks.blockCastIronLampOn, world.getBlockMetadata(x, y, z), 2);
|
||||
}
|
||||
}
|
||||
|
@ -111,14 +112,14 @@ public class BlockCastIronLamp extends BlockContainer
|
|||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block p_149695_5_)
|
||||
{
|
||||
if(!world.isRemote)
|
||||
if (!world.isRemote)
|
||||
{
|
||||
if(this.powered && !world.isBlockIndirectlyGettingPowered(x, y, z))
|
||||
if (this.powered && !world.isBlockIndirectlyGettingPowered(x, y, z))
|
||||
{
|
||||
world.scheduleBlockUpdate(x, y, z, this, 4);
|
||||
world.setBlock(x, y, z, InitBlocks.blockCastIronLamp, world.getBlockMetadata(x, y, z), 2);
|
||||
}
|
||||
else if(!this.powered && world.isBlockIndirectlyGettingPowered(x, y, z))
|
||||
else if (!this.powered && world.isBlockIndirectlyGettingPowered(x, y, z))
|
||||
world.setBlock(x, y, z, InitBlocks.blockCastIronLampOn, world.getBlockMetadata(x, y, z), 2);
|
||||
}
|
||||
}
|
||||
|
@ -127,7 +128,7 @@ public class BlockCastIronLamp extends BlockContainer
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void randomDisplayTick(World world, int x, int j, int z, Random random)
|
||||
{
|
||||
if(this.powered)
|
||||
if (this.powered)
|
||||
{
|
||||
int l = world.getBlockMetadata(x, j, z);
|
||||
double d = x + 0.5F + ((random.nextFloat() - 0.5F) * 0.20000000000000001D);
|
||||
|
@ -136,11 +137,11 @@ public class BlockCastIronLamp extends BlockContainer
|
|||
double d3 = 0.2199999988079071D;
|
||||
double d4 = 0.27000001072883606D;
|
||||
|
||||
if(l == 1)
|
||||
if (l == 1)
|
||||
world.spawnParticle("reddust", d - d4, d1 + d3, d2, -1.0D, 0.7D, 1.0D);
|
||||
else if(l == 2)
|
||||
else if (l == 2)
|
||||
world.spawnParticle("reddust", d + d4, d1 + d3, d2, -1.0D, 0.7D, 1.0D);
|
||||
else if(l == 3)
|
||||
else if (l == 3)
|
||||
world.spawnParticle("reddust", d, d1 + d3, d2 - d4, -1.0D, 0.7D, 1.0D);
|
||||
else
|
||||
world.spawnParticle("reddust", d, d1, d2, -1.0D, 0.7D, 1.0D);
|
||||
|
|
|
@ -67,8 +67,8 @@ public class BlockCastIronRailing extends BaseBlock
|
|||
@SideOnly(Side.CLIENT)
|
||||
public boolean shouldSideBeRendered(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_)
|
||||
{
|
||||
return (p_149646_1_.getBlock(p_149646_2_, p_149646_3_, p_149646_4_) != this) && super.shouldSideBeRendered(p_149646_1_, p_149646_2_,
|
||||
p_149646_3_, p_149646_4_, p_149646_5_);
|
||||
return (p_149646_1_.getBlock(p_149646_2_, p_149646_3_, p_149646_4_) != this)
|
||||
&& super.shouldSideBeRendered(p_149646_1_, p_149646_2_, p_149646_3_, p_149646_4_, p_149646_5_);
|
||||
}
|
||||
|
||||
@SuppressWarnings("all")
|
||||
|
@ -81,14 +81,14 @@ public class BlockCastIronRailing extends BaseBlock
|
|||
boolean flag2 = this.canPaneConnectTo(p_149743_1_, p_149743_2_ - 1, p_149743_3_, p_149743_4_, WEST);
|
||||
boolean flag3 = this.canPaneConnectTo(p_149743_1_, p_149743_2_ + 1, p_149743_3_, p_149743_4_, EAST);
|
||||
|
||||
if((!flag2 || !flag3) && (flag2 || flag3 || flag || flag1))
|
||||
if ((!flag2 || !flag3) && (flag2 || flag3 || flag || flag1))
|
||||
{
|
||||
if(flag2 && !flag3)
|
||||
if (flag2 && !flag3)
|
||||
{
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.4375F, 0.5F, 1.0F, 0.5625F);
|
||||
super.addCollisionBoxesToList(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, p_149743_5_, p_149743_6_, p_149743_7_);
|
||||
}
|
||||
else if(!flag2 && flag3)
|
||||
else if (!flag2 && flag3)
|
||||
{
|
||||
this.setBlockBounds(0.5F, 0.0F, 0.4375F, 1.0F, 1.0F, 0.5625F);
|
||||
super.addCollisionBoxesToList(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, p_149743_5_, p_149743_6_, p_149743_7_);
|
||||
|
@ -100,14 +100,14 @@ public class BlockCastIronRailing extends BaseBlock
|
|||
super.addCollisionBoxesToList(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, p_149743_5_, p_149743_6_, p_149743_7_);
|
||||
}
|
||||
|
||||
if((!flag || !flag1) && (flag2 || flag3 || flag || flag1))
|
||||
if ((!flag || !flag1) && (flag2 || flag3 || flag || flag1))
|
||||
{
|
||||
if(flag && !flag1)
|
||||
if (flag && !flag1)
|
||||
{
|
||||
this.setBlockBounds(0.4375F, 0.0F, 0.0F, 0.5625F, 1.0F, 0.5F);
|
||||
super.addCollisionBoxesToList(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, p_149743_5_, p_149743_6_, p_149743_7_);
|
||||
}
|
||||
else if(!flag && flag1)
|
||||
else if (!flag && flag1)
|
||||
{
|
||||
this.setBlockBounds(0.4375F, 0.0F, 0.5F, 0.5625F, 1.0F, 1.0F);
|
||||
super.addCollisionBoxesToList(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, p_149743_5_, p_149743_6_, p_149743_7_);
|
||||
|
@ -138,11 +138,11 @@ public class BlockCastIronRailing extends BaseBlock
|
|||
boolean flag2 = this.canPaneConnectTo(p_149719_1_, p_149719_2_ - 1, p_149719_3_, p_149719_4_, WEST);
|
||||
boolean flag3 = this.canPaneConnectTo(p_149719_1_, p_149719_2_ + 1, p_149719_3_, p_149719_4_, EAST);
|
||||
|
||||
if((!flag2 || !flag3) && (flag2 || flag3 || flag || flag1))
|
||||
if ((!flag2 || !flag3) && (flag2 || flag3 || flag || flag1))
|
||||
{
|
||||
if(flag2 && !flag3)
|
||||
if (flag2 && !flag3)
|
||||
f = 0.0F;
|
||||
else if(!flag2 && flag3)
|
||||
else if (!flag2 && flag3)
|
||||
f1 = 1.0F;
|
||||
}
|
||||
else
|
||||
|
@ -151,11 +151,11 @@ public class BlockCastIronRailing extends BaseBlock
|
|||
f1 = 1.0F;
|
||||
}
|
||||
|
||||
if((!flag || !flag1) && (flag2 || flag3 || flag || flag1))
|
||||
if ((!flag || !flag1) && (flag2 || flag3 || flag || flag1))
|
||||
{
|
||||
if(flag && !flag1)
|
||||
if (flag && !flag1)
|
||||
f2 = 0.0F;
|
||||
else if(!flag && flag1)
|
||||
else if (!flag && flag1)
|
||||
f3 = 1.0F;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -27,7 +27,8 @@ public class BlockCongealedSlime extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Triggered whenever an entity collides with this block (enters into the block). Args: world, x, y, z, entity
|
||||
* Triggered whenever an entity collides with this block (enters into the
|
||||
* block). Args: world, x, y, z, entity
|
||||
*/
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World p_149670_1_, int p_149670_2_, int p_149670_3_, int p_149670_4_, Entity ent)
|
||||
|
@ -37,8 +38,9 @@ public class BlockCongealedSlime extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two adjacent blocks and also whether the
|
||||
* player can attach torches, redstone wire, etc to this block.
|
||||
* Is this block (a) opaque and (b) a full 1m cube? This determines whether
|
||||
* or not to render the shared face of two adjacent blocks and also whether
|
||||
* the player can attach torches, redstone wire, etc to this block.
|
||||
*/
|
||||
@Override
|
||||
public boolean isOpaqueCube()
|
||||
|
@ -47,7 +49,8 @@ public class BlockCongealedSlime extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been cleared to be reused)
|
||||
* Returns a bounding box from the pool of bounding boxes (this means this
|
||||
* box can change after the pool has been cleared to be reused)
|
||||
*/
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z)
|
||||
|
|
|
@ -47,7 +47,7 @@ public class BlockCustomMushroom extends BlockMushroom
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(final Item item, final CreativeTabs tab, final List l)
|
||||
{
|
||||
for(int var4 = 0; var4 < this.icon.length; ++var4)
|
||||
for (int var4 = 0; var4 < this.icon.length; ++var4)
|
||||
l.add(new ItemStack(InitBlocks.blockMushroom, 1, var4));
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ public class BlockDynamite extends BaseBlock
|
|||
{
|
||||
super.onBlockAdded(p_149726_1_, p_149726_2_, p_149726_3_, p_149726_4_);
|
||||
|
||||
if(p_149726_1_.isBlockIndirectlyGettingPowered(p_149726_2_, p_149726_3_, p_149726_4_))
|
||||
if (p_149726_1_.isBlockIndirectlyGettingPowered(p_149726_2_, p_149726_3_, p_149726_4_))
|
||||
{
|
||||
this.onBlockDestroyedByPlayer(p_149726_1_, p_149726_2_, p_149726_3_, p_149726_4_, 1);
|
||||
p_149726_1_.setBlockToAir(p_149726_2_, p_149726_3_, p_149726_4_);
|
||||
|
@ -46,13 +46,14 @@ public class BlockDynamite extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are their own) Args: x, y, z, neighbor
|
||||
* Block
|
||||
* Lets the block know when one of its neighbor changes. Doesn't know which
|
||||
* neighbor changed (coordinates passed are their own) Args: x, y, z,
|
||||
* neighbor Block
|
||||
*/
|
||||
@Override
|
||||
public void onNeighborBlockChange(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_)
|
||||
{
|
||||
if(p_149695_1_.isBlockIndirectlyGettingPowered(p_149695_2_, p_149695_3_, p_149695_4_))
|
||||
if (p_149695_1_.isBlockIndirectlyGettingPowered(p_149695_2_, p_149695_3_, p_149695_4_))
|
||||
{
|
||||
this.onBlockDestroyedByPlayer(p_149695_1_, p_149695_2_, p_149695_3_, p_149695_4_, 1);
|
||||
p_149695_1_.setBlockToAir(p_149695_2_, p_149695_3_, p_149695_4_);
|
||||
|
@ -74,7 +75,7 @@ public class BlockDynamite extends BaseBlock
|
|||
@Override
|
||||
public void onBlockDestroyedByExplosion(World p_149723_1_, int p_149723_2_, int p_149723_3_, int p_149723_4_, Explosion p_149723_5_)
|
||||
{
|
||||
if(!p_149723_1_.isRemote)
|
||||
if (!p_149723_1_.isRemote)
|
||||
{
|
||||
EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(p_149723_1_, p_149723_2_ + 0.5F, p_149723_3_ + 0.5F, p_149723_4_ + 0.5F,
|
||||
p_149723_5_.getExplosivePlacedBy());
|
||||
|
@ -84,7 +85,8 @@ public class BlockDynamite extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Called right before the block is destroyed by a player. Args: world, x, y, z, metaData
|
||||
* Called right before the block is destroyed by a player. Args: world, x,
|
||||
* y, z, metaData
|
||||
*/
|
||||
@Override
|
||||
public void onBlockDestroyedByPlayer(World p_149664_1_, int p_149664_2_, int p_149664_3_, int p_149664_4_, int p_149664_5_)
|
||||
|
@ -94,11 +96,12 @@ public class BlockDynamite extends BaseBlock
|
|||
|
||||
public void spawnTNT(World p_150114_1_, int p_150114_2_, int p_150114_3_, int p_150114_4_, int p_150114_5_, EntityLivingBase p_150114_6_)
|
||||
{
|
||||
if(!p_150114_1_.isRemote)
|
||||
if (!p_150114_1_.isRemote)
|
||||
{
|
||||
if((p_150114_5_ & 1) == 1)
|
||||
if ((p_150114_5_ & 1) == 1)
|
||||
{
|
||||
EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(p_150114_1_, p_150114_2_ + 0.5F, p_150114_3_ + 0.5F, p_150114_4_ + 0.5F, p_150114_6_);
|
||||
EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(p_150114_1_, p_150114_2_ + 0.5F, p_150114_3_ + 0.5F, p_150114_4_ + 0.5F,
|
||||
p_150114_6_);
|
||||
p_150114_1_.spawnEntityInWorld(entitytntprimed);
|
||||
p_150114_1_.playSoundAtEntity(entitytntprimed, "game.tnt.primed", 1.0F, 1.0F);
|
||||
}
|
||||
|
@ -112,7 +115,7 @@ public class BlockDynamite extends BaseBlock
|
|||
public boolean onBlockActivated(World p_149727_1_, int p_149727_2_, int p_149727_3_, int p_149727_4_, EntityPlayer p_149727_5_, int p_149727_6_,
|
||||
float p_149727_7_, float p_149727_8_, float p_149727_9_)
|
||||
{
|
||||
if((p_149727_5_.getCurrentEquippedItem() != null) && (p_149727_5_.getCurrentEquippedItem().getItem() == Items.flint_and_steel))
|
||||
if ((p_149727_5_.getCurrentEquippedItem() != null) && (p_149727_5_.getCurrentEquippedItem().getItem() == Items.flint_and_steel))
|
||||
{
|
||||
this.spawnTNT(p_149727_1_, p_149727_2_, p_149727_3_, p_149727_4_, 1, p_149727_5_);
|
||||
p_149727_1_.setBlockToAir(p_149727_2_, p_149727_3_, p_149727_4_);
|
||||
|
@ -121,21 +124,23 @@ public class BlockDynamite extends BaseBlock
|
|||
}
|
||||
else
|
||||
{
|
||||
return super.onBlockActivated(p_149727_1_, p_149727_2_, p_149727_3_, p_149727_4_, p_149727_5_, p_149727_6_, p_149727_7_, p_149727_8_, p_149727_9_);
|
||||
return super.onBlockActivated(p_149727_1_, p_149727_2_, p_149727_3_, p_149727_4_, p_149727_5_, p_149727_6_, p_149727_7_, p_149727_8_,
|
||||
p_149727_9_);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggered whenever an entity collides with this block (enters into the block). Args: world, x, y, z, entity
|
||||
* Triggered whenever an entity collides with this block (enters into the
|
||||
* block). Args: world, x, y, z, entity
|
||||
*/
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World p_149670_1_, int p_149670_2_, int p_149670_3_, int p_149670_4_, Entity p_149670_5_)
|
||||
{
|
||||
if((p_149670_5_ instanceof EntityArrow) && !p_149670_1_.isRemote)
|
||||
if ((p_149670_5_ instanceof EntityArrow) && !p_149670_1_.isRemote)
|
||||
{
|
||||
EntityArrow entityarrow = (EntityArrow) p_149670_5_;
|
||||
|
||||
if(entityarrow.isBurning())
|
||||
if (entityarrow.isBurning())
|
||||
{
|
||||
this.spawnTNT(p_149670_1_, p_149670_2_, p_149670_3_, p_149670_4_, 1,
|
||||
entityarrow.shootingEntity instanceof EntityLivingBase ? (EntityLivingBase) entityarrow.shootingEntity : null);
|
||||
|
@ -159,7 +164,7 @@ public class BlockDynamite extends BaseBlock
|
|||
@Override
|
||||
public void onBlockClicked(World world, int x, int y, int z, EntityPlayer player)
|
||||
{
|
||||
if(!world.isRemote)
|
||||
if (!world.isRemote)
|
||||
{
|
||||
EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, x, y, z, player);
|
||||
world.spawnEntityInWorld(entitytntprimed);
|
||||
|
@ -180,14 +185,14 @@ public class BlockDynamite extends BaseBlock
|
|||
@Override
|
||||
public IIcon getIcon(int side, int meta)
|
||||
{
|
||||
switch(side)
|
||||
switch (side)
|
||||
{
|
||||
case 0:
|
||||
return this.iconTop; // bottom
|
||||
case 1:
|
||||
return this.iconTop;// top
|
||||
default:
|
||||
return this.blockIcon; // sides
|
||||
case 0:
|
||||
return this.iconTop; // bottom
|
||||
case 1:
|
||||
return this.iconTop;// top
|
||||
default:
|
||||
return this.blockIcon; // sides
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ public class BlockEngravedVanilla extends BlockEngravedSolid
|
|||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(final int side, final int metadata)
|
||||
{
|
||||
if(metadata < this.icon.length)
|
||||
if (metadata < this.icon.length)
|
||||
return this.icon[metadata];
|
||||
else
|
||||
return this.icon[0];
|
||||
|
@ -65,7 +65,7 @@ public class BlockEngravedVanilla extends BlockEngravedSolid
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List l)
|
||||
{
|
||||
for(int var4 = 0; var4 < this.icon.length; ++var4)
|
||||
for (int var4 = 0; var4 < this.icon.length; ++var4)
|
||||
l.add(new ItemStack(InitBlocks.blockEngravedVanilla, 1, var4));
|
||||
}
|
||||
|
||||
|
|
|
@ -20,21 +20,22 @@ public class BlockFissurePortal extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Triggered whenever an entity collides with this block (enters into the block). Args: world, x, y, z, entity
|
||||
* Triggered whenever an entity collides with this block (enters into the
|
||||
* block). Args: world, x, y, z, entity
|
||||
*/
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity)
|
||||
{
|
||||
if(world.getWorldInfo().getTerrainType() == WorldType.FLAT)
|
||||
if (world.getWorldInfo().getTerrainType() == WorldType.FLAT)
|
||||
return;
|
||||
if((entity.ridingEntity == null) && (entity.riddenByEntity == null) && ((entity instanceof EntityPlayerMP)))
|
||||
if ((entity.ridingEntity == null) && (entity.riddenByEntity == null) && ((entity instanceof EntityPlayerMP)))
|
||||
{
|
||||
EntityPlayerMP thePlayer = (EntityPlayerMP) entity;
|
||||
if(thePlayer.timeUntilPortal > 0)
|
||||
if (thePlayer.timeUntilPortal > 0)
|
||||
{
|
||||
thePlayer.timeUntilPortal = 10;
|
||||
}
|
||||
else if(thePlayer.dimension != ConfigGeneral.deepsDimensionID)
|
||||
else if (thePlayer.dimension != ConfigGeneral.deepsDimensionID)
|
||||
{
|
||||
thePlayer.timeUntilPortal = 10;
|
||||
thePlayer.mcServer.getConfigurationManager().transferPlayerToDimension(thePlayer, ConfigGeneral.deepsDimensionID,
|
||||
|
@ -50,7 +51,8 @@ public class BlockFissurePortal extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been cleared to be reused)
|
||||
* Returns a bounding box from the pool of bounding boxes (this means this
|
||||
* box can change after the pool has been cleared to be reused)
|
||||
*/
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z)
|
||||
|
|
|
@ -24,8 +24,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
import net.minecraftforge.fluids.BlockFluidClassic;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
|
||||
import steamcraft.common.lib.ModInfo;
|
||||
import boilerplate.common.utils.ItemStackUtils;
|
||||
import steamcraft.common.lib.ModInfo;
|
||||
|
||||
/**
|
||||
* @author Decebaldecebal
|
||||
|
|
|
@ -131,7 +131,7 @@ public class BlockHatch extends BaseContainerBlock
|
|||
public void setBlockBoundsForItemRender()
|
||||
{
|
||||
float f = 0.1875F;
|
||||
this.setBlockBounds(0.0F, 0.5F - f / 2.0F, 0.0F, 1.0F, 0.5F + f / 2.0F, 1.0F);
|
||||
this.setBlockBounds(0.0F, 0.5F - (f / 2.0F), 0.0F, 1.0F, 0.5F + (f / 2.0F), 1.0F);
|
||||
}
|
||||
|
||||
public void changeBounds(int p_150117_1_)
|
||||
|
@ -268,7 +268,7 @@ public class BlockHatch extends BaseContainerBlock
|
|||
j1 = 3;
|
||||
}
|
||||
|
||||
if (p_149660_5_ != 1 && p_149660_5_ != 0 && p_149660_7_ > 0.5F)
|
||||
if ((p_149660_5_ != 1) && (p_149660_5_ != 0) && (p_149660_7_ > 0.5F))
|
||||
{
|
||||
j1 |= 8;
|
||||
}
|
||||
|
|
|
@ -40,12 +40,13 @@ public class BlockInfestedDirt extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Called right before the block is destroyed by a player. Args: world, x, y, z, metaData
|
||||
* Called right before the block is destroyed by a player. Args: world, x,
|
||||
* y, z, metaData
|
||||
*/
|
||||
@Override
|
||||
public void onBlockDestroyedByPlayer(World world, int p_149664_2_, int p_149664_3_, int p_149664_4_, int p_149664_5_)
|
||||
{
|
||||
if(!world.isRemote && (world.rand.nextInt(10) == 0))
|
||||
if (!world.isRemote && (world.rand.nextInt(10) == 0))
|
||||
{
|
||||
EntityGrub grub = new EntityGrub(world);
|
||||
grub.setLocationAndAngles(p_149664_2_ + 0.5D, p_149664_3_, p_149664_4_ + 0.5D, 0.0F, 0.0F);
|
||||
|
|
|
@ -32,7 +32,7 @@ public class BlockInfestedGrass extends BlockGrass
|
|||
@Override
|
||||
public void onBlockDestroyedByPlayer(World world, int p_149664_2_, int p_149664_3_, int p_149664_4_, int p_149664_5_)
|
||||
{
|
||||
if(!world.isRemote && (world.rand.nextInt(10) == 0))
|
||||
if (!world.isRemote && (world.rand.nextInt(10) == 0))
|
||||
{
|
||||
EntityGrub grub = new EntityGrub(world);
|
||||
grub.setLocationAndAngles(p_149664_2_ + 0.5D, p_149664_3_, p_149664_4_ + 0.5D, 0.0F, 0.0F);
|
||||
|
|
|
@ -14,6 +14,7 @@ package steamcraft.common.blocks;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import steamcraft.common.init.InitBlocks;
|
||||
|
||||
/**
|
||||
|
@ -28,16 +29,15 @@ public class BlockInvertedCastIronLamp extends BlockCastIronLamp
|
|||
}
|
||||
|
||||
@Override
|
||||
public int onBlockPlaced(World world, int x, int y, int z, int metadata, float hitX, float hitY,
|
||||
float hitZ, int side)
|
||||
public int onBlockPlaced(World world, int x, int y, int z, int metadata, float hitX, float hitY, float hitZ, int side)
|
||||
{
|
||||
if((side == 1) || (side == 3))
|
||||
if ((side == 1) || (side == 3))
|
||||
world.setBlockMetadataWithNotify(x, y, z, 0, 2);
|
||||
if(side == 2)
|
||||
if (side == 2)
|
||||
world.setBlockMetadataWithNotify(x, y, z, 1, 2);
|
||||
if(side == 4)
|
||||
if (side == 4)
|
||||
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
if(side == 5)
|
||||
if (side == 5)
|
||||
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
return metadata;
|
||||
}
|
||||
|
@ -45,14 +45,14 @@ public class BlockInvertedCastIronLamp extends BlockCastIronLamp
|
|||
@Override
|
||||
public void onBlockAdded(World world, int x, int y, int z)
|
||||
{
|
||||
if(!world.isRemote)
|
||||
if (!world.isRemote)
|
||||
{
|
||||
if(!this.powered && !world.isBlockIndirectlyGettingPowered(x, y, z))
|
||||
if (!this.powered && !world.isBlockIndirectlyGettingPowered(x, y, z))
|
||||
{
|
||||
world.scheduleBlockUpdate(x, y, z, this, 4);
|
||||
world.setBlock(x, y, z, InitBlocks.blockInvertedCastIronLamp, world.getBlockMetadata(x, y, z), 2);
|
||||
}
|
||||
else if(this.powered && world.isBlockIndirectlyGettingPowered(x, y, z))
|
||||
else if (this.powered && world.isBlockIndirectlyGettingPowered(x, y, z))
|
||||
world.setBlock(x, y, z, InitBlocks.blockInvertedCastIronLampOff, world.getBlockMetadata(x, y, z), 2);
|
||||
}
|
||||
}
|
||||
|
@ -60,14 +60,14 @@ public class BlockInvertedCastIronLamp extends BlockCastIronLamp
|
|||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block p_149695_5_)
|
||||
{
|
||||
if(!world.isRemote)
|
||||
if (!world.isRemote)
|
||||
{
|
||||
if(!this.powered && !world.isBlockIndirectlyGettingPowered(x, y, z))
|
||||
if (!this.powered && !world.isBlockIndirectlyGettingPowered(x, y, z))
|
||||
{
|
||||
world.scheduleBlockUpdate(x, y, z, this, 4);
|
||||
world.setBlock(x, y, z, InitBlocks.blockInvertedCastIronLamp, world.getBlockMetadata(x, y, z), 2);
|
||||
}
|
||||
else if(this.powered && world.isBlockIndirectlyGettingPowered(x, y, z))
|
||||
else if (this.powered && world.isBlockIndirectlyGettingPowered(x, y, z))
|
||||
world.setBlock(x, y, z, InitBlocks.blockInvertedCastIronLampOff, world.getBlockMetadata(x, y, z), 2);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,10 +47,10 @@ public class BlockLamp extends BlockRedstoneLight
|
|||
this.setHardness(3.0F);
|
||||
this.setResistance(10.0F);
|
||||
this.setStepSound(Block.soundTypeStone);
|
||||
if(!powered)
|
||||
if (!powered)
|
||||
this.setCreativeTab(Steamcraft.tabSC2);
|
||||
|
||||
if(powered)
|
||||
if (powered)
|
||||
this.setLightLevel(0.98F);
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ public class BlockLamp extends BlockRedstoneLight
|
|||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess p_149673_1_, int p_149673_2_, int p_149673_3_, int p_149673_4_, int p_149673_5_)
|
||||
{
|
||||
if(this.powered)
|
||||
if (this.powered)
|
||||
return this.blockIconPowered;
|
||||
else
|
||||
return this.blockIcon;
|
||||
|
@ -78,13 +78,13 @@ public class BlockLamp extends BlockRedstoneLight
|
|||
@Override
|
||||
public void onBlockAdded(World p_149726_1_, int p_149726_2_, int p_149726_3_, int p_149726_4_)
|
||||
{
|
||||
if(!p_149726_1_.isRemote)
|
||||
if (!p_149726_1_.isRemote)
|
||||
{
|
||||
if(this.powered && !p_149726_1_.isBlockIndirectlyGettingPowered(p_149726_2_, p_149726_3_, p_149726_4_))
|
||||
if (this.powered && !p_149726_1_.isBlockIndirectlyGettingPowered(p_149726_2_, p_149726_3_, p_149726_4_))
|
||||
{
|
||||
p_149726_1_.scheduleBlockUpdate(p_149726_2_, p_149726_3_, p_149726_4_, this, 4);
|
||||
}
|
||||
else if(!this.powered && p_149726_1_.isBlockIndirectlyGettingPowered(p_149726_2_, p_149726_3_, p_149726_4_))
|
||||
else if (!this.powered && p_149726_1_.isBlockIndirectlyGettingPowered(p_149726_2_, p_149726_3_, p_149726_4_))
|
||||
{
|
||||
p_149726_1_.setBlock(p_149726_2_, p_149726_3_, p_149726_4_, InitBlocks.blockLampOn, 0, 2);
|
||||
}
|
||||
|
@ -92,19 +92,20 @@ public class BlockLamp extends BlockRedstoneLight
|
|||
}
|
||||
|
||||
/**
|
||||
* Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are their own) Args: x, y, z, neighbor
|
||||
* Block
|
||||
* Lets the block know when one of its neighbor changes. Doesn't know which
|
||||
* neighbor changed (coordinates passed are their own) Args: x, y, z,
|
||||
* neighbor Block
|
||||
*/
|
||||
@Override
|
||||
public void onNeighborBlockChange(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_)
|
||||
{
|
||||
if(!p_149695_1_.isRemote)
|
||||
if (!p_149695_1_.isRemote)
|
||||
{
|
||||
if(this.powered && !p_149695_1_.isBlockIndirectlyGettingPowered(p_149695_2_, p_149695_3_, p_149695_4_))
|
||||
if (this.powered && !p_149695_1_.isBlockIndirectlyGettingPowered(p_149695_2_, p_149695_3_, p_149695_4_))
|
||||
{
|
||||
p_149695_1_.scheduleBlockUpdate(p_149695_2_, p_149695_3_, p_149695_4_, this, 4);
|
||||
}
|
||||
else if(!this.powered && p_149695_1_.isBlockIndirectlyGettingPowered(p_149695_2_, p_149695_3_, p_149695_4_))
|
||||
else if (!this.powered && p_149695_1_.isBlockIndirectlyGettingPowered(p_149695_2_, p_149695_3_, p_149695_4_))
|
||||
{
|
||||
p_149695_1_.setBlock(p_149695_2_, p_149695_3_, p_149695_4_, InitBlocks.blockLampOn, 0, 2);
|
||||
}
|
||||
|
@ -117,7 +118,7 @@ public class BlockLamp extends BlockRedstoneLight
|
|||
@Override
|
||||
public void updateTick(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_)
|
||||
{
|
||||
if(!p_149674_1_.isRemote && this.powered && !p_149674_1_.isBlockIndirectlyGettingPowered(p_149674_2_, p_149674_3_, p_149674_4_))
|
||||
if (!p_149674_1_.isRemote && this.powered && !p_149674_1_.isBlockIndirectlyGettingPowered(p_149674_2_, p_149674_3_, p_149674_4_))
|
||||
{
|
||||
p_149674_1_.setBlock(p_149674_2_, p_149674_3_, p_149674_4_, InitBlocks.blockLamp, 0, 2);
|
||||
}
|
||||
|
@ -140,8 +141,10 @@ public class BlockLamp extends BlockRedstoneLight
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns an item stack containing a single instance of the current block type. 'i' is the block's subtype/damage and is ignored for blocks which do not
|
||||
* support subtypes. Blocks which cannot be harvested should return null.
|
||||
* Returns an item stack containing a single instance of the current block
|
||||
* type. 'i' is the block's subtype/damage and is ignored for blocks which
|
||||
* do not support subtypes. Blocks which cannot be harvested should return
|
||||
* null.
|
||||
*/
|
||||
@Override
|
||||
protected ItemStack createStackedBlock(int p_149644_1_)
|
||||
|
|
|
@ -36,21 +36,22 @@ public class BlockLeafPile extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been cleared to be reused)
|
||||
* Returns a bounding box from the pool of bounding boxes (this means this
|
||||
* box can change after the pool has been cleared to be reused)
|
||||
*/
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_)
|
||||
{
|
||||
int l = p_149668_1_.getBlockMetadata(p_149668_2_, p_149668_3_, p_149668_4_) & 7;
|
||||
float f = 0.125F;
|
||||
return AxisAlignedBB.getBoundingBox(p_149668_2_ + this.minX, p_149668_3_ + this.minY, p_149668_4_ + this.minZ, p_149668_2_ + this.maxX, p_149668_3_
|
||||
+ (l
|
||||
* f), p_149668_4_ + this.maxZ);
|
||||
return AxisAlignedBB.getBoundingBox(p_149668_2_ + this.minX, p_149668_3_ + this.minY, p_149668_4_ + this.minZ, p_149668_2_ + this.maxX,
|
||||
p_149668_3_ + (l * f), p_149668_4_ + this.maxZ);
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two adjacent blocks and also whether the
|
||||
* player can attach torches, redstone wire, etc to this block.
|
||||
* Is this block (a) opaque and (b) a full 1m cube? This determines whether
|
||||
* or not to render the shared face of two adjacent blocks and also whether
|
||||
* the player can attach torches, redstone wire, etc to this block.
|
||||
*/
|
||||
@Override
|
||||
public boolean isOpaqueCube()
|
||||
|
@ -59,7 +60,8 @@ public class BlockLeafPile extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
|
||||
* If this block doesn't render as an ordinary block it will return False
|
||||
* (examples: signs, buttons, stairs, etc)
|
||||
*/
|
||||
@Override
|
||||
public boolean renderAsNormalBlock()
|
||||
|
@ -77,7 +79,8 @@ public class BlockLeafPile extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Updates the blocks bounds based on its current state. Args: world, x, y, z
|
||||
* Updates the blocks bounds based on its current state. Args: world, x, y,
|
||||
* z
|
||||
*/
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_)
|
||||
|
@ -93,7 +96,8 @@ public class BlockLeafPile extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z
|
||||
* Checks to see if its valid to put this block at the specified
|
||||
* coordinates. Args: world, x, y, z
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
|
||||
|
@ -103,8 +107,9 @@ public class BlockLeafPile extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are their own) Args: x, y, z, neighbor
|
||||
* Block
|
||||
* Lets the block know when one of its neighbor changes. Doesn't know which
|
||||
* neighbor changed (coordinates passed are their own) Args: x, y, z,
|
||||
* neighbor Block
|
||||
*/
|
||||
@Override
|
||||
public void onNeighborBlockChange(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_)
|
||||
|
@ -114,7 +119,7 @@ public class BlockLeafPile extends BaseBlock
|
|||
|
||||
private boolean func_150155_m(World p_150155_1_, int p_150155_2_, int p_150155_3_, int p_150155_4_)
|
||||
{
|
||||
if(!this.canPlaceBlockAt(p_150155_1_, p_150155_2_, p_150155_3_, p_150155_4_))
|
||||
if (!this.canPlaceBlockAt(p_150155_1_, p_150155_2_, p_150155_3_, p_150155_4_))
|
||||
{
|
||||
p_150155_1_.setBlockToAir(p_150155_2_, p_150155_3_, p_150155_4_);
|
||||
return false;
|
||||
|
@ -126,7 +131,9 @@ public class BlockLeafPile extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Called when the player destroys a block with an item that can harvest it. (i, j, k) are the coordinates of the block and l is the block's subtype/damage.
|
||||
* Called when the player destroys a block with an item that can harvest it.
|
||||
* (i, j, k) are the coordinates of the block and l is the block's
|
||||
* subtype/damage.
|
||||
*/
|
||||
@Override
|
||||
public void harvestBlock(World p_149636_1_, EntityPlayer p_149636_2_, int p_149636_3_, int p_149636_4_, int p_149636_5_, int p_149636_6_)
|
||||
|
@ -150,14 +157,16 @@ public class BlockLeafPile extends BaseBlock
|
|||
@Override
|
||||
public void updateTick(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_)
|
||||
{
|
||||
if(p_149674_1_.getSavedLightValue(EnumSkyBlock.Block, p_149674_2_, p_149674_3_, p_149674_4_) > 11)
|
||||
if (p_149674_1_.getSavedLightValue(EnumSkyBlock.Block, p_149674_2_, p_149674_3_, p_149674_4_) > 11)
|
||||
{
|
||||
p_149674_1_.setBlockToAir(p_149674_2_, p_149674_3_, p_149674_4_);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the given side of this block type should be rendered, if the adjacent block is at the given coordinates. Args: blockAccess, x, y, z, side
|
||||
* Returns true if the given side of this block type should be rendered, if
|
||||
* the adjacent block is at the given coordinates. Args: blockAccess, x, y,
|
||||
* z, side
|
||||
*/
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
@ -167,7 +176,9 @@ public class BlockLeafPile extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Determines if a new block can be replace the space occupied by this one, Used in the player's placement code to make the block act like water, and lava.
|
||||
* Determines if a new block can be replace the space occupied by this one,
|
||||
* Used in the player's placement code to make the block act like water, and
|
||||
* lava.
|
||||
*
|
||||
* @param world
|
||||
* The current world
|
||||
|
|
|
@ -21,7 +21,7 @@ public class BlockMeltingIce extends BlockIce
|
|||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random random)
|
||||
{
|
||||
if(this.meltsIntoWater)
|
||||
if (this.meltsIntoWater)
|
||||
world.setBlock(x, y, z, Blocks.water);
|
||||
else
|
||||
world.setBlock(x, y, z, Blocks.air);
|
||||
|
|
|
@ -54,7 +54,7 @@ public class BlockMetal extends BaseMetadataBlock implements IChiselable
|
|||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(final int side, final int metadata)
|
||||
{
|
||||
if(metadata < this.icon.length)
|
||||
if (metadata < this.icon.length)
|
||||
return this.icon[metadata];
|
||||
else
|
||||
return this.icon[0];
|
||||
|
@ -79,7 +79,7 @@ public class BlockMetal extends BaseMetadataBlock implements IChiselable
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(final Item item, final CreativeTabs tab, final List l)
|
||||
{
|
||||
for(int var4 = 0; var4 < this.icon.length; ++var4)
|
||||
for (int var4 = 0; var4 < this.icon.length; ++var4)
|
||||
l.add(new ItemStack(InitBlocks.blockMetal, 1, var4));
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ public class BlockMotionSensor extends BlockContainer
|
|||
{
|
||||
super(p_i45386_1_);
|
||||
this.isOn = isOn;
|
||||
if(!isOn)
|
||||
if (!isOn)
|
||||
this.setCreativeTab(Steamcraft.tabSC2);
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ public class BlockMotionSensor extends BlockContainer
|
|||
@Override
|
||||
public int isProvidingWeakPower(IBlockAccess p_149709_1_, int p_149709_2_, int p_149709_3_, int p_149709_4_, int p_149709_5_)
|
||||
{
|
||||
if(this.isOn)
|
||||
if (this.isOn)
|
||||
return 15;
|
||||
else
|
||||
return 0;
|
||||
|
|
|
@ -27,7 +27,8 @@ public class BlockMud extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been cleared to be reused)
|
||||
* Returns a bounding box from the pool of bounding boxes (this means this
|
||||
* box can change after the pool has been cleared to be reused)
|
||||
*/
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_)
|
||||
|
@ -36,7 +37,8 @@ public class BlockMud extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Triggered whenever an entity collides with this block (enters into the block). Args: world, x, y, z, entity
|
||||
* Triggered whenever an entity collides with this block (enters into the
|
||||
* block). Args: world, x, y, z, entity
|
||||
*/
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World p_149670_1_, int p_149670_2_, int p_149670_3_, int p_149670_4_, Entity p_149670_5_)
|
||||
|
|
|
@ -81,8 +81,9 @@ public class BlockPlankStack extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are their own) Args: x, y, z, neighbor
|
||||
* Block
|
||||
* Lets the block know when one of its neighbor changes. Doesn't know which
|
||||
* neighbor changed (coordinates passed are their own) Args: x, y, z,
|
||||
* neighbor Block
|
||||
*/
|
||||
@Override
|
||||
public void onNeighborBlockChange(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_)
|
||||
|
@ -96,7 +97,7 @@ public class BlockPlankStack extends BaseBlock
|
|||
@Override
|
||||
public void updateTick(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_)
|
||||
{
|
||||
if(!p_149674_1_.isRemote)
|
||||
if (!p_149674_1_.isRemote)
|
||||
{
|
||||
this.func_149830_m(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_);
|
||||
}
|
||||
|
@ -104,16 +105,17 @@ public class BlockPlankStack extends BaseBlock
|
|||
|
||||
private void func_149830_m(World p_149830_1_, int p_149830_2_, int p_149830_3_, int p_149830_4_)
|
||||
{
|
||||
if(func_149831_e(p_149830_1_, p_149830_2_, p_149830_3_ - 1, p_149830_4_) && (p_149830_3_ >= 0))
|
||||
if (func_149831_e(p_149830_1_, p_149830_2_, p_149830_3_ - 1, p_149830_4_) && (p_149830_3_ >= 0))
|
||||
{
|
||||
byte b0 = 32;
|
||||
|
||||
if(p_149830_1_.checkChunksExist(p_149830_2_ - b0, p_149830_3_ - b0, p_149830_4_ - b0, p_149830_2_ + b0, p_149830_3_ + b0, p_149830_4_ + b0))
|
||||
if (p_149830_1_.checkChunksExist(p_149830_2_ - b0, p_149830_3_ - b0, p_149830_4_ - b0, p_149830_2_ + b0, p_149830_3_ + b0,
|
||||
p_149830_4_ + b0))
|
||||
{
|
||||
if(!p_149830_1_.isRemote)
|
||||
if (!p_149830_1_.isRemote)
|
||||
{
|
||||
EntityFallingBlock entityfallingblock = new EntityFallingBlock(p_149830_1_, p_149830_2_ + 0.5F, p_149830_3_ + 0.5F, p_149830_4_ + 0.5F,
|
||||
this, p_149830_1_.getBlockMetadata(p_149830_2_, p_149830_3_, p_149830_4_));
|
||||
EntityFallingBlock entityfallingblock = new EntityFallingBlock(p_149830_1_, p_149830_2_ + 0.5F, p_149830_3_ + 0.5F,
|
||||
p_149830_4_ + 0.5F, this, p_149830_1_.getBlockMetadata(p_149830_2_, p_149830_3_, p_149830_4_));
|
||||
this.func_149829_a(entityfallingblock);
|
||||
p_149830_1_.spawnEntityInWorld(entityfallingblock);
|
||||
}
|
||||
|
@ -138,11 +140,11 @@ public class BlockPlankStack extends BaseBlock
|
|||
{
|
||||
Block block = p_149831_0_.getBlock(p_149831_1_, p_149831_2_, p_149831_3_);
|
||||
|
||||
if(block.isAir(p_149831_0_, p_149831_1_, p_149831_2_, p_149831_3_))
|
||||
if (block.isAir(p_149831_0_, p_149831_1_, p_149831_2_, p_149831_3_))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if(block == Blocks.fire)
|
||||
else if (block == Blocks.fire)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -162,7 +164,7 @@ public class BlockPlankStack extends BaseBlock
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List l)
|
||||
{
|
||||
for(int var4 = 0; var4 < 6; ++var4)
|
||||
for (int var4 = 0; var4 < 6; ++var4)
|
||||
l.add(new ItemStack(InitBlocks.blockPlankStack, 1, var4));
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ public class BlockPolishedPlanks extends BaseMetadataBlock
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(final Item item, final CreativeTabs tab, final List l)
|
||||
{
|
||||
for(int var4 = 0; var4 < this.icon.length; ++var4)
|
||||
for (int var4 = 0; var4 < this.icon.length; ++var4)
|
||||
l.add(new ItemStack(InitBlocks.blockPolishedPlanks, 1, var4));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ public class BlockSiren extends BaseMetadataBlock
|
|||
super(p_i45394_1_);
|
||||
this.isOn = isOn;
|
||||
this.sound = sound;
|
||||
if(!isOn)
|
||||
if (!isOn)
|
||||
this.setCreativeTab(Steamcraft.tabSC2);
|
||||
}
|
||||
|
||||
|
@ -45,13 +45,13 @@ public class BlockSiren extends BaseMetadataBlock
|
|||
@Override
|
||||
public void onBlockAdded(World world, int x, int y, int z)
|
||||
{
|
||||
if(!world.isRemote)
|
||||
if (!world.isRemote)
|
||||
{
|
||||
if(this.isOn && !world.isBlockIndirectlyGettingPowered(x, y, z))
|
||||
if (this.isOn && !world.isBlockIndirectlyGettingPowered(x, y, z))
|
||||
{
|
||||
world.scheduleBlockUpdate(x, y, z, this, 4);
|
||||
}
|
||||
else if(!this.isOn && world.isBlockIndirectlyGettingPowered(x, y, z))
|
||||
else if (!this.isOn && world.isBlockIndirectlyGettingPowered(x, y, z))
|
||||
{
|
||||
world.playSoundEffect(x + 0.5D, y + 0.5D, z + 0.5D, ModInfo.PREFIX + this.sound, world.getBlockPowerInput(x, y, z) / 2, 1F);
|
||||
}
|
||||
|
@ -59,19 +59,20 @@ public class BlockSiren extends BaseMetadataBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are their own) Args: x, y, z, neighbor
|
||||
* Block
|
||||
* Lets the block know when one of its neighbor changes. Doesn't know which
|
||||
* neighbor changed (coordinates passed are their own) Args: x, y, z,
|
||||
* neighbor Block
|
||||
*/
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block p_149695_5_)
|
||||
{
|
||||
if(!world.isRemote)
|
||||
if (!world.isRemote)
|
||||
{
|
||||
if(this.isOn && !world.isBlockIndirectlyGettingPowered(x, y, z))
|
||||
if (this.isOn && !world.isBlockIndirectlyGettingPowered(x, y, z))
|
||||
{
|
||||
world.scheduleBlockUpdate(x, y, z, this, 4);
|
||||
}
|
||||
else if(!this.isOn && world.isBlockIndirectlyGettingPowered(x, y, z))
|
||||
else if (!this.isOn && world.isBlockIndirectlyGettingPowered(x, y, z))
|
||||
{
|
||||
world.playSoundEffect(x + 0.5D, y + 0.5D, z + 0.5D, ModInfo.PREFIX + this.sound, 5F, 1F);
|
||||
}
|
||||
|
|
|
@ -40,13 +40,14 @@ public class BlockSkyrail extends BlockRailBase
|
|||
}
|
||||
|
||||
/**
|
||||
* Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are their own) Args: x, y, z, neighbor
|
||||
* Block
|
||||
* Lets the block know when one of its neighbor changes. Doesn't know which
|
||||
* neighbor changed (coordinates passed are their own) Args: x, y, z,
|
||||
* neighbor Block
|
||||
*/
|
||||
@Override
|
||||
public void onNeighborBlockChange(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_)
|
||||
{
|
||||
if(!p_149695_1_.isRemote)
|
||||
if (!p_149695_1_.isRemote)
|
||||
{
|
||||
int l = p_149695_1_.getBlockMetadata(p_149695_2_, p_149695_3_, p_149695_4_);
|
||||
int i1 = l;
|
||||
|
|
|
@ -54,7 +54,7 @@ public class BlockSlate extends BaseMetadataBlock
|
|||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(final int side, final int metadata)
|
||||
{
|
||||
if(metadata < this.icon.length)
|
||||
if (metadata < this.icon.length)
|
||||
return this.icon[metadata];
|
||||
else
|
||||
return this.icon[0];
|
||||
|
@ -84,7 +84,7 @@ public class BlockSlate extends BaseMetadataBlock
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(final Item item, final CreativeTabs tab, final List l)
|
||||
{
|
||||
for(int var4 = 0; var4 < this.icon.length; ++var4)
|
||||
for (int var4 = 0; var4 < this.icon.length; ++var4)
|
||||
l.add(new ItemStack(InitBlocks.blockSlate, 1, var4));
|
||||
}
|
||||
|
||||
|
@ -93,20 +93,20 @@ public class BlockSlate extends BaseMetadataBlock
|
|||
{
|
||||
ArrayList<ItemStack> drop = new ArrayList<ItemStack>();
|
||||
|
||||
switch(metadata)
|
||||
switch (metadata)
|
||||
{
|
||||
case 0:
|
||||
drop.add(new ItemStack(InitBlocks.blockSlate, 1, 3));
|
||||
break;
|
||||
case 1:
|
||||
drop.add(new ItemStack(InitBlocks.blockSlate, 1, 4));
|
||||
break;
|
||||
case 2:
|
||||
drop.add(new ItemStack(InitBlocks.blockSlate, 1, 5));
|
||||
break;
|
||||
default:
|
||||
drop.add(0, new ItemStack(InitBlocks.blockSlate, 1, metadata));
|
||||
break;
|
||||
case 0:
|
||||
drop.add(new ItemStack(InitBlocks.blockSlate, 1, 3));
|
||||
break;
|
||||
case 1:
|
||||
drop.add(new ItemStack(InitBlocks.blockSlate, 1, 4));
|
||||
break;
|
||||
case 2:
|
||||
drop.add(new ItemStack(InitBlocks.blockSlate, 1, 5));
|
||||
break;
|
||||
default:
|
||||
drop.add(0, new ItemStack(InitBlocks.blockSlate, 1, metadata));
|
||||
break;
|
||||
}
|
||||
|
||||
return drop;
|
||||
|
|
|
@ -34,18 +34,19 @@ public class BlockSpiderEgg extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Called right before the block is destroyed by a player. Args: world, x, y, z, metaData
|
||||
* Called right before the block is destroyed by a player. Args: world, x,
|
||||
* y, z, metaData
|
||||
*/
|
||||
@Override
|
||||
public void onBlockDestroyedByPlayer(World world, int p_149664_2_, int p_149664_3_, int p_149664_4_, int p_149664_5_)
|
||||
{
|
||||
if(!world.isRemote)
|
||||
if (!world.isRemote)
|
||||
{
|
||||
int randNum = world.rand.nextInt(10);
|
||||
EntitySpider spider;
|
||||
if(randNum < 3)
|
||||
if (randNum < 3)
|
||||
spider = new EntityGhostSpider(world);
|
||||
else if(randNum == 1)
|
||||
else if (randNum == 1)
|
||||
spider = new EntityGiantSpider(world);
|
||||
else
|
||||
spider = new EntitySpider(world);
|
||||
|
@ -58,8 +59,9 @@ public class BlockSpiderEgg extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two adjacent blocks and also whether the
|
||||
* player can attach torches, redstone wire, etc to this block.
|
||||
* Is this block (a) opaque and (b) a full 1m cube? This determines whether
|
||||
* or not to render the shared face of two adjacent blocks and also whether
|
||||
* the player can attach torches, redstone wire, etc to this block.
|
||||
*/
|
||||
@Override
|
||||
public boolean isOpaqueCube()
|
||||
|
@ -68,7 +70,8 @@ public class BlockSpiderEgg extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
|
||||
* If this block doesn't render as an ordinary block it will return False
|
||||
* (examples: signs, buttons, stairs, etc)
|
||||
*/
|
||||
@Override
|
||||
public boolean renderAsNormalBlock()
|
||||
|
@ -77,7 +80,9 @@ public class BlockSpiderEgg extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns true if the given side of this block type should be rendered, if the adjacent block is at the given coordinates. Args: blockAccess, x, y, z, side
|
||||
* Returns true if the given side of this block type should be rendered, if
|
||||
* the adjacent block is at the given coordinates. Args: blockAccess, x, y,
|
||||
* z, side
|
||||
*/
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
|
|
@ -24,8 +24,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
import net.minecraftforge.fluids.BlockFluidClassic;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
|
||||
import steamcraft.common.lib.ModInfo;
|
||||
import boilerplate.common.utils.ItemStackUtils;
|
||||
import steamcraft.common.lib.ModInfo;
|
||||
|
||||
/**
|
||||
* @author Decebaldecebal
|
||||
|
@ -52,7 +52,7 @@ public class BlockSteamcraftFluid extends BlockFluidClassic
|
|||
this.stillIcon = iconRegister.registerIcon(ModInfo.PREFIX + this.texture);
|
||||
this.flowIcon = iconRegister.registerIcon(ModInfo.PREFIX + this.texture + "_flow");
|
||||
|
||||
if(this.overwriteIcons)
|
||||
if (this.overwriteIcons)
|
||||
this.getFluid().setIcons(this.stillIcon, this.flowIcon);
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ public class BlockSteamcraftFluid extends BlockFluidClassic
|
|||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta)
|
||||
{
|
||||
if((side == 0) || (side == 1))
|
||||
if ((side == 0) || (side == 1))
|
||||
return this.stillIcon;
|
||||
return this.flowIcon;
|
||||
}
|
||||
|
|
|
@ -23,16 +23,16 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import steamcraft.api.block.IHammerable;
|
||||
import steamcraft.common.Steamcraft;
|
||||
import steamcraft.common.init.InitBlocks;
|
||||
import steamcraft.common.init.InitItems;
|
||||
import steamcraft.common.lib.ModInfo;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import boilerplate.common.baseclasses.blocks.BaseMetadataBlock;
|
||||
import steamcraft.api.block.IHammerable;
|
||||
import steamcraft.common.Steamcraft;
|
||||
import steamcraft.common.init.InitBlocks;
|
||||
import steamcraft.common.init.InitItems;
|
||||
import steamcraft.common.lib.ModInfo;
|
||||
|
||||
/**
|
||||
* @author Surseance
|
||||
|
@ -64,7 +64,7 @@ public class BlockSteamcraftOre extends BaseMetadataBlock implements IHammerable
|
|||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
if(metadata < this.icon.length)
|
||||
if (metadata < this.icon.length)
|
||||
return this.icon[metadata];
|
||||
else
|
||||
return this.icon[0];
|
||||
|
@ -88,14 +88,14 @@ public class BlockSteamcraftOre extends BaseMetadataBlock implements IHammerable
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List l)
|
||||
{
|
||||
for(int var4 = 0; var4 < 7; ++var4)
|
||||
for (int var4 = 0; var4 < 7; ++var4)
|
||||
l.add(new ItemStack(InitBlocks.blockCustomOre, 1, var4));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getOutput(int meta)
|
||||
{
|
||||
if(meta < 4)
|
||||
if (meta < 4)
|
||||
return new ItemStack(InitItems.itemPowder);
|
||||
else
|
||||
return null;
|
||||
|
@ -106,20 +106,20 @@ public class BlockSteamcraftOre extends BaseMetadataBlock implements IHammerable
|
|||
{
|
||||
ArrayList<ItemStack> drop = new ArrayList<ItemStack>();
|
||||
|
||||
switch(metadata)
|
||||
switch (metadata)
|
||||
{
|
||||
case 4:
|
||||
drop.add(new ItemStack(InitItems.itemResource, 1, 4));
|
||||
break;
|
||||
case 5:
|
||||
drop.add(new ItemStack(InitItems.itemResource, 2 + world.rand.nextInt(3), 1));
|
||||
break;
|
||||
case 6:
|
||||
drop.add(new ItemStack(InitItems.itemResource, 2 + world.rand.nextInt(3), 3));
|
||||
break;
|
||||
default:
|
||||
drop.add(0, new ItemStack(InitBlocks.blockCustomOre, 1, metadata));
|
||||
break;
|
||||
case 4:
|
||||
drop.add(new ItemStack(InitItems.itemResource, 1, 4));
|
||||
break;
|
||||
case 5:
|
||||
drop.add(new ItemStack(InitItems.itemResource, 2 + world.rand.nextInt(3), 1));
|
||||
break;
|
||||
case 6:
|
||||
drop.add(new ItemStack(InitItems.itemResource, 2 + world.rand.nextInt(3), 3));
|
||||
break;
|
||||
default:
|
||||
drop.add(0, new ItemStack(InitBlocks.blockCustomOre, 1, metadata));
|
||||
break;
|
||||
}
|
||||
|
||||
return drop;
|
||||
|
|
|
@ -150,22 +150,22 @@ public class BlockTeaPlant extends BlockCrops implements IPlantable
|
|||
{
|
||||
ArrayList<ItemStack> ret = new ArrayList();
|
||||
|
||||
int count = quantityDropped(metadata, fortune, world.rand);
|
||||
int count = this.quantityDropped(metadata, fortune, world.rand);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
Item item = getItemDropped(metadata, world.rand, fortune);
|
||||
Item item = this.getItemDropped(metadata, world.rand, fortune);
|
||||
if (item != null)
|
||||
{
|
||||
ret.add(new ItemStack(item, 1, damageDropped(metadata)));
|
||||
ret.add(new ItemStack(item, 1, this.damageDropped(metadata)));
|
||||
}
|
||||
}
|
||||
|
||||
if (metadata != 0)
|
||||
{
|
||||
ret.add(new ItemStack(this.func_149866_i(), 1, damageDropped(metadata)));
|
||||
ret.add(new ItemStack(this.func_149866_i(), 1, this.damageDropped(metadata)));
|
||||
for (int i = 0; i < count; ++i)
|
||||
{
|
||||
ret.add(new ItemStack(this.func_149866_i(), world.rand.nextInt(1), damageDropped(metadata)));
|
||||
ret.add(new ItemStack(this.func_149866_i(), world.rand.nextInt(1), this.damageDropped(metadata)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,8 @@ public class BlockThin extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been cleared to be reused)
|
||||
* Returns a bounding box from the pool of bounding boxes (this means this
|
||||
* box can change after the pool has been cleared to be reused)
|
||||
*/
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z)
|
||||
|
@ -41,8 +42,9 @@ public class BlockThin extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two adjacent blocks and also whether the
|
||||
* player can attach torches, redstone wire, etc to this block.
|
||||
* Is this block (a) opaque and (b) a full 1m cube? This determines whether
|
||||
* or not to render the shared face of two adjacent blocks and also whether
|
||||
* the player can attach torches, redstone wire, etc to this block.
|
||||
*/
|
||||
@Override
|
||||
public boolean isOpaqueCube()
|
||||
|
@ -51,7 +53,8 @@ public class BlockThin extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
|
||||
* If this block doesn't render as an ordinary block it will return False
|
||||
* (examples: signs, buttons, stairs, etc)
|
||||
*/
|
||||
@Override
|
||||
public boolean renderAsNormalBlock()
|
||||
|
@ -76,7 +79,8 @@ public class BlockThin extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z
|
||||
* Checks to see if its valid to put this block at the specified
|
||||
* coordinates. Args: world, x, y, z
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
|
||||
|
@ -86,8 +90,9 @@ public class BlockThin extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are their own) Args: x, y, z, neighbor
|
||||
* Block
|
||||
* Lets the block know when one of its neighbor changes. Doesn't know which
|
||||
* neighbor changed (coordinates passed are their own) Args: x, y, z,
|
||||
* neighbor Block
|
||||
*/
|
||||
@Override
|
||||
public void onNeighborBlockChange(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_)
|
||||
|
@ -97,9 +102,10 @@ public class BlockThin extends BaseBlock
|
|||
|
||||
private boolean func_150090_e(World p_150090_1_, int p_150090_2_, int p_150090_3_, int p_150090_4_)
|
||||
{
|
||||
if(!this.canBlockStay(p_150090_1_, p_150090_2_, p_150090_3_, p_150090_4_))
|
||||
if (!this.canBlockStay(p_150090_1_, p_150090_2_, p_150090_3_, p_150090_4_))
|
||||
{
|
||||
this.dropBlockAsItem(p_150090_1_, p_150090_2_, p_150090_3_, p_150090_4_, p_150090_1_.getBlockMetadata(p_150090_2_, p_150090_3_, p_150090_4_), 0);
|
||||
this.dropBlockAsItem(p_150090_1_, p_150090_2_, p_150090_3_, p_150090_4_,
|
||||
p_150090_1_.getBlockMetadata(p_150090_2_, p_150090_3_, p_150090_4_), 0);
|
||||
p_150090_1_.setBlockToAir(p_150090_2_, p_150090_3_, p_150090_4_);
|
||||
return false;
|
||||
}
|
||||
|
@ -110,7 +116,8 @@ public class BlockThin extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Can this block stay at this position. Similar to canPlaceBlockAt except gets checked often with plants.
|
||||
* Can this block stay at this position. Similar to canPlaceBlockAt except
|
||||
* gets checked often with plants.
|
||||
*/
|
||||
@Override
|
||||
public boolean canBlockStay(World p_149718_1_, int p_149718_2_, int p_149718_3_, int p_149718_4_)
|
||||
|
@ -119,7 +126,9 @@ public class BlockThin extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns true if the given side of this block type should be rendered, if the adjacent block is at the given coordinates. Args: blockAccess, x, y, z, side
|
||||
* Returns true if the given side of this block type should be rendered, if
|
||||
* the adjacent block is at the given coordinates. Args: blockAccess, x, y,
|
||||
* z, side
|
||||
*/
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
@ -129,7 +138,8 @@ public class BlockThin extends BaseBlock
|
|||
}
|
||||
|
||||
/**
|
||||
* Determines the damage on the item the block drops. Used in cloth and wood.
|
||||
* Determines the damage on the item the block drops. Used in cloth and
|
||||
* wood.
|
||||
*/
|
||||
@Override
|
||||
public int damageDropped(int p_149692_1_)
|
||||
|
|
|
@ -54,13 +54,13 @@ public class BlockTimeBomb extends BaseContainerBlock
|
|||
@Override
|
||||
public boolean onBlockActivated(World world, int par2, int par3, int par4, EntityPlayer player, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
if(world.isRemote)
|
||||
if (world.isRemote)
|
||||
return true;
|
||||
else
|
||||
{
|
||||
TileTimeBomb tile = (TileTimeBomb) world.getTileEntity(par2, par3, par4);
|
||||
|
||||
if((tile == null) || player.isSneaking())
|
||||
if ((tile == null) || player.isSneaking())
|
||||
return false;
|
||||
|
||||
player.openGui(Steamcraft.instance, GuiIDs.TIMEBOMB, world, par2, par3, par4);
|
||||
|
@ -72,12 +72,12 @@ public class BlockTimeBomb extends BaseContainerBlock
|
|||
@Override
|
||||
public IIcon getIcon(int side, int meta)
|
||||
{
|
||||
switch(side)
|
||||
switch (side)
|
||||
{
|
||||
case 1:
|
||||
return this.iconEnd; // top
|
||||
default:
|
||||
return this.blockIcon; // sides
|
||||
case 1:
|
||||
return this.iconEnd; // top
|
||||
default:
|
||||
return this.blockIcon; // sides
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,12 +92,11 @@ public class BlockTimeBomb extends BaseContainerBlock
|
|||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase ent, ItemStack stack)
|
||||
{
|
||||
if((ent != null) && (ent instanceof EntityPlayer))
|
||||
if ((ent != null) && (ent instanceof EntityPlayer))
|
||||
{
|
||||
EntityPlayer player = (EntityPlayer) ent;
|
||||
LoggerSteamcraft.info(
|
||||
"Time Bomb placed at X: " + Integer.toString(x) + " Y: " + Integer.toString(y) + " Z: " + Integer.toString(z) + " by player: "
|
||||
+ player.getCommandSenderName());
|
||||
LoggerSteamcraft.info("Time Bomb placed at X: " + Integer.toString(x) + " Y: " + Integer.toString(y) + " Z: " + Integer.toString(z)
|
||||
+ " by player: " + player.getCommandSenderName());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,9 +24,9 @@ import net.minecraft.world.World;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import boilerplate.client.utils.EffectUtils;
|
||||
import steamcraft.api.block.IChiselable;
|
||||
import steamcraft.common.init.InitBlocks;
|
||||
import boilerplate.client.utils.EffectUtils;
|
||||
|
||||
/**
|
||||
* @author warlordjones
|
||||
|
|
|
@ -26,14 +26,13 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import cofh.api.block.IDismantleable;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import boilerplate.common.baseclasses.BaseTileWithInventory;
|
||||
import cofh.api.block.IDismantleable;
|
||||
import steamcraft.common.Steamcraft;
|
||||
import steamcraft.common.lib.ModInfo;
|
||||
import boilerplate.common.baseclasses.BaseTileWithInventory;
|
||||
|
||||
/**
|
||||
* @author decebaldecebal
|
||||
|
@ -60,37 +59,37 @@ public abstract class BaseContainerBlock extends BlockContainer implements IDism
|
|||
@Override
|
||||
public void breakBlock(World par1World, int par2, int par3, int par4, Block block, int par6)
|
||||
{
|
||||
if(!keepInventory)
|
||||
if (!keepInventory)
|
||||
{
|
||||
TileEntity tile = par1World.getTileEntity(par2, par3, par4);
|
||||
|
||||
if((tile != null) && (tile instanceof BaseTileWithInventory))
|
||||
if ((tile != null) && (tile instanceof BaseTileWithInventory))
|
||||
{
|
||||
BaseTileWithInventory invTile = (BaseTileWithInventory) tile;
|
||||
|
||||
for(int var8 = 0; var8 < invTile.getSizeInventory(); ++var8)
|
||||
for (int var8 = 0; var8 < invTile.getSizeInventory(); ++var8)
|
||||
{
|
||||
ItemStack var9 = invTile.getStackInSlot(var8);
|
||||
|
||||
if(var9 != null)
|
||||
if (var9 != null)
|
||||
{
|
||||
Random random = par1World.rand;
|
||||
float var10 = (random.nextFloat() * 0.8F) + 0.1F;
|
||||
float var11 = (random.nextFloat() * 0.8F) + 0.1F;
|
||||
float var12 = (random.nextFloat() * 0.8F) + 0.1F;
|
||||
|
||||
while(var9.stackSize > 0)
|
||||
while (var9.stackSize > 0)
|
||||
{
|
||||
int var13 = random.nextInt(21) + 10;
|
||||
|
||||
if(var13 > var9.stackSize)
|
||||
if (var13 > var9.stackSize)
|
||||
var13 = var9.stackSize;
|
||||
|
||||
var9.stackSize -= var13;
|
||||
EntityItem var14 = new EntityItem(par1World, par2 + var10, par3 + var11, par4 + var12, new ItemStack(var9.getItem(),
|
||||
var13, var9.getItemDamage()));
|
||||
EntityItem var14 = new EntityItem(par1World, par2 + var10, par3 + var11, par4 + var12,
|
||||
new ItemStack(var9.getItem(), var13, var9.getItemDamage()));
|
||||
|
||||
if(var9.hasTagCompound())
|
||||
if (var9.hasTagCompound())
|
||||
var14.getEntityItem().setTagCompound((NBTTagCompound) var9.getTagCompound().copy());
|
||||
|
||||
float var15 = 0.05F;
|
||||
|
|
|
@ -49,13 +49,13 @@ public class BlockArmorEditor extends BaseContainerBlock
|
|||
@Override
|
||||
public boolean onBlockActivated(World world, int par2, int par3, int par4, EntityPlayer player, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
if(world.isRemote)
|
||||
if (world.isRemote)
|
||||
return true;
|
||||
else
|
||||
{
|
||||
TileArmorEditor tile = (TileArmorEditor) world.getTileEntity(par2, par3, par4);
|
||||
|
||||
if((tile == null) || player.isSneaking())
|
||||
if ((tile == null) || player.isSneaking())
|
||||
return false;
|
||||
|
||||
player.openGui(Steamcraft.instance, GuiIDs.ARMOR_EDITOR, world, par2, par3, par4);
|
||||
|
@ -70,14 +70,14 @@ public class BlockArmorEditor extends BaseContainerBlock
|
|||
|
||||
keepInventory = true;
|
||||
|
||||
if(par0)
|
||||
if (par0)
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, var5 + 7, 2);
|
||||
else
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, var5 - 7, 2);
|
||||
|
||||
keepInventory = false;
|
||||
|
||||
if(tileentity != null)
|
||||
if (tileentity != null)
|
||||
{
|
||||
tileentity.validate();
|
||||
par1World.setTileEntity(par2, par3, par4, tileentity);
|
||||
|
|
|
@ -53,20 +53,20 @@ public abstract class BlockBaseBoiler extends BaseContainerBlock
|
|||
@Override
|
||||
public IIcon getIcon(int side, int meta)
|
||||
{
|
||||
if(side == (meta - 7))
|
||||
if (side == (meta - 7))
|
||||
return this.iconFrontActive;
|
||||
if(((meta == 0) && (side == 3)) || (side == meta))
|
||||
if (((meta == 0) && (side == 3)) || (side == meta))
|
||||
return this.iconFront;
|
||||
switch(side)
|
||||
switch (side)
|
||||
{
|
||||
case 0:
|
||||
return this.iconTop; // bottom
|
||||
case 0:
|
||||
return this.iconTop; // bottom
|
||||
|
||||
case 1:
|
||||
return this.iconTop; // top
|
||||
case 1:
|
||||
return this.iconTop; // top
|
||||
|
||||
default:
|
||||
return this.blockIcon; // sides
|
||||
default:
|
||||
return this.blockIcon; // sides
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -77,14 +77,14 @@ public abstract class BlockBaseBoiler extends BaseContainerBlock
|
|||
|
||||
keepInventory = true;
|
||||
|
||||
if(par0)
|
||||
if (par0)
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, var5 + 7, 2);
|
||||
else
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, var5 - 7, 2);
|
||||
|
||||
keepInventory = false;
|
||||
|
||||
if(tileentity != null)
|
||||
if (tileentity != null)
|
||||
{
|
||||
tileentity.validate();
|
||||
par1World.setTileEntity(par2, par3, par4, tileentity);
|
||||
|
@ -96,16 +96,16 @@ public abstract class BlockBaseBoiler extends BaseContainerBlock
|
|||
{
|
||||
int l = MathHelper.floor_double(((living.rotationYaw * 4.0F) / 360.0F) + 0.5D) & 3;
|
||||
|
||||
if(l == 0)
|
||||
if (l == 0)
|
||||
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
|
||||
if(l == 1)
|
||||
if (l == 1)
|
||||
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
||||
|
||||
if(l == 2)
|
||||
if (l == 2)
|
||||
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
|
||||
if(l == 3)
|
||||
if (l == 3)
|
||||
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||
|
||||
super.onBlockPlacedBy(world, x, y, z, living, stack);
|
||||
|
|
|
@ -66,13 +66,13 @@ public class BlockBattery extends BaseContainerBlock
|
|||
@Override
|
||||
public boolean onBlockActivated(World world, int par2, int par3, int par4, EntityPlayer player, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
if(world.isRemote)
|
||||
if (world.isRemote)
|
||||
return true;
|
||||
else
|
||||
{
|
||||
TileBattery tile = (TileBattery) world.getTileEntity(par2, par3, par4);
|
||||
|
||||
if((tile == null) || player.isSneaking())
|
||||
if ((tile == null) || player.isSneaking())
|
||||
return false;
|
||||
|
||||
player.openGui(Steamcraft.instance, GuiIDs.BATTERY, world, par2, par3, par4);
|
||||
|
|
|
@ -65,21 +65,21 @@ public class BlockBloomery extends BaseContainerBlock
|
|||
@Override
|
||||
public IIcon getIcon(int side, int meta)
|
||||
{
|
||||
if(side == (meta - 7))
|
||||
if (side == (meta - 7))
|
||||
return this.iconFrontActive;
|
||||
if(((meta == 0) && (side == 3)) || (side == meta))
|
||||
if (((meta == 0) && (side == 3)) || (side == meta))
|
||||
return this.iconFront;
|
||||
switch(side)
|
||||
switch (side)
|
||||
{
|
||||
case 0:
|
||||
return this.blockIcon; // bottom
|
||||
case 1:
|
||||
if(meta > 7)
|
||||
return this.iconTopActive;
|
||||
else
|
||||
return this.iconTop;// top
|
||||
default:
|
||||
return this.blockIcon; // sides
|
||||
case 0:
|
||||
return this.blockIcon; // bottom
|
||||
case 1:
|
||||
if (meta > 7)
|
||||
return this.iconTopActive;
|
||||
else
|
||||
return this.iconTop;// top
|
||||
default:
|
||||
return this.blockIcon; // sides
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -97,13 +97,13 @@ public class BlockBloomery extends BaseContainerBlock
|
|||
@Override
|
||||
public boolean onBlockActivated(World world, int par2, int par3, int par4, EntityPlayer player, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
if(world.isRemote)
|
||||
if (world.isRemote)
|
||||
return true;
|
||||
else
|
||||
{
|
||||
TileBloomery tile = (TileBloomery) world.getTileEntity(par2, par3, par4);
|
||||
|
||||
if((tile == null) || player.isSneaking())
|
||||
if ((tile == null) || player.isSneaking())
|
||||
return false;
|
||||
player.openGui(Steamcraft.instance, GuiIDs.BLOOMERY, world, par2, par3, par4);
|
||||
return true;
|
||||
|
@ -117,14 +117,14 @@ public class BlockBloomery extends BaseContainerBlock
|
|||
|
||||
keepInventory = true;
|
||||
|
||||
if(par0)
|
||||
if (par0)
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, var5 + 7, 2);
|
||||
else
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, var5 - 7, 2);
|
||||
|
||||
keepInventory = false;
|
||||
|
||||
if(tileentity != null)
|
||||
if (tileentity != null)
|
||||
{
|
||||
tileentity.validate();
|
||||
par1World.setTileEntity(par2, par3, par4, tileentity);
|
||||
|
@ -136,7 +136,7 @@ public class BlockBloomery extends BaseContainerBlock
|
|||
public void randomDisplayTick(World world, int par2, int par3, int par4, Random par5Random)
|
||||
{
|
||||
int l = world.getBlockMetadata(par2, par3, par4);
|
||||
if(l >= 7)
|
||||
if (l >= 7)
|
||||
{
|
||||
float f = par2 + 0.5F;
|
||||
float f1 = par3 + 0.0F + ((par5Random.nextFloat() * 6.0F) / 16.0F);
|
||||
|
@ -144,22 +144,22 @@ public class BlockBloomery extends BaseContainerBlock
|
|||
float f3 = 0.52F;
|
||||
float f4 = (par5Random.nextFloat() * 0.6F) - 0.3F;
|
||||
|
||||
if((l == 4) || (l == 11))
|
||||
if ((l == 4) || (l == 11))
|
||||
{
|
||||
world.spawnParticle("smoke", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("flame", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
else if((l == 5) || (l == 12))
|
||||
else if ((l == 5) || (l == 12))
|
||||
{
|
||||
world.spawnParticle("smoke", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("flame", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
else if((l == 2) || (l == 9))
|
||||
else if ((l == 2) || (l == 9))
|
||||
{
|
||||
world.spawnParticle("smoke", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("flame", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
else if((l == 3) || (l == 10))
|
||||
else if ((l == 3) || (l == 10))
|
||||
{
|
||||
world.spawnParticle("smoke", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("flame", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D);
|
||||
|
@ -172,16 +172,16 @@ public class BlockBloomery extends BaseContainerBlock
|
|||
{
|
||||
int l = MathHelper.floor_double(((living.rotationYaw * 4.0F) / 360.0F) + 0.5D) & 3;
|
||||
|
||||
if(l == 0)
|
||||
if (l == 0)
|
||||
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
|
||||
if(l == 1)
|
||||
if (l == 1)
|
||||
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
||||
|
||||
if(l == 2)
|
||||
if (l == 2)
|
||||
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
|
||||
if(l == 3)
|
||||
if (l == 3)
|
||||
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||
|
||||
super.onBlockPlacedBy(world, x, y, z, living, stack);
|
||||
|
|
|
@ -41,20 +41,22 @@ public class BlockCapacitor extends BaseContainerBlock
|
|||
|
||||
/*
|
||||
* @Override public int getRenderType() { return RenderIDs.blockBatteryRI; }
|
||||
*
|
||||
* @Override public boolean isOpaqueCube() { return false; }
|
||||
*
|
||||
* @Override public boolean renderAsNormalBlock() { return false; }
|
||||
*/
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int par2, int par3, int par4, EntityPlayer player, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
if(world.isRemote)
|
||||
if (world.isRemote)
|
||||
return true;
|
||||
else
|
||||
{
|
||||
TileEntity tile = world.getTileEntity(par2, par3, par4);
|
||||
|
||||
if((tile == null) || player.isSneaking())
|
||||
if ((tile == null) || player.isSneaking())
|
||||
return false;
|
||||
|
||||
player.openGui(Steamcraft.instance, GuiIDs.CAPACITOR, world, par2, par3, par4);
|
||||
|
|
|
@ -77,13 +77,13 @@ public class BlockCharger extends BaseContainerBlock
|
|||
@Override
|
||||
public boolean onBlockActivated(World world, int par2, int par3, int par4, EntityPlayer player, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
if(world.isRemote)
|
||||
if (world.isRemote)
|
||||
return true;
|
||||
else
|
||||
{
|
||||
TileCharger tile = (TileCharger) world.getTileEntity(par2, par3, par4);
|
||||
|
||||
if((tile == null) || player.isSneaking())
|
||||
if ((tile == null) || player.isSneaking())
|
||||
return false;
|
||||
|
||||
player.openGui(Steamcraft.instance, GuiIDs.CHARGER, world, par2, par3, par4);
|
||||
|
|
|
@ -20,6 +20,7 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import steamcraft.client.lib.RenderIDs;
|
||||
import steamcraft.common.init.InitBlocks;
|
||||
import steamcraft.common.tiles.TileCopperPipe;
|
||||
|
@ -67,11 +68,11 @@ public class BlockCopperPipe extends BaseContainerBlock
|
|||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityLiving, ItemStack is)
|
||||
{
|
||||
if(!world.isRemote)
|
||||
if (!world.isRemote)
|
||||
{
|
||||
TileCopperPipe tile = (TileCopperPipe) world.getTileEntity(x, y, z);
|
||||
|
||||
if(tile != null)
|
||||
if (tile != null)
|
||||
{
|
||||
tile.network = null;
|
||||
tile.updateConnections();
|
||||
|
@ -82,7 +83,7 @@ public class BlockCopperPipe extends BaseContainerBlock
|
|||
@Override
|
||||
public void onNeighborChange(IBlockAccess world, int x, int y, int z, int tileX, int tileY, int tileZ)
|
||||
{
|
||||
if(world.getBlock(tileX, tileY, tileZ) != InitBlocks.blockCopperPipe)
|
||||
if (world.getBlock(tileX, tileY, tileZ) != InitBlocks.blockCopperPipe)
|
||||
{
|
||||
TileCopperPipe tile = (TileCopperPipe) world.getTileEntity(x, y, z);
|
||||
tile.updateConnections();
|
||||
|
@ -95,8 +96,8 @@ public class BlockCopperPipe extends BaseContainerBlock
|
|||
if (!world.isRemote)
|
||||
{
|
||||
TileCopperPipe tile = (TileCopperPipe) world.getTileEntity(x, y, z);
|
||||
|
||||
if(tile != null)
|
||||
|
||||
if (tile != null)
|
||||
tile.removeFromNetwork();
|
||||
}
|
||||
|
||||
|
@ -119,12 +120,12 @@ public class BlockCopperPipe extends BaseContainerBlock
|
|||
{
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
TileCopperPipe pipe = null;
|
||||
if(tile instanceof TileCopperPipe)
|
||||
if (tile instanceof TileCopperPipe)
|
||||
{
|
||||
pipe = (TileCopperPipe) tile;
|
||||
}
|
||||
|
||||
if(pipe != null)
|
||||
if (pipe != null)
|
||||
{
|
||||
float minX = (5.5f * pixel) - (pipe.connections[4] != null ? 5.5f * pixel : 0);
|
||||
float maxX = (1 - (5.5f * pixel)) + (pipe.connections[5] != null ? 5.5f * pixel : 0);
|
||||
|
|
|
@ -17,8 +17,10 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.IFluidContainerItem;
|
||||
|
||||
import steamcraft.client.lib.RenderIDs;
|
||||
import steamcraft.common.tiles.TileCopperTank;
|
||||
|
||||
|
@ -29,15 +31,15 @@ import steamcraft.common.tiles.TileCopperTank;
|
|||
public class BlockCopperTank extends BaseContainerBlock
|
||||
{
|
||||
public static float pixel = 1 / 16f;
|
||||
|
||||
|
||||
public BlockCopperTank(Material mat)
|
||||
{
|
||||
super(mat);
|
||||
|
||||
this.setBlockBounds(1.5f * pixel, 0, 1.5f * pixel, 1 - 1.5f * pixel, 1, 1 - 1.5f * pixel);
|
||||
|
||||
this.setBlockBounds(1.5f * pixel, 0, 1.5f * pixel, 1 - (1.5f * pixel), 1, 1 - (1.5f * pixel));
|
||||
this.useNeighborBrightness = true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World var1, int var2)
|
||||
{
|
||||
|
@ -61,22 +63,21 @@ public class BlockCopperTank extends BaseContainerBlock
|
|||
{
|
||||
return RenderIDs.blockCopperTankRI;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float posX,
|
||||
float posY, float posZ)
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float posX, float posY, float posZ)
|
||||
{
|
||||
if (!world.isRemote)
|
||||
{
|
||||
TileCopperTank tank = (TileCopperTank) world.getTileEntity(x, y, z);
|
||||
ItemStack stack = player.getHeldItem();
|
||||
|
||||
if(stack != null && stack.getItem() instanceof IFluidContainerItem)
|
||||
|
||||
if ((stack != null) && (stack.getItem() instanceof IFluidContainerItem))
|
||||
{
|
||||
IFluidContainerItem container = (IFluidContainerItem) stack.getItem();
|
||||
|
||||
int amount = 0;
|
||||
if((amount = tank.fill(ForgeDirection.getOrientation(side), container.getFluid(stack), false)) > 0)
|
||||
if ((amount = tank.fill(ForgeDirection.getOrientation(side), container.getFluid(stack), false)) > 0)
|
||||
{
|
||||
amount = tank.fill(ForgeDirection.getOrientation(side), container.getFluid(stack), true);
|
||||
container.drain(stack, amount, true);
|
||||
|
|
|
@ -27,13 +27,16 @@ import net.minecraft.util.AxisAlignedBB;
|
|||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import steamcraft.client.lib.RenderIDs;
|
||||
import steamcraft.common.init.InitBlocks;
|
||||
import steamcraft.common.lib.DamageSourceHandler;
|
||||
import steamcraft.common.tiles.energy.TileCopperWire;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* @author warlordjones
|
||||
|
@ -78,11 +81,11 @@ public class BlockCopperWire extends BaseContainerBlock
|
|||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityLiving, ItemStack is)
|
||||
{
|
||||
if(!world.isRemote)
|
||||
if (!world.isRemote)
|
||||
{
|
||||
TileCopperWire tile = (TileCopperWire) world.getTileEntity(x, y, z);
|
||||
|
||||
if(tile != null)
|
||||
if (tile != null)
|
||||
{
|
||||
tile.network = null;
|
||||
tile.updateConnections();
|
||||
|
@ -93,8 +96,8 @@ public class BlockCopperWire extends BaseContainerBlock
|
|||
@Override
|
||||
public void onNeighborChange(IBlockAccess world, int x, int y, int z, int tileX, int tileY, int tileZ)
|
||||
{
|
||||
if(world.getBlock(tileX, tileY, tileZ) != InitBlocks.blockCopperWire)
|
||||
{
|
||||
if (world.getBlock(tileX, tileY, tileZ) != InitBlocks.blockCopperWire)
|
||||
{
|
||||
TileCopperWire tile = (TileCopperWire) world.getTileEntity(x, y, z);
|
||||
tile.updateConnections(); // only on server
|
||||
}
|
||||
|
@ -106,11 +109,11 @@ public class BlockCopperWire extends BaseContainerBlock
|
|||
if (!world.isRemote)
|
||||
{
|
||||
TileCopperWire tile = (TileCopperWire) world.getTileEntity(x, y, z);
|
||||
|
||||
if(tile != null)
|
||||
|
||||
if (tile != null)
|
||||
tile.removeFromNetwork();
|
||||
}
|
||||
|
||||
|
||||
super.breakBlock(world, x, y, z, block, metadata);
|
||||
}
|
||||
|
||||
|
@ -130,12 +133,12 @@ public class BlockCopperWire extends BaseContainerBlock
|
|||
{
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
TileCopperWire wire = null;
|
||||
if(tile instanceof TileCopperWire)
|
||||
if (tile instanceof TileCopperWire)
|
||||
{
|
||||
wire = (TileCopperWire) tile;
|
||||
}
|
||||
|
||||
if(wire != null)
|
||||
if (wire != null)
|
||||
{
|
||||
float minX = (5.5f * pixel) - (wire.connections[4] != null ? 5.5f * pixel : 0);
|
||||
float maxX = (1 - (5.5f * pixel)) + (wire.connections[5] != null ? 5.5f * pixel : 0);
|
||||
|
@ -155,10 +158,10 @@ public class BlockCopperWire extends BaseContainerBlock
|
|||
@Override
|
||||
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity)
|
||||
{
|
||||
if(world.getBlockMetadata(x, y, z) == 0)
|
||||
if (world.getBlockMetadata(x, y, z) == 0)
|
||||
{
|
||||
TileCopperWire wire = (TileCopperWire) world.getTileEntity(x, y, z);
|
||||
if(wire.getEnergyStored(ForgeDirection.UNKNOWN) != 0)
|
||||
if (wire.getEnergyStored(ForgeDirection.UNKNOWN) != 0)
|
||||
entity.attackEntityFrom(DamageSourceHandler.electrocution, 0.5F);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,13 +51,13 @@ public class BlockNuclearBoiler extends BlockBaseBoiler
|
|||
@Override
|
||||
public boolean onBlockActivated(World world, int par2, int par3, int par4, EntityPlayer player, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
if(world.isRemote)
|
||||
if (world.isRemote)
|
||||
return true;
|
||||
else
|
||||
{
|
||||
TileNuclearBoiler tile = (TileNuclearBoiler) world.getTileEntity(par2, par3, par4);
|
||||
|
||||
if((tile == null) || player.isSneaking())
|
||||
if ((tile == null) || player.isSneaking())
|
||||
return false;
|
||||
|
||||
player.openGui(Steamcraft.instance, GuiIDs.NUKE_BOILER, world, par2, par3, par4);
|
||||
|
@ -70,7 +70,7 @@ public class BlockNuclearBoiler extends BlockBaseBoiler
|
|||
public void randomDisplayTick(World world, int par2, int par3, int par4, Random par5Random)
|
||||
{
|
||||
int l = world.getBlockMetadata(par2, par3, par4);
|
||||
if(l >= 7)
|
||||
if (l >= 7)
|
||||
{
|
||||
float f = par2 + 0.5F;
|
||||
float f1 = par3 + 0.0F + ((par5Random.nextFloat() * 6.0F) / 16.0F);
|
||||
|
@ -78,22 +78,22 @@ public class BlockNuclearBoiler extends BlockBaseBoiler
|
|||
float f3 = 0.52F;
|
||||
float f4 = (par5Random.nextFloat() * 0.6F) - 0.3F;
|
||||
|
||||
if((l == 4) || (l == 11))
|
||||
if ((l == 4) || (l == 11))
|
||||
{
|
||||
world.spawnParticle("happyVillager", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("flame", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
else if((l == 5) || (l == 12))
|
||||
else if ((l == 5) || (l == 12))
|
||||
{
|
||||
world.spawnParticle("happyVillager", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("flame", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
else if((l == 2) || (l == 9))
|
||||
else if ((l == 2) || (l == 9))
|
||||
{
|
||||
world.spawnParticle("happyVillager", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("flame", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
else if((l == 3) || (l == 10))
|
||||
else if ((l == 3) || (l == 10))
|
||||
{
|
||||
world.spawnParticle("happyVillager", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("flame", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D);
|
||||
|
|
|
@ -58,20 +58,20 @@ public class BlockRefinery extends BaseContainerBlock
|
|||
@Override
|
||||
public IIcon getIcon(int side, int meta)
|
||||
{
|
||||
if(side == (meta - 7))
|
||||
if (side == (meta - 7))
|
||||
return this.iconFrontActive;
|
||||
if(((meta == 0) && (side == 3)) || (side == meta))
|
||||
if (((meta == 0) && (side == 3)) || (side == meta))
|
||||
return this.iconFront;
|
||||
switch(side)
|
||||
switch (side)
|
||||
{
|
||||
case 0:
|
||||
return this.iconTop; // bottom
|
||||
case 0:
|
||||
return this.iconTop; // bottom
|
||||
|
||||
case 1:
|
||||
return this.iconTop; // top
|
||||
case 1:
|
||||
return this.iconTop; // top
|
||||
|
||||
default:
|
||||
return this.blockIcon; // sides
|
||||
default:
|
||||
return this.blockIcon; // sides
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -82,14 +82,14 @@ public class BlockRefinery extends BaseContainerBlock
|
|||
|
||||
keepInventory = true;
|
||||
|
||||
if(par0)
|
||||
if (par0)
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, var5 + 7, 2);
|
||||
else
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, var5 - 7, 2);
|
||||
|
||||
keepInventory = false;
|
||||
|
||||
if(tileentity != null)
|
||||
if (tileentity != null)
|
||||
{
|
||||
tileentity.validate();
|
||||
par1World.setTileEntity(par2, par3, par4, tileentity);
|
||||
|
@ -101,16 +101,16 @@ public class BlockRefinery extends BaseContainerBlock
|
|||
{
|
||||
int l = MathHelper.floor_double(((living.rotationYaw * 4.0F) / 360.0F) + 0.5D) & 3;
|
||||
|
||||
if(l == 0)
|
||||
if (l == 0)
|
||||
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
|
||||
if(l == 1)
|
||||
if (l == 1)
|
||||
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
||||
|
||||
if(l == 2)
|
||||
if (l == 2)
|
||||
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
|
||||
if(l == 3)
|
||||
if (l == 3)
|
||||
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||
|
||||
super.onBlockPlacedBy(world, x, y, z, living, stack);
|
||||
|
@ -137,13 +137,13 @@ public class BlockRefinery extends BaseContainerBlock
|
|||
@Override
|
||||
public boolean onBlockActivated(World world, int par2, int par3, int par4, EntityPlayer player, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
if(world.isRemote)
|
||||
if (world.isRemote)
|
||||
return true;
|
||||
else
|
||||
{
|
||||
TileRefinery tile = (TileRefinery) world.getTileEntity(par2, par3, par4);
|
||||
|
||||
if((tile == null) || player.isSneaking())
|
||||
if ((tile == null) || player.isSneaking())
|
||||
return false;
|
||||
|
||||
player.openGui(Steamcraft.instance, GuiIDs.REFINERY, world, par2, par3, par4);
|
||||
|
|
|
@ -24,7 +24,9 @@ import steamcraft.common.tiles.TileSawmill;
|
|||
public class BlockSawmill extends BaseContainerBlock
|
||||
{
|
||||
/*
|
||||
* TODO - Only Works on X Axis - Does not support dark oak/acacia wood. - Model - Should take time to saw - Plank blocks share number of planks & meta.
|
||||
* TODO - Only Works on X Axis - Does not support dark oak/acacia wood. -
|
||||
* Model - Should take time to saw - Plank blocks share number of planks &
|
||||
* meta.
|
||||
*/
|
||||
public BlockSawmill(Material mat)
|
||||
{
|
||||
|
@ -42,16 +44,16 @@ public class BlockSawmill extends BaseContainerBlock
|
|||
{
|
||||
int l = MathHelper.floor_double(((living.rotationYaw * 4.0F) / 360.0F) + 0.5D) & 3;
|
||||
|
||||
if(l == 0)
|
||||
if (l == 0)
|
||||
world.setBlockMetadataWithNotify(x, y, z, 0, 2);
|
||||
|
||||
if(l == 1)
|
||||
if (l == 1)
|
||||
world.setBlockMetadataWithNotify(x, y, z, 1, 2);
|
||||
|
||||
if(l == 2)
|
||||
if (l == 2)
|
||||
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
|
||||
if(l == 3)
|
||||
if (l == 3)
|
||||
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||
|
||||
super.onBlockPlacedBy(world, x, y, z, living, stack);
|
||||
|
|
|
@ -51,13 +51,13 @@ public class BlockSteamBoiler extends BlockBaseBoiler
|
|||
@Override
|
||||
public boolean onBlockActivated(World world, int par2, int par3, int par4, EntityPlayer player, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
if(world.isRemote)
|
||||
if (world.isRemote)
|
||||
return true;
|
||||
else
|
||||
{
|
||||
TileSteamBoiler tile = (TileSteamBoiler) world.getTileEntity(par2, par3, par4);
|
||||
|
||||
if((tile == null) || player.isSneaking())
|
||||
if ((tile == null) || player.isSneaking())
|
||||
return false;
|
||||
|
||||
player.openGui(Steamcraft.instance, GuiIDs.STEAM_BOILER, world, par2, par3, par4);
|
||||
|
@ -70,7 +70,7 @@ public class BlockSteamBoiler extends BlockBaseBoiler
|
|||
public void randomDisplayTick(World world, int par2, int par3, int par4, Random par5Random)
|
||||
{
|
||||
int l = world.getBlockMetadata(par2, par3, par4);
|
||||
if(l >= 7)
|
||||
if (l >= 7)
|
||||
{
|
||||
float f = par2 + 0.5F;
|
||||
float f1 = par3 + 0.0F + ((par5Random.nextFloat() * 6.0F) / 16.0F);
|
||||
|
@ -78,22 +78,22 @@ public class BlockSteamBoiler extends BlockBaseBoiler
|
|||
float f3 = 0.52F;
|
||||
float f4 = (par5Random.nextFloat() * 0.6F) - 0.3F;
|
||||
|
||||
if((l == 4) || (l == 11))
|
||||
if ((l == 4) || (l == 11))
|
||||
{
|
||||
world.spawnParticle("smoke", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("flame", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
else if((l == 5) || (l == 12))
|
||||
else if ((l == 5) || (l == 12))
|
||||
{
|
||||
world.spawnParticle("smoke", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("flame", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
else if((l == 2) || (l == 9))
|
||||
else if ((l == 2) || (l == 9))
|
||||
{
|
||||
world.spawnParticle("smoke", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("flame", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
else if((l == 3) || (l == 10))
|
||||
else if ((l == 3) || (l == 10))
|
||||
{
|
||||
world.spawnParticle("smoke", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("flame", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D);
|
||||
|
|
|
@ -16,6 +16,7 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import steamcraft.client.lib.RenderIDs;
|
||||
import steamcraft.common.init.InitBlocks;
|
||||
import steamcraft.common.tiles.TileSteelPipe;
|
||||
|
@ -46,8 +47,8 @@ public class BlockSteelPipe extends BlockCopperPipe
|
|||
@Override
|
||||
public void onNeighborChange(IBlockAccess world, int x, int y, int z, int tileX, int tileY, int tileZ)
|
||||
{
|
||||
if(world.getBlock(tileX, tileY, tileZ) != InitBlocks.blockSteelPipe)
|
||||
{
|
||||
if (world.getBlock(tileX, tileY, tileZ) != InitBlocks.blockSteelPipe)
|
||||
{
|
||||
TileSteelPipe tile = (TileSteelPipe) world.getTileEntity(x, y, z);
|
||||
tile.updateConnections(); // only on server
|
||||
}
|
||||
|
|
|
@ -21,11 +21,13 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import steamcraft.client.lib.RenderIDs;
|
||||
import steamcraft.common.init.InitBlocks;
|
||||
import steamcraft.common.tiles.energy.TileSteelWire;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* @author Decebaldecebal
|
||||
|
@ -53,8 +55,8 @@ public class BlockSteelWire extends BlockCopperWire
|
|||
@Override
|
||||
public void onNeighborChange(IBlockAccess world, int x, int y, int z, int tileX, int tileY, int tileZ)
|
||||
{
|
||||
if(world.getBlock(tileX, tileY, tileZ) != InitBlocks.blockSteelWire)
|
||||
{
|
||||
if (world.getBlock(tileX, tileY, tileZ) != InitBlocks.blockSteelWire)
|
||||
{
|
||||
TileSteelWire tile = (TileSteelWire) world.getTileEntity(x, y, z);
|
||||
tile.updateConnections(); // only on server
|
||||
}
|
||||
|
|
|
@ -48,14 +48,14 @@ public class BlockTurbine extends BaseContainerBlock
|
|||
@Override
|
||||
public IIcon getIcon(int side, int meta)
|
||||
{
|
||||
switch(side)
|
||||
switch (side)
|
||||
{
|
||||
case 1:
|
||||
return this.iconTop; // top
|
||||
case 0:
|
||||
return this.iconTop;
|
||||
default:
|
||||
return this.blockIcon; // sides
|
||||
case 1:
|
||||
return this.iconTop; // top
|
||||
case 0:
|
||||
return this.iconTop;
|
||||
default:
|
||||
return this.blockIcon; // sides
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ public class ForgeHooks
|
|||
|
||||
private static void addCustomFishResults()
|
||||
{
|
||||
for(int i = 0; i < 10; i++)
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
FishingHooks.addJunk(new WeightedRandomFishable(new ItemStack(InitItems.itemBrassParts, 1, i), 25));
|
||||
FishingHooks.addJunk(new WeightedRandomFishable(new ItemStack(InitItems.itemCopperParts, 1, i), 25));
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue