-
Notifications
You must be signed in to change notification settings - Fork 551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replace isitemsimilar #4120
replace isitemsimilar #4120
Changes from 7 commits
09fdb87
f91ee0e
2aa1f0c
c013fad
5fbef63
cbb40ef
cbb1f25
8542e26
22e0773
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ protected void tick(Block b) { | |
|
||
for (Entity n : b.getWorld().getNearbyEntities(b.getLocation(), RADIUS, RADIUS, RADIUS, this::isReadyToGrow)) { | ||
for (int slot : getInputSlots()) { | ||
if (SlimefunUtils.isItemSimilar(inv.getItemInSlot(slot), organicFood, false, false)) { | ||
if (SlimefunUtils.compareItem(inv.getItemInSlot(slot), organicFood)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This compares with an unobtainable blank organic food item. |
||
if (getCharge(b.getLocation()) < ENERGY_CONSUMPTION) { | ||
return; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,7 +58,7 @@ private boolean grow(Block machine, BlockMenu inv, Block crop) { | |
|
||
if (ageable.getAge() < ageable.getMaximumAge()) { | ||
for (int slot : getInputSlots()) { | ||
if (SlimefunUtils.isItemSimilar(inv.getItemInSlot(slot), organicFertilizer, false, false)) { | ||
if (SlimefunUtils.compareItem(inv.getItemInSlot(slot), organicFertilizer)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This compares with an unobtainable blank organic fertilizer item. |
||
removeCharge(machine.getLocation(), getEnergyConsumption()); | ||
inv.consumeItem(slot); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,7 +120,7 @@ private boolean updateSaplingData(Block machine, Block block, BlockMenu inv, Sap | |
} | ||
|
||
protected boolean isFertilizer(@Nullable ItemStack item) { | ||
return SlimefunUtils.isItemSimilar(item, organicFertilizer, false, false); | ||
return SlimefunUtils.compareItem(item, organicFertilizer); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This compares with an unobtainable blank organic fertilizer item. |
||
} | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,7 +111,7 @@ protected void tick(Block b) { | |
|
||
for (Entity n : b.getWorld().getNearbyEntities(b.getLocation(), 4.0, 2.0, 4.0, this::canBreed)) { | ||
for (int slot : getInputSlots()) { | ||
if (SlimefunUtils.isItemSimilar(inv.getItemInSlot(slot), organicFood, false)) { | ||
if (SlimefunUtils.compareItem(inv.getItemInSlot(slot), organicFood)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This compares with an unobtainable blank organic food item. |
||
if (getCharge(b.getLocation()) < ENERGY_CONSUMPTION) { | ||
return; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "checkLore" option is ignored here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already check lore in the method. We don’t specifically need to check for it with a boolean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The option exists in the gui yet it has no effect on the check.