Skip to content

Commit

Permalink
use getMaxStackSize in solidifier and crusher; update changelogs from…
Browse files Browse the repository at this point in the history
… PRs
  • Loading branch information
Lothrazar committed Jul 28, 2024
1 parent 02cfd51 commit 69a36b3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,11 @@ public void tick() {
return;
}
//Checks if there is space in the output slots before processing
if(outputSlots.getStackInSlot(0).getCount() > 64 - currentRecipe.getResultItem(level.registryAccess()).copy().getCount()) return;
if(outputSlots.getStackInSlot(1).getCount() > 64 - currentRecipe.randOutput.bonus.getCount()) return;
var res = currentRecipe.getResultItem(level.registryAccess()).copy();
var max = res.getMaxStackSize();
if(outputSlots.getStackInSlot(0).getCount() > max - res.getCount()) { return; }
max = currentRecipe.randOutput.bonus.getMaxStackSize();
if(outputSlots.getStackInSlot(1).getCount() > max - currentRecipe.randOutput.bonus.getCount()) { return; }

if (this.burnTime <= 0 && this.currentRecipe != null) {
this.burnTimeMax = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,11 @@ public void tick() {
return;
}
//Fixes sync issue entirely
if(level.isClientSide()) return;
if(level.isClientSide()) { return; }
//Checks if there is space in the output slot
if(this.outputSlots.getStackInSlot(0).getCount() > 64 - currentRecipe.getResultItem(level.registryAccess()).getCount()) return;
var res = currentRecipe.getResultItem(level.registryAccess());
var max = res.getMaxStackSize();
if(this.outputSlots.getStackInSlot(0).getCount() > max - res.getCount()){ return; }
final int energyCost = this.currentRecipe.getEnergy().getRfPertick();
final int fluidCost = this.currentRecipe.getRecipeFluid().getAmount();
if ((energy.getEnergyStored() < energyCost && energyCost > 0)
Expand Down
5 changes: 4 additions & 1 deletion update.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,10 @@
,"1.20.5":"Merge pull request #2334 from TelepathicGrunt/trunk/1.20 Optimize anti beacon to not deadlock worldgen or lag entities"
,"1.20.6":"#2332 Patch doorbell crash. Patch InvocationTargetException: null errors coming from IHasClickToggle"
,"1.20.7":"Change curio render_toggle. #2356. Wooden Hopper is mineable with axes. Fixed Block Breaker attempting to break liquid source blocks. "
,"1.20.8":"Re-added botania-api Solegnolia support. Growth enchantment now uses the same logic as Sprinkler & Terra Soil (only minecraft:crops or minecraft::saplings can grow, respect IGrowable::canUseBonemeal). New gloom ignored config Gloom enchant (cyclic:curse) to ignore and not use these effects #2217 #2325. Fix Soundproofing block not muting Mekanism sounds #2389 (for example Precision Sawmill and others - you may need four or more soundproofing blocks for the desired effect). New config [cyclic.blocks.soundproofing] radius = 6 to control the area. New config under [cyclic.blocks] wireless_transfer_dimensional = true allowing transfer nodes to connect across dimensions #1913. Balance changes made for Excavate enchant it will no longer trigger if the tool is not 'mineable' effective for example axe on dirt. New feature for Excavate enchant #2116 it will not trigger on anything matching the block data-tag 'cyclic:ignored/excavate'. "
,"1.20.8":"Re-added botania-api Solegnolia support. Growth enchantment now uses the same logic as Sprinkler & Terra Soil (only minecraft:crops or minecraft::saplings can grow, respect IGrowable::canUseBonemeal). New gloom ignored config Gloom enchant (cyclic:curse) to ignore and not use these effects #2217 #2325. Fix Soundproofing block not muting Mekanism sounds #2389 (for example Precision Sawmill and others - you may need four or more soundproofing blocks for the desired effect). New config [cyclic.blocks.soundproofing] radius = 6 to control the area. New config under [cyclic.blocks] wireless_transfer_dimensional = true allowing transfer nodes to connect across dimensions #1913. Balance changes made for Excavate enchant it will no longer trigger if the tool is not 'mineable' effective for example axe on dirt. New feature for Excavate enchant #2116 it will not trigger on anything matching the block data-tag 'cyclic:ignored/excavate'. ",

"1.20.9": " Fix tanks not getting filled from buckets\n\nMerge pull request #2400 from PocketSizedWeeb Fixes Issue #2376 solidifier client-server desync problems with fluid quantities during recipe processing\n\nMerge pull request #2387 from Apollounknowndev Fix worldgen crash and compatibility with other worldgen mods; flower worldgen has moved to new blocktags in woldgen/biome/has_flower/\n ",
"1.20.10": "JEI Changes:\n\n Fixes issue \n\nSolidifier doesn't show liquid requirements #2369\nMade the JEI category for the Melter more closely match the Melter's GUI\nMoved the JEI \"Show Recipe\" area for the machines line up with the progress bar\nMoved the JEI \"Show Recipe\" area for the generators line up with the generator name\nEvery applicable JEI Category got an energy bar added to show max consumed/produced RF\nEvery applicable JEI Category got a progress bar to show how long the machine will run for\nEdited the Melter category texture to add space for energy bar\nPossibly fixed\n\n HashMap memory leak #2383 by caching an instance of Minecraft instead of grabbing it when needed in the Packager's JEI Category\n\nDry Peat:\n\n Fixes issue \n\n Peat bog cannot be saturated with water-logged leaves #2399 by allowing water-logged blocks to hydrate peat\n\nSolidifier/Melter:\n\n Fully fixes desync issue by making all of the processing server sided.\n\nCrushing Macerator:\n\n Fixed \n\nCrushing Macerator continues to operate and void items if full #2343\nFixed\n\n Crushing Macerator allows items to be shift-clicked into output slots #2341\n\nEvaporation Generator:\n\n Removed tank tooltip from before it was rotated\n Fixes \n\n Evaporation Generator 1.19.2 #2322 by implementing a workaround since the fluid portion of FluidTagIngredient was defaulting to empty which was not allowing tagged fluids in the generator\n\nAuto Crafter:\n\n Fixed \n\n auto crafting machine duplicate glitch #2358 by checking input before processing\n Fixed an issue where the preview slot wasn't updating until the machine was processing a craft\n\nWireless Transmitter:\n\n Fixed \n\ngps card inside wireless transmitter disappearing #2403 by adding an onRemove method to the transmitter that drops the gps card"

}
}

0 comments on commit 69a36b3

Please sign in to comment.