Skip to content

Commit

Permalink
Change drop block pos check
Browse files Browse the repository at this point in the history
  • Loading branch information
Roadhog360 committed Sep 14, 2023
1 parent d092227 commit 22385aa
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
import com.google.common.collect.Lists;
import ganymedes01.etfuturum.api.PistonBehaviorRegistry;
import ganymedes01.etfuturum.core.utils.helpers.BlockPos;
import net.minecraft.block.Block;
import net.minecraft.block.BlockPistonBase;
import net.minecraft.block.BlockPistonMoving;
import net.minecraft.block.BlockPistonExtension;
import net.minecraft.block.BlockSnow;
import net.minecraft.block.*;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.init.Blocks;
Expand Down Expand Up @@ -345,7 +341,7 @@ public boolean onBlockEventReceived(World world, int x, int y, int z, int extend

if (block.getMobilityFlag() == 1) {
float chance = block instanceof BlockSnow ? -1.0f : 1.0f;
block.dropBlockAsItemWithChance(world, blockX - xoffset, blockY - yoffset, blockZ - zoffset, blockMeta, chance, 0);
block.dropBlockAsItemWithChance(world, pos.getX(), pos.getY(), pos.getZ(), blockMeta, chance, 0);
world.setBlockToAir(blockX, blockY, blockZ);
} else {
world.setBlock(blockX, blockY, blockZ, Blocks.piston_extension, blockMeta, 4);
Expand Down

0 comments on commit 22385aa

Please sign in to comment.