Skip to content

Commit

Permalink
fix: Fix sieve meshes
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed Jun 30, 2024
1 parent 571eaad commit d0dca60
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ public ExNihiloSequentiaAddon() {
itemMap.put(NihiloItems.ANDESITE_GRAVEL, findBlock("crushed_andesite"));
itemMap.put(NihiloItems.GRANITE_GRAVEL, findBlock("crushed_granite"));

SieveMeshRegistry.registerDefaults(MeshType.STRING);

ItemStack stringMeshItem = findItem("string_mesh");
if (!stringMeshItem.isEmpty()) {
SieveMeshRegistryEntry stringMesh = new SieveMeshRegistryEntry(CommonMeshType.STRING, stringMeshItem, MeshType.STRING);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import net.blay09.mods.excompressum.registry.compressor.CompressedRecipeRegistry;
import net.blay09.mods.excompressum.registry.hammer.HammerRegistry;
import net.blay09.mods.excompressum.registry.heavysieve.HeavySieveRegistry;
import net.blay09.mods.excompressum.registry.sievemesh.SieveMeshRegistry;
import net.blay09.mods.excompressum.registry.woodencrucible.WoodenCrucibleRegistry;

public class ExRegistries {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import net.blay09.mods.excompressum.api.IHammerRecipe;
import net.blay09.mods.excompressum.api.sievemesh.SieveMeshRegistryEntry;

import net.blay09.mods.excompressum.registry.sievemesh.SieveMeshRegistry;
import net.minecraft.core.BlockPos;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.util.RandomSource;
Expand All @@ -19,6 +20,10 @@
import java.util.List;

public class NihilisticNihiloProvider implements ExNihiloProvider {
public NihilisticNihiloProvider() {
SieveMeshRegistry.registerDefaults(null);
}

@Override
public ItemStack getNihiloItem(NihiloItems type) {
return ItemStack.EMPTY;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public class SieveMeshRegistry {
private static final Map<CommonMeshType, SieveMeshRegistryEntry> entriesByType = new HashMap<>();
private static final Map<ResourceLocation, SieveMeshRegistryEntry> entriesByItem = new HashMap<>();

public static void registerDefaults() {
SieveMeshRegistryEntry ironMesh = new SieveMeshRegistryEntry(CommonMeshType.IRON, new ItemStack(ModItems.ironMesh), null);
public static void registerDefaults(@Nullable Object backingMesh) {
SieveMeshRegistryEntry ironMesh = new SieveMeshRegistryEntry(CommonMeshType.IRON, new ItemStack(ModItems.ironMesh), backingMesh);
ironMesh.setHeavy(true);
ironMesh.setMeshLevel(3);
ironMesh.setModelName("iron");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"credit": "Made with Blockbench",
"parent": "minecraft:block/block",
"textures": {
"mesh": "excompressum:blocks/diamond_mesh"
"mesh": "excompressum:block/diamond_mesh"
},
"elements": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"credit": "Made with Blockbench",
"parent": "minecraft:block/block",
"textures": {
"mesh": "excompressum:blocks/emerald_mesh"
"mesh": "excompressum:block/emerald_mesh"
},
"elements": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"credit": "Made with Blockbench",
"parent": "minecraft:block/block",
"textures": {
"mesh": "excompressum:blocks/flint_mesh"
"mesh": "excompressum:block/flint_mesh"
},
"elements": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"__comment": "Designed by Blay09 with BDcraft Cubik PRO 0.96 Beta - http://bdcraft.net",
"textures": {
"particle": "#texture",
"iron_mesh": "excompressum:blocks/iron_mesh"
"iron_mesh": "excompressum:block/iron_mesh"
},
"elements": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"credit": "Made with Blockbench",
"parent": "minecraft:block/block",
"textures": {
"mesh": "excompressum:blocks/iron_mesh"
"mesh": "excompressum:block/iron_mesh"
},
"elements": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"credit": "Made with Blockbench",
"parent": "minecraft:block/block",
"textures": {
"mesh": "excompressum:blocks/netherite_mesh"
"mesh": "excompressum:block/netherite_mesh"
},
"elements": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"credit": "Made with Blockbench",
"parent": "minecraft:block/block",
"textures": {
"mesh": "excompressum:blocks/string_mesh"
"mesh": "excompressum:block/string_mesh"
},
"elements": [
{
Expand Down

0 comments on commit d0dca60

Please sign in to comment.