Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
progwml6 committed Jan 15, 2014
1 parent dc968ae commit dfcc6e9
Show file tree
Hide file tree
Showing 17 changed files with 32 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/blocks/DryingRack.java
Expand Up @@ -34,7 +34,7 @@ public DryingRack()
}

@Override
public TileEntity createTileEntity (World world, int metadata)
public TileEntity func_149915_a (World world, int metadata)
{
return new DryingRackLogic();
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/tconstruct/blocks/EquipBlock.java
Expand Up @@ -76,7 +76,7 @@ public int idDropped (int par1, Random par2Random, int par3)
}

@Override
public TileEntity createTileEntity (World world, int metadata)
public TileEntity func_149915_a (World world, int metadata)
{
return new FrypanLogic();
}
Expand Down Expand Up @@ -184,4 +184,5 @@ public Object getModInstance ()
{
return TConstruct.instance;
}

}
4 changes: 2 additions & 2 deletions src/main/java/tconstruct/blocks/FurnaceSlab.java
Expand Up @@ -21,12 +21,12 @@ public class FurnaceSlab extends InventorySlab
public FurnaceSlab(Material material)
{
super(material);
this.setCreativeTab(TConstructRegistry.blockTab);
this.func_149647_a(TConstructRegistry.blockTab);
this.setHardness(3.5f);
}

@Override
public TileEntity createTileEntity (World world, int metadata)
public TileEntity func_149915_a (World world, int metadata)
{
switch (metadata % 8)
{
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/tconstruct/blocks/LavaTankBlock.java
Expand Up @@ -150,7 +150,7 @@ public int getTextureIndex (int side)
}

@Override
public TileEntity createTileEntity (World world, int metadata)
public TileEntity func_149915_a (World world, int metadata)
{
return new LavaTankLogic();
}
Expand Down Expand Up @@ -232,7 +232,7 @@ public static ItemStack consumeItem (ItemStack stack)
@Override
public TileEntity createNewTileEntity (World world)
{
return createTileEntity(world, 0);
return func_149915_a(world, 0);
}

@Override
Expand Down Expand Up @@ -291,7 +291,7 @@ protected void dropTankBlock (World world, int x, int y, int z, ItemStack stack)
double d1 = (double) (world.rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
double d2 = (double) (world.rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
EntityItem entityitem = new EntityItem(world, (double) x + d0, (double) y + d1, (double) z + d2, stack);
entityitem.delayBeforeCanPickup = 10;
entityitem.field_145804_b = 10;
world.spawnEntityInWorld(entityitem);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/blocks/SmelteryBlock.java
Expand Up @@ -228,7 +228,7 @@ public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer
}

@Override
public TileEntity createTileEntity (World world, int metadata)
public TileEntity func_149915_a (World world, int metadata)
{
switch (metadata)
{
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/tconstruct/blocks/TankAirBlock.java
Expand Up @@ -28,7 +28,7 @@ public TankAirBlock(Material material)
}

@Override
public TileEntity createNewTileEntity (World world)
public TileEntity func_149915_a (World world, int i)
{
return new TankAirLogic();
}
Expand Down Expand Up @@ -104,4 +104,5 @@ public boolean isAirBlock (World world, int x, int y, int z)
public void getSubBlocks (int id, CreativeTabs tab, List list)
{
}

}
2 changes: 2 additions & 0 deletions src/main/java/tconstruct/blocks/logic/TankAirLogic.java
Expand Up @@ -191,4 +191,6 @@ public Packet getDescriptionPacket ()
writeNetworkNBT(tag);
return new Packet132TileEntityData(field_145851_c, field_145848_d, field_145849_e, 1, tag);
}


}
5 changes: 3 additions & 2 deletions src/main/java/tconstruct/blocks/slime/SlimeLeaves.java
Expand Up @@ -7,6 +7,7 @@
import net.minecraft.block.BlockLeaves;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
Expand All @@ -29,7 +30,7 @@ public class SlimeLeaves extends BlockLeaves
public SlimeLeaves()
{
super();
setCreativeTab(TConstructRegistry.blockTab);
func_149647_a(TConstructRegistry.blockTab);
setLightOpacity(1);
this.func_149711_c(0.3f);
}
Expand Down Expand Up @@ -77,7 +78,7 @@ public IIcon getIcon (int side, int meta)
}

@Override
public void getSubBlocks (Block b, CreativeTabs tab, List list)
public void getSubBlocks (Item b, CreativeTabs tab, List list)
{
for (int iter = 0; iter < fastIcons.length; iter++)
{
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/tconstruct/common/TRecipes.java
Expand Up @@ -892,9 +892,9 @@ public void oreRegistry ()
OreDictionary.registerOre(glassTypes[15 - i], new ItemStack(TRepo.stainedGlassClear, 1, i));
}

BlockDispenser.dispenseBehaviorRegistry.putObject(TRepo.titleIcon, new TDispenserBehaviorSpawnEgg());
BlockDispenser.field_149943_a.putObject(TRepo.titleIcon, new TDispenserBehaviorSpawnEgg());

BlockDispenser.dispenseBehaviorRegistry.putObject(TRepo.arrow, new TDispenserBehaviorArrow());
BlockDispenser.field_149943_a.putObject(TRepo.arrow, new TDispenserBehaviorArrow());

//Vanilla stuff
OreDictionary.registerOre("slimeball", new ItemStack(Items.slime_ball));
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/items/blocks/WoolSlab1Item.java
Expand Up @@ -24,7 +24,7 @@ public WoolSlab1Item(Block b)
@Override
public boolean onItemUse (ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
{
int id = world.getBlockId(x, y, z);
int id = world.getBlock(x, y, z);
int meta = world.getBlockMetadata(x, y, z);
int trueMeta = meta % 8;
boolean flag = (id & 8) != 0;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/tconstruct/library/armor/ArmorCore.java
Expand Up @@ -36,7 +36,7 @@ public ArmorCore(int baseProtection, EnumArmorPart part)
this.setUnlocalizedName(SET_NAME);
this.armorPart = part;
this.baseProtection = baseProtection;
BlockDispenser.dispenseBehaviorRegistry.putObject(this, dispenserBehavior);
BlockDispenser.field_149943_a.putObject(this, dispenserBehavior);
}

public String getArmorName ()
Expand Down Expand Up @@ -92,7 +92,7 @@ public void damageArmor (EntityLivingBase entity, ItemStack stack, DamageSource
tags = new NBTTagCompound();
stack.setTagCompound(tags);
data = new NBTTagCompound();
tags.setCompoundTag(SET_NAME, data);
tags.setTag(SET_NAME, data);
data.setInteger("damageReduction", baseProtection);
data.setInteger("maxAbsorb", baseProtection);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/library/tools/AbilityHelper.java
Expand Up @@ -604,7 +604,7 @@ public static EntityItem addItemStackToWorld (World world, float f, float f1, fl
float f6 = random.nextFloat() * f3 + (1.0F - f3) * 0.5F;
entityitem = new EntityItem(world, f + f4, f1 + f5, f2 + f6, itemstack);
}
entityitem.delayBeforeCanPickup = 10;
entityitem.field_145804_b = 10;
world.spawnEntityInWorld(entityitem);
return entityitem;
}
Expand Down
Expand Up @@ -89,7 +89,7 @@ public boolean beforeBlockBreak (ToolCore tool, ItemStack stack, int x, int y, i
}
EntityItem entityitem = new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, spawnme);

entityitem.delayBeforeCanPickup = 10;
entityitem.field_145804_b = 10;
world.spawnEntityInWorld(entityitem);
world.playAuxSFX(2001, x, y, z, bID + (meta << 12));

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/tconstruct/util/EnvironmentGui.java
Expand Up @@ -43,15 +43,15 @@ public void initGui ()
/**
* Called when the screen is unloaded. Used to disable keyboard repeat events
*/
public void onGuiClosed ()
public void func_146281_b ()
{
Keyboard.enableRepeatEvents(false);
}

/**
* Fired when a control is clicked. This is the equivalent of ActionListener.actionPerformed(ActionEvent e).
*/
protected void actionPerformed (GuiButton button)
protected void func_146284_a (GuiButton button)
{
if (button.field_146124_l)
{
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/tconstruct/util/TEventHandler.java
Expand Up @@ -283,15 +283,15 @@ public void onLivingDrop (LivingDropsEvent event)
{
ItemStack dropStack = new ItemStack(TRepo.heartCanister, 1, 1);
EntityItem entityitem = new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, dropStack);
entityitem.delayBeforeCanPickup = 10;
entityitem.field_145804_b = 10;
event.drops.add(entityitem);
}

if (event.entityLiving instanceof EntityWither && random.nextInt(5) == 0)
{
ItemStack dropStack = new ItemStack(TRepo.heartCanister, 1, 1);
EntityItem entityitem = new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, dropStack);
entityitem.delayBeforeCanPickup = 10;
entityitem.field_145804_b = 10;
event.drops.add(entityitem);
}

Expand Down Expand Up @@ -476,7 +476,7 @@ public void onLivingDeath (LivingDeathEvent event)
void addDrops (LivingDropsEvent event, ItemStack dropStack)
{
EntityItem entityitem = new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, dropStack);
entityitem.delayBeforeCanPickup = 10;
entityitem.field_145804_b = 10;
event.drops.add(entityitem);
}

Expand Down
Expand Up @@ -2,8 +2,9 @@

import java.util.List;

import mantle.blocks.BlockUtils;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityFallingSand;
import net.minecraft.entity.item.EntityFallingBlock;
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.getItem(),
EntityFallingBlock entityfallingsand = new EntityFallingBlock(par1World, (double) ((float) par2 + 0.5F), (double) ((float) par3 + 2F), (double) ((float) par4 + 0.5F), BlockUtils.getBlockFromItemStack(par5ItemStack),
par5ItemStack.getItemDamage());
entityfallingsand.preventEntitySpawning = false;
entityfallingsand.fallTime = 2;
Expand Down
Expand Up @@ -83,7 +83,7 @@ protected void dropItem (World par1World, int par2, int par3, int par4, ItemStac
double d1 = (double) (par1World.rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
double d2 = (double) (par1World.rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
EntityItem entityitem = new EntityItem(par1World, (double) par2 + d0, (double) par3 + d1, (double) par4 + d2, par5ItemStack);
entityitem.delayBeforeCanPickup = 10;
entityitem.field_145804_b = 10;
par1World.spawnEntityInWorld(entityitem);
}
}
Expand Down

0 comments on commit dfcc6e9

Please sign in to comment.