Block Selectable Variable

This commit is contained in:
ImTallone 2019-03-25 09:55:52 +02:00
parent debb3d2f61
commit c39b059e51
2 changed files with 12 additions and 0 deletions

View File

@ -14,6 +14,8 @@ public class Block implements IRegistryElement {
private String texture; private String texture;
private float hardness; private float hardness;
private boolean solid = true; private boolean solid = true;
//NOTE FOR ZEN: This variable is mostly making the fluids non-selectable! Also i couln't find where you made the blocks selected. Please make if this is false, then the block isn't blue (selected)!!
private boolean selectable = true;
public String getTexture() { public String getTexture() {
return texture; return texture;
@ -36,6 +38,15 @@ public class Block implements IRegistryElement {
return solid; return solid;
} }
public Block setSelectable(boolean selectable) {
this.selectable = selectable;
return this;
}
public boolean isSelectable() {
return selectable;
}
public IRenderablePair getBlockPair() { public IRenderablePair getBlockPair() {
return pair; return pair;
} }

View File

@ -5,6 +5,7 @@ public class Water extends Block {
public Water() { public Water() {
setTexture("water"); setTexture("water");
setID("cubyz:water"); setID("cubyz:water");
setSelectable(false);
} }
} }