mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 19:59:55 +00:00
TContent refactor Part 1
This commit is contained in:
1 parent
241bfcf0d5
commit
1a74c0768f
77 files changed
+1884
-5647
No files matched your search
@@ -9,7 +9,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import tconstruct.blocks.logic.TileEntityLandmine;
|
||||
import tconstruct.common.TContent;
|
||||
import tconstruct.common.TRepo;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -58,25 +58,25 @@ public class ItemBlockLandmine extends ItemBlock
|
||||
@Override
|
||||
public boolean placeBlockAt (ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata)
|
||||
{
|
||||
if (!world.setBlock(x, y, z, TContent.landmine.blockID, metadata, 3))
|
||||
if (!world.setBlock(x, y, z, TRepo.landmine.blockID, metadata, 3))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (world.getBlockId(x, y, z) == TContent.landmine.blockID)
|
||||
if (world.getBlockId(x, y, z) == TRepo.landmine.blockID)
|
||||
{
|
||||
TContent.landmine.onBlockPlacedBy(world, x, y, z, player, stack);
|
||||
TRepo.landmine.onBlockPlacedBy(world, x, y, z, player, stack);
|
||||
|
||||
TileEntityLandmine te = (TileEntityLandmine) world.getBlockTileEntity(x, y, z);
|
||||
if (te == null)
|
||||
{
|
||||
te = (TileEntityLandmine) TContent.landmine.createTileEntity(world, metadata);
|
||||
te = (TileEntityLandmine) TRepo.landmine.createTileEntity(world, metadata);
|
||||
}
|
||||
|
||||
te.triggerType = stack.getItemDamage();
|
||||
world.setBlockTileEntity(x, y, z, te);
|
||||
|
||||
TContent.landmine.onPostBlockPlaced(world, x, y, z, metadata);
|
||||
TRepo.landmine.onPostBlockPlaced(world, x, y, z, metadata);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -2,7 +2,7 @@ package tconstruct.items.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import tconstruct.common.TContent;
|
||||
import tconstruct.common.TRepo;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -44,7 +44,7 @@ public class OreberryBushItem extends ItemBlock
|
||||
{
|
||||
Block block = Block.blocksList[world.getBlockId(x, y, z)];
|
||||
|
||||
if (block != null && block.canSustainPlant(world, x, y, z, ForgeDirection.UP, (IPlantable) TContent.oreBerry) && world.isAirBlock(x, y + 1, z))
|
||||
if (block != null && block.canSustainPlant(world, x, y, z, ForgeDirection.UP, (IPlantable) TRepo.oreBerry) && world.isAirBlock(x, y + 1, z))
|
||||
{
|
||||
world.setBlock(x, y + 1, z, blockID, stack.getItemDamage() % 4, 3);
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
|
||||
@@ -2,7 +2,7 @@ package tconstruct.items.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import tconstruct.common.TContent;
|
||||
import tconstruct.common.TRepo;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -48,7 +48,7 @@ public class OreberryBushSecondItem extends ItemBlock
|
||||
{
|
||||
Block block = Block.blocksList[world.getBlockId(x, y, z)];
|
||||
|
||||
if (block != null && block.canSustainPlant(world, x, y, z, ForgeDirection.UP, (IPlantable) TContent.oreBerrySecond) && world.isAirBlock(x, y + 1, z))
|
||||
if (block != null && block.canSustainPlant(world, x, y, z, ForgeDirection.UP, (IPlantable) TRepo.oreBerrySecond) && world.isAirBlock(x, y + 1, z))
|
||||
{
|
||||
world.setBlock(x, y + 1, z, blockID, stack.getItemDamage() % 4, 3);
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
|
||||
@@ -4,7 +4,7 @@ import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import tconstruct.common.TContent;
|
||||
import tconstruct.common.TRepo;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -28,7 +28,7 @@ public class SlimeTallGrassItem extends ItemBlock
|
||||
public Icon getIconFromDamage (int meta)
|
||||
{
|
||||
int arr = MathHelper.clamp_int(meta, 0, blockType.length);
|
||||
return TContent.slimeTallGrass.getIcon(0, arr);
|
||||
return TRepo.slimeTallGrass.getIcon(0, arr);
|
||||
}
|
||||
|
||||
public String getUnlocalizedName (ItemStack itemstack)
|
||||
|
||||
Reference in new issue
Block a user