Skip to content

Commit

Permalink
Fix renewables
Browse files Browse the repository at this point in the history
Signed-off-by: cswhite2000 <[email protected]>
  • Loading branch information
cswhite2000 authored and Electroid committed Apr 20, 2021
1 parent 49f2864 commit a4b07a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/src/main/java/tc/oc/pgm/renewable/Renewable.java
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ boolean renew(BlockVector pos, MaterialData material) {
Location location = pos.toLocation(match.getWorld());
Block block = location.getBlock();
BlockState newState = location.getBlock().getState();
newState.setType(material.getItemType());
newState.setData(material);

BlockRenewEvent event = new BlockRenewEvent(block, newState, this);
Expand Down
1 change: 1 addition & 0 deletions util/src/main/java/tc/oc/pgm/util/block/BlockStates.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ static BlockState cloneWithMaterial(Block block, MaterialData materialData) {

static BlockState create(World world, BlockVector pos, MaterialData materialData) {
BlockState state = pos.toLocation(world).getBlock().getState();
state.setType(materialData.getItemType());
state.setData(materialData);
return state;
}
Expand Down

0 comments on commit a4b07a5

Please sign in to comment.