mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 08:48:34 +01:00
parent
e46851e789
commit
eeb7592d22
13 changed files with 13 additions and 13 deletions
|
@ -56,7 +56,7 @@ public class ItemChestToCrateUpgrade extends ItemBase{
|
||||||
|
|
||||||
//Set New Block
|
//Set New Block
|
||||||
if(!ConfigValues.lessBlockBreakingEffects){
|
if(!ConfigValues.lessBlockBreakingEffects){
|
||||||
world.playBroadcastSound(2001, pos, Block.getStateId(world.getBlockState(pos)));
|
world.playEvent(2001, pos, Block.getStateId(world.getBlockState(pos)));
|
||||||
}
|
}
|
||||||
PosUtil.setBlock(pos, world, InitBlocks.blockGiantChest, 0, 2);
|
PosUtil.setBlock(pos, world, InitBlocks.blockGiantChest, 0, 2);
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class ItemFertilizer extends ItemBase{
|
||||||
public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing side, float par8, float par9, float par10){
|
public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing side, float par8, float par9, float par10){
|
||||||
if(ItemDye.applyBonemeal(stack, world, pos, player)){
|
if(ItemDye.applyBonemeal(stack, world, pos, player)){
|
||||||
if(!world.isRemote){
|
if(!world.isRemote){
|
||||||
world.playBroadcastSound(2005, pos, 0);
|
world.playEvent(2005, pos, 0);
|
||||||
}
|
}
|
||||||
return EnumActionResult.SUCCESS;
|
return EnumActionResult.SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ public class ItemGrowthRing extends ItemEnergy{
|
||||||
|
|
||||||
//Show Particles if Metadata changed
|
//Show Particles if Metadata changed
|
||||||
if(PosUtil.getMetadata(pos, world) != metaBefore){
|
if(PosUtil.getMetadata(pos, world) != metaBefore){
|
||||||
world.playBroadcastSound(2005, pos, 0);
|
world.playEvent(2005, pos, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!player.capabilities.isCreativeMode){
|
if(!player.capabilities.isCreativeMode){
|
||||||
|
|
|
@ -120,7 +120,7 @@ public class ItemLeafBlower extends ItemBase{
|
||||||
|
|
||||||
//Plays the Breaking Sound
|
//Plays the Breaking Sound
|
||||||
if(!ConfigValues.lessBlockBreakingEffects){
|
if(!ConfigValues.lessBlockBreakingEffects){
|
||||||
world.playBroadcastSound(2001, theCoord, Block.getStateId(world.getBlockState(theCoord)));
|
world.playEvent(2001, theCoord, Block.getStateId(world.getBlockState(theCoord)));
|
||||||
}
|
}
|
||||||
|
|
||||||
//Deletes the Block
|
//Deletes the Block
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class DispenserHandlerFertilize extends BehaviorDefaultDispenseItem{
|
||||||
BlockPos pos = new BlockPos(x, y, z);
|
BlockPos pos = new BlockPos(x, y, z);
|
||||||
|
|
||||||
if(ItemDye.applyBonemeal(stack, source.getWorld(), pos)){
|
if(ItemDye.applyBonemeal(stack, source.getWorld(), pos)){
|
||||||
source.getWorld().playBroadcastSound(2005, pos, 0);
|
source.getWorld().playEvent(2005, pos, 0);
|
||||||
}
|
}
|
||||||
return stack;
|
return stack;
|
||||||
}
|
}
|
||||||
|
|
|
@ -136,7 +136,7 @@ public class MethodHandler implements IMethodHandler{
|
||||||
ItemStack output = outputs.get(0);
|
ItemStack output = outputs.get(0);
|
||||||
if(output.getItem() instanceof ItemBlock){
|
if(output.getItem() instanceof ItemBlock){
|
||||||
if(!ConfigValues.lessBlockBreakingEffects){
|
if(!ConfigValues.lessBlockBreakingEffects){
|
||||||
tile.getWorldObject().playBroadcastSound(2001, pos, Block.getStateId(tile.getWorldObject().getBlockState(pos)));
|
tile.getWorldObject().playEvent(2001, pos, Block.getStateId(tile.getWorldObject().getBlockState(pos)));
|
||||||
}
|
}
|
||||||
PosUtil.setBlock(pos, tile.getWorldObject(), Block.getBlockFromItem(output.getItem()), output.getItemDamage(), 2);
|
PosUtil.setBlock(pos, tile.getWorldObject(), Block.getBlockFromItem(output.getItem()), output.getItemDamage(), 2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,7 +91,7 @@ public class TileEntityBreaker extends TileEntityInventoryBase implements IRedst
|
||||||
if(Util.RANDOM.nextFloat() <= chance){
|
if(Util.RANDOM.nextFloat() <= chance){
|
||||||
if(WorldUtil.addToInventory(this, drops, false, true)){
|
if(WorldUtil.addToInventory(this, drops, false, true)){
|
||||||
if(!ConfigValues.lessBlockBreakingEffects){
|
if(!ConfigValues.lessBlockBreakingEffects){
|
||||||
this.worldObj.playBroadcastSound(2001, coordsBlock, Block.getStateId(stateToBreak));
|
this.worldObj.playEvent(2001, coordsBlock, Block.getStateId(stateToBreak));
|
||||||
}
|
}
|
||||||
WorldUtil.breakBlockAtSide(sideToManipulate, this.worldObj, this.pos);
|
WorldUtil.breakBlockAtSide(sideToManipulate, this.worldObj, this.pos);
|
||||||
WorldUtil.addToInventory(this, drops, true, true);
|
WorldUtil.addToInventory(this, drops, true, true);
|
||||||
|
|
|
@ -93,7 +93,7 @@ public class TileEntityDirectionalBreaker extends TileEntityInventoryBase implem
|
||||||
if(Util.RANDOM.nextFloat() <= chance){
|
if(Util.RANDOM.nextFloat() <= chance){
|
||||||
if(WorldUtil.addToInventory(this, drops, false, true)){
|
if(WorldUtil.addToInventory(this, drops, false, true)){
|
||||||
if(!ConfigValues.lessBlockBreakingEffects){
|
if(!ConfigValues.lessBlockBreakingEffects){
|
||||||
this.worldObj.playBroadcastSound(2001, coordsBlock, Block.getStateId(this.worldObj.getBlockState(coordsBlock)));
|
this.worldObj.playEvent(2001, coordsBlock, Block.getStateId(this.worldObj.getBlockState(coordsBlock)));
|
||||||
}
|
}
|
||||||
WorldUtil.breakBlockAtSide(sideToManipulate, this.worldObj, this.getPos(), i);
|
WorldUtil.breakBlockAtSide(sideToManipulate, this.worldObj, this.getPos(), i);
|
||||||
WorldUtil.addToInventory(this, drops, true, true);
|
WorldUtil.addToInventory(this, drops, true, true);
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class TileEntityGreenhouseGlass extends TileEntityBase{
|
||||||
PosUtil.getBlock(blockToFert, this.worldObj).updateTick(this.worldObj, blockToFert, this.worldObj.getBlockState(blockToFert), Util.RANDOM);
|
PosUtil.getBlock(blockToFert, this.worldObj).updateTick(this.worldObj, blockToFert, this.worldObj.getBlockState(blockToFert), Util.RANDOM);
|
||||||
|
|
||||||
if(PosUtil.getMetadata(blockToFert, this.worldObj) != metaBefore){
|
if(PosUtil.getMetadata(blockToFert, this.worldObj) != metaBefore){
|
||||||
this.worldObj.playBroadcastSound(2005, blockToFert, 0);
|
this.worldObj.playEvent(2005, blockToFert, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class TileEntityLeafGenerator extends TileEntityBase implements IEnergyPr
|
||||||
BlockPos theCoord = breakPositions.get(0);
|
BlockPos theCoord = breakPositions.get(0);
|
||||||
|
|
||||||
if(!ConfigValues.lessBlockBreakingEffects){
|
if(!ConfigValues.lessBlockBreakingEffects){
|
||||||
this.worldObj.playBroadcastSound(2001, theCoord, Block.getStateId(this.worldObj.getBlockState(theCoord)));
|
this.worldObj.playEvent(2001, theCoord, Block.getStateId(this.worldObj.getBlockState(theCoord)));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.worldObj.setBlockToAir(theCoord);
|
this.worldObj.setBlockToAir(theCoord);
|
||||||
|
|
|
@ -108,7 +108,7 @@ public class TileEntityMiner extends TileEntityInventoryBase implements IEnergyR
|
||||||
if(Util.RANDOM.nextFloat() <= chance){
|
if(Util.RANDOM.nextFloat() <= chance){
|
||||||
if(WorldUtil.addToInventory(this, drops, false, true)){
|
if(WorldUtil.addToInventory(this, drops, false, true)){
|
||||||
if(!ConfigValues.lessBlockBreakingEffects){
|
if(!ConfigValues.lessBlockBreakingEffects){
|
||||||
this.worldObj.playBroadcastSound(2001, pos, Block.getStateId(this.worldObj.getBlockState(pos)));
|
this.worldObj.playEvent(2001, pos, Block.getStateId(this.worldObj.getBlockState(pos)));
|
||||||
}
|
}
|
||||||
this.worldObj.setBlockToAir(pos);
|
this.worldObj.setBlockToAir(pos);
|
||||||
|
|
||||||
|
|
|
@ -131,7 +131,7 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements
|
||||||
|
|
||||||
if(WorldUtil.addToInventory(this, drops, false, true)){
|
if(WorldUtil.addToInventory(this, drops, false, true)){
|
||||||
if(!ConfigValues.lessBlockBreakingEffects){
|
if(!ConfigValues.lessBlockBreakingEffects){
|
||||||
this.worldObj.playBroadcastSound(2001, this.boundPosition, Block.getStateId(this.worldObj.getBlockState(this.boundPosition)));
|
this.worldObj.playEvent(2001, this.boundPosition, Block.getStateId(this.worldObj.getBlockState(this.boundPosition)));
|
||||||
}
|
}
|
||||||
this.worldObj.setBlockToAir(this.boundPosition);
|
this.worldObj.setBlockToAir(this.boundPosition);
|
||||||
WorldUtil.addToInventory(this, drops, true, true);
|
WorldUtil.addToInventory(this, drops, true, true);
|
||||||
|
|
|
@ -333,7 +333,7 @@ public class WorldUtil{
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
//Shows the Harvest Particles and plays the Block's Sound
|
//Shows the Harvest Particles and plays the Block's Sound
|
||||||
world.playBroadcastSound(2001, pos, Block.getStateId(state));
|
world.playEvent(2001, pos, Block.getStateId(state));
|
||||||
}
|
}
|
||||||
|
|
||||||
//If the Block was actually "removed", meaning it will drop an Item
|
//If the Block was actually "removed", meaning it will drop an Item
|
||||||
|
|
Loading…
Reference in a new issue