Don't refund deconstruction in sandbox

This commit is contained in:
Anuken 2024-04-20 11:18:57 -04:00
parent 3595c350ab
commit 3a4f3e7fe7

View File

@ -353,7 +353,7 @@ public class ConstructBlock extends Block{
if(progress <= current.deconstructThreshold || state.rules.infiniteResources){
//add any leftover items that weren't obtained due to rounding errors
if(core != null){
if(core != null && !state.rules.infiniteResources){
for(int i = 0; i < itemsLeft.length; i++){
int target = Mathf.round(requirements[i].amount * state.rules.buildCostMultiplier * state.rules.deconstructRefundMultiplier);
int remaining = target - itemsLeft[i];