rename MaterialSet

This commit is contained in:
dfsek
2025-12-28 20:53:51 -07:00
parent c6eb2f49f3
commit c537605880
10 changed files with 35 additions and 35 deletions
@@ -19,7 +19,7 @@ import com.dfsek.terra.api.block.BlockType;
import com.dfsek.terra.api.block.state.BlockState;
import com.dfsek.terra.api.config.AbstractableTemplate;
import com.dfsek.terra.api.config.meta.Meta;
import com.dfsek.terra.api.util.collection.MaterialSet;
import com.dfsek.terra.api.util.collection.BlockStateSet;
@SuppressWarnings({ "unused", "FieldMayBeFinal" })
@@ -36,7 +36,7 @@ public class OreTemplate implements AbstractableTemplate {
private @Meta Map<@Meta BlockType, @Meta BlockState> materials = new HashMap<>();
@Value("replace")
private @Meta MaterialSet replaceable;
private @Meta BlockStateSet replaceable;
@Value("physics")
@Default
@@ -62,7 +62,7 @@ public class OreTemplate implements AbstractableTemplate {
return material;
}
public MaterialSet getReplaceable() {
public BlockStateSet getReplaceable() {
return replaceable;
}
@@ -20,7 +20,7 @@ import java.util.random.RandomGenerator;
import com.dfsek.terra.api.block.BlockType;
import com.dfsek.terra.api.block.state.BlockState;
import com.dfsek.terra.api.structure.Structure;
import com.dfsek.terra.api.util.collection.MaterialSet;
import com.dfsek.terra.api.util.collection.BlockStateSet;
import com.dfsek.terra.api.world.WritableWorld;
import static com.dfsek.terra.addons.ore.utils.VanillaOreUtils.shouldPlace;
@@ -31,12 +31,12 @@ public class VanillaOre implements Structure {
protected final BlockState material;
protected final double size;
protected final MaterialSet replaceable;
protected final BlockStateSet replaceable;
protected final boolean applyGravity;
protected final double exposed;
protected final Map<BlockType, BlockState> materials;
public VanillaOre(BlockState material, double size, MaterialSet replaceable, boolean applyGravity,
public VanillaOre(BlockState material, double size, BlockStateSet replaceable, boolean applyGravity,
double exposed, Map<BlockType, BlockState> materials) {
this.material = material;
this.size = size;
@@ -171,7 +171,7 @@ public class VanillaOre implements Structure {
return materials.getOrDefault(replace, material);
}
public MaterialSet getReplaceable() {
public BlockStateSet getReplaceable() {
return replaceable;
}
@@ -8,7 +8,7 @@ import java.util.random.RandomGenerator;
import com.dfsek.terra.api.block.BlockType;
import com.dfsek.terra.api.block.state.BlockState;
import com.dfsek.terra.api.util.collection.MaterialSet;
import com.dfsek.terra.api.util.collection.BlockStateSet;
import com.dfsek.terra.api.world.WritableWorld;
import static com.dfsek.terra.addons.ore.utils.VanillaOreUtils.shouldPlace;
@@ -17,7 +17,7 @@ import static com.dfsek.terra.addons.ore.utils.VanillaOreUtils.shouldPlace;
public class VanillaScatteredOre extends VanillaOre {
protected final int spread;
public VanillaScatteredOre(BlockState material, double size, MaterialSet replaceable, boolean applyGravity, double exposed,
public VanillaScatteredOre(BlockState material, double size, BlockStateSet replaceable, boolean applyGravity, double exposed,
Map<BlockType, BlockState> materials, int spread) {
super(material, size, replaceable, applyGravity, exposed, materials);
@@ -3,7 +3,7 @@ package com.dfsek.terra.addons.ore.utils;
import java.util.random.RandomGenerator;
import com.dfsek.terra.api.block.BlockType;
import com.dfsek.terra.api.util.collection.MaterialSet;
import com.dfsek.terra.api.util.collection.BlockStateSet;
import com.dfsek.terra.api.world.WritableWorld;
@@ -14,7 +14,7 @@ public class VanillaOreUtils {
return random.nextFloat() < exposedChance;
}
public static boolean shouldPlace(MaterialSet replaceable, BlockType type, Double exposedChance, RandomGenerator random,
public static boolean shouldPlace(BlockStateSet replaceable, BlockType type, Double exposedChance, RandomGenerator random,
WritableWorld world,
int x,
int y, int z) {