Skip to content

Commit

Permalink
added missing method worldprovider
Browse files Browse the repository at this point in the history
  • Loading branch information
pollend committed Apr 20, 2020
1 parent 8d6e88d commit 5a3c50e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public int setExtraData(int index, Vector3i pos, int value) {

@Override
public int setExtraData(int index, Vector3ic pos, int value) {
return 0;
return base.setExtraData(index, pos, value);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,16 @@ public void shutdown() {

@Override
public Block setBlock(Vector3i pos, Block type) {
return this.setBlock(JomlUtil.from(pos),type);
}

@Override
public Block setBlock(Vector3ic pos, Block type) {
if (GameThread.isCurrentThread()) {
EntityRef blockEntity = getBlockEntityAt(pos);
Block oldType = super.setBlock(pos, type);
if (oldType != null) {
updateBlockEntity(blockEntity, JomlUtil.from(pos), oldType, type, false, Collections.<Class<? extends Component>>emptySet());
updateBlockEntity(blockEntity, pos, oldType, type, false, Collections.<Class<? extends Component>>emptySet());
}
return oldType;
}
Expand Down

0 comments on commit 5a3c50e

Please sign in to comment.