Fix Loader Redstone
Dieser Commit ist enthalten in:
Ursprung
e18b2c77d8
Commit
d4535ff36d
@ -30,10 +30,28 @@ class AutoLoader_15 {
|
|||||||
Powerable powerable = (Powerable) data;
|
Powerable powerable = (Powerable) data;
|
||||||
powerable.setPowered(active);
|
powerable.setPowered(active);
|
||||||
block.setBlockData(powerable);
|
block.setBlockData(powerable);
|
||||||
block.getState().update(true);
|
updateBlock(block.getLocation());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void updateBlock(Location location) {
|
||||||
|
Location[] locations = new Location[] {
|
||||||
|
location.clone(),
|
||||||
|
location.clone().add(1, 0,0),
|
||||||
|
location.clone().add(-1, 0,0),
|
||||||
|
location.clone().add(0, 1,0),
|
||||||
|
location.clone().add(0, -1,0),
|
||||||
|
location.clone().add(0, 0,1),
|
||||||
|
location.clone().add(0, 0,-1)
|
||||||
|
};
|
||||||
|
for (Location value : locations) {
|
||||||
|
if (value.getBlock().getType().toString().contains("SIGN")) continue;
|
||||||
|
BlockData data = value.getBlock().getBlockData();
|
||||||
|
value.getBlock().setType(Material.BARRIER, true);
|
||||||
|
value.getBlock().setBlockData(data, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void onPlayerInteract(IAutoLoader loader, PlayerInteractEvent event) {
|
static void onPlayerInteract(IAutoLoader loader, PlayerInteractEvent event) {
|
||||||
if (event.getAction() != Action.RIGHT_CLICK_BLOCK && event.getAction() != Action.PHYSICAL)
|
if (event.getAction() != Action.RIGHT_CLICK_BLOCK && event.getAction() != Action.PHYSICAL)
|
||||||
return;
|
return;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren