mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-25 06:24:42 +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
@@ -14,25 +14,25 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
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.TileNpcContainer;
|
||||
import noppes.npcs.blocks.tiles.TilePedestal;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockPedestal extends BlockTrigger{
|
||||
|
||||
|
||||
public BlockPedestal() {
|
||||
super(Blocks.stone);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World par1World, int i, int j, int k, EntityPlayer player, int side, float hitX, float hitY, float hitZ){
|
||||
if(par1World.isRemote)
|
||||
return true;
|
||||
|
||||
|
||||
TilePedestal tile = (TilePedestal) par1World.getTileEntity(i, j, k);
|
||||
|
||||
|
||||
ItemStack item = player.getCurrentEquippedItem();
|
||||
ItemStack weapon = tile.getStackInSlot(0);
|
||||
if(item == null && weapon != null){
|
||||
@@ -51,8 +51,8 @@ public class BlockPedestal extends BlockTrigger{
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@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));
|
||||
@@ -61,18 +61,18 @@ public class BlockPedestal extends BlockTrigger{
|
||||
par3List.add(new ItemStack(par1, 1, 4));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public int damageDropped(int par1){
|
||||
return par1;
|
||||
}
|
||||
@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;
|
||||
if(tile.rotation % 2 == 0){
|
||||
setBlockBounds(0f, 0, 0.2f, 1, 0.5f, 0.8f );
|
||||
}
|
||||
@@ -81,12 +81,12 @@ public class BlockPedestal extends BlockTrigger{
|
||||
}
|
||||
}
|
||||
|
||||
@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
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int p_149691_1_, int meta)
|
||||
@@ -108,7 +108,7 @@ public class BlockPedestal extends BlockTrigger{
|
||||
public TileEntity createNewTileEntity(World var1, int var2) {
|
||||
return new TilePedestal();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int p_149749_6_){
|
||||
TileNpcContainer tile = (TileNpcContainer)world.getTileEntity(x, y, z);
|
||||
|
||||
Reference in new issue
Block a user