Implement custom Compressed Sieve types
This commit is contained in:
parent
43b801220d
commit
b2ddaacc56
|
|
@ -1,3 +1,6 @@
|
|||
## Ex Deorum 3.6
|
||||
- Implement custom Compressed Sieve types. Works the same as with sieves, just replace `sieve_materials` with `compressed_sieve_materials`
|
||||
|
||||
## Ex Deorum 3.5
|
||||
- Remove Yellorium Dust sieve drop (#116)
|
||||
- Fixed Fluid Transformation recipes requiring byproducts
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ package thedarkcolour.exdeorum.material;
|
|||
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import thedarkcolour.exdeorum.block.CompressedSieveBlock;
|
||||
|
||||
public class CompressedSieveMaterial extends SieveMaterial {
|
||||
|
|
@ -31,4 +32,18 @@ public class CompressedSieveMaterial extends SieveMaterial {
|
|||
protected Block createBlock() {
|
||||
return new CompressedSieveBlock(props().noOcclusion());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static CompressedSieveMaterial readFromJson(MaterialParser parser) {
|
||||
SoundType soundType = parser.getSoundType();
|
||||
float strength = parser.getStrength();
|
||||
boolean needsCorrectTool = parser.getOptionalBoolean("needs_correct_tool");
|
||||
String requiredModId = parser.getRequiredModId();
|
||||
|
||||
if (parser.error) {
|
||||
return null;
|
||||
} else {
|
||||
return new CompressedSieveMaterial(soundType, strength, needsCorrectTool, requiredModId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ public class DefaultMaterials {
|
|||
public static void registerMaterials() {
|
||||
BARRELS.search(BarrelMaterial::readFromJson);
|
||||
SIEVES.search(SieveMaterial::readFromJson);
|
||||
// todo compressed sieve JSON
|
||||
COMPRESSED_SIEVES.search(CompressedSieveMaterial::readFromJson);
|
||||
LAVA_CRUCIBLES.search(parser -> AbstractCrucibleMaterial.readFromJson(parser, LavaCrucibleMaterial::new));
|
||||
WATER_CRUCIBLES.search(parser -> AbstractCrucibleMaterial.readFromJson(parser, WaterCrucibleMaterial::new));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user