Track transparent crucibles

This commit is contained in:
thedarkcolour 2024-03-21 22:10:46 -07:00
parent 07ae72d9ec
commit e0e419f3fe
2 changed files with 10 additions and 0 deletions

View File

@ -66,6 +66,7 @@ import thedarkcolour.exdeorum.compat.ModIds;
import thedarkcolour.exdeorum.compat.top.ExDeorumTopCompat;
import thedarkcolour.exdeorum.config.EConfig;
import thedarkcolour.exdeorum.item.WateringCanItem;
import thedarkcolour.exdeorum.material.AbstractCrucibleMaterial;
import thedarkcolour.exdeorum.material.BarrelMaterial;
import thedarkcolour.exdeorum.network.NetworkHandler;
import thedarkcolour.exdeorum.network.VisualUpdateTracker;
@ -183,6 +184,7 @@ public final class EventHandler {
));
BarrelMaterial.loadTransparentBlocks();
AbstractCrucibleMaterial.loadTransparentBlocks();
});
}

View File

@ -18,6 +18,8 @@
package thedarkcolour.exdeorum.material;
import com.google.common.collect.Iterables;
import com.google.common.collect.Iterators;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.SoundType;
import org.jetbrains.annotations.Nullable;
@ -53,6 +55,12 @@ public abstract class AbstractCrucibleMaterial extends AbstractMaterial {
}
}
public static void loadTransparentBlocks() {
for (var material : Iterables.concat(DefaultMaterials.WATER_CRUCIBLES, DefaultMaterials.LAVA_CRUCIBLES)) {
TRANSPARENT_CRUCIBLES.add(material.getBlock());
}
}
public interface Factory<T> {
T create(SoundType soundType, float strength, boolean needsCorrectTool, int mapColor, String requiredModId, boolean transparent);
}