Reformated
This commit is contained in:
parent
fc1da134e7
commit
60e8008cb7
416 changed files with 5772 additions and 4573 deletions
|
@ -1,17 +1,17 @@
|
|||
package org.betterx.betterend.integration;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BiomeAPI;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.BCLFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.api.v2.tag.TagAPI;
|
||||
import org.betterx.bclib.integration.ModIntegration;
|
||||
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.MappedRegistry;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
import net.minecraft.world.level.levelgen.GenerationStep.Decoration;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.BCLFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.api.v2.tag.TagAPI;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BiomeAPI;
|
||||
import org.betterx.bclib.integration.ModIntegration;
|
||||
|
||||
public class EnderscapeIntegration extends ModIntegration {
|
||||
public EnderscapeIntegration() {
|
||||
super("enderscape");
|
||||
|
@ -32,8 +32,10 @@ public class EnderscapeIntegration extends ModIntegration {
|
|||
}
|
||||
});
|
||||
|
||||
BCLFeature scatteredShadowQuartzOre = getFeature("scattered_shadow_quartz_ore",
|
||||
Decoration.UNDERGROUND_DECORATION);
|
||||
BCLFeature scatteredShadowQuartzOre = getFeature(
|
||||
"scattered_shadow_quartz_ore",
|
||||
Decoration.UNDERGROUND_DECORATION
|
||||
);
|
||||
BCLFeature voidNebuliteOre = getFeature("void_nebulite_ore", Decoration.UNDERGROUND_DECORATION);
|
||||
BCLFeature nebuliteOre = getFeature("nebulite_ore", Decoration.UNDERGROUND_DECORATION);
|
||||
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
package org.betterx.betterend.integration;
|
||||
|
||||
import net.minecraft.world.level.ItemLike;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import org.betterx.bclib.integration.ModIntegration;
|
||||
import org.betterx.bclib.util.ColorUtil;
|
||||
import org.betterx.betterend.blocks.HydraluxPetalColoredBlock;
|
||||
import org.betterx.betterend.complexmaterials.ColoredMaterial;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.world.level.ItemLike;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.Map;
|
||||
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
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.v2.ModIntegrationAPI;
|
||||
import org.betterx.bclib.integration.ModIntegration;
|
||||
import org.betterx.bclib.recipes.GridRecipe;
|
||||
|
@ -16,6 +10,12 @@ import org.betterx.betterend.integration.byg.BYGIntegration;
|
|||
import org.betterx.betterend.item.GuideBookItem;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.Items;
|
||||
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
|
||||
public class Integrations {
|
||||
public static final ModIntegration BYG = ModIntegrationAPI.register(new BYGIntegration());
|
||||
public static final ModIntegration NOURISH = ModIntegrationAPI.register(new NourishIntegration());
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package org.betterx.betterend.integration;
|
||||
|
||||
import net.minecraft.tags.TagKey;
|
||||
import net.minecraft.world.item.Item;
|
||||
|
||||
import org.betterx.bclib.api.v2.tag.TagAPI;
|
||||
import org.betterx.bclib.integration.ModIntegration;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.tags.TagKey;
|
||||
import net.minecraft.world.item.Item;
|
||||
|
||||
public class NourishIntegration extends ModIntegration {
|
||||
public NourishIntegration() {
|
||||
super("nourish");
|
||||
|
@ -32,7 +32,7 @@ public class NourishIntegration extends ModIntegration {
|
|||
EndItems.CHORUS_MUSHROOM_RAW,
|
||||
EndItems.CHORUS_MUSHROOM_COOKED,
|
||||
EndItems.BOLUX_MUSHROOM_COOKED
|
||||
);
|
||||
);
|
||||
TagAPI.addItemTag(
|
||||
protein,
|
||||
EndItems.END_FISH_RAW,
|
||||
|
@ -40,13 +40,13 @@ public class NourishIntegration extends ModIntegration {
|
|||
EndItems.CHORUS_MUSHROOM_COOKED,
|
||||
EndItems.BOLUX_MUSHROOM_COOKED,
|
||||
EndItems.CAVE_PUMPKIN_PIE
|
||||
);
|
||||
);
|
||||
TagAPI.addItemTag(
|
||||
sweets,
|
||||
EndItems.SHADOW_BERRY_JELLY,
|
||||
EndItems.SWEET_BERRY_JELLY,
|
||||
EndItems.BLOSSOM_BERRY_JELLY,
|
||||
EndItems.CAVE_PUMPKIN_PIE
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package org.betterx.betterend.integration.byg;
|
||||
|
||||
import net.minecraft.world.level.block.Block;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseVineBlock;
|
||||
import org.betterx.betterend.blocks.basis.EndWallPlantBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.world.level.block.Block;
|
||||
|
||||
public class BYGBlocks {
|
||||
public static final Block IVIS_MOSS = EndBlocks.registerBlock("ivis_moss", new EndWallPlantBlock());
|
||||
public static final Block NIGHTSHADE_MOSS = EndBlocks.registerBlock("nightshade_moss", new EndWallPlantBlock());
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
package org.betterx.betterend.integration.byg.biomes;
|
||||
|
||||
import org.betterx.bclib.BCLib;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.betterend.integration.Integrations;
|
||||
import org.betterx.betterend.integration.byg.features.BYGFeatures;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
import net.minecraft.sounds.SoundEvent;
|
||||
|
@ -11,13 +18,6 @@ import net.minecraft.world.level.biome.BiomeSpecialEffects;
|
|||
import net.minecraft.world.level.biome.MobSpawnSettings.SpawnerData;
|
||||
import net.minecraft.world.level.levelgen.GenerationStep.Decoration;
|
||||
|
||||
import org.betterx.bclib.BCLib;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.betterend.integration.Integrations;
|
||||
import org.betterx.betterend.integration.byg.features.BYGFeatures;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class NightshadeRedwoods extends EndBiome.Config {
|
||||
|
@ -37,7 +37,7 @@ public class NightshadeRedwoods extends EndBiome.Config {
|
|||
.particles(
|
||||
ParticleTypes.REVERSE_PORTAL,
|
||||
0.002F
|
||||
)
|
||||
)
|
||||
//TODO: 1.18 surface rules
|
||||
// .setSurface(biome.getGenerationSettings()
|
||||
// .getSurfaceBuilder()
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
package org.betterx.betterend.integration.byg.biomes;
|
||||
|
||||
import org.betterx.bclib.BCLib;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.betterend.integration.Integrations;
|
||||
import org.betterx.betterend.integration.byg.features.BYGFeatures;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.HolderSet;
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
|
@ -14,13 +21,6 @@ import net.minecraft.world.level.block.Block;
|
|||
import net.minecraft.world.level.levelgen.GenerationStep.Decoration;
|
||||
import net.minecraft.world.level.levelgen.placement.PlacedFeature;
|
||||
|
||||
import org.betterx.bclib.BCLib;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.betterend.integration.Integrations;
|
||||
import org.betterx.betterend.integration.byg.features.BYGFeatures;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
|
@ -47,7 +47,7 @@ public class OldBulbisGardens extends EndBiome.Config {
|
|||
.particles(
|
||||
ParticleTypes.REVERSE_PORTAL,
|
||||
0.002F
|
||||
)
|
||||
)
|
||||
//TODO: 1.18 surface rules
|
||||
//.surface(ivis, origin)
|
||||
.feature(EndFeatures.END_LAKE_RARE)
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package org.betterx.betterend.integration.byg.features;
|
||||
|
||||
import net.minecraft.world.level.levelgen.feature.Feature;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.BCLCommonFeatures;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.BCLFeature;
|
||||
import org.betterx.betterend.BetterEnd;
|
||||
|
@ -13,6 +10,9 @@ import org.betterx.betterend.world.features.VineFeature;
|
|||
import org.betterx.betterend.world.features.WallPlantFeature;
|
||||
import org.betterx.betterend.world.features.WallPlantOnLogFeature;
|
||||
|
||||
import net.minecraft.world.level.levelgen.feature.Feature;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
|
||||
public class BYGFeatures {
|
||||
public static final BCLFeature OLD_BULBIS_TREE = redisterVegetation(
|
||||
"old_bulbis_tree",
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
package org.betterx.betterend.integration.byg.features;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.bclib.util.SplineHelper;
|
||||
import org.betterx.betterend.integration.Integrations;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
|
@ -9,13 +17,6 @@ import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConf
|
|||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.mojang.math.Vector3f;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.bclib.util.SplineHelper;
|
||||
import org.betterx.betterend.integration.Integrations;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -1,5 +1,20 @@
|
|||
package org.betterx.betterend.integration.byg.features;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.sdf.PosInfo;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
import org.betterx.bclib.sdf.operator.SDFDisplacement;
|
||||
import org.betterx.bclib.sdf.operator.SDFFlatWave;
|
||||
import org.betterx.bclib.sdf.operator.SDFSmoothUnion;
|
||||
import org.betterx.bclib.sdf.primitive.SDFCappedCone;
|
||||
import org.betterx.bclib.sdf.primitive.SDFSphere;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.bclib.util.SplineHelper;
|
||||
import org.betterx.betterend.integration.Integrations;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -14,20 +29,6 @@ import net.minecraft.world.level.material.Material;
|
|||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.mojang.math.Vector3f;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.sdf.PosInfo;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
import org.betterx.bclib.sdf.operator.SDFDisplacement;
|
||||
import org.betterx.bclib.sdf.operator.SDFFlatWave;
|
||||
import org.betterx.bclib.sdf.operator.SDFSmoothUnion;
|
||||
import org.betterx.bclib.sdf.primitive.SDFCappedCone;
|
||||
import org.betterx.bclib.sdf.primitive.SDFSphere;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.bclib.util.SplineHelper;
|
||||
import org.betterx.betterend.integration.Integrations;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -1,18 +1,5 @@
|
|||
package org.betterx.betterend.integration.byg.features;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.mojang.math.Vector3f;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
|
@ -26,6 +13,20 @@ import org.betterx.bclib.util.SplineHelper;
|
|||
import org.betterx.betterend.integration.Integrations;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
||||
|
@ -101,14 +102,16 @@ public class OldBulbisTreeFeature extends DefaultFeature {
|
|||
return true;
|
||||
}
|
||||
|
||||
private void bigSphere(WorldGenLevel world,
|
||||
BlockPos pos,
|
||||
float radius,
|
||||
BlockState cap,
|
||||
BlockState glow,
|
||||
BlockState wood,
|
||||
Function<BlockState, Boolean> replacement,
|
||||
RandomSource random) {
|
||||
private void bigSphere(
|
||||
WorldGenLevel world,
|
||||
BlockPos pos,
|
||||
float radius,
|
||||
BlockState cap,
|
||||
BlockState glow,
|
||||
BlockState wood,
|
||||
Function<BlockState, Boolean> replacement,
|
||||
RandomSource random
|
||||
) {
|
||||
OpenSimplexNoise noise = new OpenSimplexNoise(random.nextLong());
|
||||
SDF sphere = new SDFSphere().setRadius(radius).setBlock(cap);
|
||||
|
||||
|
@ -155,12 +158,14 @@ public class OldBulbisTreeFeature extends DefaultFeature {
|
|||
sphere.fillArea(world, pos, new AABB(pos.above((int) offsetY)).inflate(radius * 1.3F));
|
||||
}
|
||||
|
||||
private void makeRoots(WorldGenLevel world,
|
||||
BlockPos pos,
|
||||
float radius,
|
||||
RandomSource random,
|
||||
BlockState wood,
|
||||
Function<BlockState, Boolean> replacement) {
|
||||
private void makeRoots(
|
||||
WorldGenLevel world,
|
||||
BlockPos pos,
|
||||
float radius,
|
||||
RandomSource random,
|
||||
BlockState wood,
|
||||
Function<BlockState, Boolean> replacement
|
||||
) {
|
||||
int count = (int) (radius * 1.5F);
|
||||
for (int i = 0; i < count; i++) {
|
||||
float angle = (float) i / (float) count * MHelper.PI2;
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package org.betterx.betterend.integration.rei;
|
||||
|
||||
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.network.chat.Component;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
@ -12,7 +14,6 @@ import me.shedaniel.rei.api.client.registry.display.DisplayCategory;
|
|||
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
|
||||
import me.shedaniel.rei.api.common.entry.EntryIngredient;
|
||||
import me.shedaniel.rei.api.common.entry.EntryStack;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.List;
|
||||
|
@ -52,11 +53,12 @@ public class REIAlloyingCategory implements DisplayCategory<REIAlloyingDisplay>
|
|||
.animationDurationMS(10000));
|
||||
widgets.add(Widgets.createLabel(
|
||||
new Point(bounds.x + bounds.width - 5, bounds.y + 5),
|
||||
Component.translatable("category.rei.cooking.time&xp",
|
||||
df.format(display.getXp()),
|
||||
df.format(smeltTime / 20D)
|
||||
)
|
||||
).noShadow().rightAligned().color(0xFF404040, 0xFFBBBBBB));
|
||||
Component.translatable(
|
||||
"category.rei.cooking.time&xp",
|
||||
df.format(display.getXp()),
|
||||
df.format(smeltTime / 20D)
|
||||
)
|
||||
).noShadow().rightAligned().color(0xFF404040, 0xFFBBBBBB));
|
||||
widgets.add(Widgets.createArrow(new Point(startPoint.x + 24, startPoint.y + 8))
|
||||
.animationDurationTicks(smeltTime));
|
||||
List<EntryIngredient> inputEntries = display.getInputEntries();
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package org.betterx.betterend.integration.rei;
|
||||
|
||||
import org.betterx.betterend.blocks.entities.EndStoneSmelterBlockEntity;
|
||||
import org.betterx.betterend.recipe.builders.AlloyingRecipe;
|
||||
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
@ -12,8 +15,6 @@ import me.shedaniel.rei.api.common.display.basic.BasicDisplay;
|
|||
import me.shedaniel.rei.api.common.entry.EntryStack;
|
||||
import me.shedaniel.rei.api.common.util.EntryIngredients;
|
||||
import me.shedaniel.rei.api.common.util.EntryStacks;
|
||||
import org.betterx.betterend.blocks.entities.EndStoneSmelterBlockEntity;
|
||||
import org.betterx.betterend.recipe.builders.AlloyingRecipe;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
@ -23,11 +24,11 @@ import org.jetbrains.annotations.NotNull;
|
|||
|
||||
public class REIAlloyingDisplay extends BasicDisplay implements SimpleGridMenuDisplay {
|
||||
|
||||
private static List<EntryStack> fuel;
|
||||
private static final List<EntryStack> fuel;
|
||||
|
||||
private Recipe<?> recipe;
|
||||
private float xp;
|
||||
private double smeltTime;
|
||||
private final Recipe<?> recipe;
|
||||
private final float xp;
|
||||
private final double smeltTime;
|
||||
|
||||
|
||||
public REIAlloyingDisplay(AlloyingRecipe recipe) {
|
||||
|
@ -38,7 +39,7 @@ public class REIAlloyingDisplay extends BasicDisplay implements SimpleGridMenuDi
|
|||
super(
|
||||
EntryIngredients.ofIngredients(recipe.getIngredients()),
|
||||
Collections.singletonList(EntryIngredients.of(recipe.getResultItem()))
|
||||
);
|
||||
);
|
||||
this.recipe = recipe;
|
||||
this.xp = xp;
|
||||
this.smeltTime = smeltTime;
|
||||
|
@ -101,7 +102,7 @@ public class REIAlloyingDisplay extends BasicDisplay implements SimpleGridMenuDi
|
|||
EntryStack.Settings.TOOLTIP_APPEND_EXTRA,
|
||||
stack -> Collections.singletonList(Component.translatable(
|
||||
"category.rei.smelting.fuel").withStyle(ChatFormatting.YELLOW))
|
||||
))
|
||||
))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
|
@ -1,11 +1,11 @@
|
|||
package org.betterx.betterend.integration.rei;
|
||||
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.item.Items;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import me.shedaniel.math.Point;
|
||||
import me.shedaniel.math.Rectangle;
|
||||
import me.shedaniel.rei.api.client.gui.DisplayRenderer;
|
||||
|
@ -52,7 +52,7 @@ public class REIAlloyingFuelCategory implements DisplayCategory<REIAlloyingFuelD
|
|||
widgets.add(Widgets.createLabel(
|
||||
new Point(bounds.x + 26, bounds.getMaxY() - 15),
|
||||
Component.translatable("category.rei.fuel.time", burnTime)
|
||||
).color(0xFF404040, 0xFFBBBBBB).noShadow().leftAligned());
|
||||
).color(0xFF404040, 0xFFBBBBBB).noShadow().leftAligned());
|
||||
widgets.add(Widgets.createBurningFire(new Point(bounds.x + 6, startPoint.y + 1))
|
||||
.animationDurationTicks(recipeDisplay.getFuelTime()));
|
||||
widgets.add(Widgets.createSlot(new Point(bounds.x + 6, startPoint.y + 18))
|
||||
|
@ -69,10 +69,10 @@ public class REIAlloyingFuelCategory implements DisplayCategory<REIAlloyingFuelD
|
|||
.disableHighlight();
|
||||
String burnItems = DECIMAL_FORMAT.format(recipe.getFuelTime() / 200d);
|
||||
return new DisplayRenderer() {
|
||||
private Component text = Component.translatable(
|
||||
private final Component text = Component.translatable(
|
||||
"category.rei.fuel.time_short.items",
|
||||
burnItems
|
||||
);
|
||||
);
|
||||
|
||||
@Override
|
||||
public int getHeight() {
|
||||
|
@ -97,7 +97,7 @@ public class REIAlloyingFuelCategory implements DisplayCategory<REIAlloyingFuelD
|
|||
bounds.x + 25,
|
||||
bounds.y + 8,
|
||||
-1
|
||||
);
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package org.betterx.betterend.integration.rei;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.EndAnvilBlock;
|
||||
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
@ -15,7 +17,6 @@ import me.shedaniel.rei.api.client.registry.display.DisplayCategory;
|
|||
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
|
||||
import me.shedaniel.rei.api.common.entry.EntryIngredient;
|
||||
import me.shedaniel.rei.api.common.entry.EntryStack;
|
||||
import org.betterx.betterend.blocks.basis.EndAnvilBlock;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -71,7 +72,7 @@ public class REIAnvilCategory implements DisplayCategory<REIAnvilDisplay> {
|
|||
widgets.add(Widgets.createLabel(
|
||||
new Point(bounds.x + bounds.width - 7, bounds.y + bounds.height - 15),
|
||||
Component.translatable("category.rei.damage.amount&dmg", display.getDamage())
|
||||
).noShadow().rightAligned().color(0xFF404040, 0xFFBBBBBB));
|
||||
).noShadow().rightAligned().color(0xFF404040, 0xFFBBBBBB));
|
||||
widgets.add(Widgets.createSlot(new Point(x - 20, y + 4)).entries(materials).markInput());
|
||||
widgets.add(Widgets.createSlot(new Point(x + 1, y + 4)).entries(inputEntries.get(0)).markInput());
|
||||
widgets.add(Widgets.createSlot(new Point(x + 61, y + 5))
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package org.betterx.betterend.integration.rei;
|
||||
|
||||
import org.betterx.bclib.recipes.AnvilRecipe;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.crafting.Recipe;
|
||||
|
@ -8,7 +10,6 @@ import me.shedaniel.rei.api.common.category.CategoryIdentifier;
|
|||
import me.shedaniel.rei.api.common.display.SimpleGridMenuDisplay;
|
||||
import me.shedaniel.rei.api.common.display.basic.BasicDisplay;
|
||||
import me.shedaniel.rei.api.common.util.EntryIngredients;
|
||||
import org.betterx.bclib.recipes.AnvilRecipe;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Optional;
|
||||
|
@ -22,7 +23,7 @@ public class REIAnvilDisplay extends BasicDisplay implements SimpleGridMenuDispl
|
|||
super(
|
||||
EntryIngredients.ofIngredients(recipe.getIngredients()),
|
||||
Collections.singletonList(EntryIngredients.of(recipe.getResultItem()))
|
||||
);
|
||||
);
|
||||
this.recipe = recipe;
|
||||
|
||||
inputs.get(1).forEach(entryStack -> {
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package org.betterx.betterend.integration.rei;
|
||||
|
||||
import org.betterx.betterend.BetterEnd;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
||||
|
@ -12,8 +15,6 @@ import me.shedaniel.rei.api.client.registry.display.DisplayCategory;
|
|||
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
|
||||
import me.shedaniel.rei.api.common.entry.EntryIngredient;
|
||||
import me.shedaniel.rei.api.common.entry.EntryStack;
|
||||
import org.betterx.betterend.BetterEnd;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -99,7 +100,7 @@ public class REIInfusionCategory implements DisplayCategory<REIInfusionDisplay>
|
|||
widgets.add(Widgets.createLabel(
|
||||
new Point(bounds.getMaxX() - 5, bounds.y + 6),
|
||||
Component.translatable("category.rei.infusion.time&val", display.getInfusionTime())
|
||||
).noShadow().rightAligned().color(0xFF404040, 0xFFBBBBBB));
|
||||
).noShadow().rightAligned().color(0xFF404040, 0xFFBBBBBB));
|
||||
return widgets;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package org.betterx.betterend.integration.rei;
|
||||
|
||||
import org.betterx.betterend.recipe.builders.InfusionRecipe;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.crafting.Recipe;
|
||||
|
||||
|
@ -7,7 +9,6 @@ import me.shedaniel.rei.api.common.category.CategoryIdentifier;
|
|||
import me.shedaniel.rei.api.common.display.SimpleGridMenuDisplay;
|
||||
import me.shedaniel.rei.api.common.display.basic.BasicDisplay;
|
||||
import me.shedaniel.rei.api.common.util.EntryIngredients;
|
||||
import org.betterx.betterend.recipe.builders.InfusionRecipe;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Optional;
|
||||
|
@ -22,7 +23,7 @@ public class REIInfusionDisplay extends BasicDisplay implements SimpleGridMenuDi
|
|||
super(
|
||||
EntryIngredients.ofIngredients(recipe.getIngredients()),
|
||||
Collections.singletonList(EntryIngredients.of(recipe.getResultItem()))
|
||||
);
|
||||
);
|
||||
this.recipe = recipe;
|
||||
this.time = recipe.getInfusionTime();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
package org.betterx.betterend.integration.rei;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseFurnaceBlock;
|
||||
import org.betterx.bclib.recipes.AnvilRecipe;
|
||||
import org.betterx.betterend.BetterEnd;
|
||||
import org.betterx.betterend.blocks.basis.EndAnvilBlock;
|
||||
import org.betterx.betterend.recipe.builders.AlloyingRecipe;
|
||||
import org.betterx.betterend.recipe.builders.InfusionRecipe;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.crafting.BlastingRecipe;
|
||||
|
@ -19,13 +27,6 @@ import me.shedaniel.rei.api.common.entry.EntryStack;
|
|||
import me.shedaniel.rei.api.common.util.EntryIngredients;
|
||||
import me.shedaniel.rei.api.common.util.EntryStacks;
|
||||
import me.shedaniel.rei.plugin.common.BuiltinPlugin;
|
||||
import org.betterx.bclib.blocks.BaseFurnaceBlock;
|
||||
import org.betterx.bclib.recipes.AnvilRecipe;
|
||||
import org.betterx.betterend.BetterEnd;
|
||||
import org.betterx.betterend.blocks.basis.EndAnvilBlock;
|
||||
import org.betterx.betterend.recipe.builders.AlloyingRecipe;
|
||||
import org.betterx.betterend.recipe.builders.InfusionRecipe;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
@ -38,19 +39,19 @@ public class REIPlugin implements REIClientPlugin {
|
|||
public final static CategoryIdentifier<REIAlloyingFuelDisplay> ALLOYING_FUEL = CategoryIdentifier.of(
|
||||
BetterEnd.MOD_ID,
|
||||
"alloying_fuel"
|
||||
);
|
||||
);
|
||||
public final static CategoryIdentifier<REIAlloyingDisplay> ALLOYING = CategoryIdentifier.of(
|
||||
BetterEnd.MOD_ID,
|
||||
AlloyingRecipe.GROUP
|
||||
);
|
||||
);
|
||||
public final static CategoryIdentifier<REIAnvilDisplay> SMITHING = CategoryIdentifier.of(
|
||||
BetterEnd.MOD_ID,
|
||||
AnvilRecipe.ID.getPath()
|
||||
);
|
||||
);
|
||||
public final static CategoryIdentifier<REIInfusionDisplay> INFUSION = CategoryIdentifier.of(
|
||||
BetterEnd.MOD_ID,
|
||||
InfusionRecipe.GROUP
|
||||
);
|
||||
);
|
||||
|
||||
@Override
|
||||
public void registerDisplays(DisplayRegistry registry) {
|
||||
|
@ -90,7 +91,7 @@ public class REIPlugin implements REIClientPlugin {
|
|||
new REIAlloyingCategory(endStoneSmelter),
|
||||
new REIInfusionCategory(infusionRitual),
|
||||
new REIAnvilCategory(anvilsArray)
|
||||
);
|
||||
);
|
||||
|
||||
registry.addWorkstations(ALLOYING_FUEL, endStoneSmelter);
|
||||
registry.addWorkstations(ALLOYING, endStoneSmelter);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue