mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-21 03:22:23 +00:00
Hex Color Update
This commit is contained in:
1 parent
3c610e7105
commit
3a00d08304
50 files changed
+456
-360
No files matched your search
@@ -9,30 +9,30 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import noppes.npcs.blocks.tiles.TileColorable;
|
||||
import noppes.npcs.blocks.tiles.TileVariant;
|
||||
import noppes.npcs.blocks.tiles.TileShelf;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockShelf extends BlockRotated{
|
||||
|
||||
|
||||
public BlockShelf() {
|
||||
super(Blocks.planks);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack){
|
||||
super.onBlockPlacedBy(par1World, par2, par3, par4, par5EntityLivingBase, par6ItemStack);
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, par6ItemStack.getItemDamage() , 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int x, int y, int z){
|
||||
setBlockBoundsBasedOnState(p_149668_1_, x, y, z);
|
||||
return AxisAlignedBB.getBoundingBox(x + minX, y + 0.9f, z + minZ, x + maxX, y + 1, z + maxZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List){
|
||||
par3List.add(new ItemStack(par1, 1, 0));
|
||||
par3List.add(new ItemStack(par1, 1, 1));
|
||||
@@ -41,14 +41,14 @@ public class BlockShelf extends BlockRotated{
|
||||
par3List.add(new ItemStack(par1, 1, 4));
|
||||
par3List.add(new ItemStack(par1, 1, 5));
|
||||
}
|
||||
@Override
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z){
|
||||
TileEntity tileentity = world.getTileEntity(x, y, z);
|
||||
if(!(tileentity instanceof TileColorable)){
|
||||
if(!(tileentity instanceof TileVariant)){
|
||||
super.setBlockBoundsBasedOnState(world, x, y, z);
|
||||
return;
|
||||
}
|
||||
TileColorable tile = (TileColorable) tileentity;
|
||||
TileVariant tile = (TileVariant) tileentity;
|
||||
float xStart = 0;
|
||||
float zStart = 0;
|
||||
float xEnd = 1;
|
||||
@@ -64,7 +64,7 @@ public class BlockShelf extends BlockRotated{
|
||||
setBlockBounds(xStart, 0.44f, zStart, xEnd, 1, zEnd);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public int damageDropped(int par1){
|
||||
return par1;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user