Reorganized Imports/Packages

This commit is contained in:
Frank 2022-05-18 23:56:18 +02:00
parent a8beba9196
commit 770a5b4046
854 changed files with 42775 additions and 41811 deletions

View file

@ -0,0 +1,56 @@
package org.betterx.betterend.integration;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.fabricmc.loader.api.FabricLoader;
import org.betterx.bclib.api.ModIntegrationAPI;
import org.betterx.bclib.integration.ModIntegration;
import org.betterx.bclib.recipes.GridRecipe;
import org.betterx.betterend.BetterEnd;
import org.betterx.betterend.config.Configs;
import org.betterx.betterend.events.PlayerAdvancementsCallback;
import org.betterx.betterend.integration.byg.BYGIntegration;
import org.betterx.betterend.item.GuideBookItem;
import org.betterx.betterend.registry.EndItems;
public class Integrations {
public static final ModIntegration BYG = ModIntegrationAPI.register(new BYGIntegration());
public static final ModIntegration NOURISH = ModIntegrationAPI.register(new NourishIntegration());
public static final ModIntegration FLAMBOYANT_REFABRICATED = ModIntegrationAPI.register(new FlamboyantRefabricatedIntegration());
public static final ModIntegration ENDERSCAPE = ModIntegrationAPI.register(new EnderscapeIntegration());
private static boolean hasHydrogen;
public static void init() {
if (hasGuideBook()) {
GuideBookItem.register();
PlayerAdvancementsCallback.PLAYER_ADVANCEMENT_COMPLETE.register((player, advancement, criterionName) -> {
ResourceLocation advId = new ResourceLocation("minecraft:end/enter_end_gateway");
if (advId.equals(advancement.getId())) {
player.addItem(new ItemStack(GuideBookItem.GUIDE_BOOK));
}
});
GridRecipe.make(BetterEnd.MOD_ID, "guide_book", GuideBookItem.GUIDE_BOOK)
.checkConfig(Configs.RECIPE_CONFIG)
.setShape("D", "B", "C")
.addMaterial('D', EndItems.ENDER_DUST)
.addMaterial('B', Items.BOOK)
.addMaterial('C', EndItems.CRYSTAL_SHARDS)
.build();
}
hasHydrogen = FabricLoader.getInstance().isModLoaded("hydrogen");
}
public static boolean hasGuideBook() {
return FabricLoader.getInstance().isModLoaded("patchouli");
}
public static boolean hasHydrogen() {
return hasHydrogen;
}
}