Collission Changes

This commit is contained in:
Frank 2023-05-25 00:15:14 +02:00
parent 33fdac0b98
commit 457673d721

View file

@ -14,11 +14,19 @@ public class BehaviourBuilders {
}
public static BlockBehaviour.Properties createPlant(MapColor color) {
return BlockBehaviour.Properties.of()
return createPlant(color, false);
}
//TODO: Remove this method, and call noCollision explicitly
public static BlockBehaviour.Properties createPlant(MapColor color, boolean collission) {
var p = BlockBehaviour.Properties.of()
.mapColor(color)
.noCollission()
.instabreak()
.pushReaction(PushReaction.DESTROY);
if (!collission)
p.noCollission();
return p;
}
public static BlockBehaviour.Properties createGrass(MapColor color, boolean flammable) {
@ -45,11 +53,19 @@ public class BehaviourBuilders {
}
public static BlockBehaviour.Properties createWaterPlant() {
return BlockBehaviour.Properties.of()
.mapColor(MapColor.WATER)
.noCollission()
return createWaterPlant(MapColor.WATER, false);
}
//TODO: Remove this method, and call noCollision explicitly
public static BlockBehaviour.Properties createWaterPlant(MapColor color, boolean collission) {
var p = BlockBehaviour.Properties.of()
.mapColor(color)
.instabreak()
.pushReaction(PushReaction.DESTROY);
if (!collission)
p.noCollission();
return p;
}
public static BlockBehaviour.Properties createReplaceableWaterPlant() {