mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2025-02-16 10:11:19 +01:00
Don't check block type twice
This also prevents it from getting it multiple types which would result in a chunk data query too...
This commit is contained in:
parent
4de1f1e8c5
commit
7d92cb820d
@ -66,10 +66,6 @@ public class BlockPlace implements Listener {
|
||||
public static void onHopperDropperPlace(BlockPlaceEvent event) {
|
||||
Block placed = event.getBlockPlaced();
|
||||
|
||||
if (placed.getType() != Material.HOPPER && placed.getType() != Material.DROPPER) {
|
||||
return;
|
||||
}
|
||||
|
||||
List<BlockFace> searchDirections = new ArrayList<>();
|
||||
switch (placed.getType()) {
|
||||
case HOPPER:
|
||||
@ -79,6 +75,8 @@ public class BlockPlace implements Listener {
|
||||
case DROPPER:
|
||||
searchDirections.add(((Directional) placed.getBlockData()).getFacing());
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
for (BlockFace face : searchDirections) {
|
||||
|
Loading…
Reference in New Issue
Block a user