[ci skip] spotlessApply with the new settings

This commit is contained in:
Jason Mitchell committed 2023-01-28 18:04:28 -08:00
1 parent 83698cb73c
commit 84c2239244
561 files changed
+8872 -9300

No files matched your search

@@ -1,7 +1,7 @@
package tconstruct.tools.blocks;
import cpw.mods.fml.relauncher.*;
import java.util.List;
import net.minecraft.block.material.Material;
import net.minecraft.entity.*;
import net.minecraft.entity.player.EntityPlayer;
@@ -9,8 +9,10 @@ import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.*;
import net.minecraft.world.*;
import tconstruct.tools.logic.BattlesignLogic;
import tconstruct.tools.model.BattlesignRender;
import cpw.mods.fml.relauncher.*;
public class BattlesignBlock extends EquipBlock {
@@ -27,23 +29,14 @@ public class BattlesignBlock extends EquipBlock {
@SideOnly(Side.CLIENT)
@Override
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_5_ == 0 && this.minY > 0.0D
|| (p_149646_5_ == 1 && this.maxY < 1.0D
|| (p_149646_5_ == 2 && this.minZ > 0.0D
|| (p_149646_5_ == 3 && this.maxZ < 1.0D
|| (p_149646_5_ == 4 && this.minX > 0.0D
|| (p_149646_5_ == 5 && this.maxX < 1.0D
|| !(p_149646_1_
.getBlock(p_149646_2_, p_149646_3_, p_149646_4_)
.isOpaqueCube()
&& p_149646_1_
.getBlock(
p_149646_2_,
p_149646_3_ + 1,
p_149646_4_)
.isOpaqueCube()))))));
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_5_ == 0 && this.minY > 0.0D || (p_149646_5_ == 1 && this.maxY < 1.0D || (p_149646_5_ == 2
&& this.minZ > 0.0D
|| (p_149646_5_ == 3 && this.maxZ < 1.0D || (p_149646_5_ == 4 && this.minX > 0.0D || (p_149646_5_ == 5
&& this.maxX < 1.0D
|| !(p_149646_1_.getBlock(p_149646_2_, p_149646_3_, p_149646_4_).isOpaqueCube()
&& p_149646_1_.getBlock(p_149646_2_, p_149646_3_ + 1, p_149646_4_).isOpaqueCube()))))));
}
@Override
@@ -52,12 +45,7 @@ public class BattlesignBlock extends EquipBlock {
}
@Override
public void onBlockPlacedBy(
World par1World,
int par2,
int par3,
int par4,
EntityLivingBase par5EntityLivingBase,
public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase,
ItemStack par6ItemStack) {
super.onBlockPlacedBy(par1World, par2, par3, par4, par5EntityLivingBase, par6ItemStack);
int i3 = MathHelper.floor_double((par5EntityLivingBase.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
@@ -100,8 +88,8 @@ public class BattlesignBlock extends EquipBlock {
}
@Override
public void addCollisionBoxesToList(
World world, int x, int y, int z, AxisAlignedBB aabb, List list, Entity entity) {
public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB aabb, List list,
Entity entity) {
setBlockBoundsBasedOnState(world, x, y, z);
super.addCollisionBoxesToList(world, x, y, z, aabb, list, entity);
@@ -1,8 +1,9 @@
package tconstruct.tools.blocks;
import cpw.mods.fml.relauncher.*;
import java.util.List;
import mantle.blocks.abstracts.InventorySlab;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
@@ -14,13 +15,16 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.*;
import net.minecraft.world.World;
import tconstruct.TConstruct;
import tconstruct.library.TConstructRegistry;
import tconstruct.tools.*;
import tconstruct.tools.logic.*;
import tconstruct.util.config.PHConstruct;
import cpw.mods.fml.relauncher.*;
public class CraftingSlab extends InventorySlab {
public CraftingSlab(Material material) {
super(material);
this.setCreativeTab(TConstructRegistry.blockTab);
@@ -31,26 +35,11 @@ public class CraftingSlab extends InventorySlab {
/* Rendering */
@Override
public String[] getTextureNames() {
return new String[] {
"craftingstation_top",
"craftingstation_slab_side",
"craftingstation_bottom",
"toolstation_top",
"toolstation_slab_side",
"toolstation_bottom",
"partbuilder_oak_top",
"partbuilder_slab_side",
"partbuilder_oak_bottom",
"stenciltable_oak_top",
"stenciltable_slab_side",
"stenciltable_oak_bottom",
"patternchest_top",
"patternchest_slab_side",
"patternchest_bottom",
"toolforge_top",
"toolforge_slab_side",
"toolforge_top"
};
return new String[] { "craftingstation_top", "craftingstation_slab_side", "craftingstation_bottom",
"toolstation_top", "toolstation_slab_side", "toolstation_bottom", "partbuilder_oak_top",
"partbuilder_slab_side", "partbuilder_oak_bottom", "stenciltable_oak_top", "stenciltable_slab_side",
"stenciltable_oak_bottom", "patternchest_top", "patternchest_slab_side", "patternchest_bottom",
"toolforge_top", "toolforge_slab_side", "toolforge_top" };
}
@Override
@@ -74,14 +63,13 @@ public class CraftingSlab extends InventorySlab {
@Override
public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z) {
int metadata = world.getBlockMetadata(x, y, z);
if (metadata == 5)
return AxisAlignedBB.getBoundingBox(
(double) x + this.minX,
(double) y + this.minY,
(double) z + this.minZ,
(double) x + this.maxX,
(double) y + this.maxY - 0.125,
(double) z + this.maxZ);
if (metadata == 5) return AxisAlignedBB.getBoundingBox(
(double) x + this.minX,
(double) y + this.minY,
(double) z + this.minZ,
(double) x + this.maxX,
(double) y + this.maxY - 0.125,
(double) z + this.maxZ);
return AxisAlignedBB.getBoundingBox(
(double) x + this.minX,
(double) y + this.minY,
@@ -218,8 +206,12 @@ public class CraftingSlab extends InventorySlab {
double d0 = (double) (world.rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
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, chest);
EntityItem entityitem = new EntityItem(
world,
(double) x + d0,
(double) y + d1,
(double) z + d2,
chest);
entityitem.delayBeforeCanPickup = 10;
world.spawnEntityInWorld(entityitem);
}
@@ -1,8 +1,9 @@
package tconstruct.tools.blocks;
import cpw.mods.fml.relauncher.*;
import java.util.List;
import mantle.blocks.abstracts.InventoryBlock;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
@@ -11,13 +12,16 @@ import net.minecraft.item.*;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.*;
import tconstruct.TConstruct;
import tconstruct.library.TConstructRegistry;
import tconstruct.tools.ToolProxyCommon;
import tconstruct.tools.logic.CraftingStationLogic;
import tconstruct.tools.model.TableRender;
import cpw.mods.fml.relauncher.*;
public class CraftingStationBlock extends InventoryBlock {
public CraftingStationBlock(Material material) {
super(material);
this.setCreativeTab(TConstructRegistry.blockTab);
@@ -30,7 +34,7 @@ public class CraftingStationBlock extends InventoryBlock {
/* Rendering */
@Override
public String[] getTextureNames() {
return new String[] {"craftingstation_top", "craftingstation_side", "craftingstation_bottom"};
return new String[] { "craftingstation_top", "craftingstation_side", "craftingstation_bottom" };
}
@Override
@@ -1,8 +1,9 @@
package tconstruct.tools.blocks;
import cpw.mods.fml.relauncher.*;
import java.util.Random;
import mantle.blocks.abstracts.InventoryBlock;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -15,11 +16,13 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.*;
import net.minecraft.world.*;
import tconstruct.TConstruct;
import tconstruct.library.TConstructRegistry;
import tconstruct.tools.ToolProxyCommon;
import tconstruct.tools.logic.*;
import tconstruct.tools.model.FrypanRender;
import cpw.mods.fml.relauncher.*;
public class EquipBlock extends InventoryBlock {
@@ -32,7 +35,7 @@ public class EquipBlock extends InventoryBlock {
@Override
public String[] getTextureNames() {
return new String[] {"toolstation_top"};
return new String[] { "toolstation_top" };
}
@Override
@@ -91,12 +94,7 @@ public class EquipBlock extends InventoryBlock {
}
@Override
public void onBlockPlacedBy(
World par1World,
int par2,
int par3,
int par4,
EntityLivingBase par5EntityLivingBase,
public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase,
ItemStack par6ItemStack) {
super.onBlockPlacedBy(par1World, par2, par3, par4, par5EntityLivingBase, par6ItemStack);
int i3 = MathHelper.floor_double((par5EntityLivingBase.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
@@ -150,8 +148,7 @@ public class EquipBlock extends InventoryBlock {
new ItemStack(stack.getItem(), itemSize, stack.getItemDamage()));
if (stack.hasTagCompound()) {
entityitem.getEntityItem().setTagCompound((NBTTagCompound)
stack.getTagCompound().copy());
entityitem.getEntityItem().setTagCompound((NBTTagCompound) stack.getTagCompound().copy());
}
float offset = 0.05F;
@@ -190,9 +187,7 @@ public class EquipBlock extends InventoryBlock {
if (te instanceof EquipLogic) {
EquipLogic logic = (EquipLogic) te;
ItemStack stack = logic.getEquipmentItem();
if (stack != null
&& stack.hasTagCompound()
&& stack.getTagCompound().hasKey("InfiTool")) {
if (stack != null && stack.hasTagCompound() && stack.getTagCompound().hasKey("InfiTool")) {
NBTTagCompound tag = stack.getTagCompound().getCompoundTag("InfiTool");
if (tag != null) {
@@ -1,19 +1,22 @@
package tconstruct.tools.blocks;
import cpw.mods.fml.relauncher.*;
import java.util.Random;
import mantle.blocks.abstracts.InventorySlab;
import mantle.blocks.iface.*;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.*;
import tconstruct.TConstruct;
import tconstruct.library.TConstructRegistry;
import tconstruct.tools.ToolProxyCommon;
import tconstruct.tools.logic.FurnaceLogic;
import cpw.mods.fml.relauncher.*;
public class FurnaceSlab extends InventorySlab {
@@ -43,7 +46,7 @@ public class FurnaceSlab extends InventorySlab {
@Override
public String[] getTextureNames() {
return new String[] {"furnaceslab_front", "furnaceslab_front_active", "furnaceslab_side", "furnace_top"};
return new String[] { "furnaceslab_front", "furnaceslab_front_active", "furnaceslab_side", "furnace_top" };
}
@Override
@@ -1,31 +1,20 @@
package tconstruct.tools.blocks;
import cpw.mods.fml.relauncher.*;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.init.Blocks;
import net.minecraft.util.*;
import net.minecraft.world.*;
import tconstruct.blocks.TConstructBlock;
import cpw.mods.fml.relauncher.*;
public class MultiBrick extends TConstructBlock {
static String[] blockTextures = {
"brick_obsidian",
"brick_sandstone",
"brick_netherrack",
"brick_stone_refined",
"brick_iron",
"brick_gold",
"brick_lapis",
"brick_diamond",
"brick_redstone",
"brick_bone",
"brick_slime",
"brick_blueslime",
"brick_endstone",
"brick_obsidian_ingot"
};
static String[] blockTextures = { "brick_obsidian", "brick_sandstone", "brick_netherrack", "brick_stone_refined",
"brick_iron", "brick_gold", "brick_lapis", "brick_diamond", "brick_redstone", "brick_bone", "brick_slime",
"brick_blueslime", "brick_endstone", "brick_obsidian_ingot" };
public MultiBrick() {
super(Material.rock, 3f, blockTextures);
@@ -67,46 +56,46 @@ public class MultiBrick extends TConstructBlock {
}
@Override
public float getExplosionResistance(
Entity entity, World world, int x, int y, int z, double explosionX, double explosionY, double explosionZ) {
public float getExplosionResistance(Entity entity, World world, int x, int y, int z, double explosionX,
double explosionY, double explosionZ) {
int meta = world.getBlockMetadata(x, y, z);
switch (meta) {
case 0:
case 13:
return Blocks.obsidian.getExplosionResistance(
entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
return Blocks.obsidian
.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
case 1:
return Blocks.sandstone.getExplosionResistance(
entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
return Blocks.sandstone
.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
case 2:
return Blocks.netherrack.getExplosionResistance(
entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
return Blocks.netherrack
.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
case 3:
return Blocks.stone.getExplosionResistance(
entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
return Blocks.stone
.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
case 4:
return Blocks.iron_block.getExplosionResistance(
entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
return Blocks.iron_block
.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
case 5:
return Blocks.gold_block.getExplosionResistance(
entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
return Blocks.gold_block
.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
case 6:
return Blocks.lapis_block.getExplosionResistance(
entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
return Blocks.lapis_block
.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
case 7:
return Blocks.diamond_block.getExplosionResistance(
entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
return Blocks.diamond_block
.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
case 8:
return Blocks.redstone_block.getExplosionResistance(
entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
return Blocks.redstone_block
.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
case 9:
return 1.0F;
case 10:
case 11:
return 1.5F;
case 12:
return Blocks.end_stone.getExplosionResistance(
entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
return Blocks.end_stone
.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
default:
return getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
}
@@ -1,33 +1,21 @@
package tconstruct.tools.blocks;
import cpw.mods.fml.relauncher.*;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.init.Blocks;
import net.minecraft.util.*;
import net.minecraft.world.*;
import tconstruct.blocks.TConstructBlock;
import cpw.mods.fml.relauncher.*;
public class MultiBrickFancy extends TConstructBlock {
static String[] blockTextures = {
"fancybrick_obsidian",
"fancybrick_sandstone",
"fancybrick_netherrack",
"fancybrick_stone_refined",
"fancybrick_iron",
"fancybrick_gold",
"fancybrick_lapis",
"fancybrick_diamond",
"fancybrick_redstone",
"fancybrick_bone",
"fancybrick_slime",
"fancybrick_blueslime",
"fancybrick_endstone",
"fancybrick_obsidian_ingot",
"fancybrick_stone",
"road_stone"
};
static String[] blockTextures = { "fancybrick_obsidian", "fancybrick_sandstone", "fancybrick_netherrack",
"fancybrick_stone_refined", "fancybrick_iron", "fancybrick_gold", "fancybrick_lapis", "fancybrick_diamond",
"fancybrick_redstone", "fancybrick_bone", "fancybrick_slime", "fancybrick_blueslime", "fancybrick_endstone",
"fancybrick_obsidian_ingot", "fancybrick_stone", "road_stone" };
public MultiBrickFancy() {
super(Material.rock, 3f, blockTextures);
@@ -72,48 +60,48 @@ public class MultiBrickFancy extends TConstructBlock {
}
@Override
public float getExplosionResistance(
Entity entity, World world, int x, int y, int z, double explosionX, double explosionY, double explosionZ) {
public float getExplosionResistance(Entity entity, World world, int x, int y, int z, double explosionX,
double explosionY, double explosionZ) {
int meta = world.getBlockMetadata(x, y, z);
switch (meta) {
case 0:
case 13:
return Blocks.obsidian.getExplosionResistance(
entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
return Blocks.obsidian
.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
case 1:
return Blocks.sandstone.getExplosionResistance(
entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
return Blocks.sandstone
.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
case 2:
return Blocks.netherrack.getExplosionResistance(
entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
return Blocks.netherrack
.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
case 4:
return Blocks.iron_block.getExplosionResistance(
entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
return Blocks.iron_block
.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
case 5:
return Blocks.gold_block.getExplosionResistance(
entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
return Blocks.gold_block
.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
case 6:
return Blocks.lapis_block.getExplosionResistance(
entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
return Blocks.lapis_block
.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
case 7:
return Blocks.diamond_block.getExplosionResistance(
entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
return Blocks.diamond_block
.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
case 8:
return Blocks.redstone_block.getExplosionResistance(
entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
return Blocks.redstone_block
.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
case 9:
return 1.0F;
case 10:
case 11:
return 1.5F;
case 12:
return Blocks.end_stone.getExplosionResistance(
entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
return Blocks.end_stone
.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
case 3:
case 14:
case 15:
return Blocks.stone.getExplosionResistance(
entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
return Blocks.stone
.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
default:
return getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
}
@@ -1,24 +1,18 @@
package tconstruct.tools.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
import tconstruct.blocks.TConstructBlock;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class MultiBrickMetal extends TConstructBlock {
static String[] blockTextures = {
"brick_alumite",
"brick_ardite",
"brick_cobalt",
"brick_manyullyn",
"fancybrick_alumite",
"fancybrick_ardite",
"fancybrick_cobalt",
"fancybrick_manyullyn"
};
static String[] blockTextures = { "brick_alumite", "brick_ardite", "brick_cobalt", "brick_manyullyn",
"fancybrick_alumite", "fancybrick_ardite", "fancybrick_cobalt", "fancybrick_manyullyn" };
public MultiBrickMetal() {
super(Material.iron, 10f, blockTextures);
@@ -1,8 +1,9 @@
package tconstruct.tools.blocks;
import cpw.mods.fml.relauncher.*;
import java.util.List;
import mantle.blocks.abstracts.InventoryBlock;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -14,12 +15,14 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.*;
import net.minecraftforge.common.util.ForgeDirection;
import tconstruct.TConstruct;
import tconstruct.library.TConstructRegistry;
import tconstruct.tools.ToolProxyCommon;
import tconstruct.tools.logic.ToolForgeLogic;
import tconstruct.tools.model.TableRender;
import tconstruct.world.TinkerWorld;
import cpw.mods.fml.relauncher.*;
public class ToolForgeBlock extends InventoryBlock {
@@ -30,22 +33,9 @@ public class ToolForgeBlock extends InventoryBlock {
this.setStepSound(Block.soundTypeMetal);
}
String[] textureNames = {
"toolforge_iron",
"toolforge_gold",
"toolforge_diamond",
"toolforge_emerald",
"toolforge_cobalt",
"toolforge_ardite",
"toolforge_manyullyn",
"toolforge_copper",
"toolforge_bronze",
"toolforge_tin",
"toolforge_aluminum",
"toolforge_alubrass",
"toolforge_alumite",
"toolforge_steel"
};
String[] textureNames = { "toolforge_iron", "toolforge_gold", "toolforge_diamond", "toolforge_emerald",
"toolforge_cobalt", "toolforge_ardite", "toolforge_manyullyn", "toolforge_copper", "toolforge_bronze",
"toolforge_tin", "toolforge_aluminum", "toolforge_alubrass", "toolforge_alumite", "toolforge_steel" };
/* Rendering */
@Override
@@ -1,8 +1,9 @@
package tconstruct.tools.blocks;
import cpw.mods.fml.relauncher.*;
import java.util.List;
import mantle.blocks.abstracts.InventoryBlock;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
@@ -15,14 +16,17 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.*;
import net.minecraft.world.*;
import net.minecraftforge.common.util.ForgeDirection;
import tconstruct.TConstruct;
import tconstruct.library.TConstructRegistry;
import tconstruct.tools.TinkerTools;
import tconstruct.tools.logic.*;
import tconstruct.tools.model.TableRender;
import tconstruct.util.config.PHConstruct;
import cpw.mods.fml.relauncher.*;
public class ToolStationBlock extends InventoryBlock {
public ToolStationBlock(Material material) {
super(material);
this.setCreativeTab(TConstructRegistry.blockTab);
@@ -35,38 +39,15 @@ public class ToolStationBlock extends InventoryBlock {
/* Rendering */
@Override
public String[] getTextureNames() {
return new String[] {
"toolstation_top",
"toolstation_side",
"toolstation_bottom",
"partbuilder_oak_top",
"partbuilder_oak_side",
"partbuilder_oak_bottom",
"partbuilder_spruce_top",
"partbuilder_spruce_side",
"partbuilder_spruce_bottom",
"partbuilder_birch_top",
"partbuilder_birch_side",
"partbuilder_birch_bottom",
"partbuilder_jungle_top",
"partbuilder_jungle_side",
"partbuilder_jungle_bottom",
"patternchest_top",
"patternchest_side",
"patternchest_bottom",
"stenciltable_oak_top",
"stenciltable_oak_side",
"stenciltable_oak_bottom",
"stenciltable_spruce_top",
"stenciltable_spruce_side",
"stenciltable_spruce_bottom",
"stenciltable_birch_top",
"stenciltable_birch_side",
"stenciltable_birch_bottom",
"stenciltable_jungle_top",
"stenciltable_jungle_side",
"stenciltable_jungle_bottom"
};
return new String[] { "toolstation_top", "toolstation_side", "toolstation_bottom", "partbuilder_oak_top",
"partbuilder_oak_side", "partbuilder_oak_bottom", "partbuilder_spruce_top", "partbuilder_spruce_side",
"partbuilder_spruce_bottom", "partbuilder_birch_top", "partbuilder_birch_side",
"partbuilder_birch_bottom", "partbuilder_jungle_top", "partbuilder_jungle_side",
"partbuilder_jungle_bottom", "patternchest_top", "patternchest_side", "patternchest_bottom",
"stenciltable_oak_top", "stenciltable_oak_side", "stenciltable_oak_bottom", "stenciltable_spruce_top",
"stenciltable_spruce_side", "stenciltable_spruce_bottom", "stenciltable_birch_top",
"stenciltable_birch_side", "stenciltable_birch_bottom", "stenciltable_jungle_top",
"stenciltable_jungle_side", "stenciltable_jungle_bottom" };
}
@Override
@@ -116,14 +97,13 @@ public class ToolStationBlock extends InventoryBlock {
@Override
public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z) {
int metadata = world.getBlockMetadata(x, y, z);
if (metadata == 5)
return AxisAlignedBB.getBoundingBox(
(double) x + this.minX,
(double) y + this.minY,
(double) z + this.minZ,
(double) x + this.maxX,
(double) y + this.maxY - 0.125,
(double) z + this.maxZ);
if (metadata == 5) return AxisAlignedBB.getBoundingBox(
(double) x + this.minX,
(double) y + this.minY,
(double) z + this.minZ,
(double) x + this.maxX,
(double) y + this.maxY - 0.125,
(double) z + this.maxZ);
return AxisAlignedBB.getBoundingBox(
(double) x + this.minX,
(double) y + this.minY,
@@ -154,8 +134,9 @@ public class ToolStationBlock extends InventoryBlock {
case 12:
case 11:
return new StencilTableLogic();
/*case 14:
return new CastingTableLogic();*/
/*
* case 14: return new CastingTableLogic();
*/
default:
return null;
}
@@ -188,24 +169,14 @@ public class ToolStationBlock extends InventoryBlock {
}
}
/*@Override
public void onBlockPlacedBy (World world, int x, int y, int z, EntityLivingBase par5EntityLiving, ItemStack par6ItemStack)
{
if (PHConstruct.freePatterns)
{
int meta = world.getBlockMetadata(x, y, z);
if (meta == 5)
{
PatternChestLogic logic = (PatternChestLogic) world.getTileEntity(x, y, z);
for (int i = 1; i <= 13; i++)
{
logic.setInventorySlotContents(i - 1, new ItemStack(TinkerTools.woodPattern, 1, i));
}
logic.setInventorySlotContents(13, new ItemStack(TinkerTools.woodPattern, 1, 22));
}
}
super.onBlockPlacedBy(world, x, y, z, par5EntityLiving, par6ItemStack);
}*/
/*
* @Override public void onBlockPlacedBy (World world, int x, int y, int z, EntityLivingBase par5EntityLiving,
* ItemStack par6ItemStack) { if (PHConstruct.freePatterns) { int meta = world.getBlockMetadata(x, y, z); if (meta
* == 5) { PatternChestLogic logic = (PatternChestLogic) world.getTileEntity(x, y, z); for (int i = 1; i <= 13; i++)
* { logic.setInventorySlotContents(i - 1, new ItemStack(TinkerTools.woodPattern, 1, i)); }
* logic.setInventorySlotContents(13, new ItemStack(TinkerTools.woodPattern, 1, 22)); } }
* super.onBlockPlacedBy(world, x, y, z, par5EntityLiving, par6ItemStack); }
*/
@Override
public String getTextureDomain(int textureNameIndex) {
@@ -238,8 +209,12 @@ public class ToolStationBlock extends InventoryBlock {
double d0 = (double) (world.rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
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, chest);
EntityItem entityitem = new EntityItem(
world,
(double) x + d0,
(double) y + d1,
(double) z + d2,
chest);
entityitem.delayBeforeCanPickup = 10;
world.spawnEntityInWorld(entityitem);
}