Skip to content

Commit

Permalink
wip: move everything to shared code
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed Feb 28, 2024
1 parent b8a0f8b commit 80e480c
Show file tree
Hide file tree
Showing 178 changed files with 175 additions and 415 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package net.blay09.mods.excompressum;
package net.blay09.mods.excompressum.forge;

import net.blay09.mods.balm.api.Balm;
import net.blay09.mods.balm.api.client.BalmClient;
import net.blay09.mods.excompressum.ExCompressum;
import net.blay09.mods.excompressum.client.ExCompressumClient;
import net.blay09.mods.excompressum.compat.top.TheOneProbeAddon;
import net.blay09.mods.excompressum.forge.compat.top.TheOneProbeAddon;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.fml.DistExecutor;
import net.minecraftforge.fml.ModList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.blay09.mods.excompressum.compat.exnihilosequentia;
package net.blay09.mods.excompressum.forge.compat.exnihilosequentia;

import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Maps;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
package net.blay09.mods.excompressum.compat.jei;
package net.blay09.mods.excompressum.forge.compat.jei;

import com.mojang.blaze3d.vertex.PoseStack;
import mezz.jei.api.constants.VanillaTypes;
import mezz.jei.api.gui.builder.IRecipeLayoutBuilder;
import mezz.jei.api.gui.drawable.IDrawable;
import mezz.jei.api.helpers.IGuiHelper;
import mezz.jei.api.recipe.IFocus;
import mezz.jei.api.recipe.IFocusGroup;
import mezz.jei.api.recipe.RecipeType;
import mezz.jei.api.recipe.category.IRecipeCategory;
import net.blay09.mods.excompressum.ExCompressum;
import net.blay09.mods.excompressum.item.ModItems;
import net.blay09.mods.excompressum.loot.MergedLootTableEntry;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.ItemStack;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
package net.blay09.mods.excompressum.compat.jei;
package net.blay09.mods.excompressum.forge.compat.jei;

import com.mojang.blaze3d.vertex.PoseStack;
import mezz.jei.api.constants.VanillaTypes;
import mezz.jei.api.gui.builder.IRecipeLayoutBuilder;
import mezz.jei.api.gui.drawable.IDrawable;
import mezz.jei.api.helpers.IGuiHelper;
import mezz.jei.api.recipe.IFocus;
import mezz.jei.api.recipe.IFocusGroup;
import mezz.jei.api.recipe.RecipeType;
import mezz.jei.api.recipe.category.IRecipeCategory;
import net.blay09.mods.excompressum.ExCompressum;
import net.blay09.mods.excompressum.block.ModBlocks;
import net.blay09.mods.excompressum.loot.MergedLootTableEntry;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.ItemStack;

import javax.annotation.Nonnull;
import java.util.List;

public class CompressedHammerRecipeCategory implements IRecipeCategory<JeiCompressedHammerRecipe> {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.blay09.mods.excompressum.compat.jei;
package net.blay09.mods.excompressum.forge.compat.jei;

import net.blay09.mods.excompressum.item.ModItems;
import net.minecraft.nbt.CompoundTag;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.blay09.mods.excompressum.compat.jei;
package net.blay09.mods.excompressum.forge.compat.jei;

import mezz.jei.api.constants.VanillaTypes;
import mezz.jei.api.gui.builder.IRecipeLayoutBuilder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.blay09.mods.excompressum.compat.jei;
package net.blay09.mods.excompressum.forge.compat.jei;

import mezz.jei.api.constants.VanillaTypes;
import mezz.jei.api.gui.builder.IRecipeLayoutBuilder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.blay09.mods.excompressum.compat.jei;
package net.blay09.mods.excompressum.forge.compat.jei;

import mezz.jei.api.constants.VanillaTypes;
import mezz.jei.api.gui.builder.IRecipeLayoutBuilder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.blay09.mods.excompressum.compat.jei;
package net.blay09.mods.excompressum.forge.compat.jei;

import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Lists;
Expand All @@ -9,6 +9,7 @@
import mezz.jei.api.registration.IRecipeCatalystRegistration;
import mezz.jei.api.registration.IRecipeCategoryRegistration;
import mezz.jei.api.registration.IRecipeRegistration;
import net.blay09.mods.balm.api.Balm;
import net.blay09.mods.excompressum.ExCompressum;
import net.blay09.mods.excompressum.api.ExNihiloProvider;
import net.blay09.mods.excompressum.api.IHammerRecipe;
Expand Down Expand Up @@ -37,7 +38,6 @@
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.Fluid;
import net.minecraft.world.level.storage.loot.LootTable;
import net.minecraftforge.registries.ForgeRegistries;

import java.util.ArrayList;
import java.util.Comparator;
Expand Down Expand Up @@ -92,12 +92,12 @@ public void registerRecipes(IRecipeRegistration registry) {
ArrayListMultimap<ResourceLocation, WoodenCrucibleRecipe> fluidOutputMap = ArrayListMultimap.create();
List<WoodenCrucibleRecipe> woodenCrucibleRecipes = recipeManager.getAllRecipesFor(ModRecipeTypes.woodenCrucibleRecipeType);
for (WoodenCrucibleRecipe entry : woodenCrucibleRecipes) {
fluidOutputMap.put(entry.getFluid(), entry);
fluidOutputMap.put(entry.getFluidId(), entry);
}

List<JeiWoodenCrucibleRecipe> jeiWoodenCrucibleRecipes = new ArrayList<>();
for (ResourceLocation fluidName : fluidOutputMap.keySet()) {
Fluid fluid = ForgeRegistries.FLUIDS.getValue(fluidName);
Fluid fluid = Balm.getRegistries().getFluid(fluidName);
if (fluid == null) {
continue;
}
Expand Down Expand Up @@ -128,7 +128,7 @@ private void loadGeneratedHeavySieveRecipe(boolean waterlogged, GeneratedHeavySi
BlockState waterLoggedState = ModBlocks.heavySieves[0].defaultBlockState().setValue(HeavySieveBlock.WATERLOGGED, waterlogged);
for (SieveMeshRegistryEntry mesh : SieveMeshRegistry.getEntries().values()) {
int rolls = HeavySieveRegistry.getGeneratedRollCount(generatedRecipe);
ItemLike source = ForgeRegistries.ITEMS.getValue(generatedRecipe.getSource());
ItemLike source = Balm.getRegistries().getItem(generatedRecipe.getSource());
LootTable lootTable = ExNihilo.getInstance().generateHeavySieveLootTable(waterLoggedState, source, rolls, mesh);
if (!LootTableUtils.isLootTableEmpty(lootTable)) {
HeavySieveRecipe recipe = new HeavySieveRecipe(generatedRecipe.getId(), generatedRecipe.getInput(), new LootTableProvider(lootTable), waterlogged, null, Sets.newHashSet(mesh.getMeshType()));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.blay09.mods.excompressum.compat.jei;
package net.blay09.mods.excompressum.forge.compat.jei;

import net.blay09.mods.excompressum.loot.LootTableEntry;
import net.blay09.mods.excompressum.loot.LootTableUtils;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.blay09.mods.excompressum.compat.jei;
package net.blay09.mods.excompressum.forge.compat.jei;

import net.blay09.mods.excompressum.loot.LootTableEntry;
import net.blay09.mods.excompressum.loot.LootTableUtils;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.blay09.mods.excompressum.compat.jei;
package net.blay09.mods.excompressum.forge.compat.jei;

import net.blay09.mods.excompressum.api.IHammerRecipe;
import net.blay09.mods.excompressum.loot.LootTableEntry;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.blay09.mods.excompressum.compat.jei;
package net.blay09.mods.excompressum.forge.compat.jei;

import net.blay09.mods.excompressum.api.sievemesh.CommonMeshType;
import net.blay09.mods.excompressum.api.sievemesh.SieveMeshRegistryEntry;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.blay09.mods.excompressum.compat.jei;
package net.blay09.mods.excompressum.forge.compat.jei;

import net.blay09.mods.excompressum.loot.LootTableEntry;
import net.blay09.mods.excompressum.loot.LootTableUtils;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.blay09.mods.excompressum.compat.jei;
package net.blay09.mods.excompressum.forge.compat.jei;

import com.mojang.datafixers.util.Pair;
import net.blay09.mods.excompressum.registry.woodencrucible.WoodenCrucibleRecipe;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.blay09.mods.excompressum.compat.jei;
package net.blay09.mods.excompressum.forge.compat.jei;

import mezz.jei.api.constants.VanillaTypes;
import mezz.jei.api.gui.builder.IRecipeLayoutBuilder;
Expand Down
Loading

0 comments on commit 80e480c

Please sign in to comment.