general Block* code cleanup
This commit is contained in:
parent
7fd8879c73
commit
7299ab8e5c
221 changed files with 1000 additions and 1340 deletions
|
@ -42,7 +42,7 @@ public abstract class GuiContainer extends Gui
|
||||||
|
|
||||||
private static final List<ItemStack> ITEM_LIST = Lists.<ItemStack>newArrayList();
|
private static final List<ItemStack> ITEM_LIST = Lists.<ItemStack>newArrayList();
|
||||||
|
|
||||||
private static CheatTab selectedTab = CheatTab.tabBlocks;
|
private static CheatTab selectedTab = CheatTab.BLOCKS;
|
||||||
// /** The location of the inventory background texture */
|
// /** The location of the inventory background texture */
|
||||||
// protected static final String inventoryBackground = "textures/gui/inventory.png";
|
// protected static final String inventoryBackground = "textures/gui/inventory.png";
|
||||||
|
|
||||||
|
@ -1151,7 +1151,7 @@ public abstract class GuiContainer extends Gui
|
||||||
protected void drawTab(CheatTab tab)
|
protected void drawTab(CheatTab tab)
|
||||||
{
|
{
|
||||||
this.itemRender.zLevel = 100.0F;
|
this.itemRender.zLevel = 100.0F;
|
||||||
ItemStack itemstack = tab.getIconItemStack();
|
ItemStack itemstack = tab.getIcon();
|
||||||
GlState.enableDepth();
|
GlState.enableDepth();
|
||||||
this.itemRender.renderItemAndEffectIntoGUI(itemstack, this.xSize + 2 + 18 * tab.getHorizontal() + 1, 9 * 18 + 4 + 20 * tab.getVertical() + 1);
|
this.itemRender.renderItemAndEffectIntoGUI(itemstack, this.xSize + 2 + 18 * tab.getHorizontal() + 1, 9 * 18 + 4 + 20 * tab.getVertical() + 1);
|
||||||
this.itemRender.zLevel = 0.0F;
|
this.itemRender.zLevel = 0.0F;
|
||||||
|
@ -1176,7 +1176,7 @@ public abstract class GuiContainer extends Gui
|
||||||
selectedTab = tab;
|
selectedTab = tab;
|
||||||
this.dragSplittingSlots.clear();
|
this.dragSplittingSlots.clear();
|
||||||
ITEM_LIST.clear();
|
ITEM_LIST.clear();
|
||||||
tab.displayAllReleventItems(ITEM_LIST);
|
tab.filter(ITEM_LIST);
|
||||||
|
|
||||||
this.currentScroll = 0.0F;
|
this.currentScroll = 0.0F;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,12 +15,12 @@ import client.renderer.texture.TextureAtlasSprite;
|
||||||
import client.renderer.texture.TextureMap;
|
import client.renderer.texture.TextureMap;
|
||||||
import client.renderer.tileentity.TileEntityItemStackRenderer;
|
import client.renderer.tileentity.TileEntityItemStackRenderer;
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.block.liquid.BlockLiquid;
|
import common.block.liquid.BlockLiquid;
|
||||||
import common.collect.Maps;
|
import common.collect.Maps;
|
||||||
import common.init.BlockRegistry;
|
import common.init.BlockRegistry;
|
||||||
import common.init.FluidRegistry;
|
import common.init.FluidRegistry;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.util.ExtMath;
|
import common.util.ExtMath;
|
||||||
import common.util.Facing;
|
import common.util.Facing;
|
||||||
|
|
|
@ -16,6 +16,7 @@ import client.renderer.texture.TextureMap;
|
||||||
import client.world.WorldClient;
|
import client.world.WorldClient;
|
||||||
import common.biome.Biome;
|
import common.biome.Biome;
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
import common.entity.types.EntityAnimal;
|
import common.entity.types.EntityAnimal;
|
||||||
|
@ -23,7 +24,6 @@ import common.entity.types.EntityLiving;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.init.Items;
|
import common.init.Items;
|
||||||
import common.init.SoundEvent;
|
import common.init.SoundEvent;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.BlockLayer;
|
import common.model.BlockLayer;
|
||||||
import common.model.ParticleType;
|
import common.model.ParticleType;
|
||||||
import common.potion.Potion;
|
import common.potion.Potion;
|
||||||
|
@ -1155,7 +1155,7 @@ public class EntityRenderer {
|
||||||
double d3 = this.random.doublev();
|
double d3 = this.random.doublev();
|
||||||
double d4 = this.random.doublev();
|
double d4 = this.random.doublev();
|
||||||
|
|
||||||
if (temp >= 194.0f || block.getMaterial() == Material.lava)
|
if (temp >= 194.0f || block.getMaterial() == Material.LAVA)
|
||||||
{
|
{
|
||||||
if(temp >= 194.0f) {
|
if(temp >= 194.0f) {
|
||||||
++n;
|
++n;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package client.renderer.particle;
|
package client.renderer.particle;
|
||||||
|
|
||||||
import common.material.Material;
|
import common.block.Material;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.world.World;
|
import common.world.World;
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ public class EntityBubbleFX extends EntityFX
|
||||||
this.motionY *= 0.8500000238418579D;
|
this.motionY *= 0.8500000238418579D;
|
||||||
this.motionZ *= 0.8500000238418579D;
|
this.motionZ *= 0.8500000238418579D;
|
||||||
|
|
||||||
if (this.worldObj.getState(new BlockPos(this)).getBlock().getMaterial() != Material.water)
|
if (this.worldObj.getState(new BlockPos(this)).getBlock().getMaterial() != Material.WATER)
|
||||||
{
|
{
|
||||||
this.setDead();
|
this.setDead();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package client.renderer.particle;
|
package client.renderer.particle;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.block.liquid.BlockLiquid;
|
import common.block.liquid.BlockLiquid;
|
||||||
import common.material.Material;
|
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.util.ExtMath;
|
import common.util.ExtMath;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package client.renderer.particle;
|
package client.renderer.particle;
|
||||||
|
|
||||||
|
import common.block.Material;
|
||||||
import common.block.liquid.BlockLiquid;
|
import common.block.liquid.BlockLiquid;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.ParticleType;
|
import common.model.ParticleType;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.util.ExtMath;
|
import common.util.ExtMath;
|
||||||
|
@ -21,7 +21,7 @@ public class EntityDropParticleFX extends EntityFX
|
||||||
super(worldIn, xCoordIn, yCoordIn, zCoordIn, 0.0D, 0.0D, 0.0D);
|
super(worldIn, xCoordIn, yCoordIn, zCoordIn, 0.0D, 0.0D, 0.0D);
|
||||||
this.motionX = this.motionY = this.motionZ = 0.0D;
|
this.motionX = this.motionY = this.motionZ = 0.0D;
|
||||||
|
|
||||||
if (p_i1203_8_ == Material.water)
|
if (p_i1203_8_ == Material.WATER)
|
||||||
{
|
{
|
||||||
this.particleRed = 0.0F;
|
this.particleRed = 0.0F;
|
||||||
this.particleGreen = 0.0F;
|
this.particleGreen = 0.0F;
|
||||||
|
@ -45,7 +45,7 @@ public class EntityDropParticleFX extends EntityFX
|
||||||
|
|
||||||
public int getBrightnessForRender(float partialTicks)
|
public int getBrightnessForRender(float partialTicks)
|
||||||
{
|
{
|
||||||
return this.materialType == Material.water ? super.getBrightnessForRender(partialTicks) : 257;
|
return this.materialType == Material.WATER ? super.getBrightnessForRender(partialTicks) : 257;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -53,7 +53,7 @@ public class EntityDropParticleFX extends EntityFX
|
||||||
*/
|
*/
|
||||||
public float getBrightness(float partialTicks)
|
public float getBrightness(float partialTicks)
|
||||||
{
|
{
|
||||||
return this.materialType == Material.water ? super.getBrightness(partialTicks) : 1.0F;
|
return this.materialType == Material.WATER ? super.getBrightness(partialTicks) : 1.0F;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -65,7 +65,7 @@ public class EntityDropParticleFX extends EntityFX
|
||||||
this.prevY = this.posY;
|
this.prevY = this.posY;
|
||||||
this.prevZ = this.posZ;
|
this.prevZ = this.posZ;
|
||||||
|
|
||||||
if (this.materialType == Material.water)
|
if (this.materialType == Material.WATER)
|
||||||
{
|
{
|
||||||
this.particleRed = 0.2F;
|
this.particleRed = 0.2F;
|
||||||
this.particleGreen = 0.3F;
|
this.particleGreen = 0.3F;
|
||||||
|
@ -104,7 +104,7 @@ public class EntityDropParticleFX extends EntityFX
|
||||||
|
|
||||||
if (this.onGround)
|
if (this.onGround)
|
||||||
{
|
{
|
||||||
if (this.materialType == Material.water)
|
if (this.materialType == Material.WATER)
|
||||||
{
|
{
|
||||||
this.setDead();
|
this.setDead();
|
||||||
this.worldObj.spawnParticle(ParticleType.WATER_SPLASH, this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
|
this.worldObj.spawnParticle(ParticleType.WATER_SPLASH, this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
|
||||||
|
@ -144,7 +144,7 @@ public class EntityDropParticleFX extends EntityFX
|
||||||
{
|
{
|
||||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||||
{
|
{
|
||||||
return new EntityDropParticleFX(worldIn, xCoordIn, yCoordIn, zCoordIn, Material.lava);
|
return new EntityDropParticleFX(worldIn, xCoordIn, yCoordIn, zCoordIn, Material.LAVA);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,7 +152,7 @@ public class EntityDropParticleFX extends EntityFX
|
||||||
{
|
{
|
||||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||||
{
|
{
|
||||||
return new EntityDropParticleFX(worldIn, xCoordIn, yCoordIn, zCoordIn, Material.water);
|
return new EntityDropParticleFX(worldIn, xCoordIn, yCoordIn, zCoordIn, Material.WATER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package client.renderer.particle;
|
package client.renderer.particle;
|
||||||
|
|
||||||
import common.material.Material;
|
import common.block.Material;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.world.World;
|
import common.world.World;
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ public class EntitySuspendFX extends EntityFX
|
||||||
this.prevZ = this.posZ;
|
this.prevZ = this.posZ;
|
||||||
this.moveEntity(this.motionX, this.motionY, this.motionZ);
|
this.moveEntity(this.motionX, this.motionY, this.motionZ);
|
||||||
|
|
||||||
if (this.worldObj.getState(new BlockPos(this)).getBlock().getMaterial() != Material.water)
|
if (this.worldObj.getState(new BlockPos(this)).getBlock().getMaterial() != Material.WATER)
|
||||||
{
|
{
|
||||||
this.setDead();
|
this.setDead();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package common.ai;
|
package common.ai;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.block.artificial.BlockDoor;
|
import common.block.artificial.BlockDoor;
|
||||||
import common.entity.types.EntityLiving;
|
import common.entity.types.EntityLiving;
|
||||||
import common.material.Material;
|
|
||||||
import common.pathfinding.PathEntity;
|
import common.pathfinding.PathEntity;
|
||||||
import common.pathfinding.PathNavigateGround;
|
import common.pathfinding.PathNavigateGround;
|
||||||
import common.pathfinding.PathPoint;
|
import common.pathfinding.PathPoint;
|
||||||
|
@ -113,6 +113,6 @@ public abstract class EntityAIDoorInteract extends EntityAIBase
|
||||||
private BlockDoor getBlockDoor(BlockPos pos)
|
private BlockDoor getBlockDoor(BlockPos pos)
|
||||||
{
|
{
|
||||||
Block block = this.theEntity.worldObj.getState(pos).getBlock();
|
Block block = this.theEntity.worldObj.getState(pos).getBlock();
|
||||||
return block instanceof BlockDoor && block.getMaterial() == Material.wood ? (BlockDoor)block : null;
|
return block instanceof BlockDoor && block.getMaterial() == Material.WOOD ? (BlockDoor)block : null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,6 @@ import common.init.ItemRegistry;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.BlockLayer;
|
import common.model.BlockLayer;
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
|
@ -265,9 +264,9 @@ public class Block {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Block(Material material) {
|
public Block(Material material) {
|
||||||
this.miningLevel = (material == Material.rock || material == Material.iron || material == Material.anvil) ? 0 : -1;
|
this.miningLevel = (material == Material.SOLID || material == Material.HEAVY) ? 0 : -1;
|
||||||
this.axeHarvest = material == Material.wood || material == Material.plants || material == Material.vine || material == Material.gourd;
|
this.axeHarvest = material == Material.WOOD || material == Material.PLANT || material == Material.BUSH || material == Material.SOFT;
|
||||||
this.shearsEfficiency = (material == Material.leaves || material == Material.web) ? 3 : -1;
|
this.shearsEfficiency = (material == Material.LEAVES || material == Material.FLUFF) ? 3 : -1;
|
||||||
this.sound = SoundType.STONE;
|
this.sound = SoundType.STONE;
|
||||||
this.slipperiness = 0.6F;
|
this.slipperiness = 0.6F;
|
||||||
this.material = material;
|
this.material = material;
|
||||||
|
@ -495,10 +494,6 @@ public class Block {
|
||||||
: !worldIn.getState(pos).getBlock().isOpaqueCube())))));
|
: !worldIn.getState(pos).getBlock().isOpaqueCube())))));
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isBlockSolid(IBlockAccess worldIn, BlockPos pos, Facing side) {
|
|
||||||
return worldIn.getState(pos).getBlock().getMaterial().isSolid();
|
|
||||||
}
|
|
||||||
|
|
||||||
public BoundingBox getSelectedBoundingBox(World worldIn, BlockPos pos) {
|
public BoundingBox getSelectedBoundingBox(World worldIn, BlockPos pos) {
|
||||||
return new BoundingBox((double)pos.getX() + this.minX, (double)pos.getY() + this.minY, (double)pos.getZ() + this.minZ,
|
return new BoundingBox((double)pos.getX() + this.minX, (double)pos.getY() + this.minY, (double)pos.getZ() + this.minZ,
|
||||||
(double)pos.getX() + this.maxX, (double)pos.getY() + this.maxY, (double)pos.getZ() + this.maxZ);
|
(double)pos.getX() + this.maxX, (double)pos.getY() + this.maxY, (double)pos.getZ() + this.maxZ);
|
||||||
|
@ -760,7 +755,7 @@ public class Block {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canPlaceBlockAt(World worldIn, BlockPos pos) {
|
public boolean canPlaceBlockAt(World worldIn, BlockPos pos) {
|
||||||
return worldIn.getState(pos).getBlock().material.isReplaceable();
|
return worldIn.getState(pos).getBlock().getMaterial().isReplaceable();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onBlockActivated(World worldIn, BlockPos pos, State state, EntityNPC playerIn, Facing side, float hitX, float hitY, float hitZ) {
|
public boolean onBlockActivated(World worldIn, BlockPos pos, State state, EntityNPC playerIn, Facing side, float hitX, float hitY, float hitZ) {
|
||||||
|
@ -887,7 +882,7 @@ public class Block {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMobilityFlag() {
|
public int getMobilityFlag() {
|
||||||
return this.material.getMaterialMobility();
|
return this.material.getMobility();
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getAmbientOcclusionLightValue() {
|
public float getAmbientOcclusionLightValue() {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package common.block;
|
package common.block;
|
||||||
|
|
||||||
import common.material.MaterialTransparent;
|
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.util.BoundingBox;
|
import common.util.BoundingBox;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
|
@ -8,7 +7,7 @@ import common.world.World;
|
||||||
|
|
||||||
public final class BlockAir extends Block {
|
public final class BlockAir extends Block {
|
||||||
public BlockAir() {
|
public BlockAir() {
|
||||||
super(new MaterialTransparent());
|
super(Material.NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getRenderType() {
|
public int getRenderType() {
|
||||||
|
|
|
@ -6,7 +6,6 @@ import common.color.DyeColor;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.properties.IProperty;
|
import common.properties.IProperty;
|
||||||
|
@ -19,7 +18,7 @@ public class BlockColored extends Block {
|
||||||
public BlockColored(Material material) {
|
public BlockColored(Material material) {
|
||||||
super(material);
|
super(material);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(COLOR, DyeColor.WHITE));
|
this.setDefaultState(this.getBaseState().withProperty(COLOR, DyeColor.WHITE));
|
||||||
this.setTab(CheatTab.tabBlocks);
|
this.setTab(CheatTab.BLOCKS);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int damageDropped(State state) {
|
public int damageDropped(State state) {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package common.block;
|
package common.block;
|
||||||
|
|
||||||
import common.material.Material;
|
|
||||||
import common.tileentity.TileEntity;
|
import common.tileentity.TileEntity;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.util.Facing;
|
import common.util.Facing;
|
||||||
|
@ -15,7 +14,7 @@ public abstract class BlockContainer extends Block implements ITileEntityProvide
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean isInvalidNeighbor(World world, BlockPos pos, Facing face) {
|
protected boolean isInvalidNeighbor(World world, BlockPos pos, Facing face) {
|
||||||
return world.getState(pos.offset(face)).getBlock().getMaterial() == Material.cactus;
|
return world.getState(pos.offset(face)).getBlock().getMaterial() == Material.BLOCKING;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean hasInvalidNeighbor(World world, BlockPos pos) {
|
protected boolean hasInvalidNeighbor(World world, BlockPos pos) {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package common.block;
|
package common.block;
|
||||||
|
|
||||||
import common.material.Material;
|
|
||||||
import common.properties.PropertyDirection;
|
import common.properties.PropertyDirection;
|
||||||
import common.util.Facing;
|
import common.util.Facing;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ import common.block.natural.BlockFire;
|
||||||
import common.entity.item.EntityFalling;
|
import common.entity.item.EntityFalling;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.init.Config;
|
import common.init.Config;
|
||||||
import common.material.Material;
|
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
|
@ -16,7 +15,7 @@ public class BlockFalling extends Block {
|
||||||
|
|
||||||
public static boolean canFallInto(World world, BlockPos pos) {
|
public static boolean canFallInto(World world, BlockPos pos) {
|
||||||
Block block = world.getState(pos).getBlock();
|
Block block = world.getState(pos).getBlock();
|
||||||
return block instanceof BlockFire || block == Blocks.air || block.material.isLiquid();
|
return block instanceof BlockFire || block == Blocks.air || block.getMaterial().isLiquid();
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockFalling(Material material) {
|
public BlockFalling(Material material) {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package common.block;
|
package common.block;
|
||||||
|
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.model.ModelRotation;
|
import common.model.ModelRotation;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package common.block;
|
package common.block;
|
||||||
|
|
||||||
import common.material.Material;
|
|
||||||
import common.model.BlockLayer;
|
import common.model.BlockLayer;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.util.Facing;
|
import common.util.Facing;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package common.block;
|
package common.block;
|
||||||
|
|
||||||
import common.material.Material;
|
|
||||||
|
|
||||||
public class BlockTreasure extends Block {
|
public class BlockTreasure extends Block {
|
||||||
public BlockTreasure(Material material) {
|
public BlockTreasure(Material material) {
|
||||||
super(material);
|
super(material);
|
||||||
|
|
192
common/src/common/block/Material.java
Executable file
192
common/src/common/block/Material.java
Executable file
|
@ -0,0 +1,192 @@
|
||||||
|
package common.block;
|
||||||
|
|
||||||
|
public enum Material {
|
||||||
|
NONE {{
|
||||||
|
this.setNonSolid().setReplaceable();
|
||||||
|
}},
|
||||||
|
LOOSE {{
|
||||||
|
;
|
||||||
|
}},
|
||||||
|
WOOD {{
|
||||||
|
this.setBurning();
|
||||||
|
}},
|
||||||
|
SOLID {{
|
||||||
|
this.setRequiresTool();
|
||||||
|
}},
|
||||||
|
DIGGABLE {{ // can harvest with shovel
|
||||||
|
this.setRequiresTool();
|
||||||
|
}},
|
||||||
|
TRANSLUCENT {{
|
||||||
|
this.setTranslucent();
|
||||||
|
}},
|
||||||
|
BURNABLE {{
|
||||||
|
this.setBurning();
|
||||||
|
}},
|
||||||
|
SOFT {{ // can break faster with sword, can't connect to fences+walls
|
||||||
|
this.setNoPushMobility();
|
||||||
|
}},
|
||||||
|
PISTON {{
|
||||||
|
this.setImmovableMobility();
|
||||||
|
}},
|
||||||
|
HEAVY {{
|
||||||
|
this.setRequiresTool().setImmovableMobility();
|
||||||
|
}},
|
||||||
|
PLANT {{ // can break faster with sword
|
||||||
|
this.setNonSolid().setNoPushMobility();
|
||||||
|
}},
|
||||||
|
SMALL {{ // can be placed more easily
|
||||||
|
this.setNonSolid().setNoPushMobility();
|
||||||
|
}},
|
||||||
|
FLEECE {{
|
||||||
|
this.setNonSolid().setBurning();
|
||||||
|
}},
|
||||||
|
EXPLOSIVE {{
|
||||||
|
this.setBurning().setTranslucent();
|
||||||
|
}},
|
||||||
|
BLOCKING {{ // can't be placed next to signs and banners
|
||||||
|
this.setTranslucent().setNoPushMobility();
|
||||||
|
}},
|
||||||
|
PORTAL {{ // not floodable by liquids
|
||||||
|
this.setNonSolid().setImmovableMobility();
|
||||||
|
}},
|
||||||
|
WATER {{
|
||||||
|
this.setLiquid(false).setReplaceable().setNoPushMobility();
|
||||||
|
}},
|
||||||
|
COLD {{
|
||||||
|
this.setLiquid(false).setReplaceable().setNoPushMobility();
|
||||||
|
}},
|
||||||
|
LAVA {{
|
||||||
|
this.setLiquid(true).setReplaceable().setNoPushMobility();
|
||||||
|
}},
|
||||||
|
HOT {{
|
||||||
|
this.setLiquid(true).setReplaceable().setNoPushMobility();
|
||||||
|
}},
|
||||||
|
LEAVES {{ // can break faster with sword, precipitation block, special treatment in some worldgen
|
||||||
|
this.setBurning().setTranslucent().setNoPushMobility();
|
||||||
|
}},
|
||||||
|
BUSH {{ // can break faster with sword, can be replaced by small tree leaves
|
||||||
|
this.setNonSolid().setBurning().setNoPushMobility().setReplaceable();
|
||||||
|
}},
|
||||||
|
FIRE {{
|
||||||
|
this.setNonSolid().setReplaceable().setNoPushMobility();
|
||||||
|
}},
|
||||||
|
POWDER {{ // can harvest with shovel, precipitation block
|
||||||
|
this.setNonSolid().setReplaceable().setRequiresTool().setNoPushMobility();
|
||||||
|
}},
|
||||||
|
FLUFF {{ // can harvest with shears
|
||||||
|
this.setPassable().setRequiresTool().setNoPushMobility();
|
||||||
|
}};
|
||||||
|
|
||||||
|
private boolean solid = true;
|
||||||
|
private boolean lightOpaque = true;
|
||||||
|
private boolean unpassable = true;
|
||||||
|
private boolean opaque = true;
|
||||||
|
private boolean liquid;
|
||||||
|
private boolean cold;
|
||||||
|
private boolean hot;
|
||||||
|
private boolean burnable;
|
||||||
|
private boolean replaceable;
|
||||||
|
private boolean requiresTool;
|
||||||
|
// 0 - normal; 1 - can't push other blocks; 2 - can't be pushed
|
||||||
|
private int mobility;
|
||||||
|
|
||||||
|
protected Material setTranslucent() {
|
||||||
|
this.opaque = false;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Material setNonSolid() {
|
||||||
|
this.solid = false;
|
||||||
|
this.lightOpaque = false;
|
||||||
|
this.unpassable = false;
|
||||||
|
this.opaque = false;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Material setPassable() {
|
||||||
|
this.unpassable = false;
|
||||||
|
this.opaque = false;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Material setLiquid(boolean hot) {
|
||||||
|
this.solid = false;
|
||||||
|
this.unpassable = false;
|
||||||
|
this.opaque = false;
|
||||||
|
this.liquid = true;
|
||||||
|
if(hot)
|
||||||
|
this.hot = true;
|
||||||
|
else
|
||||||
|
this.cold = true;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Material setRequiresTool() {
|
||||||
|
this.requiresTool = true;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Material setBurning() {
|
||||||
|
this.burnable = true;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Material setReplaceable() {
|
||||||
|
this.replaceable = true;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Material setNoPushMobility() {
|
||||||
|
this.mobility = 1;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Material setImmovableMobility() {
|
||||||
|
this.mobility = 2;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isLiquid() {
|
||||||
|
return this.liquid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isColdLiquid() {
|
||||||
|
return this.cold;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isHotLiquid() {
|
||||||
|
return this.hot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSolid() {
|
||||||
|
return this.solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean blocksLight() {
|
||||||
|
return this.lightOpaque;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean blocksMovement() {
|
||||||
|
return this.unpassable;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getCanBurn() {
|
||||||
|
return this.burnable;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isReplaceable() {
|
||||||
|
return this.replaceable;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isOpaque() {
|
||||||
|
return this.opaque;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isToolRequired() {
|
||||||
|
return this.requiresTool;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMobility() {
|
||||||
|
return this.mobility;
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,12 +2,12 @@ package common.block.artificial;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
import common.block.BlockDirectional;
|
import common.block.BlockDirectional;
|
||||||
|
import common.block.Material;
|
||||||
import common.color.DyeColor;
|
import common.color.DyeColor;
|
||||||
import common.color.TextColor;
|
import common.color.TextColor;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
import common.init.ItemRegistry;
|
import common.init.ItemRegistry;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.BlockLayer;
|
import common.model.BlockLayer;
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
|
@ -50,7 +50,7 @@ public class BlockBed extends BlockDirectional {
|
||||||
private final DyeColor color;
|
private final DyeColor color;
|
||||||
|
|
||||||
public BlockBed(DyeColor color) {
|
public BlockBed(DyeColor color) {
|
||||||
super(Material.cloth);
|
super(Material.BURNABLE);
|
||||||
this.color = color;
|
this.color = color;
|
||||||
this.setDefaultState(this.getBaseState().withProperty(PART, BlockBed.EnumPartType.FOOT));
|
this.setDefaultState(this.getBaseState().withProperty(PART, BlockBed.EnumPartType.FOOT));
|
||||||
this.setBedBounds();
|
this.setBedBounds();
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package common.block.artificial;
|
package common.block.artificial;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.init.Items;
|
import common.init.Items;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
|
@ -14,8 +14,8 @@ public class BlockBookshelf extends Block
|
||||||
{
|
{
|
||||||
public BlockBookshelf()
|
public BlockBookshelf()
|
||||||
{
|
{
|
||||||
super(Material.wood);
|
super(Material.WOOD);
|
||||||
this.setTab(CheatTab.tabDeco);
|
this.setTab(CheatTab.DECORATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package common.block.artificial;
|
package common.block.artificial;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
import common.init.Items;
|
import common.init.Items;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.BlockLayer;
|
import common.model.BlockLayer;
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
|
@ -90,7 +90,7 @@ public class BlockCake extends Block
|
||||||
|
|
||||||
public BlockCake()
|
public BlockCake()
|
||||||
{
|
{
|
||||||
super(Material.cake);
|
super(Material.SOFT);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(BITES, Integer.valueOf(0)));
|
this.setDefaultState(this.getBaseState().withProperty(BITES, Integer.valueOf(0)));
|
||||||
// this.setTickRandomly(true);
|
// this.setTickRandomly(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,11 +3,11 @@ package common.block.artificial;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.color.DyeColor;
|
import common.color.DyeColor;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.model.Transforms;
|
import common.model.Transforms;
|
||||||
|
@ -25,11 +25,11 @@ public class BlockCarpet extends Block
|
||||||
|
|
||||||
public BlockCarpet()
|
public BlockCarpet()
|
||||||
{
|
{
|
||||||
super(Material.carpet);
|
super(Material.FLEECE);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(COLOR, DyeColor.WHITE));
|
this.setDefaultState(this.getBaseState().withProperty(COLOR, DyeColor.WHITE));
|
||||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.0625F, 1.0F);
|
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.0625F, 1.0F);
|
||||||
// this.setTickRandomly(true);
|
// this.setTickRandomly(true);
|
||||||
this.setTab(CheatTab.tabDeco);
|
this.setTab(CheatTab.DECORATION);
|
||||||
this.setBlockBoundsFromMeta(0);
|
this.setBlockBoundsFromMeta(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package common.block.artificial;
|
package common.block.artificial;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
import common.material.Material;
|
import common.block.Material;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.util.Facing;
|
import common.util.Facing;
|
||||||
import common.world.IWorldAccess;
|
import common.world.IWorldAccess;
|
||||||
|
|
|
@ -3,12 +3,12 @@ package common.block.artificial;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.collect.Lists;
|
import common.collect.Lists;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.init.Items;
|
import common.init.Items;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.BlockLayer;
|
import common.model.BlockLayer;
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
|
@ -163,7 +163,7 @@ public class BlockDoor extends Block
|
||||||
|
|
||||||
public boolean onBlockActivated(World worldIn, BlockPos pos, State state, EntityNPC playerIn, Facing side, float hitX, float hitY, float hitZ)
|
public boolean onBlockActivated(World worldIn, BlockPos pos, State state, EntityNPC playerIn, Facing side, float hitX, float hitY, float hitZ)
|
||||||
{
|
{
|
||||||
if (this.material == Material.iron)
|
if (this.material == Material.SOLID)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,11 +2,11 @@ package common.block.artificial;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
import common.block.BlockFalling;
|
import common.block.BlockFalling;
|
||||||
|
import common.block.Material;
|
||||||
import common.entity.item.EntityFalling;
|
import common.entity.item.EntityFalling;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.init.Config;
|
import common.init.Config;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.model.ParticleType;
|
import common.model.ParticleType;
|
||||||
|
@ -81,7 +81,7 @@ public class BlockDragonEgg extends Block
|
||||||
|
|
||||||
public BlockDragonEgg()
|
public BlockDragonEgg()
|
||||||
{
|
{
|
||||||
super(Material.dragonEgg);
|
super(Material.SOFT);
|
||||||
this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 1.0F, 0.9375F);
|
this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 1.0F, 0.9375F);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,12 @@ package common.block.artificial;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.collect.Lists;
|
import common.collect.Lists;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.ItemLead;
|
import common.item.ItemLead;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.model.ModelRotation;
|
import common.model.ModelRotation;
|
||||||
|
@ -44,7 +44,7 @@ public class BlockFence extends Block
|
||||||
{
|
{
|
||||||
super(p_i46395_1_);
|
super(p_i46395_1_);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(NORTH, Boolean.valueOf(false)).withProperty(EAST, Boolean.valueOf(false)).withProperty(SOUTH, Boolean.valueOf(false)).withProperty(WEST, Boolean.valueOf(false)));
|
this.setDefaultState(this.getBaseState().withProperty(NORTH, Boolean.valueOf(false)).withProperty(EAST, Boolean.valueOf(false)).withProperty(SOUTH, Boolean.valueOf(false)).withProperty(WEST, Boolean.valueOf(false)));
|
||||||
this.setTab(p_i46395_1_ == Material.wood ? CheatTab.tabWood : CheatTab.tabBlocks);
|
this.setTab(p_i46395_1_ == Material.WOOD ? CheatTab.WOOD : CheatTab.BLOCKS);
|
||||||
this.texture = texture;
|
this.texture = texture;
|
||||||
FENCES.add(this);
|
FENCES.add(this);
|
||||||
}
|
}
|
||||||
|
@ -166,7 +166,7 @@ public class BlockFence extends Block
|
||||||
public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos)
|
public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos)
|
||||||
{
|
{
|
||||||
Block block = worldIn.getState(pos).getBlock();
|
Block block = worldIn.getState(pos).getBlock();
|
||||||
return ((!(block instanceof BlockFence) || block.getMaterial() != this.material) && !(block instanceof BlockFenceGate) ? (block.getMaterial().isOpaque() && block.isFullCube() ? block.getMaterial() != Material.gourd : false) : true);
|
return ((!(block instanceof BlockFence) || block.getMaterial() != this.material) && !(block instanceof BlockFenceGate) ? (block.getMaterial().isOpaque() && block.isFullCube() ? block.getMaterial() != Material.SOFT : false) : true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean shouldSideBeRendered(IWorldAccess worldIn, BlockPos pos, Facing side)
|
public boolean shouldSideBeRendered(IWorldAccess worldIn, BlockPos pos, Facing side)
|
||||||
|
|
|
@ -2,12 +2,12 @@ package common.block.artificial;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
import common.block.BlockDirectional;
|
import common.block.BlockDirectional;
|
||||||
|
import common.block.Material;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
import common.entity.types.EntityLiving;
|
import common.entity.types.EntityLiving;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.init.WoodType;
|
import common.init.WoodType;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.model.ModelRotation;
|
import common.model.ModelRotation;
|
||||||
|
@ -32,9 +32,9 @@ public class BlockFenceGate extends BlockDirectional
|
||||||
|
|
||||||
public BlockFenceGate(WoodType p_i46394_1_)
|
public BlockFenceGate(WoodType p_i46394_1_)
|
||||||
{
|
{
|
||||||
super(Material.wood); // , p_i46394_1_.getMapColor());
|
super(Material.WOOD); // , p_i46394_1_.getMapColor());
|
||||||
this.setDefaultState(this.getBaseState().withProperty(OPEN, Boolean.valueOf(false)).withProperty(POWERED, Boolean.valueOf(false)).withProperty(IN_WALL, Boolean.valueOf(false)));
|
this.setDefaultState(this.getBaseState().withProperty(OPEN, Boolean.valueOf(false)).withProperty(POWERED, Boolean.valueOf(false)).withProperty(IN_WALL, Boolean.valueOf(false)));
|
||||||
this.setTab(CheatTab.tabWood);
|
this.setTab(CheatTab.WOOD);
|
||||||
this.texture = p_i46394_1_.getName() + "_planks";
|
this.texture = p_i46394_1_.getName() + "_planks";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,10 +5,10 @@ import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.collect.Sets;
|
import common.collect.Sets;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.model.ParticleType;
|
import common.model.ParticleType;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package common.block.artificial;
|
package common.block.artificial;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.block.foliage.BlockFlower;
|
import common.block.foliage.BlockFlower;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
|
@ -9,7 +10,6 @@ import common.init.Items;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemBlock;
|
import common.item.ItemBlock;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.BlockLayer;
|
import common.model.BlockLayer;
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
|
@ -103,7 +103,7 @@ public class BlockFlowerPot extends Block // Container
|
||||||
|
|
||||||
public BlockFlowerPot()
|
public BlockFlowerPot()
|
||||||
{
|
{
|
||||||
super(Material.circuits);
|
super(Material.SMALL);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(CONTENTS, 0)); // .withProperty(LEGACY_DATA, Integer.valueOf(0)));
|
this.setDefaultState(this.getBaseState().withProperty(CONTENTS, 0)); // .withProperty(LEGACY_DATA, Integer.valueOf(0)));
|
||||||
this.setBlockBoundsForItemRender();
|
this.setBlockBoundsForItemRender();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package common.block.artificial;
|
package common.block.artificial;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.BlockLayer;
|
import common.model.BlockLayer;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
|
@ -12,8 +12,8 @@ import common.world.State;
|
||||||
|
|
||||||
public class BlockGlass extends Block {
|
public class BlockGlass extends Block {
|
||||||
public BlockGlass() {
|
public BlockGlass() {
|
||||||
super(Material.glass);
|
super(Material.TRANSLUCENT);
|
||||||
this.setTab(CheatTab.tabBlocks);
|
this.setTab(CheatTab.BLOCKS);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int quantityDropped(Random rand) {
|
public int quantityDropped(Random rand) {
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package common.block.artificial;
|
package common.block.artificial;
|
||||||
|
|
||||||
import common.block.BlockRotatedPillar;
|
import common.block.BlockRotatedPillar;
|
||||||
|
import common.block.Material;
|
||||||
import common.entity.types.EntityLiving;
|
import common.entity.types.EntityLiving;
|
||||||
import common.init.ItemRegistry;
|
import common.init.ItemRegistry;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.properties.IProperty;
|
import common.properties.IProperty;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.util.Facing;
|
import common.util.Facing;
|
||||||
|
@ -16,9 +16,9 @@ public class BlockHay extends BlockRotatedPillar
|
||||||
{
|
{
|
||||||
public BlockHay()
|
public BlockHay()
|
||||||
{
|
{
|
||||||
super(Material.grass);
|
super(Material.LOOSE);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(AXIS, Facing.Axis.Y));
|
this.setDefaultState(this.getBaseState().withProperty(AXIS, Facing.Axis.Y));
|
||||||
this.setTab(CheatTab.tabBlocks);
|
this.setTab(CheatTab.BLOCKS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,9 +2,9 @@ package common.block.artificial;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
import common.block.BlockDirectional;
|
import common.block.BlockDirectional;
|
||||||
|
import common.block.Material;
|
||||||
import common.entity.types.EntityLiving;
|
import common.entity.types.EntityLiving;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.BlockLayer;
|
import common.model.BlockLayer;
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
|
@ -24,9 +24,9 @@ public class BlockLadder extends Block
|
||||||
|
|
||||||
public BlockLadder()
|
public BlockLadder()
|
||||||
{
|
{
|
||||||
super(Material.circuits);
|
super(Material.SMALL);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(FACING, Facing.NORTH));
|
this.setDefaultState(this.getBaseState().withProperty(FACING, Facing.NORTH));
|
||||||
this.setTab(CheatTab.tabWood);
|
this.setTab(CheatTab.WOOD);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BoundingBox getCollisionBoundingBox(World worldIn, BlockPos pos, State state)
|
public BoundingBox getCollisionBoundingBox(World worldIn, BlockPos pos, State state)
|
||||||
|
|
|
@ -3,11 +3,11 @@ package common.block.artificial;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.BlockLayer;
|
import common.model.BlockLayer;
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
|
@ -35,7 +35,7 @@ public class BlockPane extends Block
|
||||||
super(materialIn);
|
super(materialIn);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(NORTH, Boolean.valueOf(false)).withProperty(EAST, Boolean.valueOf(false)).withProperty(SOUTH, Boolean.valueOf(false)).withProperty(WEST, Boolean.valueOf(false)));
|
this.setDefaultState(this.getBaseState().withProperty(NORTH, Boolean.valueOf(false)).withProperty(EAST, Boolean.valueOf(false)).withProperty(SOUTH, Boolean.valueOf(false)).withProperty(WEST, Boolean.valueOf(false)));
|
||||||
this.canDrop = canDrop;
|
this.canDrop = canDrop;
|
||||||
this.setTab(CheatTab.tabBlocks);
|
this.setTab(CheatTab.BLOCKS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -207,7 +207,7 @@ public class BlockPane extends Block
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isMagnetic() {
|
public boolean isMagnetic() {
|
||||||
return this.material == Material.iron;
|
return this.material == Material.SOLID;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String getPaneBase(State state) {
|
protected String getPaneBase(State state) {
|
||||||
|
|
|
@ -3,11 +3,11 @@ package common.block.artificial;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.block.natural.BlockFire;
|
import common.block.natural.BlockFire;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.BlockLayer;
|
import common.model.BlockLayer;
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
|
@ -34,7 +34,7 @@ public class BlockPortal extends Block
|
||||||
|
|
||||||
public BlockPortal()
|
public BlockPortal()
|
||||||
{
|
{
|
||||||
super(Material.portal);
|
super(Material.PORTAL);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(AXIS, Facing.Axis.X).withProperty(DIM, 0));
|
this.setDefaultState(this.getBaseState().withProperty(AXIS, Facing.Axis.X).withProperty(DIM, 0));
|
||||||
// this.setTickRandomly();
|
// this.setTickRandomly();
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package common.block.artificial;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
import common.entity.types.EntityLiving;
|
import common.entity.types.EntityLiving;
|
||||||
|
@ -11,7 +12,6 @@ import common.init.ItemRegistry;
|
||||||
import common.init.Items;
|
import common.init.Items;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.model.ModelRotation;
|
import common.model.ModelRotation;
|
||||||
|
@ -33,7 +33,7 @@ public class BlockPortalFrame extends Block
|
||||||
|
|
||||||
public BlockPortalFrame()
|
public BlockPortalFrame()
|
||||||
{
|
{
|
||||||
super(Material.rock);
|
super(Material.SOLID);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(FACING, Facing.NORTH).withProperty(ORB, Boolean.valueOf(false)));
|
this.setDefaultState(this.getBaseState().withProperty(FACING, Facing.NORTH).withProperty(ORB, Boolean.valueOf(false)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,12 @@ package common.block.artificial;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.entity.types.EntityLiving;
|
import common.entity.types.EntityLiving;
|
||||||
import common.init.ItemRegistry;
|
import common.init.ItemRegistry;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.model.ModelRotation;
|
import common.model.ModelRotation;
|
||||||
|
@ -28,9 +28,9 @@ public class BlockQuartz extends Block
|
||||||
|
|
||||||
public BlockQuartz(String prefix)
|
public BlockQuartz(String prefix)
|
||||||
{
|
{
|
||||||
super(Material.rock);
|
super(Material.SOLID);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(VARIANT, BlockQuartz.EnumType.DEFAULT));
|
this.setDefaultState(this.getBaseState().withProperty(VARIANT, BlockQuartz.EnumType.DEFAULT));
|
||||||
this.setTab(CheatTab.tabBlocks);
|
this.setTab(CheatTab.BLOCKS);
|
||||||
this.prefix = prefix;
|
this.prefix = prefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,13 +3,13 @@ package common.block.artificial;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.collect.Lists;
|
import common.collect.Lists;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
import common.entity.types.EntityLiving;
|
import common.entity.types.EntityLiving;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.properties.IProperty;
|
import common.properties.IProperty;
|
||||||
|
@ -44,7 +44,7 @@ public class BlockSlab extends Block
|
||||||
super(materialIn);
|
super(materialIn);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(FACING, Facing.DOWN).withProperty(DOUBLE, false)
|
this.setDefaultState(this.getBaseState().withProperty(FACING, Facing.DOWN).withProperty(DOUBLE, false)
|
||||||
.withProperty(SEAMLESS, false));
|
.withProperty(SEAMLESS, false));
|
||||||
this.setTab(materialIn == Material.wood ? CheatTab.tabWood : CheatTab.tabBlocks);
|
this.setTab(materialIn == Material.WOOD ? CheatTab.WOOD : CheatTab.BLOCKS);
|
||||||
|
|
||||||
// this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.5F);
|
// this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.5F);
|
||||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
|
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
|
||||||
|
|
|
@ -2,11 +2,11 @@ package common.block.artificial;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import common.block.Material;
|
||||||
import common.color.DyeColor;
|
import common.color.DyeColor;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.BlockLayer;
|
import common.model.BlockLayer;
|
||||||
import common.properties.IProperty;
|
import common.properties.IProperty;
|
||||||
import common.properties.PropertyEnum;
|
import common.properties.PropertyEnum;
|
||||||
|
@ -18,9 +18,9 @@ public class BlockStainedGlassPane extends BlockPane
|
||||||
|
|
||||||
public BlockStainedGlassPane()
|
public BlockStainedGlassPane()
|
||||||
{
|
{
|
||||||
super(Material.glass, false);
|
super(Material.TRANSLUCENT, false);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(NORTH, Boolean.valueOf(false)).withProperty(EAST, Boolean.valueOf(false)).withProperty(SOUTH, Boolean.valueOf(false)).withProperty(WEST, Boolean.valueOf(false)).withProperty(COLOR, DyeColor.WHITE));
|
this.setDefaultState(this.getBaseState().withProperty(NORTH, Boolean.valueOf(false)).withProperty(EAST, Boolean.valueOf(false)).withProperty(SOUTH, Boolean.valueOf(false)).withProperty(WEST, Boolean.valueOf(false)).withProperty(COLOR, DyeColor.WHITE));
|
||||||
this.setTab(CheatTab.tabBlocks);
|
this.setTab(CheatTab.BLOCKS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -4,13 +4,13 @@ import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
import common.entity.types.EntityLiving;
|
import common.entity.types.EntityLiving;
|
||||||
import common.init.BlockRegistry;
|
import common.init.BlockRegistry;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.BlockLayer;
|
import common.model.BlockLayer;
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
|
@ -61,7 +61,7 @@ public class BlockStairs extends Block
|
||||||
this.setResistance(this.modelBlock.getRawResistance() / 3.0F);
|
this.setResistance(this.modelBlock.getRawResistance() / 3.0F);
|
||||||
this.setStepSound(this.modelBlock.sound);
|
this.setStepSound(this.modelBlock.sound);
|
||||||
this.setLightOpacity(255);
|
this.setLightOpacity(255);
|
||||||
this.setTab(modelState.getBlock().getMaterial() == Material.wood ? CheatTab.tabWood : CheatTab.tabBlocks);
|
this.setTab(modelState.getBlock().getMaterial() == Material.WOOD ? CheatTab.WOOD : CheatTab.BLOCKS);
|
||||||
this.downTex = down;
|
this.downTex = down;
|
||||||
this.upTex = up;
|
this.upTex = up;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,10 +3,10 @@ package common.block.artificial;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.properties.IProperty;
|
import common.properties.IProperty;
|
||||||
|
@ -24,9 +24,9 @@ public class BlockStoneBrick extends Block
|
||||||
|
|
||||||
public BlockStoneBrick()
|
public BlockStoneBrick()
|
||||||
{
|
{
|
||||||
super(Material.rock);
|
super(Material.SOLID);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(VARIANT, BlockStoneBrick.EnumType.DEFAULT));
|
this.setDefaultState(this.getBaseState().withProperty(VARIANT, BlockStoneBrick.EnumType.DEFAULT));
|
||||||
this.setTab(CheatTab.tabBlocks);
|
this.setTab(CheatTab.BLOCKS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package common.block.artificial;
|
package common.block.artificial;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
import common.entity.types.EntityLiving;
|
import common.entity.types.EntityLiving;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.BlockLayer;
|
import common.model.BlockLayer;
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
|
@ -39,7 +39,7 @@ public class BlockTrapDoor extends Block
|
||||||
float f = 0.5F;
|
float f = 0.5F;
|
||||||
float f1 = 1.0F;
|
float f1 = 1.0F;
|
||||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||||
this.setTab(materialIn == Material.wood ? CheatTab.tabWood : CheatTab.tabTech);
|
this.setTab(materialIn == Material.WOOD ? CheatTab.WOOD : CheatTab.TECHNOLOGY);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -131,7 +131,7 @@ public class BlockTrapDoor extends Block
|
||||||
|
|
||||||
public boolean onBlockActivated(World worldIn, BlockPos pos, State state, EntityNPC playerIn, Facing side, float hitX, float hitY, float hitZ)
|
public boolean onBlockActivated(World worldIn, BlockPos pos, State state, EntityNPC playerIn, Facing side, float hitX, float hitY, float hitZ)
|
||||||
{
|
{
|
||||||
if (this.material == Material.iron)
|
if (this.material == Material.SOLID)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -293,7 +293,7 @@ public class BlockTrapDoor extends Block
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isMagnetic() {
|
public boolean isMagnetic() {
|
||||||
return this.material == Material.iron;
|
return this.material == Material.SOLID;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Transforms getTransform() {
|
public Transforms getTransform() {
|
||||||
|
|
|
@ -3,11 +3,11 @@ package common.block.artificial;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.model.ModelRotation;
|
import common.model.ModelRotation;
|
||||||
|
@ -39,7 +39,7 @@ public class BlockWall extends Block
|
||||||
this.setHardness(modelBlock.getRawHardness());
|
this.setHardness(modelBlock.getRawHardness());
|
||||||
this.setResistance(modelBlock.getRawResistance() / 3.0F);
|
this.setResistance(modelBlock.getRawResistance() / 3.0F);
|
||||||
this.setStepSound(modelBlock.sound);
|
this.setStepSound(modelBlock.sound);
|
||||||
this.setTab(CheatTab.tabBlocks);
|
this.setTab(CheatTab.BLOCKS);
|
||||||
}
|
}
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
|
@ -126,7 +126,7 @@ public class BlockWall extends Block
|
||||||
public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos)
|
public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos)
|
||||||
{
|
{
|
||||||
Block block = worldIn.getState(pos).getBlock();
|
Block block = worldIn.getState(pos).getBlock();
|
||||||
return (block != this && !(block instanceof BlockFenceGate) ? (block.getMaterial().isOpaque() && block.isFullCube() ? block.getMaterial() != Material.gourd : false) : true);
|
return (block != this && !(block instanceof BlockFenceGate) ? (block.getMaterial().isOpaque() && block.isFullCube() ? block.getMaterial() != Material.SOFT : false) : true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,11 +2,11 @@ package common.block.foliage;
|
||||||
|
|
||||||
import common.biome.Biome;
|
import common.biome.Biome;
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.init.Config;
|
import common.init.Config;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
|
@ -18,9 +18,9 @@ public class BlockBlackenedSoil extends Block
|
||||||
{
|
{
|
||||||
public BlockBlackenedSoil()
|
public BlockBlackenedSoil()
|
||||||
{
|
{
|
||||||
super(Material.grass);
|
super(Material.LOOSE);
|
||||||
this.setTickRandomly();
|
this.setTickRandomly();
|
||||||
this.setTab(CheatTab.tabNature);
|
this.setTab(CheatTab.NATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
|
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package common.block.foliage;
|
package common.block.foliage;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.BlockLayer;
|
import common.model.BlockLayer;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
|
@ -16,7 +16,7 @@ public class BlockBush extends Block
|
||||||
{
|
{
|
||||||
public BlockBush()
|
public BlockBush()
|
||||||
{
|
{
|
||||||
this(Material.plants);
|
this(Material.PLANT);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockBush(Material p_i46452_1_)
|
public BlockBush(Material p_i46452_1_)
|
||||||
|
@ -25,7 +25,7 @@ public class BlockBush extends Block
|
||||||
this.setTickRandomly();
|
this.setTickRandomly();
|
||||||
float f = 0.2F;
|
float f = 0.2F;
|
||||||
this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 3.0F, 0.5F + f);
|
this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 3.0F, 0.5F + f);
|
||||||
this.setTab(CheatTab.tabPlants);
|
this.setTab(CheatTab.PLANTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
|
public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package common.block.foliage;
|
package common.block.foliage;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.entity.DamageSource;
|
import common.entity.DamageSource;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.init.Config;
|
import common.init.Config;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.BlockLayer;
|
import common.model.BlockLayer;
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
|
@ -38,10 +38,10 @@ public class BlockCactus extends Block
|
||||||
|
|
||||||
public BlockCactus()
|
public BlockCactus()
|
||||||
{
|
{
|
||||||
super(Material.cactus);
|
super(Material.BLOCKING);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(AGE, Integer.valueOf(0)));
|
this.setDefaultState(this.getBaseState().withProperty(AGE, Integer.valueOf(0)));
|
||||||
this.setTickRandomly();
|
this.setTickRandomly();
|
||||||
this.setTab(CheatTab.tabPlants);
|
this.setTab(CheatTab.PLANTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
|
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
|
||||||
|
|
|
@ -2,6 +2,7 @@ package common.block.foliage;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
import common.block.BlockDirectional;
|
import common.block.BlockDirectional;
|
||||||
|
import common.block.Material;
|
||||||
import common.color.DyeColor;
|
import common.color.DyeColor;
|
||||||
import common.entity.types.EntityLiving;
|
import common.entity.types.EntityLiving;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
|
@ -9,7 +10,6 @@ import common.init.Config;
|
||||||
import common.init.Items;
|
import common.init.Items;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.BlockLayer;
|
import common.model.BlockLayer;
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
|
@ -31,7 +31,7 @@ public class BlockCocoa extends BlockDirectional implements IGrowable
|
||||||
|
|
||||||
public BlockCocoa()
|
public BlockCocoa()
|
||||||
{
|
{
|
||||||
super(Material.plants);
|
super(Material.PLANT);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(FACING, Facing.NORTH).withProperty(AGE, Integer.valueOf(0)));
|
this.setDefaultState(this.getBaseState().withProperty(FACING, Facing.NORTH).withProperty(AGE, Integer.valueOf(0)));
|
||||||
this.setTickRandomly();
|
this.setTickRandomly();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
package common.block.foliage;
|
package common.block.foliage;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.init.Items;
|
import common.init.Items;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemShears;
|
import common.item.ItemShears;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
|
@ -20,7 +20,7 @@ public class BlockDeadBush extends BlockBush
|
||||||
{
|
{
|
||||||
public BlockDeadBush()
|
public BlockDeadBush()
|
||||||
{
|
{
|
||||||
super(Material.vine);
|
super(Material.BUSH);
|
||||||
float f = 0.4F;
|
float f = 0.4F;
|
||||||
this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.8F, 0.5F + f);
|
this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.8F, 0.5F + f);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
import common.block.BlockDirectional;
|
import common.block.BlockDirectional;
|
||||||
|
import common.block.Material;
|
||||||
import common.block.SoundType;
|
import common.block.SoundType;
|
||||||
import common.color.Colorizer;
|
import common.color.Colorizer;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
|
@ -16,7 +17,6 @@ import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemShears;
|
import common.item.ItemShears;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.properties.IProperty;
|
import common.properties.IProperty;
|
||||||
|
@ -40,7 +40,7 @@ public class BlockDoublePlant extends BlockBush implements IGrowable
|
||||||
|
|
||||||
public BlockDoublePlant()
|
public BlockDoublePlant()
|
||||||
{
|
{
|
||||||
super(Material.vine);
|
super(Material.BUSH);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(VARIANT, BlockDoublePlant.EnumPlantType.SUNFLOWER).withProperty(HALF, BlockDoublePlant.EnumBlockHalf.LOWER).withProperty(FACING, Facing.NORTH));
|
this.setDefaultState(this.getBaseState().withProperty(VARIANT, BlockDoublePlant.EnumPlantType.SUNFLOWER).withProperty(HALF, BlockDoublePlant.EnumBlockHalf.LOWER).withProperty(FACING, Facing.NORTH));
|
||||||
this.setHardness(0.0F);
|
this.setHardness(0.0F);
|
||||||
this.setStepSound(SoundType.GRASS);
|
this.setStepSound(SoundType.GRASS);
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package common.block.foliage;
|
package common.block.foliage;
|
||||||
|
|
||||||
|
import common.block.Material;
|
||||||
import common.block.SoundType;
|
import common.block.SoundType;
|
||||||
import common.init.Items;
|
import common.init.Items;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.material.Material;
|
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
|
|
||||||
|
@ -14,8 +14,8 @@ public class BlockDryLeaves extends BlockLeavesBase
|
||||||
|
|
||||||
public BlockDryLeaves()
|
public BlockDryLeaves()
|
||||||
{
|
{
|
||||||
super(Material.gourd);
|
super(Material.SOFT);
|
||||||
this.setTab(CheatTab.tabPlants);
|
this.setTab(CheatTab.PLANTS);
|
||||||
this.setHardness(0.2F);
|
this.setHardness(0.2F);
|
||||||
this.setLightOpacity(1);
|
this.setLightOpacity(1);
|
||||||
this.setStepSound(SoundType.GRASS);
|
this.setStepSound(SoundType.GRASS);
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package common.block.foliage;
|
package common.block.foliage;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.block.natural.BlockDirt;
|
import common.block.natural.BlockDirt;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
import common.entity.types.EntityLiving;
|
import common.entity.types.EntityLiving;
|
||||||
|
@ -8,7 +9,6 @@ import common.init.Blocks;
|
||||||
import common.init.Config;
|
import common.init.Config;
|
||||||
import common.init.ItemRegistry;
|
import common.init.ItemRegistry;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.properties.IProperty;
|
import common.properties.IProperty;
|
||||||
|
@ -28,7 +28,7 @@ public class BlockFarmland extends Block
|
||||||
|
|
||||||
public BlockFarmland()
|
public BlockFarmland()
|
||||||
{
|
{
|
||||||
super(Material.ground);
|
super(Material.LOOSE);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(MOISTURE, Integer.valueOf(0)));
|
this.setDefaultState(this.getBaseState().withProperty(MOISTURE, Integer.valueOf(0)));
|
||||||
this.setTickRandomly();
|
this.setTickRandomly();
|
||||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.9375F, 1.0F);
|
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.9375F, 1.0F);
|
||||||
|
@ -103,7 +103,7 @@ public class BlockFarmland extends Block
|
||||||
{
|
{
|
||||||
for (BlockPos.MutableBlockPos blockpos$mutableblockpos : BlockPos.getAllInBoxMutable(pos.add(-4, 0, -4), pos.add(4, 1, 4)))
|
for (BlockPos.MutableBlockPos blockpos$mutableblockpos : BlockPos.getAllInBoxMutable(pos.add(-4, 0, -4), pos.add(4, 1, 4)))
|
||||||
{
|
{
|
||||||
if (worldIn.getState(blockpos$mutableblockpos).getBlock().getMaterial() == Material.water)
|
if (worldIn.getState(blockpos$mutableblockpos).getBlock().getMaterial() == Material.WATER)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,13 @@ package common.block.foliage;
|
||||||
|
|
||||||
import common.biome.IBiome;
|
import common.biome.IBiome;
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.block.natural.BlockDirt;
|
import common.block.natural.BlockDirt;
|
||||||
import common.color.Colorizer;
|
import common.color.Colorizer;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.init.Config;
|
import common.init.Config;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.BlockLayer;
|
import common.model.BlockLayer;
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
|
@ -27,10 +27,10 @@ public class BlockGrass extends Block implements IGrowable
|
||||||
|
|
||||||
public BlockGrass()
|
public BlockGrass()
|
||||||
{
|
{
|
||||||
super(Material.grass);
|
super(Material.LOOSE);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(SNOWY, Boolean.valueOf(false)));
|
this.setDefaultState(this.getBaseState().withProperty(SNOWY, Boolean.valueOf(false)));
|
||||||
this.setTickRandomly();
|
this.setTickRandomly();
|
||||||
this.setTab(CheatTab.tabNature);
|
this.setTab(CheatTab.NATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package common.block.foliage;
|
package common.block.foliage;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.entity.types.EntityLiving;
|
import common.entity.types.EntityLiving;
|
||||||
import common.init.ItemRegistry;
|
import common.init.ItemRegistry;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.properties.IProperty;
|
import common.properties.IProperty;
|
||||||
|
|
|
@ -3,6 +3,7 @@ package common.block.foliage;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.block.SoundType;
|
import common.block.SoundType;
|
||||||
import common.collect.Lists;
|
import common.collect.Lists;
|
||||||
import common.color.Colorizer;
|
import common.color.Colorizer;
|
||||||
|
@ -15,7 +16,6 @@ import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemShears;
|
import common.item.ItemShears;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.model.ParticleType;
|
import common.model.ParticleType;
|
||||||
|
@ -43,11 +43,11 @@ public class BlockLeaves extends BlockLeavesBase
|
||||||
|
|
||||||
public BlockLeaves(WoodType type)
|
public BlockLeaves(WoodType type)
|
||||||
{
|
{
|
||||||
super(Material.leaves);
|
super(Material.LEAVES);
|
||||||
this.type = type;
|
this.type = type;
|
||||||
this.setDefaultState(this.getBaseState().withProperty(TYPE, LeavesType.SPRING).withProperty(DECAY, Boolean.valueOf(true)));
|
this.setDefaultState(this.getBaseState().withProperty(TYPE, LeavesType.SPRING).withProperty(DECAY, Boolean.valueOf(true)));
|
||||||
this.setTickRandomly();
|
this.setTickRandomly();
|
||||||
this.setTab(CheatTab.tabPlants);
|
this.setTab(CheatTab.PLANTS);
|
||||||
this.setHardness(0.2F);
|
this.setHardness(0.2F);
|
||||||
this.setLightOpacity(1);
|
this.setLightOpacity(1);
|
||||||
this.setStepSound(SoundType.GRASS);
|
this.setStepSound(SoundType.GRASS);
|
||||||
|
@ -88,7 +88,7 @@ public class BlockLeaves extends BlockLeavesBase
|
||||||
BlockPos blockpos = pos.add(j1, k1, l1);
|
BlockPos blockpos = pos.add(j1, k1, l1);
|
||||||
State iblockstate = worldIn.getState(blockpos);
|
State iblockstate = worldIn.getState(blockpos);
|
||||||
|
|
||||||
if (iblockstate.getBlock().getMaterial() == Material.leaves && !((Boolean)iblockstate.getValue(DECAY)).booleanValue())
|
if (iblockstate.getBlock().getMaterial() == Material.LEAVES && !((Boolean)iblockstate.getValue(DECAY)).booleanValue())
|
||||||
{
|
{
|
||||||
worldIn.setState(blockpos, iblockstate.withProperty(DECAY, Boolean.valueOf(true)), 4);
|
worldIn.setState(blockpos, iblockstate.withProperty(DECAY, Boolean.valueOf(true)), 4);
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,7 @@ public class BlockLeaves extends BlockLeavesBase
|
||||||
|
|
||||||
if (!(block instanceof BlockLog))
|
if (!(block instanceof BlockLog))
|
||||||
{
|
{
|
||||||
if (block.getMaterial() == Material.leaves)
|
if (block.getMaterial() == Material.LEAVES)
|
||||||
{
|
{
|
||||||
this.surroundings[(i2 + l1) * k1 + (j2 + l1) * j1 + k2 + l1] = -2;
|
this.surroundings[(i2 + l1) * k1 + (j2 + l1) * j1 + k2 + l1] = -2;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package common.block.foliage;
|
package common.block.foliage;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
import common.material.Material;
|
import common.block.Material;
|
||||||
import common.model.BlockLayer;
|
import common.model.BlockLayer;
|
||||||
|
|
||||||
public class BlockLeavesBase extends Block
|
public class BlockLeavesBase extends Block
|
||||||
|
|
|
@ -30,7 +30,7 @@ public class BlockLilyPad extends BlockBush
|
||||||
float f1 = 0.015625F;
|
float f1 = 0.015625F;
|
||||||
this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f1, 0.5F + f);
|
this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f1, 0.5F + f);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(BlockDirectional.FACING, Facing.NORTH));
|
this.setDefaultState(this.getBaseState().withProperty(BlockDirectional.FACING, Facing.NORTH));
|
||||||
this.setTab(CheatTab.tabPlants);
|
this.setTab(CheatTab.PLANTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addCollisionBoxesToList(World worldIn, BlockPos pos, State state, BoundingBox mask, List<BoundingBox> list, Entity collidingEntity)
|
public void addCollisionBoxesToList(World worldIn, BlockPos pos, State state, BoundingBox mask, List<BoundingBox> list, Entity collidingEntity)
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package common.block.foliage;
|
package common.block.foliage;
|
||||||
|
|
||||||
import common.block.BlockRotatedPillar;
|
import common.block.BlockRotatedPillar;
|
||||||
|
import common.block.Material;
|
||||||
import common.block.SoundType;
|
import common.block.SoundType;
|
||||||
import common.entity.types.EntityLiving;
|
import common.entity.types.EntityLiving;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.model.ModelRotation;
|
import common.model.ModelRotation;
|
||||||
|
@ -23,9 +23,9 @@ public class BlockLog extends BlockRotatedPillar
|
||||||
|
|
||||||
public BlockLog()
|
public BlockLog()
|
||||||
{
|
{
|
||||||
super(Material.wood);
|
super(Material.WOOD);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(LOG_AXIS, BlockLog.EnumAxis.Y));
|
this.setDefaultState(this.getBaseState().withProperty(LOG_AXIS, BlockLog.EnumAxis.Y));
|
||||||
this.setTab(CheatTab.tabWood);
|
this.setTab(CheatTab.WOOD);
|
||||||
this.setHardness(2.0F);
|
this.setHardness(2.0F);
|
||||||
this.setStepSound(SoundType.WOOD);
|
this.setStepSound(SoundType.WOOD);
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ public class BlockLog extends BlockRotatedPillar
|
||||||
{
|
{
|
||||||
State iblockstate = worldIn.getState(blockpos);
|
State iblockstate = worldIn.getState(blockpos);
|
||||||
|
|
||||||
if (iblockstate.getBlock().getMaterial() == Material.leaves && !((Boolean)iblockstate.getValue(BlockLeaves.DECAY)).booleanValue())
|
if (iblockstate.getBlock().getMaterial() == Material.LEAVES && !((Boolean)iblockstate.getValue(BlockLeaves.DECAY)).booleanValue())
|
||||||
{
|
{
|
||||||
worldIn.setState(blockpos, iblockstate.withProperty(BlockLeaves.DECAY, Boolean.valueOf(true)), 4);
|
worldIn.setState(blockpos, iblockstate.withProperty(BlockLeaves.DECAY, Boolean.valueOf(true)), 4);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package common.block.foliage;
|
package common.block.foliage;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.init.Items;
|
import common.init.Items;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
|
@ -14,8 +14,8 @@ public class BlockMelon extends Block
|
||||||
{
|
{
|
||||||
public BlockMelon()
|
public BlockMelon()
|
||||||
{
|
{
|
||||||
super(Material.gourd);
|
super(Material.SOFT);
|
||||||
this.setTab(CheatTab.tabPlants);
|
this.setTab(CheatTab.PLANTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package common.block.foliage;
|
package common.block.foliage;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.block.natural.BlockDirt;
|
import common.block.natural.BlockDirt;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.init.Config;
|
import common.init.Config;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.model.ParticleType;
|
import common.model.ParticleType;
|
||||||
|
@ -25,10 +25,10 @@ public class BlockMycelium extends Block
|
||||||
|
|
||||||
public BlockMycelium()
|
public BlockMycelium()
|
||||||
{
|
{
|
||||||
super(Material.grass);
|
super(Material.LOOSE);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(SNOWY, Boolean.valueOf(false)));
|
this.setDefaultState(this.getBaseState().withProperty(SNOWY, Boolean.valueOf(false)));
|
||||||
this.setTickRandomly();
|
this.setTickRandomly();
|
||||||
this.setTab(CheatTab.tabNature);
|
this.setTab(CheatTab.NATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package common.block.foliage;
|
package common.block.foliage;
|
||||||
|
|
||||||
import common.block.BlockDirectional;
|
import common.block.BlockDirectional;
|
||||||
|
import common.block.Material;
|
||||||
import common.entity.types.EntityLiving;
|
import common.entity.types.EntityLiving;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.model.ModelRotation;
|
import common.model.ModelRotation;
|
||||||
|
@ -29,10 +29,10 @@ public class BlockPumpkin extends BlockDirectional
|
||||||
|
|
||||||
public BlockPumpkin()
|
public BlockPumpkin()
|
||||||
{
|
{
|
||||||
super(Material.gourd);
|
super(Material.SOFT);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(FACING, Facing.NORTH));
|
this.setDefaultState(this.getBaseState().withProperty(FACING, Facing.NORTH));
|
||||||
// this.setTickRandomly(true);
|
// this.setTickRandomly(true);
|
||||||
this.setTab(CheatTab.tabPlants);
|
this.setTab(CheatTab.PLANTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
// public void onBlockAdded(IWorldServer worldIn, BlockPos pos, IBlockState state)
|
// public void onBlockAdded(IWorldServer worldIn, BlockPos pos, IBlockState state)
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package common.block.foliage;
|
package common.block.foliage;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.init.Config;
|
import common.init.Config;
|
||||||
import common.init.Items;
|
import common.init.Items;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.BlockLayer;
|
import common.model.BlockLayer;
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
|
@ -26,7 +26,7 @@ public class BlockReed extends Block
|
||||||
|
|
||||||
public BlockReed()
|
public BlockReed()
|
||||||
{
|
{
|
||||||
super(Material.plants);
|
super(Material.PLANT);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(AGE, Integer.valueOf(0)));
|
this.setDefaultState(this.getBaseState().withProperty(AGE, Integer.valueOf(0)));
|
||||||
float f = 0.375F;
|
float f = 0.375F;
|
||||||
this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 1.0F, 0.5F + f);
|
this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 1.0F, 0.5F + f);
|
||||||
|
@ -85,7 +85,7 @@ public class BlockReed extends Block
|
||||||
{
|
{
|
||||||
for (Facing enumfacing : Facing.Plane.HORIZONTAL)
|
for (Facing enumfacing : Facing.Plane.HORIZONTAL)
|
||||||
{
|
{
|
||||||
if (worldIn.getState(pos.offset(enumfacing).down()).getBlock().getMaterial() == Material.water)
|
if (worldIn.getState(pos.offset(enumfacing).down()).getBlock().getMaterial() == Material.WATER)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class BlockSapling extends BlockBush implements IGrowable
|
||||||
this.setDefaultState(this.getBaseState() /* .withProperty(TYPE, BlockPlanks.EnumType.OAK) */ .withProperty(STAGE, Integer.valueOf(0)));
|
this.setDefaultState(this.getBaseState() /* .withProperty(TYPE, BlockPlanks.EnumType.OAK) */ .withProperty(STAGE, Integer.valueOf(0)));
|
||||||
float f = 0.4F;
|
float f = 0.4F;
|
||||||
this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 2.0F, 0.5F + f);
|
this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 2.0F, 0.5F + f);
|
||||||
this.setTab(CheatTab.tabPlants);
|
this.setTab(CheatTab.PLANTS);
|
||||||
this.type = type;
|
this.type = type;
|
||||||
SAPLINGS.add(this);
|
SAPLINGS.add(this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ package common.block.foliage;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import common.block.Material;
|
||||||
import common.color.Colorizer;
|
import common.color.Colorizer;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
|
@ -11,7 +12,6 @@ import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemShears;
|
import common.item.ItemShears;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.properties.IProperty;
|
import common.properties.IProperty;
|
||||||
|
@ -31,7 +31,7 @@ public class BlockTallGrass extends BlockBush implements IGrowable
|
||||||
|
|
||||||
public BlockTallGrass()
|
public BlockTallGrass()
|
||||||
{
|
{
|
||||||
super(Material.vine);
|
super(Material.BUSH);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(TYPE, BlockTallGrass.EnumType.DEAD_BUSH));
|
this.setDefaultState(this.getBaseState().withProperty(TYPE, BlockTallGrass.EnumType.DEAD_BUSH));
|
||||||
float f = 0.4F;
|
float f = 0.4F;
|
||||||
this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.8F, 0.5F + f);
|
this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.8F, 0.5F + f);
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package common.block.foliage;
|
package common.block.foliage;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.properties.IProperty;
|
import common.properties.IProperty;
|
||||||
|
@ -20,9 +20,9 @@ public class BlockTianSoil extends Block
|
||||||
|
|
||||||
public BlockTianSoil()
|
public BlockTianSoil()
|
||||||
{
|
{
|
||||||
super(Material.rock);
|
super(Material.SOLID);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(SNOWY, Boolean.valueOf(false)));
|
this.setDefaultState(this.getBaseState().withProperty(SNOWY, Boolean.valueOf(false)));
|
||||||
this.setTab(CheatTab.tabNature);
|
this.setTab(CheatTab.NATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public State getActualState(State state, IWorldAccess worldIn, BlockPos pos)
|
public State getActualState(State state, IWorldAccess worldIn, BlockPos pos)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package common.block.foliage;
|
package common.block.foliage;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.color.Colorizer;
|
import common.color.Colorizer;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
import common.entity.types.EntityLiving;
|
import common.entity.types.EntityLiving;
|
||||||
|
@ -10,7 +11,6 @@ import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemShears;
|
import common.item.ItemShears;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.BlockLayer;
|
import common.model.BlockLayer;
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
|
@ -38,10 +38,10 @@ public class BlockVine extends Block
|
||||||
|
|
||||||
public BlockVine()
|
public BlockVine()
|
||||||
{
|
{
|
||||||
super(Material.vine);
|
super(Material.BUSH);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(UP, Boolean.valueOf(false)).withProperty(NORTH, Boolean.valueOf(false)).withProperty(EAST, Boolean.valueOf(false)).withProperty(SOUTH, Boolean.valueOf(false)).withProperty(WEST, Boolean.valueOf(false)));
|
this.setDefaultState(this.getBaseState().withProperty(UP, Boolean.valueOf(false)).withProperty(NORTH, Boolean.valueOf(false)).withProperty(EAST, Boolean.valueOf(false)).withProperty(SOUTH, Boolean.valueOf(false)).withProperty(WEST, Boolean.valueOf(false)));
|
||||||
this.setTickRandomly();
|
this.setTickRandomly();
|
||||||
this.setTab(CheatTab.tabPlants);
|
this.setTab(CheatTab.PLANTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
package common.block.foliage;
|
package common.block.foliage;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.init.Config;
|
import common.init.Config;
|
||||||
import common.init.Items;
|
import common.init.Items;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.properties.IProperty;
|
import common.properties.IProperty;
|
||||||
|
@ -24,7 +24,7 @@ public class BlockWart extends BlockBush
|
||||||
|
|
||||||
public BlockWart()
|
public BlockWart()
|
||||||
{
|
{
|
||||||
super(Material.plants);
|
super(Material.PLANT);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(AGE, Integer.valueOf(0)));
|
this.setDefaultState(this.getBaseState().withProperty(AGE, Integer.valueOf(0)));
|
||||||
this.setTickRandomly();
|
this.setTickRandomly();
|
||||||
float f = 0.5F;
|
float f = 0.5F;
|
||||||
|
|
|
@ -4,10 +4,10 @@ import java.util.EnumSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.block.artificial.BlockDoor;
|
import common.block.artificial.BlockDoor;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.init.Config;
|
import common.init.Config;
|
||||||
import common.material.Material;
|
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.util.Facing;
|
import common.util.Facing;
|
||||||
|
@ -76,10 +76,10 @@ public class BlockDynamicLiquid extends BlockLiquid
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.adjacentSourceBlocks >= 2 && ((Config.mergeWater && this.material == Material.water)
|
if (this.adjacentSourceBlocks >= 2 && ((Config.mergeWater && this.material == Material.WATER)
|
||||||
|| (Config.mergeLava && this.material == Material.lava)
|
|| (Config.mergeLava && this.material == Material.LAVA)
|
||||||
|| (this.infinite && Config.mergeInfinite && this.material != Material.water && this.material != Material.lava)
|
|| (this.infinite && Config.mergeInfinite && this.material != Material.WATER && this.material != Material.LAVA)
|
||||||
|| (!this.infinite && Config.mergeFinite && this.material != Material.water && this.material != Material.lava)))
|
|| (!this.infinite && Config.mergeFinite && this.material != Material.WATER && this.material != Material.LAVA)))
|
||||||
{
|
{
|
||||||
State iblockstate1 = worldIn.getState(pos.down());
|
State iblockstate1 = worldIn.getState(pos.down());
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ public class BlockDynamicLiquid extends BlockLiquid
|
||||||
|
|
||||||
if (this.canFlowInto(worldIn, pos.down(), iblockstate))
|
if (this.canFlowInto(worldIn, pos.down(), iblockstate))
|
||||||
{
|
{
|
||||||
if (this.material == Material.lava && worldIn.getState(pos.down()).getBlock().getMaterial().isColdLiquid())
|
if (this.material == Material.LAVA && worldIn.getState(pos.down()).getBlock().getMaterial().isColdLiquid())
|
||||||
{
|
{
|
||||||
worldIn.setState(pos.down(), Blocks.stone.getState());
|
worldIn.setState(pos.down(), Blocks.stone.getState());
|
||||||
this.triggerMixEffects(worldIn, pos.down());
|
this.triggerMixEffects(worldIn, pos.down());
|
||||||
|
@ -172,7 +172,7 @@ public class BlockDynamicLiquid extends BlockLiquid
|
||||||
{
|
{
|
||||||
if (state.getBlock() != Blocks.air)
|
if (state.getBlock() != Blocks.air)
|
||||||
{
|
{
|
||||||
if (this.material == Material.lava)
|
if (this.material == Material.LAVA)
|
||||||
{
|
{
|
||||||
this.triggerMixEffects(worldIn, pos);
|
this.triggerMixEffects(worldIn, pos);
|
||||||
}
|
}
|
||||||
|
@ -262,7 +262,7 @@ public class BlockDynamicLiquid extends BlockLiquid
|
||||||
private boolean isBlocked(World worldIn, BlockPos pos, State state)
|
private boolean isBlocked(World worldIn, BlockPos pos, State state)
|
||||||
{
|
{
|
||||||
Block block = worldIn.getState(pos).getBlock();
|
Block block = worldIn.getState(pos).getBlock();
|
||||||
return !(block instanceof BlockDoor) && block != Blocks.sign && block != Blocks.ladder && block != Blocks.reeds ? (block.getMaterial() == Material.portal ? true : block.getMaterial().blocksMovement()) : true;
|
return !(block instanceof BlockDoor) && block != Blocks.sign && block != Blocks.ladder && block != Blocks.reeds ? (block.getMaterial() == Material.PORTAL ? true : block.getMaterial().blocksMovement()) : true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int checkAdjacentBlock(World worldIn, BlockPos pos, int currentMinLevel)
|
protected int checkAdjacentBlock(World worldIn, BlockPos pos, int currentMinLevel)
|
||||||
|
@ -292,7 +292,7 @@ public class BlockDynamicLiquid extends BlockLiquid
|
||||||
private boolean canFlowInto(World worldIn, BlockPos pos, State state)
|
private boolean canFlowInto(World worldIn, BlockPos pos, State state)
|
||||||
{
|
{
|
||||||
Material material = state.getBlock().getMaterial();
|
Material material = state.getBlock().getMaterial();
|
||||||
return material != this.material && material != Material.lava && !this.isBlocked(worldIn, pos, state);
|
return material != this.material && material != Material.LAVA && !this.isBlocked(worldIn, pos, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state)
|
public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package common.block.liquid;
|
package common.block.liquid;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.color.Colorizer;
|
import common.color.Colorizer;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
|
@ -8,7 +9,6 @@ import common.init.Config;
|
||||||
import common.init.FluidRegistry;
|
import common.init.FluidRegistry;
|
||||||
import common.init.SoundEvent;
|
import common.init.SoundEvent;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.BlockLayer;
|
import common.model.BlockLayer;
|
||||||
import common.model.ParticleType;
|
import common.model.ParticleType;
|
||||||
import common.properties.IProperty;
|
import common.properties.IProperty;
|
||||||
|
@ -51,7 +51,7 @@ public abstract class BlockLiquid extends Block
|
||||||
|
|
||||||
public int colorMultiplier(IWorldAccess worldIn, BlockPos pos, int renderPass)
|
public int colorMultiplier(IWorldAccess worldIn, BlockPos pos, int renderPass)
|
||||||
{
|
{
|
||||||
return this.material == Material.water ? Colorizer.getWaterColor(worldIn, pos) : 16777215;
|
return this.material == Material.WATER ? Colorizer.getWaterColor(worldIn, pos) : 16777215;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -96,13 +96,10 @@ public abstract class BlockLiquid extends Block
|
||||||
return liquid && ((Integer)state.getValue(LEVEL)).intValue() == 0;
|
return liquid && ((Integer)state.getValue(LEVEL)).intValue() == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether this Block is solid on the given Side
|
|
||||||
*/
|
|
||||||
public boolean isBlockSolid(IBlockAccess worldIn, BlockPos pos, Facing side)
|
public boolean isBlockSolid(IBlockAccess worldIn, BlockPos pos, Facing side)
|
||||||
{
|
{
|
||||||
Material material = worldIn.getState(pos).getBlock().getMaterial();
|
Block block = worldIn.getState(pos).getBlock();
|
||||||
return material == this.material ? false : (side == Facing.UP ? true : (material == Material.ice ? false : super.isBlockSolid(worldIn, pos, side)));
|
return block.getMaterial() == this.material ? false : (side == Facing.UP ? true : (block != Blocks.ice && worldIn.getState(pos).getBlock().getMaterial().isSolid()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean shouldSideBeRendered(IWorldAccess worldIn, BlockPos pos, Facing side)
|
public boolean shouldSideBeRendered(IWorldAccess worldIn, BlockPos pos, Facing side)
|
||||||
|
@ -241,7 +238,7 @@ public abstract class BlockLiquid extends Block
|
||||||
double d1 = (double)pos.getY();
|
double d1 = (double)pos.getY();
|
||||||
double d2 = (double)pos.getZ();
|
double d2 = (double)pos.getZ();
|
||||||
|
|
||||||
if (this.material == Material.water)
|
if (this.material == Material.WATER)
|
||||||
{
|
{
|
||||||
int i = ((Integer)state.getValue(LEVEL)).intValue();
|
int i = ((Integer)state.getValue(LEVEL)).intValue();
|
||||||
|
|
||||||
|
@ -258,7 +255,7 @@ public abstract class BlockLiquid extends Block
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.material == Material.lava && worldIn.getState(pos.up()).getBlock() == Blocks.air && !worldIn.getState(pos.up()).getBlock().isOpaqueCube())
|
if (this.material == Material.LAVA && worldIn.getState(pos.up()).getBlock() == Blocks.air && !worldIn.getState(pos.up()).getBlock().isOpaqueCube())
|
||||||
{
|
{
|
||||||
if (rand.chance(100))
|
if (rand.chance(100))
|
||||||
{
|
{
|
||||||
|
@ -285,7 +282,7 @@ public abstract class BlockLiquid extends Block
|
||||||
double d5 = d1 - 1.05D;
|
double d5 = d1 - 1.05D;
|
||||||
double d7 = d2 + (double)rand.floatv();
|
double d7 = d2 + (double)rand.floatv();
|
||||||
|
|
||||||
if (this.material == Material.water)
|
if (this.material == Material.WATER)
|
||||||
{
|
{
|
||||||
worldIn.spawnParticle(ParticleType.DRIP_WATER, d3, d5, d7, 0.0D, 0.0D, 0.0D);
|
worldIn.spawnParticle(ParticleType.DRIP_WATER, d3, d5, d7, 0.0D, 0.0D, 0.0D);
|
||||||
}
|
}
|
||||||
|
@ -320,7 +317,7 @@ public abstract class BlockLiquid extends Block
|
||||||
{
|
{
|
||||||
if(worldIn.client || !Config.liquidPhysics)
|
if(worldIn.client || !Config.liquidPhysics)
|
||||||
return true;
|
return true;
|
||||||
if (this.material == Material.lava)
|
if (this.material == Material.LAVA)
|
||||||
{
|
{
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
|
|
||||||
|
@ -397,11 +394,11 @@ public abstract class BlockLiquid extends Block
|
||||||
|
|
||||||
public static BlockDynamicLiquid getFlowingBlock(BlockStaticLiquid block)
|
public static BlockDynamicLiquid getFlowingBlock(BlockStaticLiquid block)
|
||||||
{
|
{
|
||||||
if (block.getMaterial() == Material.water)
|
if (block.getMaterial() == Material.WATER)
|
||||||
{
|
{
|
||||||
return Blocks.flowing_water;
|
return Blocks.flowing_water;
|
||||||
}
|
}
|
||||||
else if (block.getMaterial() == Material.lava)
|
else if (block.getMaterial() == Material.LAVA)
|
||||||
{
|
{
|
||||||
return Blocks.flowing_lava;
|
return Blocks.flowing_lava;
|
||||||
}
|
}
|
||||||
|
@ -413,11 +410,11 @@ public abstract class BlockLiquid extends Block
|
||||||
|
|
||||||
public static BlockStaticLiquid getStaticBlock(BlockDynamicLiquid block)
|
public static BlockStaticLiquid getStaticBlock(BlockDynamicLiquid block)
|
||||||
{
|
{
|
||||||
if (block.getMaterial() == Material.water)
|
if (block.getMaterial() == Material.WATER)
|
||||||
{
|
{
|
||||||
return Blocks.water;
|
return Blocks.water;
|
||||||
}
|
}
|
||||||
else if (block.getMaterial() == Material.lava)
|
else if (block.getMaterial() == Material.LAVA)
|
||||||
{
|
{
|
||||||
return Blocks.lava;
|
return Blocks.lava;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package common.block.liquid;
|
package common.block.liquid;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.init.Config;
|
import common.init.Config;
|
||||||
import common.material.Material;
|
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.util.Facing;
|
import common.util.Facing;
|
||||||
|
@ -15,7 +15,7 @@ public class BlockStaticLiquid extends BlockLiquid
|
||||||
{
|
{
|
||||||
public BlockStaticLiquid(Material materialIn, boolean opaque, int rate)
|
public BlockStaticLiquid(Material materialIn, boolean opaque, int rate)
|
||||||
{
|
{
|
||||||
super(materialIn, materialIn == Material.lava, opaque, rate);
|
super(materialIn, materialIn == Material.LAVA, opaque, rate);
|
||||||
// this.setTickRandomly(false);
|
// this.setTickRandomly(false);
|
||||||
//
|
//
|
||||||
// if (materialIn == Material.lava)
|
// if (materialIn == Material.lava)
|
||||||
|
@ -44,7 +44,7 @@ public class BlockStaticLiquid extends BlockLiquid
|
||||||
|
|
||||||
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
|
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
|
||||||
{
|
{
|
||||||
if (Config.lavaFire && this.material == Material.lava)
|
if (Config.lavaFire && this.material == Material.LAVA)
|
||||||
{
|
{
|
||||||
if (Config.fire)
|
if (Config.fire)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package common.block.natural;
|
package common.block.natural;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
import common.material.Material;
|
import common.block.Material;
|
||||||
import common.model.ParticleType;
|
import common.model.ParticleType;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
|
@ -10,7 +10,7 @@ import common.world.State;
|
||||||
|
|
||||||
public class BlockBedrock extends Block {
|
public class BlockBedrock extends Block {
|
||||||
public BlockBedrock() {
|
public BlockBedrock() {
|
||||||
super(Material.rock);
|
super(Material.SOLID);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void randomDisplayTick(AWorldClient worldIn, BlockPos pos, State state, Random rand)
|
public void randomDisplayTick(AWorldClient worldIn, BlockPos pos, State state, Random rand)
|
||||||
|
|
|
@ -2,10 +2,10 @@ package common.block.natural;
|
||||||
|
|
||||||
import common.biome.Biome;
|
import common.biome.Biome;
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.init.Config;
|
import common.init.Config;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.material.Material;
|
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
|
@ -15,9 +15,9 @@ public class BlockBlackenedDirt extends Block
|
||||||
{
|
{
|
||||||
public BlockBlackenedDirt()
|
public BlockBlackenedDirt()
|
||||||
{
|
{
|
||||||
super(Material.ground);
|
super(Material.LOOSE);
|
||||||
this.setTickRandomly();
|
this.setTickRandomly();
|
||||||
this.setTab(CheatTab.tabNature);
|
this.setTab(CheatTab.NATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
|
public void updateTick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
package common.block.natural;
|
package common.block.natural;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.init.ItemRegistry;
|
import common.init.ItemRegistry;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.material.Material;
|
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
|
|
||||||
public class BlockBlackenedStone extends Block {
|
public class BlockBlackenedStone extends Block {
|
||||||
public BlockBlackenedStone() {
|
public BlockBlackenedStone() {
|
||||||
super(Material.rock);
|
super(Material.SOLID);
|
||||||
this.setTab(CheatTab.tabNature);
|
this.setTab(CheatTab.NATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Item getItemDropped(State state, Random rand, int fortune) {
|
public Item getItemDropped(State state, Random rand, int fortune) {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package common.block.natural;
|
package common.block.natural;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.init.Items;
|
import common.init.Items;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.material.Material;
|
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@ public class BlockClay extends Block
|
||||||
{
|
{
|
||||||
public BlockClay()
|
public BlockClay()
|
||||||
{
|
{
|
||||||
super(Material.clay);
|
super(Material.LOOSE);
|
||||||
this.setTab(CheatTab.tabNature);
|
this.setTab(CheatTab.NATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -3,11 +3,11 @@ package common.block.natural;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.properties.IProperty;
|
import common.properties.IProperty;
|
||||||
|
@ -26,9 +26,9 @@ public class BlockDirt extends Block
|
||||||
|
|
||||||
public BlockDirt()
|
public BlockDirt()
|
||||||
{
|
{
|
||||||
super(Material.ground);
|
super(Material.LOOSE);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(VARIANT, BlockDirt.DirtType.DIRT).withProperty(SNOWY, Boolean.valueOf(false)));
|
this.setDefaultState(this.getBaseState().withProperty(VARIANT, BlockDirt.DirtType.DIRT).withProperty(SNOWY, Boolean.valueOf(false)));
|
||||||
this.setTab(CheatTab.tabNature);
|
this.setTab(CheatTab.NATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
|
|
|
@ -3,11 +3,11 @@ package common.block.natural;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.init.Config;
|
import common.init.Config;
|
||||||
import common.init.FlammabilityRegistry;
|
import common.init.FlammabilityRegistry;
|
||||||
import common.init.SoundEvent;
|
import common.init.SoundEvent;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.BlockLayer;
|
import common.model.BlockLayer;
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
|
@ -69,7 +69,7 @@ public class BlockFire extends Block
|
||||||
|
|
||||||
public BlockFire()
|
public BlockFire()
|
||||||
{
|
{
|
||||||
super(Material.fire);
|
super(Material.FIRE);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(AGE, Integer.valueOf(0)).withProperty(FLIP, Boolean.valueOf(false)).withProperty(ALT, Boolean.valueOf(false)).withProperty(NORTH, Boolean.valueOf(false)).withProperty(EAST, Boolean.valueOf(false)).withProperty(SOUTH, Boolean.valueOf(false)).withProperty(WEST, Boolean.valueOf(false)).withProperty(UPPER, Integer.valueOf(0)));
|
this.setDefaultState(this.getBaseState().withProperty(AGE, Integer.valueOf(0)).withProperty(FLIP, Boolean.valueOf(false)).withProperty(ALT, Boolean.valueOf(false)).withProperty(NORTH, Boolean.valueOf(false)).withProperty(EAST, Boolean.valueOf(false)).withProperty(SOUTH, Boolean.valueOf(false)).withProperty(WEST, Boolean.valueOf(false)).withProperty(UPPER, Integer.valueOf(0)));
|
||||||
this.setTickRandomly();
|
this.setTickRandomly();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package common.block.natural;
|
package common.block.natural;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.init.Items;
|
import common.init.Items;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.material.Material;
|
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.util.ExtMath;
|
import common.util.ExtMath;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
|
@ -14,7 +14,7 @@ public class BlockGlowstone extends Block
|
||||||
public BlockGlowstone(Material materialIn)
|
public BlockGlowstone(Material materialIn)
|
||||||
{
|
{
|
||||||
super(materialIn);
|
super(materialIn);
|
||||||
this.setTab(CheatTab.tabNature);
|
this.setTab(CheatTab.NATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
package common.block.natural;
|
package common.block.natural;
|
||||||
|
|
||||||
import common.block.BlockFalling;
|
import common.block.BlockFalling;
|
||||||
|
import common.block.Material;
|
||||||
import common.init.Config;
|
import common.init.Config;
|
||||||
import common.init.ItemRegistry;
|
import common.init.ItemRegistry;
|
||||||
import common.init.Items;
|
import common.init.Items;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.material.Material;
|
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
|
|
||||||
public class BlockGravel extends BlockFalling
|
public class BlockGravel extends BlockFalling
|
||||||
{
|
{
|
||||||
public BlockGravel() {
|
public BlockGravel() {
|
||||||
super(Material.sand);
|
super(Material.LOOSE);
|
||||||
this.setTab(CheatTab.tabNature);
|
this.setTab(CheatTab.NATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Item getItemDropped(State state, Random rand, int fortune)
|
public Item getItemDropped(State state, Random rand, int fortune)
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
package common.block.natural;
|
package common.block.natural;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.material.Material;
|
|
||||||
|
|
||||||
public class BlockHardenedClay extends Block
|
public class BlockHardenedClay extends Block
|
||||||
{
|
{
|
||||||
public BlockHardenedClay()
|
public BlockHardenedClay()
|
||||||
{
|
{
|
||||||
super(Material.rock);
|
super(Material.SOLID);
|
||||||
this.setTab(CheatTab.tabNature);
|
this.setTab(CheatTab.NATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
package common.block.natural;
|
package common.block.natural;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.material.Material;
|
|
||||||
|
|
||||||
public class BlockHellRock extends Block
|
public class BlockHellRock extends Block
|
||||||
{
|
{
|
||||||
public BlockHellRock()
|
public BlockHellRock()
|
||||||
{
|
{
|
||||||
super(Material.rock);
|
super(Material.SOLID);
|
||||||
this.setTab(CheatTab.tabNature);
|
this.setTab(CheatTab.NATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
package common.block.natural;
|
package common.block.natural;
|
||||||
|
|
||||||
import common.block.BlockTranslucent;
|
import common.block.BlockTranslucent;
|
||||||
|
import common.block.Material;
|
||||||
import common.enchantment.EnchantmentHelper;
|
import common.enchantment.EnchantmentHelper;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.init.Config;
|
import common.init.Config;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.tileentity.TileEntity;
|
import common.tileentity.TileEntity;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
|
@ -18,10 +18,10 @@ import common.world.AWorldServer;
|
||||||
|
|
||||||
public class BlockIce extends BlockTranslucent {
|
public class BlockIce extends BlockTranslucent {
|
||||||
public BlockIce() {
|
public BlockIce() {
|
||||||
super(Material.ice);
|
super(Material.TRANSLUCENT);
|
||||||
this.slipperiness = 0.98F;
|
this.slipperiness = 0.98F;
|
||||||
this.setTickRandomly();
|
this.setTickRandomly();
|
||||||
this.setTab(CheatTab.tabNature);
|
this.setTab(CheatTab.NATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void harvestBlock(World world, EntityNPC player, BlockPos pos, State state, TileEntity tile) {
|
public void harvestBlock(World world, EntityNPC player, BlockPos pos, State state, TileEntity tile) {
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package common.block.natural;
|
package common.block.natural;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.init.ItemRegistry;
|
import common.init.ItemRegistry;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.material.Material;
|
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
|
|
||||||
|
@ -13,8 +13,8 @@ public class BlockObsidian extends Block
|
||||||
{
|
{
|
||||||
public BlockObsidian()
|
public BlockObsidian()
|
||||||
{
|
{
|
||||||
super(Material.rock);
|
super(Material.SOLID);
|
||||||
this.setTab(CheatTab.tabNature);
|
this.setTab(CheatTab.NATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package common.block.natural;
|
package common.block.natural;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.init.Config;
|
import common.init.Config;
|
||||||
import common.init.ItemRegistry;
|
import common.init.ItemRegistry;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
|
@ -22,8 +22,8 @@ public class BlockOre extends Block
|
||||||
|
|
||||||
public BlockOre()
|
public BlockOre()
|
||||||
{
|
{
|
||||||
super(Material.rock);
|
super(Material.SOLID);
|
||||||
this.setTab(CheatTab.tabGems);
|
this.setTab(CheatTab.GEMS);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDropItem(ItemStack item, int chance, int minXp) {
|
public void setDropItem(ItemStack item, int chance, int minXp) {
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
package common.block.natural;
|
package common.block.natural;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.material.Material;
|
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
|
|
||||||
public class BlockPackedIce extends Block
|
public class BlockPackedIce extends Block
|
||||||
{
|
{
|
||||||
public BlockPackedIce()
|
public BlockPackedIce()
|
||||||
{
|
{
|
||||||
super(Material.packedIce);
|
super(Material.LOOSE);
|
||||||
this.slipperiness = 0.98F;
|
this.slipperiness = 0.98F;
|
||||||
this.setTab(CheatTab.tabNature);
|
this.setTab(CheatTab.NATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package common.block.natural;
|
package common.block.natural;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
|
@ -8,7 +9,6 @@ import common.init.ItemRegistry;
|
||||||
import common.init.Items;
|
import common.init.Items;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.model.ParticleType;
|
import common.model.ParticleType;
|
||||||
|
@ -26,7 +26,7 @@ public class BlockRedstoneOre extends Block
|
||||||
|
|
||||||
public BlockRedstoneOre(boolean isOn)
|
public BlockRedstoneOre(boolean isOn)
|
||||||
{
|
{
|
||||||
super(Material.rock);
|
super(Material.SOLID);
|
||||||
|
|
||||||
if (isOn)
|
if (isOn)
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,10 +3,10 @@ package common.block.natural;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.properties.IProperty;
|
import common.properties.IProperty;
|
||||||
|
@ -17,9 +17,9 @@ public class BlockRock extends Block {
|
||||||
public static final PropertyBool SMOOTH = PropertyBool.create("smooth");
|
public static final PropertyBool SMOOTH = PropertyBool.create("smooth");
|
||||||
|
|
||||||
public BlockRock() {
|
public BlockRock() {
|
||||||
super(Material.rock);
|
super(Material.SOLID);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(SMOOTH, false));
|
this.setDefaultState(this.getBaseState().withProperty(SMOOTH, false));
|
||||||
this.setTab(CheatTab.tabNature);
|
this.setTab(CheatTab.NATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int damageDropped(State state) {
|
public int damageDropped(State state) {
|
||||||
|
|
|
@ -3,10 +3,10 @@ package common.block.natural;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import common.block.BlockFalling;
|
import common.block.BlockFalling;
|
||||||
|
import common.block.Material;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.properties.IProperty;
|
import common.properties.IProperty;
|
||||||
|
@ -20,9 +20,9 @@ public class BlockSand extends BlockFalling
|
||||||
|
|
||||||
public BlockSand()
|
public BlockSand()
|
||||||
{
|
{
|
||||||
super(Material.sand);
|
super(Material.LOOSE);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(VARIANT, BlockSand.EnumType.SAND));
|
this.setDefaultState(this.getBaseState().withProperty(VARIANT, BlockSand.EnumType.SAND));
|
||||||
this.setTab(CheatTab.tabNature);
|
this.setTab(CheatTab.NATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -3,10 +3,10 @@ package common.block.natural;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.properties.IProperty;
|
import common.properties.IProperty;
|
||||||
|
@ -20,9 +20,9 @@ public class BlockSandStone extends Block
|
||||||
|
|
||||||
public BlockSandStone()
|
public BlockSandStone()
|
||||||
{
|
{
|
||||||
super(Material.rock);
|
super(Material.SOLID);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(TYPE, BlockSandStone.EnumType.DEFAULT));
|
this.setDefaultState(this.getBaseState().withProperty(TYPE, BlockSandStone.EnumType.DEFAULT));
|
||||||
this.setTab(CheatTab.tabNature);
|
this.setTab(CheatTab.NATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package common.block.natural;
|
package common.block.natural;
|
||||||
|
|
||||||
import common.block.BlockTranslucent;
|
import common.block.BlockTranslucent;
|
||||||
|
import common.block.Material;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
|
@ -29,8 +29,8 @@ public class BlockSlime extends BlockTranslucent {
|
||||||
;
|
;
|
||||||
|
|
||||||
public BlockSlime() {
|
public BlockSlime() {
|
||||||
super(Material.clay);
|
super(Material.LOOSE);
|
||||||
this.setTab(CheatTab.tabTech);
|
this.setTab(CheatTab.TECHNOLOGY);
|
||||||
this.slipperiness = 0.8F;
|
this.slipperiness = 0.8F;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package common.block.natural;
|
package common.block.natural;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.init.Config;
|
import common.init.Config;
|
||||||
|
@ -8,7 +9,6 @@ import common.init.Items;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.model.Transforms;
|
import common.model.Transforms;
|
||||||
|
@ -32,11 +32,11 @@ public class BlockSnow extends Block
|
||||||
|
|
||||||
public BlockSnow()
|
public BlockSnow()
|
||||||
{
|
{
|
||||||
super(Material.snow);
|
super(Material.POWDER);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(LAYERS, Integer.valueOf(1)));
|
this.setDefaultState(this.getBaseState().withProperty(LAYERS, Integer.valueOf(1)));
|
||||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F);
|
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F);
|
||||||
this.setTickRandomly();
|
this.setTickRandomly();
|
||||||
this.setTab(CheatTab.tabDeco);
|
this.setTab(CheatTab.DECORATION);
|
||||||
this.setBlockBoundsForItemRender();
|
this.setBlockBoundsForItemRender();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ public class BlockSnow extends Block
|
||||||
{
|
{
|
||||||
State iblockstate = worldIn.getState(pos.down());
|
State iblockstate = worldIn.getState(pos.down());
|
||||||
Block block = iblockstate.getBlock();
|
Block block = iblockstate.getBlock();
|
||||||
return block != Blocks.ice && block != Blocks.packed_ice ? (block.getMaterial() == Material.leaves ? true : (block == this && ((Integer)iblockstate.getValue(LAYERS)).intValue() >= 7 ? true : block.isOpaqueCube() && block.getMaterial().blocksMovement())) : false;
|
return block != Blocks.ice && block != Blocks.packed_ice ? (block.getMaterial() == Material.LEAVES ? true : (block == this && ((Integer)iblockstate.getValue(LAYERS)).intValue() >= 7 ? true : block.isOpaqueCube() && block.getMaterial().blocksMovement())) : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package common.block.natural;
|
package common.block.natural;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.init.Config;
|
import common.init.Config;
|
||||||
import common.init.Items;
|
import common.init.Items;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.material.Material;
|
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.world.LightType;
|
import common.world.LightType;
|
||||||
|
@ -14,9 +14,9 @@ import common.world.AWorldServer;
|
||||||
|
|
||||||
public class BlockSnowBlock extends Block {
|
public class BlockSnowBlock extends Block {
|
||||||
public BlockSnowBlock() {
|
public BlockSnowBlock() {
|
||||||
super(Material.craftedSnow);
|
super(Material.DIGGABLE);
|
||||||
this.setTickRandomly();
|
this.setTickRandomly();
|
||||||
this.setTab(CheatTab.tabNature);
|
this.setTab(CheatTab.NATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Item getItemDropped(State state, Random rand, int fortune) {
|
public Item getItemDropped(State state, Random rand, int fortune) {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package common.block.natural;
|
package common.block.natural;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.material.Material;
|
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.util.BoundingBox;
|
import common.util.BoundingBox;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
|
@ -13,8 +13,8 @@ public class BlockSoulSand extends Block
|
||||||
{
|
{
|
||||||
public BlockSoulSand()
|
public BlockSoulSand()
|
||||||
{
|
{
|
||||||
super(Material.sand);
|
super(Material.LOOSE);
|
||||||
this.setTab(CheatTab.tabNature);
|
this.setTab(CheatTab.NATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BoundingBox getCollisionBoundingBox(World worldIn, BlockPos pos, State state)
|
public BoundingBox getCollisionBoundingBox(World worldIn, BlockPos pos, State state)
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
package common.block.natural;
|
package common.block.natural;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.init.Blocks;
|
import common.init.Blocks;
|
||||||
import common.init.ItemRegistry;
|
import common.init.ItemRegistry;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.material.Material;
|
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
|
|
||||||
public class BlockStone extends Block {
|
public class BlockStone extends Block {
|
||||||
public BlockStone() {
|
public BlockStone() {
|
||||||
super(Material.rock);
|
super(Material.SOLID);
|
||||||
this.setTab(CheatTab.tabNature);
|
this.setTab(CheatTab.NATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Item getItemDropped(State state, Random rand, int fortune) {
|
public Item getItemDropped(State state, Random rand, int fortune) {
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package common.block.natural;
|
package common.block.natural;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
import common.init.Items;
|
import common.init.Items;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.BlockLayer;
|
import common.model.BlockLayer;
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
|
@ -19,8 +19,8 @@ public class BlockWeb extends Block
|
||||||
{
|
{
|
||||||
public BlockWeb()
|
public BlockWeb()
|
||||||
{
|
{
|
||||||
super(Material.web);
|
super(Material.FLUFF);
|
||||||
this.setTab(CheatTab.tabDeco);
|
this.setTab(CheatTab.DECORATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -3,6 +3,7 @@ package common.block.tech;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import common.block.BlockFalling;
|
import common.block.BlockFalling;
|
||||||
|
import common.block.Material;
|
||||||
import common.entity.item.EntityFalling;
|
import common.entity.item.EntityFalling;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
import common.entity.types.EntityLiving;
|
import common.entity.types.EntityLiving;
|
||||||
|
@ -12,7 +13,6 @@ import common.inventory.InventoryPlayer;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.model.ModelRotation;
|
import common.model.ModelRotation;
|
||||||
|
@ -34,10 +34,10 @@ public class BlockAnvil extends BlockFalling
|
||||||
|
|
||||||
public BlockAnvil()
|
public BlockAnvil()
|
||||||
{
|
{
|
||||||
super(Material.anvil);
|
super(Material.HEAVY);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(FACING, Facing.NORTH).withProperty(DAMAGE, Integer.valueOf(0)));
|
this.setDefaultState(this.getBaseState().withProperty(FACING, Facing.NORTH).withProperty(DAMAGE, Integer.valueOf(0)));
|
||||||
this.setLightOpacity(0);
|
this.setLightOpacity(0);
|
||||||
this.setTab(CheatTab.tabTech);
|
this.setTab(CheatTab.TECHNOLOGY);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isFullCube()
|
public boolean isFullCube()
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package common.block.tech;
|
package common.block.tech;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.block.artificial.BlockFence;
|
import common.block.artificial.BlockFence;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
import common.init.SoundEvent;
|
import common.init.SoundEvent;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.rng.Random;
|
import common.rng.Random;
|
||||||
|
@ -23,7 +23,7 @@ public abstract class BlockBasePressurePlate extends Block
|
||||||
public BlockBasePressurePlate(Material p_i46401_1_)
|
public BlockBasePressurePlate(Material p_i46401_1_)
|
||||||
{
|
{
|
||||||
super(p_i46401_1_);
|
super(p_i46401_1_);
|
||||||
this.setTab(CheatTab.tabTech);
|
this.setTab(CheatTab.TECHNOLOGY);
|
||||||
// this.setTickRandomly(true);
|
// this.setTickRandomly(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@ package common.block.tech;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
import common.block.BlockContainer;
|
import common.block.BlockContainer;
|
||||||
|
import common.block.Material;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.BlockLayer;
|
import common.model.BlockLayer;
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
|
@ -43,9 +43,9 @@ public class BlockBeacon extends BlockContainer
|
||||||
|
|
||||||
public BlockBeacon()
|
public BlockBeacon()
|
||||||
{
|
{
|
||||||
super(Material.glass);
|
super(Material.TRANSLUCENT);
|
||||||
this.setHardness(3.0F);
|
this.setHardness(3.0F);
|
||||||
this.setTab(CheatTab.tabTech);
|
this.setTab(CheatTab.TECHNOLOGY);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -3,6 +3,7 @@ package common.block.tech;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import common.block.BlockContainer;
|
import common.block.BlockContainer;
|
||||||
|
import common.block.Material;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
import common.entity.types.EntityLiving;
|
import common.entity.types.EntityLiving;
|
||||||
|
@ -11,7 +12,6 @@ import common.inventory.Container;
|
||||||
import common.inventory.InventoryHelper;
|
import common.inventory.InventoryHelper;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.BlockLayer;
|
import common.model.BlockLayer;
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
|
@ -352,7 +352,7 @@ public class BlockBrewingStand extends BlockContainer
|
||||||
|
|
||||||
public BlockBrewingStand()
|
public BlockBrewingStand()
|
||||||
{
|
{
|
||||||
super(Material.iron);
|
super(Material.SOLID);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(HAS_BOTTLE[0], Boolean.valueOf(false)).withProperty(HAS_BOTTLE[1], Boolean.valueOf(false)).withProperty(HAS_BOTTLE[2], Boolean.valueOf(false)));
|
this.setDefaultState(this.getBaseState().withProperty(HAS_BOTTLE[0], Boolean.valueOf(false)).withProperty(HAS_BOTTLE[1], Boolean.valueOf(false)).withProperty(HAS_BOTTLE[2], Boolean.valueOf(false)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ package common.block.tech;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.collect.Lists;
|
import common.collect.Lists;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
|
@ -10,7 +11,6 @@ import common.entity.projectile.EntityArrow;
|
||||||
import common.entity.types.EntityLiving;
|
import common.entity.types.EntityLiving;
|
||||||
import common.init.SoundEvent;
|
import common.init.SoundEvent;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.model.ModelRotation;
|
import common.model.ModelRotation;
|
||||||
|
@ -39,10 +39,10 @@ public class BlockButton extends Block
|
||||||
|
|
||||||
public BlockButton(boolean arrows, int onTime, String texture)
|
public BlockButton(boolean arrows, int onTime, String texture)
|
||||||
{
|
{
|
||||||
super(Material.circuits);
|
super(Material.SMALL);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(FACING, Facing.NORTH).withProperty(POWERED, Boolean.valueOf(false)));
|
this.setDefaultState(this.getBaseState().withProperty(FACING, Facing.NORTH).withProperty(POWERED, Boolean.valueOf(false)));
|
||||||
// this.setTickRandomly(true);
|
// this.setTickRandomly(true);
|
||||||
this.setTab(CheatTab.tabTech);
|
this.setTab(CheatTab.TECHNOLOGY);
|
||||||
this.checkArrows = arrows;
|
this.checkArrows = arrows;
|
||||||
this.onTime = onTime;
|
this.onTime = onTime;
|
||||||
this.texture = texture;
|
this.texture = texture;
|
||||||
|
|
|
@ -3,6 +3,7 @@ package common.block.tech;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
import common.entity.item.EntityItem;
|
import common.entity.item.EntityItem;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
|
@ -13,7 +14,6 @@ import common.item.Item;
|
||||||
import common.item.ItemArmor;
|
import common.item.ItemArmor;
|
||||||
import common.item.ItemBanner;
|
import common.item.ItemBanner;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.model.Model;
|
import common.model.Model;
|
||||||
import common.model.ModelProvider;
|
import common.model.ModelProvider;
|
||||||
import common.properties.IProperty;
|
import common.properties.IProperty;
|
||||||
|
@ -414,7 +414,7 @@ public class BlockCauldron extends Block
|
||||||
|
|
||||||
public BlockCauldron()
|
public BlockCauldron()
|
||||||
{
|
{
|
||||||
super(Material.iron);
|
super(Material.SOLID);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(LEVEL, Integer.valueOf(0)));
|
this.setDefaultState(this.getBaseState().withProperty(LEVEL, Integer.valueOf(0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ package common.block.tech;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
import common.block.BlockContainer;
|
import common.block.BlockContainer;
|
||||||
|
import common.block.Material;
|
||||||
import common.color.TextColor;
|
import common.color.TextColor;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
import common.entity.animal.EntityOcelot;
|
import common.entity.animal.EntityOcelot;
|
||||||
|
@ -16,7 +17,6 @@ import common.inventory.InventoryHelper;
|
||||||
import common.inventory.InventoryLargeChest;
|
import common.inventory.InventoryLargeChest;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.material.Material;
|
|
||||||
import common.packet.SPacketSoundEffect;
|
import common.packet.SPacketSoundEffect;
|
||||||
import common.properties.IProperty;
|
import common.properties.IProperty;
|
||||||
import common.properties.PropertyDirection;
|
import common.properties.PropertyDirection;
|
||||||
|
@ -42,10 +42,10 @@ public class BlockChest extends BlockContainer
|
||||||
|
|
||||||
public BlockChest(int type)
|
public BlockChest(int type)
|
||||||
{
|
{
|
||||||
super(Material.wood);
|
super(Material.WOOD);
|
||||||
this.setDefaultState(this.getBaseState().withProperty(FACING, Facing.NORTH));
|
this.setDefaultState(this.getBaseState().withProperty(FACING, Facing.NORTH));
|
||||||
this.chestType = type;
|
this.chestType = type;
|
||||||
this.setTab(CheatTab.tabTech);
|
this.setTab(CheatTab.TECHNOLOGY);
|
||||||
this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
|
this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
package common.block.tech;
|
package common.block.tech;
|
||||||
|
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
|
import common.block.Material;
|
||||||
import common.init.Config;
|
import common.init.Config;
|
||||||
import common.item.CheatTab;
|
import common.item.CheatTab;
|
||||||
import common.material.Material;
|
|
||||||
import common.util.BlockPos;
|
import common.util.BlockPos;
|
||||||
import common.world.State;
|
import common.world.State;
|
||||||
import common.world.AWorldServer;
|
import common.world.AWorldServer;
|
||||||
|
|
||||||
public class BlockCore extends Block {
|
public class BlockCore extends Block {
|
||||||
public BlockCore() {
|
public BlockCore() {
|
||||||
super(Material.iron);
|
super(Material.SOLID);
|
||||||
this.setTab(CheatTab.tabTech);
|
this.setTab(CheatTab.TECHNOLOGY);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onBlockRemoved(AWorldServer world, BlockPos pos, State state)
|
public void onBlockRemoved(AWorldServer world, BlockPos pos, State state)
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue