mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 16:58:34 +01:00
Added XP Solidifier Textures
This commit is contained in:
parent
c82dc1f148
commit
1465fab3d0
4 changed files with 22 additions and 18 deletions
|
@ -57,7 +57,7 @@ public class BlockXPSolidifier extends BlockContainerBase implements INameableIt
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IIcon getIcon(int side, int meta){
|
public IIcon getIcon(int side, int meta){
|
||||||
if(side == 1) return this.topIcon;
|
if(side == 1 || side == 0) return this.topIcon;
|
||||||
if(side == 3) return this.frontIcon;
|
if(side == 3) return this.frontIcon;
|
||||||
return this.blockIcon;
|
return this.blockIcon;
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ public class BlockXPSolidifier extends BlockContainerBase implements INameableIt
|
||||||
@Override
|
@Override
|
||||||
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){
|
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){
|
||||||
int meta = world.getBlockMetadata(x, y, z);
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
if(side == 1) return this.topIcon;
|
if(side == 1 || side == 0) return this.topIcon;
|
||||||
if(side == meta+2) return this.frontIcon;
|
if(side == meta+2) return this.frontIcon;
|
||||||
return this.blockIcon;
|
return this.blockIcon;
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,8 @@ public class BlockXPSolidifier extends BlockContainerBase implements INameableIt
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){
|
||||||
if(!world.isRemote){
|
if(!world.isRemote){
|
||||||
TileEntityXPSolidifier solidifier = (TileEntityXPSolidifier)world.getTileEntity(x, y, z);
|
TileEntityXPSolidifier solidifier = (TileEntityXPSolidifier)world.getTileEntity(x, y, z);
|
||||||
if (solidifier != null) player.openGui(ActuallyAdditions.instance, GuiHandler.XP_SOLIDIFIER_ID, world, x, y, z);
|
if(solidifier != null)
|
||||||
|
player.openGui(ActuallyAdditions.instance, GuiHandler.XP_SOLIDIFIER_ID, world, x, y, z);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -94,6 +95,7 @@ public class BlockXPSolidifier extends BlockContainerBase implements INameableIt
|
||||||
TileEntity tile = world.getTileEntity(x, y, z);
|
TileEntity tile = world.getTileEntity(x, y, z);
|
||||||
if(tile instanceof TileEntityXPSolidifier){
|
if(tile instanceof TileEntityXPSolidifier){
|
||||||
TileEntityXPSolidifier solidifier = (TileEntityXPSolidifier)tile;
|
TileEntityXPSolidifier solidifier = (TileEntityXPSolidifier)tile;
|
||||||
|
if(solidifier.amount > 0){
|
||||||
int stacks = solidifier.amount/64;
|
int stacks = solidifier.amount/64;
|
||||||
int rest = solidifier.amount%64;
|
int rest = solidifier.amount%64;
|
||||||
for(int i = 0; i < stacks; i++){
|
for(int i = 0; i < stacks; i++){
|
||||||
|
@ -102,6 +104,7 @@ public class BlockXPSolidifier extends BlockContainerBase implements INameableIt
|
||||||
this.spawnItem(world, x, y, z, new ItemStack(InitItems.itemSpecialDrop, rest, TheSpecialDrops.SOLIDIFIED_EXPERIENCE.ordinal()));
|
this.spawnItem(world, x, y, z, new ItemStack(InitItems.itemSpecialDrop, rest, TheSpecialDrops.SOLIDIFIED_EXPERIENCE.ordinal()));
|
||||||
solidifier.amount = 0;
|
solidifier.amount = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
super.breakBlock(world, x, y, z, block, par6);
|
super.breakBlock(world, x, y, z, block, par6);
|
||||||
}
|
}
|
||||||
|
@ -117,6 +120,7 @@ public class BlockXPSolidifier extends BlockContainerBase implements INameableIt
|
||||||
entityItem.motionZ = world.rand.nextGaussian()*factor;
|
entityItem.motionZ = world.rand.nextGaussian()*factor;
|
||||||
world.spawnEntityInWorld(entityItem);
|
world.spawnEntityInWorld(entityItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName(){
|
public String getName(){
|
||||||
return "blockXPSolidifier";
|
return "blockXPSolidifier";
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 715 B |
Binary file not shown.
After Width: | Height: | Size: 602 B |
Binary file not shown.
After Width: | Height: | Size: 754 B |
Loading…
Reference in a new issue