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 {
|
public class AdjacentHoney implements PanzernAlgorithm {
|
||||||
|
|
||||||
private PistonLine pistonLine = new PistonLine();
|
private PistonLine pistonLine = new PistonLine();
|
||||||
|
private SlabOnRedstone slabOnRedstone = new SlabOnRedstone();
|
||||||
|
private SlabOnTorch slabOnTorch = new SlabOnTorch();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PanzernResult check(Block source, Map<BlockFace, Block> adjacent, Set<Material> adjacentMaterials) {
|
public PanzernResult check(Block source, Map<BlockFace, Block> adjacent, Set<Material> adjacentMaterials) {
|
||||||
if (adjacentMaterials.contains(Material.HONEY_BLOCK)) {
|
if (adjacentMaterials.contains(Material.HONEY_BLOCK)) {
|
||||||
for (BlockFace face : HORIZONTAL_FACES) {
|
PanzernResult result = slabOnRedstone.check(source, adjacent, adjacentMaterials);
|
||||||
if (!adjacent.containsKey(face)) continue;
|
if (result == PanzernResult.SLAB) {
|
||||||
if (adjacent.get(face).getType() == Material.REDSTONE_WIRE) {
|
return PanzernResult.UNMOVABLE_SLAB;
|
||||||
PanzernResult panzernResult = pistonLine.check(source, adjacent, adjacentMaterials);
|
}
|
||||||
if (panzernResult == PanzernResult.DEFAULT) {
|
result = slabOnTorch.check(source, adjacent, adjacentMaterials);
|
||||||
return PanzernResult.UNMOVABLE_SLAB;
|
if (result == PanzernResult.SLAB) {
|
||||||
}
|
return PanzernResult.UNMOVABLE_SLAB;
|
||||||
return panzernResult;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
PanzernResult panzernResult = pistonLine.check(source, adjacent, adjacentMaterials);
|
PanzernResult panzernResult = pistonLine.check(source, adjacent, adjacentMaterials);
|
||||||
if (panzernResult == PanzernResult.DEFAULT) {
|
if (panzernResult == PanzernResult.DEFAULT) {
|
||||||
|
@ -34,19 +34,19 @@ import java.util.Set;
|
|||||||
public class AdjacentSlime implements PanzernAlgorithm {
|
public class AdjacentSlime implements PanzernAlgorithm {
|
||||||
|
|
||||||
private PistonLine pistonLine = new PistonLine();
|
private PistonLine pistonLine = new PistonLine();
|
||||||
|
private SlabOnRedstone slabOnRedstone = new SlabOnRedstone();
|
||||||
|
private SlabOnTorch slabOnTorch = new SlabOnTorch();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PanzernResult check(Block source, Map<BlockFace, Block> adjacent, Set<Material> adjacentMaterials) {
|
public PanzernResult check(Block source, Map<BlockFace, Block> adjacent, Set<Material> adjacentMaterials) {
|
||||||
if (adjacentMaterials.contains(Material.SLIME_BLOCK)) {
|
if (adjacentMaterials.contains(Material.SLIME_BLOCK)) {
|
||||||
for (BlockFace face : HORIZONTAL_FACES) {
|
PanzernResult result = slabOnRedstone.check(source, adjacent, adjacentMaterials);
|
||||||
if (!adjacent.containsKey(face)) continue;
|
if (result == PanzernResult.SLAB) {
|
||||||
if (adjacent.get(face).getType() == Material.REDSTONE_WIRE) {
|
return PanzernResult.UNMOVABLE_SLAB;
|
||||||
PanzernResult panzernResult = pistonLine.check(source, adjacent, adjacentMaterials);
|
}
|
||||||
if (panzernResult == PanzernResult.DEFAULT) {
|
result = slabOnTorch.check(source, adjacent, adjacentMaterials);
|
||||||
return PanzernResult.UNMOVABLE_SLAB;
|
if (result == PanzernResult.SLAB) {
|
||||||
}
|
return PanzernResult.UNMOVABLE_SLAB;
|
||||||
return panzernResult;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
PanzernResult panzernResult = pistonLine.check(source, adjacent, adjacentMaterials);
|
PanzernResult panzernResult = pistonLine.check(source, adjacent, adjacentMaterials);
|
||||||
if (panzernResult == PanzernResult.DEFAULT) {
|
if (panzernResult == PanzernResult.DEFAULT) {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren