Skip to content

Commit

Permalink
fix floating point errors for water adding to planters
Browse files Browse the repository at this point in the history
  • Loading branch information
eerussianguy committed Mar 5, 2023
1 parent c5c0c9a commit 69716dc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion resources/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def generate(rm: ResourceManager):
tex = 'firmalife:block/%s_%s' % (trd, variant)
rm.block_model('firmalife:%s_%s' % (trd, variant), {'west': tex, 'east': tex, 'north': tex, 'south': tex, 'particle': tex, 'up': 'firmalife:block/%s_top' % trd, 'down': 'firmalife:block/%s_top' % trd})

rm.blockstate('sprinkler', model='firmalife:block/sprinkler').with_lang(lang('sprinkler')).with_tag('minecraft:mineable/pickaxe').with_block_loot('firmalfie:sprinkler')
rm.blockstate('sprinkler', model='firmalife:block/sprinkler').with_lang(lang('sprinkler')).with_tag('minecraft:mineable/pickaxe').with_block_loot('firmalife:sprinkler')
rm.item_model('sprinkler', parent='firmalife:block/sprinkler')

rm.blockstate('beehive', variants={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ public void setAndUpdateSlots(int slot)
public boolean addWater(float amount)
{
assert level != null;
if (water < 1f)
if (water < 0.99f)
{
water = Math.min(water + amount, 1f);
updateBlockState(level.getBlockState(worldPosition));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"entries": [
{
"type": "minecraft:item",
"name": "firmalfie:sprinkler"
"name": "firmalife:sprinkler"
}
],
"conditions": [
Expand Down

0 comments on commit 69716dc

Please sign in to comment.