Skip to content

Commit

Permalink
Don't use physics on new generated blocks.
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Nov 7, 2019
1 parent e924c18 commit fa348a6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ public boolean isReplacementGenerated(Block block, boolean improved)
double rand = new Random(System.currentTimeMillis()).nextDouble() * chanceMap.lastKey();
newMaterial = chanceMap.ceilingEntry(rand).getValue();
}

block.setType(newMaterial);
// Don't use physics
block.setType(newMaterial, false);
return true;
}

Expand Down

4 comments on commit fa348a6

@BONNe
Copy link
Member

@BONNe BONNe commented on fa348a6 Nov 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if this is correct.
This block replacement is done if the cobblestone (or stone) creating event is cancelled. So air (or water/lava) is replaced with a custom block.
If physic is not updated, then it could influence water flow that is blocked now. So the water (or lava) will not be redirected if MGC changes block.

@tastybento
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not seen that yet. I've actually see the opposite. This only affects sand and gravel blocks, in that they don't drop immediately and stay in place like cobblestone and I don't see any affect on the water or other liquids, just the pasted block.
The main point of doing this by the way was to stop sand and gravel blocks falling if they were magically generated (it is magic after all!). In a vertical cobblestone generator they were falling and being overwritten by other magic blocks.

@tastybento
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BONNe Are there any "standard" cobble gens we can try it on to make sure?

@BONNe
Copy link
Member

@BONNe BONNe commented on fa348a6 Nov 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will test and check if there is an issue with liquid flow updating.

Please sign in to comment.