Skip to content

Commit

Permalink
1.7 stuffs
Browse files Browse the repository at this point in the history
- Update tconstruct.util.landmine.Helper
- Update some/all damage sources
- A bit of stuffs in TProxyClient
- Semi-update BehaviorBlockThrow
- Semi-update SpecialStackHandler
  • Loading branch information
fuj1n committed Jan 18, 2014
1 parent bb5ab41 commit baf965d
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 30 deletions.
24 changes: 12 additions & 12 deletions src/main/java/tconstruct/client/TProxyClient.java
Expand Up @@ -52,7 +52,7 @@
public class TProxyClient extends TProxyCommon
{
public static SmallFontRenderer smallFontRenderer;
public static Icon metalBall;
public static IIcon metalBall;
public static Minecraft mc;
public static RenderItem itemRenderer = new RenderItem();

Expand All @@ -63,32 +63,32 @@ public class TProxyClient extends TProxyCommon
public Object getClientGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z)
{
if (ID == toolStationID)
return new ToolStationGui(player.inventory, (ToolStationLogic) world.getBlockTileEntity(x, y, z), world, x, y, z);
return new ToolStationGui(player.inventory, (ToolStationLogic) world.func_147438_o(x, y, z), world, x, y, z);
if (ID == partBuilderID)
return new PartCrafterGui(player.inventory, (PartBuilderLogic) world.getBlockTileEntity(x, y, z), world, x, y, z);
return new PartCrafterGui(player.inventory, (PartBuilderLogic) world.func_147438_o(x, y, z), world, x, y, z);
if (ID == patternChestID)
return new PatternChestGui(player.inventory, (PatternChestLogic) world.getBlockTileEntity(x, y, z), world, x, y, z);
return new PatternChestGui(player.inventory, (PatternChestLogic) world.func_147438_o(x, y, z), world, x, y, z);
if (ID == frypanGuiID)
return new FrypanGui(player.inventory, (FrypanLogic) world.getBlockTileEntity(x, y, z), world, x, y, z);
return new FrypanGui(player.inventory, (FrypanLogic) world.func_147438_o(x, y, z), world, x, y, z);
if (ID == smelteryGuiID)
{
if (PHConstruct.newSmeltery)
return new AdaptiveSmelteryGui(player.inventory, (AdaptiveSmelteryLogic) world.getBlockTileEntity(x, y, z), world, x, y, z);
return new AdaptiveSmelteryGui(player.inventory, (AdaptiveSmelteryLogic) world.func_147438_o(x, y, z), world, x, y, z);
else
return new SmelteryGui(player.inventory, (SmelteryLogic) world.getBlockTileEntity(x, y, z), world, x, y, z);
return new SmelteryGui(player.inventory, (SmelteryLogic) world.func_147438_o(x, y, z), world, x, y, z);
}
if (ID == stencilTableID)
return new StencilTableGui(player.inventory, (StencilTableLogic) world.getBlockTileEntity(x, y, z), world, x, y, z);
return new StencilTableGui(player.inventory, (StencilTableLogic) world.func_147438_o(x, y, z), world, x, y, z);
if (ID == toolForgeID)
return new ToolForgeGui(player.inventory, (ToolForgeLogic) world.getBlockTileEntity(x, y, z), world, x, y, z);
return new ToolForgeGui(player.inventory, (ToolForgeLogic) world.func_147438_o(x, y, z), world, x, y, z);

if (ID == landmineID)
return new GuiLandmine(new ContainerLandmine(player, (TileEntityLandmine) world.getBlockTileEntity(x, y, z)));
return new GuiLandmine(new ContainerLandmine(player, (TileEntityLandmine) world.func_147438_o(x, y, z)));
if (ID == craftingStationID)
return new CraftingStationGui(player.inventory, (CraftingStationLogic) world.getBlockTileEntity(x, y, z), world, x, y, z);
return new CraftingStationGui(player.inventory, (CraftingStationLogic) world.func_147438_o(x, y, z), world, x, y, z);

if (ID == furnaceID)
return new FurnaceGui(player.inventory, (FurnaceLogic) world.getBlockTileEntity(x, y, z));
return new FurnaceGui(player.inventory, (FurnaceLogic) world.func_147438_o(x, y, z));

if (ID == manualGuiID)
{
Expand Down
@@ -1,9 +1,8 @@
package tconstruct.util;

import net.minecraft.util.DamageSource;

import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.ChatMessageComponent;
import net.minecraft.util.DamageSource;
import net.minecraft.util.IChatComponent;

public class DamageSourceFireworkExplode extends DamageSource
{
Expand All @@ -14,9 +13,9 @@ public DamageSourceFireworkExplode(String s)
this.setDamageBypassesArmor();
}

public ChatMessageComponent getDeathMessage (EntityLivingBase par1EntityLivingBase)
public IChatComponent func_151519_b (EntityLivingBase par1EntityLivingBase)
{
return super.getDeathMessage(par1EntityLivingBase);
return super.func_151519_b(par1EntityLivingBase);
}

}
7 changes: 3 additions & 4 deletions src/main/java/tconstruct/util/DamageSourceLandmine.java
@@ -1,9 +1,8 @@
package tconstruct.util;

import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.ChatMessageComponent;
import net.minecraft.util.DamageSource;
import net.minecraft.util.StatCollector;
import net.minecraft.util.IChatComponent;

public class DamageSourceLandmine extends DamageSource
{
Expand All @@ -14,9 +13,9 @@ public DamageSourceLandmine(String s)
this.setDamageBypassesArmor();
}

public ChatMessageComponent getDeathMessage (EntityLivingBase par1EntityLivingBase)
public IChatComponent func_151519_b (EntityLivingBase par1EntityLivingBase)
{
return super.getDeathMessage(par1EntityLivingBase);
return super.func_151519_b(par1EntityLivingBase);
}

}
14 changes: 7 additions & 7 deletions src/main/java/tconstruct/util/landmine/Helper.java
Expand Up @@ -3,7 +3,7 @@
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.common.util.ForgeDirection;

/**
*
Expand Down Expand Up @@ -44,32 +44,32 @@ public static void renderInventoryCube (Block block, int metadata, int modelID,

tessellator.startDrawingQuads();
tessellator.setNormal(0.0F, 1.0F, 0.0F);
renderer.renderFaceYPos(block, 0, 0, 0, renderer.getBlockIconFromSideAndMetadata(block, 1, metadata));
renderer.func_147806_b(block, 0, 0, 0, renderer.func_147787_a(block, 1, metadata));
tessellator.draw();

tessellator.startDrawingQuads();
tessellator.setNormal(0.0F, -1.0F, 0.0F);
renderer.renderFaceYNeg(block, 0, 0, 0, renderer.getBlockIconFromSideAndMetadata(block, 0, metadata));
renderer.func_147768_a(block, 0, 0, 0, renderer.func_147787_a(block, 0, metadata));
tessellator.draw();

tessellator.startDrawingQuads();
tessellator.setNormal(1.0F, 0.0F, 0.0F);
renderer.renderFaceXPos(block, 0, 0, 0, renderer.getBlockIconFromSideAndMetadata(block, 2, metadata));
renderer.func_147764_f(block, 0, 0, 0, renderer.func_147787_a(block, 2, metadata));
tessellator.draw();

tessellator.startDrawingQuads();
tessellator.setNormal(-1.0F, 0.0F, 0.0F);
renderer.renderFaceXNeg(block, 0, 0, 0, renderer.getBlockIconFromSideAndMetadata(block, 3, metadata));
renderer.func_147798_e(block, 0, 0, 0, renderer.func_147787_a(block, 3, metadata));
tessellator.draw();

tessellator.startDrawingQuads();
tessellator.setNormal(0.0F, 0.0F, 1.0F);
renderer.renderFaceZPos(block, 0, 0, 0, renderer.getBlockIconFromSideAndMetadata(block, 4, metadata));
renderer.func_147734_d(block, 0, 0, 0, renderer.func_147787_a(block, 4, metadata));
tessellator.draw();

tessellator.startDrawingQuads();
tessellator.setNormal(0.0F, 0.0F, -1.0F);
renderer.renderFaceZNeg(block, 0, 0, 0, renderer.getBlockIconFromSideAndMetadata(block, 5, metadata));
renderer.func_147761_c(block, 0, 0, 0, renderer.func_147787_a(block, 5, metadata));
tessellator.draw();
}

Expand Down
Expand Up @@ -3,6 +3,7 @@
import java.util.List;

import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityFallingBlock;
import net.minecraft.entity.item.EntityFallingSand;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
Expand Down Expand Up @@ -64,7 +65,7 @@ public void executeLogic (World par1World, int par2, int par3, int par4, ItemSta
break;
}

EntityFallingSand entityfallingsand = new EntityFallingSand(par1World, (double) ((float) par2 + 0.5F), (double) ((float) par3 + 2F), (double) ((float) par4 + 0.5F), par5ItemStack.itemID,
EntityFallingBlock entityfallingsand = new EntityFallingBlock(par1World, (double) ((float) par2 + 0.5F), (double) ((float) par3 + 2F), (double) ((float) par4 + 0.5F), par5ItemStack.itemID,
par5ItemStack.getItemDamage());
entityfallingsand.preventEntitySpawning = false;
entityfallingsand.fallTime = 2;
Expand Down
Expand Up @@ -68,7 +68,7 @@ public final void removeItemFromInventory (World par1World, int x, int y, int z,
return;
}

TileEntityLandmine tileEntity = (TileEntityLandmine) par1World.getBlockTileEntity(x, y, z);
TileEntityLandmine tileEntity = (TileEntityLandmine) par1World.func_147438_o(x, y, z);

while (item.stackSize > 0)
{
Expand Down

0 comments on commit baf965d

Please sign in to comment.