mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-08-03 19:28:49 -04:00
Block Selectable Variable
This commit is contained in:
parent
debb3d2f61
commit
c39b059e51
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user