Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
d9db7d38ba
Commit
a82fbf9de9
@ -34,19 +34,19 @@ import java.util.Set;
|
||||
public class AdjacentHoney implements PanzernAlgorithm {
|
||||
|
||||
private PistonLine pistonLine = new PistonLine();
|
||||
private SlabOnRedstone slabOnRedstone = new SlabOnRedstone();
|
||||
private SlabOnTorch slabOnTorch = new SlabOnTorch();
|
||||
|
||||
@Override
|
||||
public PanzernResult check(Block source, Map<BlockFace, Block> adjacent, Set<Material> adjacentMaterials) {
|
||||
if (adjacentMaterials.contains(Material.HONEY_BLOCK)) {
|
||||
for (BlockFace face : HORIZONTAL_FACES) {
|
||||
if (!adjacent.containsKey(face)) continue;
|
||||
if (adjacent.get(face).getType() == Material.REDSTONE_WIRE) {
|
||||
PanzernResult panzernResult = pistonLine.check(source, adjacent, adjacentMaterials);
|
||||
if (panzernResult == PanzernResult.DEFAULT) {
|
||||
return PanzernResult.UNMOVABLE_SLAB;
|
||||
}
|
||||
return panzernResult;
|
||||
}
|
||||
PanzernResult result = slabOnRedstone.check(source, adjacent, adjacentMaterials);
|
||||
if (result == PanzernResult.SLAB) {
|
||||
return PanzernResult.UNMOVABLE_SLAB;
|
||||
}
|
||||
result = slabOnTorch.check(source, adjacent, adjacentMaterials);
|
||||
if (result == PanzernResult.SLAB) {
|
||||
return PanzernResult.UNMOVABLE_SLAB;
|
||||
}
|
||||
PanzernResult panzernResult = pistonLine.check(source, adjacent, adjacentMaterials);
|
||||
if (panzernResult == PanzernResult.DEFAULT) {
|
||||
|
@ -34,19 +34,19 @@ import java.util.Set;
|
||||
public class AdjacentSlime implements PanzernAlgorithm {
|
||||
|
||||
private PistonLine pistonLine = new PistonLine();
|
||||
private SlabOnRedstone slabOnRedstone = new SlabOnRedstone();
|
||||
private SlabOnTorch slabOnTorch = new SlabOnTorch();
|
||||
|
||||
@Override
|
||||
public PanzernResult check(Block source, Map<BlockFace, Block> adjacent, Set<Material> adjacentMaterials) {
|
||||
if (adjacentMaterials.contains(Material.SLIME_BLOCK)) {
|
||||
for (BlockFace face : HORIZONTAL_FACES) {
|
||||
if (!adjacent.containsKey(face)) continue;
|
||||
if (adjacent.get(face).getType() == Material.REDSTONE_WIRE) {
|
||||
PanzernResult panzernResult = pistonLine.check(source, adjacent, adjacentMaterials);
|
||||
if (panzernResult == PanzernResult.DEFAULT) {
|
||||
return PanzernResult.UNMOVABLE_SLAB;
|
||||
}
|
||||
return panzernResult;
|
||||
}
|
||||
PanzernResult result = slabOnRedstone.check(source, adjacent, adjacentMaterials);
|
||||
if (result == PanzernResult.SLAB) {
|
||||
return PanzernResult.UNMOVABLE_SLAB;
|
||||
}
|
||||
result = slabOnTorch.check(source, adjacent, adjacentMaterials);
|
||||
if (result == PanzernResult.SLAB) {
|
||||
return PanzernResult.UNMOVABLE_SLAB;
|
||||
}
|
||||
PanzernResult panzernResult = pistonLine.check(source, adjacent, adjacentMaterials);
|
||||
if (panzernResult == PanzernResult.DEFAULT) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren