mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-14 01:04:16 +00:00
Add the ability to break the force relays.
This commit is contained in:
1 parent
4abcdf2c32
commit
8779bc0a59
1 file changed
+15
-2
@@ -12,6 +12,7 @@
|
||||
package vazkii.botania.common.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashMap;
|
||||
@@ -57,6 +58,11 @@ public class BlockPistonRelay extends BlockMod implements IWandable {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int quantityDropped(int meta, int fortune, Random random) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
@@ -111,8 +117,15 @@ public class BlockPistonRelay extends BlockMod implements IWandable {
|
||||
|
||||
@Override
|
||||
public boolean onUsedByWand(EntityPlayer player, ItemStack stack, World world, int x, int y, int z, int side) {
|
||||
InternalTickHandler.playerPositions.put(player.username, getCoordsAsString(world.provider.dimensionId, x, y, z));
|
||||
// TODO Add drops
|
||||
if(!player.isSneaking())
|
||||
InternalTickHandler.playerPositions.put(player.username, getCoordsAsString(world.provider.dimensionId, x, y, z));
|
||||
else {
|
||||
dropBlockAsItem_do(world, x, y, z, new ItemStack(this));
|
||||
world.setBlockToAir(x, y, z);
|
||||
if(!world.isRemote)
|
||||
world.playAuxSFX(2001, x, y , z, blockID);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user