Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void onGloveActivated(World worldIn, EntityPlayer playerIn, EnumHand handIn) {
- RayTraceResult lookingAt = playerIn.rayTrace(10, 2.0F);
- BlockPos newPos = new BlockPos(lookingAt.getBlockPos());
- System.out.println(Blocks.COAL_ORE.getRegistryName().toString());
- for (int i = 0; i < validBlocks.size(); i++) {
- if ((worldIn.getBlockState(newPos).getBlock() == Blocks.COAL_ORE)
- || (worldIn.getBlockState(newPos).getBlock() == Blocks.IRON_ORE)
- || (worldIn.getBlockState(newPos).getBlock() == Blocks.REDSTONE_ORE)
- || (worldIn.getBlockState(newPos).getBlock() == Blocks.LAPIS_ORE)
- || (worldIn.getBlockState(newPos).getBlock() == Blocks.DIAMOND_ORE)
- || (worldIn.getBlockState(newPos).getBlock() == Blocks.EMERALD_ORE)) {
- System.out.println(validBlocks.get(i));
- worldIn.setBlockState(newPos, Blocks.GOLD_ORE.getDefaultState());
- System.out.println(newPos.getX() + " " + newPos.getY() + " " + newPos.getZ());
- for (int j = 0; j < 20; j++)
- AlchemyMod.network.sendTo(
- new ParticlePacket(EnumParticleTypes.SPELL_WITCH.getParticleID(), newPos.getX() + 0.5,
- newPos.getY() + 0.4, newPos.getZ() + 0.5, 3, 0, 3, 1, 200, 1),
- (EntityPlayerMP) playerIn);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement