Reformatted all the code using the default intelji formatting options.
This commit is contained in:
parent
2f63a24070
commit
e0ab0af822
363 changed files with 20524 additions and 23016 deletions
|
@ -17,20 +17,17 @@ import java.util.List;
|
|||
|
||||
public class ItemBlockAesu extends ItemBlock {
|
||||
|
||||
public ItemBlockAesu(Block p_i45328_1_)
|
||||
{
|
||||
public ItemBlockAesu(Block p_i45328_1_) {
|
||||
super(p_i45328_1_);
|
||||
}
|
||||
|
||||
@SuppressWarnings(
|
||||
{ "rawtypes", "unchecked" })
|
||||
{"rawtypes", "unchecked"})
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list,
|
||||
boolean par4)
|
||||
{
|
||||
if (stack != null && stack.hasTagCompound())
|
||||
{
|
||||
boolean par4) {
|
||||
if (stack != null && stack.hasTagCompound()) {
|
||||
if (stack.getTagCompound().getCompoundTag("tileEntity") != null)
|
||||
list.add(stack.getTagCompound().getCompoundTag("tileEntity")
|
||||
.getInteger("energy")
|
||||
|
@ -41,20 +38,16 @@ public class ItemBlockAesu 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, ModBlocks.Aesu, metadata, 3))
|
||||
{
|
||||
float hitZ, int metadata) {
|
||||
if (!world.setBlock(x, y, z, ModBlocks.Aesu, metadata, 3)) {
|
||||
return false;
|
||||
}
|
||||
if (world.getBlock(x, y, z) == ModBlocks.Aesu)
|
||||
{
|
||||
if (world.getBlock(x, y, z) == ModBlocks.Aesu) {
|
||||
world.getBlock(x, y, z).onBlockPlacedBy(world, x, y, z, player,
|
||||
stack);
|
||||
world.getBlock(x, y, z).onPostBlockPlaced(world, x, y, z, metadata);
|
||||
}
|
||||
if (stack != null && stack.hasTagCompound())
|
||||
{
|
||||
if (stack != null && stack.hasTagCompound()) {
|
||||
((TileAesu) world.getTileEntity(x, y, z))
|
||||
.readFromNBTWithoutCoords(stack.getTagCompound()
|
||||
.getCompoundTag("tileEntity"));
|
||||
|
@ -63,15 +56,14 @@ public class ItemBlockAesu extends ItemBlock {
|
|||
}
|
||||
|
||||
@SuppressWarnings(
|
||||
{ "rawtypes", "unchecked" })
|
||||
{"rawtypes", "unchecked"})
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList){
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
|
||||
itemList.add(getDropWithNBT(0));
|
||||
itemList.add(getDropWithNBT(1000000000));
|
||||
}
|
||||
|
||||
public ItemStack getDropWithNBT(double energy)
|
||||
{
|
||||
public ItemStack getDropWithNBT(double energy) {
|
||||
NBTTagCompound tileEntity = new NBTTagCompound();
|
||||
ItemStack dropStack = new ItemStack(ModBlocks.Aesu, 1);
|
||||
writeToNBTWithoutCoords(tileEntity, energy);
|
||||
|
@ -80,8 +72,7 @@ public class ItemBlockAesu extends ItemBlock {
|
|||
return dropStack;
|
||||
}
|
||||
|
||||
public void writeToNBTWithoutCoords(NBTTagCompound tagCompound, double energy)
|
||||
{
|
||||
public void writeToNBTWithoutCoords(NBTTagCompound tagCompound, double energy) {
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setDouble("energy", energy);
|
||||
tagCompound.setTag("TilePowerAcceptor", data);
|
||||
|
|
|
@ -10,28 +10,24 @@ import net.minecraft.stats.Achievement;
|
|||
import techreborn.achievement.ICraftAchievement;
|
||||
import techreborn.achievement.IPickupAchievement;
|
||||
|
||||
public class ItemBlockBase extends ItemMultiTexture implements IPickupAchievement, ICraftAchievement
|
||||
{
|
||||
public ItemBlockBase(Block p_i45346_1_, Block p_i45346_2_,
|
||||
String[] p_i45346_3_)
|
||||
{
|
||||
super(p_i45346_1_, p_i45346_2_, p_i45346_3_);
|
||||
}
|
||||
public class ItemBlockBase extends ItemMultiTexture implements IPickupAchievement, ICraftAchievement {
|
||||
public ItemBlockBase(Block p_i45346_1_, Block p_i45346_2_,
|
||||
String[] p_i45346_3_) {
|
||||
super(p_i45346_1_, p_i45346_2_, p_i45346_3_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Achievement getAchievementOnCraft(ItemStack stack,
|
||||
EntityPlayer player, IInventory matrix)
|
||||
{
|
||||
return field_150939_a instanceof ICraftAchievement ? ((ICraftAchievement) field_150939_a)
|
||||
.getAchievementOnCraft(stack, player, matrix) : null;
|
||||
}
|
||||
@Override
|
||||
public Achievement getAchievementOnCraft(ItemStack stack,
|
||||
EntityPlayer player, IInventory matrix) {
|
||||
return field_150939_a instanceof ICraftAchievement ? ((ICraftAchievement) field_150939_a)
|
||||
.getAchievementOnCraft(stack, player, matrix) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Achievement getAchievementOnPickup(ItemStack stack,
|
||||
EntityPlayer player, EntityItem item)
|
||||
{
|
||||
return field_150939_a instanceof IPickupAchievement ? ((IPickupAchievement) field_150939_a)
|
||||
.getAchievementOnPickup(stack, player, item) : null;
|
||||
}
|
||||
@Override
|
||||
public Achievement getAchievementOnPickup(ItemStack stack,
|
||||
EntityPlayer player, EntityItem item) {
|
||||
return field_150939_a instanceof IPickupAchievement ? ((IPickupAchievement) field_150939_a)
|
||||
.getAchievementOnPickup(stack, player, item) : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -14,48 +14,41 @@ import java.util.List;
|
|||
|
||||
public class ItemBlockDigitalChest extends ItemBlock {
|
||||
|
||||
public ItemBlockDigitalChest(Block p_i45328_1_)
|
||||
{
|
||||
super(p_i45328_1_);
|
||||
}
|
||||
public ItemBlockDigitalChest(Block p_i45328_1_) {
|
||||
super(p_i45328_1_);
|
||||
}
|
||||
|
||||
@SuppressWarnings(
|
||||
{ "rawtypes", "unchecked" })
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list,
|
||||
boolean par4)
|
||||
{
|
||||
if (stack != null && stack.hasTagCompound())
|
||||
{
|
||||
if (stack.getTagCompound().getCompoundTag("tileEntity") != null)
|
||||
list.add(stack.getTagCompound().getCompoundTag("tileEntity")
|
||||
.getInteger("storedQuantity")
|
||||
+ " items");
|
||||
}
|
||||
}
|
||||
@SuppressWarnings(
|
||||
{"rawtypes", "unchecked"})
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list,
|
||||
boolean par4) {
|
||||
if (stack != null && stack.hasTagCompound()) {
|
||||
if (stack.getTagCompound().getCompoundTag("tileEntity") != null)
|
||||
list.add(stack.getTagCompound().getCompoundTag("tileEntity")
|
||||
.getInteger("storedQuantity")
|
||||
+ " items");
|
||||
}
|
||||
}
|
||||
|
||||
@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, ModBlocks.digitalChest, metadata, 3))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (world.getBlock(x, y, z) == ModBlocks.digitalChest)
|
||||
{
|
||||
world.getBlock(x, y, z).onBlockPlacedBy(world, x, y, z, player,
|
||||
stack);
|
||||
world.getBlock(x, y, z).onPostBlockPlaced(world, x, y, z, metadata);
|
||||
}
|
||||
if (stack != null && stack.hasTagCompound())
|
||||
{
|
||||
((TileDigitalChest) world.getTileEntity(x, y, z))
|
||||
.readFromNBTWithoutCoords(stack.getTagCompound()
|
||||
.getCompoundTag("tileEntity"));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@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, ModBlocks.digitalChest, metadata, 3)) {
|
||||
return false;
|
||||
}
|
||||
if (world.getBlock(x, y, z) == ModBlocks.digitalChest) {
|
||||
world.getBlock(x, y, z).onBlockPlacedBy(world, x, y, z, player,
|
||||
stack);
|
||||
world.getBlock(x, y, z).onPostBlockPlaced(world, x, y, z, metadata);
|
||||
}
|
||||
if (stack != null && stack.hasTagCompound()) {
|
||||
((TileDigitalChest) world.getTileEntity(x, y, z))
|
||||
.readFromNBTWithoutCoords(stack.getTagCompound()
|
||||
.getCompoundTag("tileEntity"));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,10 +7,9 @@ import techreborn.init.ModBlocks;
|
|||
|
||||
public class ItemBlockMachineCasing extends ItemMultiTexture {
|
||||
|
||||
public ItemBlockMachineCasing(Block block)
|
||||
{
|
||||
super(ModBlocks.MachineCasing, ModBlocks.MachineCasing,
|
||||
BlockMachineCasing.types);
|
||||
}
|
||||
public ItemBlockMachineCasing(Block block) {
|
||||
super(ModBlocks.MachineCasing, ModBlocks.MachineCasing,
|
||||
BlockMachineCasing.types);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -6,9 +6,8 @@ import techreborn.init.ModBlocks;
|
|||
|
||||
public class ItemBlockOre extends ItemBlockBase {
|
||||
|
||||
public ItemBlockOre(Block block)
|
||||
{
|
||||
super(ModBlocks.ore, ModBlocks.ore, BlockOre.types);
|
||||
}
|
||||
|
||||
public ItemBlockOre(Block block) {
|
||||
super(ModBlocks.ore, ModBlocks.ore, BlockOre.types);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -14,48 +14,41 @@ import java.util.List;
|
|||
|
||||
public class ItemBlockQuantumChest extends ItemBlock {
|
||||
|
||||
public ItemBlockQuantumChest(Block p_i45328_1_)
|
||||
{
|
||||
super(p_i45328_1_);
|
||||
}
|
||||
public ItemBlockQuantumChest(Block p_i45328_1_) {
|
||||
super(p_i45328_1_);
|
||||
}
|
||||
|
||||
@SuppressWarnings(
|
||||
{ "rawtypes", "unchecked" })
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list,
|
||||
boolean par4)
|
||||
{
|
||||
if (stack != null && stack.hasTagCompound())
|
||||
{
|
||||
if (stack.getTagCompound().getCompoundTag("tileEntity") != null)
|
||||
list.add(stack.getTagCompound().getCompoundTag("tileEntity")
|
||||
.getInteger("storedQuantity")
|
||||
+ " items");
|
||||
}
|
||||
}
|
||||
@SuppressWarnings(
|
||||
{"rawtypes", "unchecked"})
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list,
|
||||
boolean par4) {
|
||||
if (stack != null && stack.hasTagCompound()) {
|
||||
if (stack.getTagCompound().getCompoundTag("tileEntity") != null)
|
||||
list.add(stack.getTagCompound().getCompoundTag("tileEntity")
|
||||
.getInteger("storedQuantity")
|
||||
+ " items");
|
||||
}
|
||||
}
|
||||
|
||||
@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, ModBlocks.quantumChest, metadata, 3))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (world.getBlock(x, y, z) == ModBlocks.quantumChest)
|
||||
{
|
||||
world.getBlock(x, y, z).onBlockPlacedBy(world, x, y, z, player,
|
||||
stack);
|
||||
world.getBlock(x, y, z).onPostBlockPlaced(world, x, y, z, metadata);
|
||||
}
|
||||
if (stack != null && stack.hasTagCompound())
|
||||
{
|
||||
((TileQuantumChest) world.getTileEntity(x, y, z))
|
||||
.readFromNBTWithoutCoords(stack.getTagCompound()
|
||||
.getCompoundTag("tileEntity"));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@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, ModBlocks.quantumChest, metadata, 3)) {
|
||||
return false;
|
||||
}
|
||||
if (world.getBlock(x, y, z) == ModBlocks.quantumChest) {
|
||||
world.getBlock(x, y, z).onBlockPlacedBy(world, x, y, z, player,
|
||||
stack);
|
||||
world.getBlock(x, y, z).onPostBlockPlaced(world, x, y, z, metadata);
|
||||
}
|
||||
if (stack != null && stack.hasTagCompound()) {
|
||||
((TileQuantumChest) world.getTileEntity(x, y, z))
|
||||
.readFromNBTWithoutCoords(stack.getTagCompound()
|
||||
.getCompoundTag("tileEntity"));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,32 +10,27 @@ import techreborn.tiles.TileQuantumTank;
|
|||
|
||||
public class ItemBlockQuantumTank extends ItemBlock {
|
||||
|
||||
public ItemBlockQuantumTank(Block block)
|
||||
{
|
||||
super(block);
|
||||
}
|
||||
public ItemBlockQuantumTank(Block block) {
|
||||
super(block);
|
||||
}
|
||||
|
||||
@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, ModBlocks.quantumTank, metadata, 3))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (world.getBlock(x, y, z) == ModBlocks.quantumTank)
|
||||
{
|
||||
world.getBlock(x, y, z).onBlockPlacedBy(world, x, y, z, player,
|
||||
stack);
|
||||
world.getBlock(x, y, z).onPostBlockPlaced(world, x, y, z, metadata);
|
||||
}
|
||||
if (stack != null && stack.hasTagCompound())
|
||||
{
|
||||
((TileQuantumTank) world.getTileEntity(x, y, z))
|
||||
.readFromNBTWithoutCoords(stack.getTagCompound()
|
||||
.getCompoundTag("tileEntity"));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@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, ModBlocks.quantumTank, metadata, 3)) {
|
||||
return false;
|
||||
}
|
||||
if (world.getBlock(x, y, z) == ModBlocks.quantumTank) {
|
||||
world.getBlock(x, y, z).onBlockPlacedBy(world, x, y, z, player,
|
||||
stack);
|
||||
world.getBlock(x, y, z).onPostBlockPlaced(world, x, y, z, metadata);
|
||||
}
|
||||
if (stack != null && stack.hasTagCompound()) {
|
||||
((TileQuantumTank) world.getTileEntity(x, y, z))
|
||||
.readFromNBTWithoutCoords(stack.getTagCompound()
|
||||
.getCompoundTag("tileEntity"));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,9 +6,8 @@ import techreborn.init.ModBlocks;
|
|||
|
||||
public class ItemBlockStorage extends ItemBlockBase {
|
||||
|
||||
public ItemBlockStorage(Block block)
|
||||
{
|
||||
super(ModBlocks.storage, ModBlocks.storage, BlockStorage.types);
|
||||
}
|
||||
public ItemBlockStorage(Block block) {
|
||||
super(ModBlocks.storage, ModBlocks.storage, BlockStorage.types);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -6,8 +6,7 @@ import techreborn.init.ModBlocks;
|
|||
|
||||
public class ItemBlockStorage2 extends ItemBlockBase {
|
||||
|
||||
public ItemBlockStorage2(Block block)
|
||||
{
|
||||
public ItemBlockStorage2(Block block) {
|
||||
super(ModBlocks.storage2, ModBlocks.storage2, BlockStorage2.types);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue