Collission Changes
This commit is contained in:
parent
33fdac0b98
commit
457673d721
1 changed files with 26 additions and 10 deletions
|
@ -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() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue