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) { public static BlockBehaviour.Properties createPlant(MapColor color) {
return BlockBehaviour.Properties.of() return createPlant(color, false);
.mapColor(color) }
.noCollission()
.instabreak() //TODO: Remove this method, and call noCollision explicitly
.pushReaction(PushReaction.DESTROY); public static BlockBehaviour.Properties createPlant(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 createGrass(MapColor color, boolean flammable) { public static BlockBehaviour.Properties createGrass(MapColor color, boolean flammable) {
@ -45,11 +53,19 @@ public class BehaviourBuilders {
} }
public static BlockBehaviour.Properties createWaterPlant() { public static BlockBehaviour.Properties createWaterPlant() {
return BlockBehaviour.Properties.of() return createWaterPlant(MapColor.WATER, false);
.mapColor(MapColor.WATER) }
.noCollission()
.instabreak() //TODO: Remove this method, and call noCollision explicitly
.pushReaction(PushReaction.DESTROY); 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() { public static BlockBehaviour.Properties createReplaceableWaterPlant() {