-
-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
767 additions
and
767 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
252 changes: 126 additions & 126 deletions
252
src/main/java/com/aetherteam/aether/integration/rei/AetherREIClientPlugin.java
Large diffs are not rendered by default.
Oops, something went wrong.
90 changes: 45 additions & 45 deletions
90
src/main/java/com/aetherteam/aether/integration/rei/AetherREIServerPlugin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,47 @@ | ||
package com.aetherteam.aether.integration.rei; | ||
|
||
import com.aetherteam.aether.Aether; | ||
import com.aetherteam.aether.integration.rei.categories.ban.PlacementBanRecipeDisplay; | ||
import com.aetherteam.aether.integration.rei.categories.item.AetherCookingRecipeDisplay; | ||
import com.aetherteam.aether.recipe.recipes.ban.BlockBanRecipe; | ||
import com.aetherteam.aether.recipe.recipes.ban.ItemBanRecipe; | ||
import com.aetherteam.aether.recipe.recipes.block.*; | ||
import com.aetherteam.aether.recipe.recipes.item.AltarRepairRecipe; | ||
import com.aetherteam.aether.recipe.recipes.item.EnchantingRecipe; | ||
import com.aetherteam.aether.recipe.recipes.item.FreezingRecipe; | ||
import com.aetherteam.aether.recipe.recipes.item.IncubationRecipe; | ||
import com.aetherteam.nitrogen.integration.rei.displays.BlockStateRecipeDisplay; | ||
import com.aetherteam.nitrogen.integration.rei.displays.FuelDisplay; | ||
import me.shedaniel.rei.api.common.category.CategoryIdentifier; | ||
import me.shedaniel.rei.api.common.display.DisplaySerializerRegistry; | ||
import me.shedaniel.rei.api.common.plugins.REIServerPlugin; | ||
import me.shedaniel.rei.forge.REIPluginCommon; | ||
import net.minecraft.resources.ResourceLocation; | ||
|
||
@REIPluginCommon | ||
public class AetherREIServerPlugin implements REIServerPlugin { | ||
public static final CategoryIdentifier<PlacementBanRecipeDisplay<BlockBanRecipe>> BLOCK_PLACEMENT_BAN = CategoryIdentifier.of(new ResourceLocation(Aether.MODID, "block_placement_ban")); | ||
public static final CategoryIdentifier<PlacementBanRecipeDisplay<ItemBanRecipe>> ITEM_PLACEMENT_BAN = CategoryIdentifier.of(new ResourceLocation(Aether.MODID, "item_placement_ban")); | ||
|
||
public static final CategoryIdentifier<BlockStateRecipeDisplay<AccessoryFreezableRecipe>> ACCESSORY_FREEZABLE = CategoryIdentifier.of(new ResourceLocation(Aether.MODID, "accessory_freezable")); | ||
public static final CategoryIdentifier<BlockStateRecipeDisplay<AmbrosiumRecipe>> AMBROSIUM_ENCHANTING = CategoryIdentifier.of(new ResourceLocation(Aether.MODID, "ambrosium_enchanting")); | ||
public static final CategoryIdentifier<BlockStateRecipeDisplay<IcestoneFreezableRecipe>> ICESTONE_FREEZABLE = CategoryIdentifier.of(new ResourceLocation(Aether.MODID, "icestone_freezable")); | ||
|
||
public static final CategoryIdentifier<BlockStateRecipeDisplay<PlacementConversionRecipe>> PLACEMENT_CONVERSION = CategoryIdentifier.of(new ResourceLocation(Aether.MODID, "placement_conversion")); | ||
public static final CategoryIdentifier<BlockStateRecipeDisplay<SwetBallRecipe>> SWET_BALL_CONVERSION = CategoryIdentifier.of(new ResourceLocation(Aether.MODID, "swet_ball_conversion")); | ||
|
||
public static final CategoryIdentifier<FuelDisplay> AETHER_FUEL = CategoryIdentifier.of(new ResourceLocation(Aether.MODID, "fuel")); | ||
|
||
public static final CategoryIdentifier<AetherCookingRecipeDisplay<AltarRepairRecipe>> ALTAR_REPAIR = CategoryIdentifier.of(new ResourceLocation(Aether.MODID, "repairing")); | ||
public static final CategoryIdentifier<AetherCookingRecipeDisplay<EnchantingRecipe>> ALTAR_ENCHANTING = CategoryIdentifier.of(new ResourceLocation(Aether.MODID, "enchanting")); | ||
public static final CategoryIdentifier<AetherCookingRecipeDisplay<FreezingRecipe>> FREEZING = CategoryIdentifier.of(new ResourceLocation(Aether.MODID, "freezing")); | ||
public static final CategoryIdentifier<AetherCookingRecipeDisplay<IncubationRecipe>> INCUBATING = CategoryIdentifier.of(new ResourceLocation(Aether.MODID, "incubating")); | ||
|
||
@Override | ||
public void registerDisplaySerializer(DisplaySerializerRegistry registry) { | ||
registry.register(ALTAR_REPAIR, AetherCookingRecipeDisplay.serializer(ALTAR_REPAIR)); | ||
registry.register(ALTAR_ENCHANTING, AetherCookingRecipeDisplay.serializer(ALTAR_ENCHANTING)); | ||
registry.register(FREEZING, AetherCookingRecipeDisplay.serializer(FREEZING)); | ||
registry.register(INCUBATING, AetherCookingRecipeDisplay.serializer(INCUBATING)); | ||
} | ||
} | ||
//import com.aetherteam.aether.Aether; | ||
//import com.aetherteam.aether.integration.rei.categories.ban.PlacementBanRecipeDisplay; | ||
//import com.aetherteam.aether.integration.rei.categories.item.AetherCookingRecipeDisplay; | ||
//import com.aetherteam.aether.recipe.recipes.ban.BlockBanRecipe; | ||
//import com.aetherteam.aether.recipe.recipes.ban.ItemBanRecipe; | ||
//import com.aetherteam.aether.recipe.recipes.block.*; | ||
//import com.aetherteam.aether.recipe.recipes.item.AltarRepairRecipe; | ||
//import com.aetherteam.aether.recipe.recipes.item.EnchantingRecipe; | ||
//import com.aetherteam.aether.recipe.recipes.item.FreezingRecipe; | ||
//import com.aetherteam.aether.recipe.recipes.item.IncubationRecipe; | ||
//import com.aetherteam.nitrogen.integration.rei.displays.BlockStateRecipeDisplay; | ||
//import com.aetherteam.nitrogen.integration.rei.displays.FuelDisplay; | ||
//import me.shedaniel.rei.api.common.category.CategoryIdentifier; | ||
//import me.shedaniel.rei.api.common.display.DisplaySerializerRegistry; | ||
//import me.shedaniel.rei.api.common.plugins.REIServerPlugin; | ||
//import me.shedaniel.rei.forge.REIPluginCommon; | ||
//import net.minecraft.resources.ResourceLocation; | ||
// | ||
//@REIPluginCommon | ||
//public class AetherREIServerPlugin implements REIServerPlugin { | ||
// public static final CategoryIdentifier<PlacementBanRecipeDisplay<BlockBanRecipe>> BLOCK_PLACEMENT_BAN = CategoryIdentifier.of(new ResourceLocation(Aether.MODID, "block_placement_ban")); | ||
// public static final CategoryIdentifier<PlacementBanRecipeDisplay<ItemBanRecipe>> ITEM_PLACEMENT_BAN = CategoryIdentifier.of(new ResourceLocation(Aether.MODID, "item_placement_ban")); | ||
// | ||
// public static final CategoryIdentifier<BlockStateRecipeDisplay<AccessoryFreezableRecipe>> ACCESSORY_FREEZABLE = CategoryIdentifier.of(new ResourceLocation(Aether.MODID, "accessory_freezable")); | ||
// public static final CategoryIdentifier<BlockStateRecipeDisplay<AmbrosiumRecipe>> AMBROSIUM_ENCHANTING = CategoryIdentifier.of(new ResourceLocation(Aether.MODID, "ambrosium_enchanting")); | ||
// public static final CategoryIdentifier<BlockStateRecipeDisplay<IcestoneFreezableRecipe>> ICESTONE_FREEZABLE = CategoryIdentifier.of(new ResourceLocation(Aether.MODID, "icestone_freezable")); | ||
// | ||
// public static final CategoryIdentifier<BlockStateRecipeDisplay<PlacementConversionRecipe>> PLACEMENT_CONVERSION = CategoryIdentifier.of(new ResourceLocation(Aether.MODID, "placement_conversion")); | ||
// public static final CategoryIdentifier<BlockStateRecipeDisplay<SwetBallRecipe>> SWET_BALL_CONVERSION = CategoryIdentifier.of(new ResourceLocation(Aether.MODID, "swet_ball_conversion")); | ||
// | ||
// public static final CategoryIdentifier<FuelDisplay> AETHER_FUEL = CategoryIdentifier.of(new ResourceLocation(Aether.MODID, "fuel")); | ||
// | ||
// public static final CategoryIdentifier<AetherCookingRecipeDisplay<AltarRepairRecipe>> ALTAR_REPAIR = CategoryIdentifier.of(new ResourceLocation(Aether.MODID, "repairing")); | ||
// public static final CategoryIdentifier<AetherCookingRecipeDisplay<EnchantingRecipe>> ALTAR_ENCHANTING = CategoryIdentifier.of(new ResourceLocation(Aether.MODID, "enchanting")); | ||
// public static final CategoryIdentifier<AetherCookingRecipeDisplay<FreezingRecipe>> FREEZING = CategoryIdentifier.of(new ResourceLocation(Aether.MODID, "freezing")); | ||
// public static final CategoryIdentifier<AetherCookingRecipeDisplay<IncubationRecipe>> INCUBATING = CategoryIdentifier.of(new ResourceLocation(Aether.MODID, "incubating")); | ||
// | ||
// @Override | ||
// public void registerDisplaySerializer(DisplaySerializerRegistry registry) { | ||
// registry.register(ALTAR_REPAIR, AetherCookingRecipeDisplay.serializer(ALTAR_REPAIR)); | ||
// registry.register(ALTAR_ENCHANTING, AetherCookingRecipeDisplay.serializer(ALTAR_ENCHANTING)); | ||
// registry.register(FREEZING, AetherCookingRecipeDisplay.serializer(FREEZING)); | ||
// registry.register(INCUBATING, AetherCookingRecipeDisplay.serializer(INCUBATING)); | ||
// } | ||
//} |
12 changes: 6 additions & 6 deletions
12
src/main/java/com/aetherteam/aether/integration/rei/FuelRecipe.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
package com.aetherteam.aether.integration.rei; | ||
|
||
import net.minecraft.world.item.ItemStack; | ||
import net.minecraft.world.level.block.Block; | ||
|
||
import java.util.List; | ||
|
||
public record FuelRecipe(List<ItemStack> inputItems, int burnTime, Block usageBlock) { } | ||
//import net.minecraft.world.item.ItemStack; | ||
//import net.minecraft.world.level.block.Block; | ||
// | ||
//import java.util.List; | ||
// | ||
//public record FuelRecipe(List<ItemStack> inputItems, int burnTime, Block usageBlock) { } |
56 changes: 28 additions & 28 deletions
56
src/main/java/com/aetherteam/aether/integration/rei/categories/BiomeTooltip.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
package com.aetherteam.aether.integration.rei.categories; | ||
|
||
import me.shedaniel.rei.api.client.gui.widgets.Tooltip; | ||
import net.minecraft.ChatFormatting; | ||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.core.registries.Registries; | ||
import net.minecraft.network.chat.Component; | ||
import net.minecraft.resources.ResourceKey; | ||
import net.minecraft.tags.TagKey; | ||
import net.minecraft.world.level.biome.Biome; | ||
|
||
import java.util.Optional; | ||
|
||
public interface BiomeTooltip { | ||
default void populateBiomeInformation(Optional<ResourceKey<Biome>> biomeKey, Optional<TagKey<Biome>> biomeTag, Tooltip tooltip) { | ||
if (Minecraft.getInstance().level != null && (biomeKey.isPresent() || biomeTag.isPresent())) { | ||
tooltip.add(Component.translatable("gui.aether.jei.biome.tooltip").withStyle(ChatFormatting.GRAY)); | ||
if (biomeKey.isPresent()) { | ||
tooltip.add(Component.translatable("gui.aether.jei.biome.tooltip.biome").withStyle(ChatFormatting.DARK_GRAY)); | ||
tooltip.add(Component.literal(biomeKey.get().location().toString()).withStyle(ChatFormatting.DARK_GRAY)); | ||
} else { | ||
tooltip.add(Component.translatable("gui.aether.jei.biome.tooltip.tag").withStyle(ChatFormatting.DARK_GRAY)); | ||
tooltip.add(Component.literal("#" + biomeTag.get().location()).withStyle(ChatFormatting.DARK_GRAY)); | ||
|
||
tooltip.add(Component.translatable("gui.aether.jei.biome.tooltip.biomes").withStyle(ChatFormatting.DARK_GRAY)); | ||
Minecraft.getInstance().level.registryAccess().registryOrThrow(Registries.BIOME).getTagOrEmpty(biomeTag.get()).forEach((biomeHolder) -> biomeHolder.unwrapKey().ifPresent((key) -> tooltip.add(Component.literal(key.location().toString()).withStyle(ChatFormatting.DARK_GRAY)))); | ||
} | ||
} | ||
} | ||
} | ||
//import me.shedaniel.rei.api.client.gui.widgets.Tooltip; | ||
//import net.minecraft.ChatFormatting; | ||
//import net.minecraft.client.Minecraft; | ||
//import net.minecraft.core.registries.Registries; | ||
//import net.minecraft.network.chat.Component; | ||
//import net.minecraft.resources.ResourceKey; | ||
//import net.minecraft.tags.TagKey; | ||
//import net.minecraft.world.level.biome.Biome; | ||
// | ||
//import java.util.Optional; | ||
// | ||
//public interface BiomeTooltip { | ||
// default void populateBiomeInformation(Optional<ResourceKey<Biome>> biomeKey, Optional<TagKey<Biome>> biomeTag, Tooltip tooltip) { | ||
// if (Minecraft.getInstance().level != null && (biomeKey.isPresent() || biomeTag.isPresent())) { | ||
// tooltip.add(Component.translatable("gui.aether.jei.biome.tooltip").withStyle(ChatFormatting.GRAY)); | ||
// if (biomeKey.isPresent()) { | ||
// tooltip.add(Component.translatable("gui.aether.jei.biome.tooltip.biome").withStyle(ChatFormatting.DARK_GRAY)); | ||
// tooltip.add(Component.literal(biomeKey.get().location().toString()).withStyle(ChatFormatting.DARK_GRAY)); | ||
// } else { | ||
// tooltip.add(Component.translatable("gui.aether.jei.biome.tooltip.tag").withStyle(ChatFormatting.DARK_GRAY)); | ||
// tooltip.add(Component.literal("#" + biomeTag.get().location()).withStyle(ChatFormatting.DARK_GRAY)); | ||
// | ||
// tooltip.add(Component.translatable("gui.aether.jei.biome.tooltip.biomes").withStyle(ChatFormatting.DARK_GRAY)); | ||
// Minecraft.getInstance().level.registryAccess().registryOrThrow(Registries.BIOME).getTagOrEmpty(biomeTag.get()).forEach((biomeHolder) -> biomeHolder.unwrapKey().ifPresent((key) -> tooltip.add(Component.literal(key.location().toString()).withStyle(ChatFormatting.DARK_GRAY)))); | ||
// } | ||
// } | ||
// } | ||
//} |
Oops, something went wrong.