Skip to content

Commit

Permalink
Can no longer place blocks on lava
Browse files Browse the repository at this point in the history
  • Loading branch information
HeathLoganCampbell committed Jul 3, 2019
1 parent f5b4cad commit cf0022f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ right arrow key = changed block placed
* Chunkize the world
* Make particles
* Generate trees
* Make lava non solid
* make lava non selectable
* Make it so you swim in lava
* add water
* Make it so Bigger Y = higher up

## Versions
Expand Down
2 changes: 1 addition & 1 deletion src/com/craftclassic/play/blocks/Block.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void setTextureId(int textureId) {
this.textureId = textureId;
}

public boolean onPlace(PlaceEvent placeEvent) { return true; }
public boolean onPlace(PlaceEvent placeEvent) { return this.solid; }
public boolean onBreak(BreakEvent breakEvent) { return this.breakable; }
public void onTick(Location loc)
{
Expand Down
1 change: 1 addition & 0 deletions src/com/craftclassic/play/blocks/LavaBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public LavaBlock(int id)
super(id, "Lava", 12);
this.setBreakable(false);
this.setSelectable(false);
this.setSolid(false);
}

private void flow(Location location, int x, int y, int z)
Expand Down

0 comments on commit cf0022f

Please sign in to comment.