New ores recipes & smelter light fix
This commit is contained in:
parent
2591cb1555
commit
43e127bf75
7 changed files with 33 additions and 17 deletions
|
@ -20,6 +20,7 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
import net.minecraft.world.level.material.Material;
|
||||
import net.minecraft.world.level.storage.loot.LootContext;
|
||||
import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
|
||||
import ru.bclib.api.TagAPI;
|
||||
import ru.bclib.client.render.BCLRenderLayer;
|
||||
import ru.bclib.interfaces.IColorProvider;
|
||||
import ru.bclib.interfaces.IRenderTyped;
|
||||
|
@ -36,7 +37,7 @@ public class AuroraCrystalBlock extends AbstractGlassBlock implements IRenderTyp
|
|||
public AuroraCrystalBlock() {
|
||||
super(FabricBlockSettings.of(Material.GLASS)
|
||||
.breakByTool(FabricToolTags.PICKAXES)
|
||||
.breakByTool(EndTags.HAMMERS)
|
||||
.breakByTool(TagAPI.HAMMERS)
|
||||
.hardness(1F)
|
||||
.resistance(1F)
|
||||
.luminance(15)
|
||||
|
|
|
@ -45,13 +45,12 @@ public class EndStoneSmelter extends BaseBlockWithEntity {
|
|||
|
||||
public EndStoneSmelter() {
|
||||
super(FabricBlockSettings.of(Material.STONE, MaterialColor.COLOR_GRAY)
|
||||
.luminance(state -> state.getValue(LIT) ? 15 : 0)
|
||||
.hardness(4F)
|
||||
.resistance(100F)
|
||||
.requiresCorrectToolForDrops()
|
||||
.sound(SoundType.STONE));
|
||||
registerDefaultState(this.stateDefinition.any()
|
||||
.setValue(FACING, Direction.NORTH)
|
||||
.setValue(LIT, false));
|
||||
registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(LIT, false));
|
||||
}
|
||||
|
||||
public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) {
|
||||
|
|
|
@ -14,6 +14,7 @@ import net.minecraft.world.level.block.Blocks;
|
|||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraft.world.level.material.MaterialColor;
|
||||
import ru.bclib.api.TagAPI;
|
||||
import ru.bclib.blocks.BaseBlock;
|
||||
import ru.bclib.blocks.BaseChainBlock;
|
||||
import ru.bclib.blocks.BaseDoorBlock;
|
||||
|
@ -213,6 +214,6 @@ public class MetalMaterial {
|
|||
TagHelper.addTag(BlockTags.ANVIL, anvilBlock);
|
||||
TagHelper.addTag(BlockTags.BEACON_BASE_BLOCKS, block);
|
||||
TagHelper.addTag(ItemTags.BEACON_PAYMENT_ITEMS, ingot);
|
||||
TagHelper.addTag(EndTags.DRAGON_IMMUNE, ore, bars);
|
||||
TagHelper.addTag(TagAPI.DRAGON_IMMUNE, ore, bars);
|
||||
}
|
||||
}
|
|
@ -31,6 +31,7 @@ import net.minecraft.world.level.Level;
|
|||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
import ru.bclib.api.TagAPI;
|
||||
import ru.bclib.client.models.ItemModelProvider;
|
||||
import ru.bclib.client.models.ModelsHelper;
|
||||
import ru.betterend.registry.EndTags;
|
||||
|
@ -96,7 +97,7 @@ public class EndHammerItem extends DiggerItem implements DynamicAttributeTool, I
|
|||
|
||||
@Override
|
||||
public float getMiningSpeedMultiplier(Tag<Item> tag, BlockState state, ItemStack stack, LivingEntity user) {
|
||||
if (tag.equals(EndTags.HAMMERS)) {
|
||||
if (tag.equals(TagAPI.HAMMERS)) {
|
||||
return this.getDestroySpeed(stack, state);
|
||||
}
|
||||
return 1.0F;
|
||||
|
@ -104,7 +105,7 @@ public class EndHammerItem extends DiggerItem implements DynamicAttributeTool, I
|
|||
|
||||
@Override
|
||||
public int getMiningLevel(Tag<Item> tag, BlockState state, ItemStack stack, LivingEntity user) {
|
||||
if (tag.equals(EndTags.HAMMERS)) {
|
||||
if (tag.equals(TagAPI.HAMMERS)) {
|
||||
return this.getTier().getLevel();
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -1,23 +1,31 @@
|
|||
package ru.betterend.recipe;
|
||||
|
||||
import net.minecraft.tags.ItemTags;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.level.ItemLike;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import ru.betterend.recipe.builders.AlloyingRecipe;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndItems;
|
||||
import ru.betterend.registry.EndTags;
|
||||
|
||||
public class AlloyingRecipes {
|
||||
public static void register() {
|
||||
AlloyingRecipe.Builder.create("additional_iron")
|
||||
.setInput(Blocks.IRON_ORE, Blocks.IRON_ORE)
|
||||
.setInput(EndTags.ALLOYING_IRON, EndTags.ALLOYING_IRON)
|
||||
.setOutput(Items.IRON_INGOT, 3)
|
||||
.setExpiriense(2.1F)
|
||||
.build();
|
||||
AlloyingRecipe.Builder.create("additional_gold")
|
||||
.setInput(Blocks.GOLD_ORE, Blocks.GOLD_ORE)
|
||||
.setInput(EndTags.ALLOYING_GOLD, EndTags.ALLOYING_GOLD)
|
||||
.setOutput(Items.GOLD_INGOT, 3)
|
||||
.setExpiriense(3F)
|
||||
.build();
|
||||
AlloyingRecipe.Builder.create("additional_gold")
|
||||
.setInput(EndTags.ALLOYING_COPPER, EndTags.ALLOYING_COPPER)
|
||||
.setOutput(Items.COPPER_INGOT, 3)
|
||||
.setExpiriense(3F)
|
||||
.build();
|
||||
AlloyingRecipe.Builder.create("additional_netherite")
|
||||
.setInput(Blocks.ANCIENT_DEBRIS, Blocks.ANCIENT_DEBRIS)
|
||||
.setOutput(Items.NETHERITE_SCRAP, 3)
|
||||
|
|
|
@ -26,6 +26,7 @@ import net.minecraft.world.item.crafting.RecipeSerializer;
|
|||
import net.minecraft.world.item.crafting.RecipeType;
|
||||
import net.minecraft.world.level.ItemLike;
|
||||
import net.minecraft.world.level.Level;
|
||||
import ru.bclib.api.TagAPI;
|
||||
import ru.bclib.recipes.BCLRecipeManager;
|
||||
import ru.betterend.BetterEnd;
|
||||
import ru.betterend.config.Configs;
|
||||
|
@ -98,7 +99,7 @@ public class AnvilRecipe implements Recipe<Container>, BetterEndRecipe {
|
|||
|
||||
public boolean matches(Container craftingInventory) {
|
||||
ItemStack hammer = craftingInventory.getItem(1);
|
||||
if (hammer.isEmpty() || !EndTags.HAMMERS.contains(hammer.getItem())) {
|
||||
if (hammer.isEmpty() || !TagAPI.HAMMERS.contains(hammer.getItem())) {
|
||||
return false;
|
||||
}
|
||||
ItemStack material = craftingInventory.getItem(0);
|
||||
|
@ -124,7 +125,7 @@ public class AnvilRecipe implements Recipe<Container>, BetterEndRecipe {
|
|||
@Override
|
||||
public NonNullList<Ingredient> getIngredients() {
|
||||
NonNullList<Ingredient> defaultedList = NonNullList.create();
|
||||
defaultedList.add(Ingredient.of(EndTags.HAMMERS.getValues().stream().filter(hammer ->
|
||||
defaultedList.add(Ingredient.of(TagAPI.HAMMERS.getValues().stream().filter(hammer ->
|
||||
((TieredItem) hammer).getTier().getLevel() >= toolLevel).map(ItemStack::new)));
|
||||
defaultedList.add(input);
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ import net.minecraft.tags.ItemTags;
|
|||
import net.minecraft.tags.Tag;
|
||||
import net.minecraft.world.food.FoodProperties;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
import net.minecraft.world.level.biome.Biome.BiomeCategory;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
|
@ -35,10 +36,10 @@ public class EndTags {
|
|||
// Block Tags
|
||||
public static final Tag.Named<Block> PEDESTALS = TagAPI.makeBlockTag(BetterEnd.MOD_ID, "pedestal");
|
||||
public static final Tag.Named<Block> END_STONES = TagAPI.makeCommonBlockTag("end_stones");
|
||||
public static final Tag.Named<Block> DRAGON_IMMUNE = TagAPI.getMCBlockTag("dragon_immune");
|
||||
|
||||
// Item Tags
|
||||
public final static Tag.Named<Item> HAMMERS = TagAPI.makeItemTag("fabric", "hammers");
|
||||
public static final Tag.Named<Item> ALLOYING_IRON = TagAPI.makeItemTag(BetterEnd.MOD_ID, "alloying_iron");
|
||||
public static final Tag.Named<Item> ALLOYING_GOLD = TagAPI.makeItemTag(BetterEnd.MOD_ID, "alloying_gold");
|
||||
public static final Tag.Named<Item> ALLOYING_COPPER = TagAPI.makeItemTag(BetterEnd.MOD_ID, "alloying_copper");
|
||||
|
||||
public static void register() {
|
||||
TagAPI.addEndGround(EndBlocks.THALLASIUM.ore);
|
||||
|
@ -84,7 +85,7 @@ public class EndTags {
|
|||
hammers.add(item);
|
||||
}
|
||||
});
|
||||
ToolManagerImpl.tag(HAMMERS).register(new ModdedToolsVanillaBlocksToolHandler(hammers));
|
||||
ToolManagerImpl.tag(TagAPI.HAMMERS).register(new ModdedToolsVanillaBlocksToolHandler(hammers));
|
||||
|
||||
TagHelper.addTag(
|
||||
TagAPI.GEN_TERRAIN,
|
||||
|
@ -101,13 +102,17 @@ public class EndTags {
|
|||
TagHelper.addTag(BlockTags.ANVIL, EndBlocks.AETERNIUM_ANVIL);
|
||||
TagHelper.addTag(BlockTags.BEACON_BASE_BLOCKS, EndBlocks.AETERNIUM_BLOCK);
|
||||
TagHelper.addTag(ItemTags.BEACON_PAYMENT_ITEMS, EndItems.AETERNIUM_INGOT);
|
||||
TagHelper.addTag(EndTags.DRAGON_IMMUNE,
|
||||
TagHelper.addTag(TagAPI.DRAGON_IMMUNE,
|
||||
EndBlocks.ENDER_ORE,
|
||||
EndBlocks.ETERNAL_PEDESTAL,
|
||||
EndBlocks.FLAVOLITE_RUNED_ETERNAL,
|
||||
EndBlocks.FLAVOLITE_RUNED
|
||||
);
|
||||
TagHelper.addTag(TagAPI.IRON_INGOTS, EndBlocks.THALLASIUM.ingot);
|
||||
|
||||
TagHelper.addTag(ALLOYING_IRON, Items.IRON_ORE, Items.DEEPSLATE_IRON_ORE, Items.RAW_IRON);
|
||||
TagHelper.addTag(ALLOYING_GOLD, Items.GOLD_ORE, Items.DEEPSLATE_GOLD_ORE, Items.RAW_GOLD);
|
||||
TagHelper.addTag(ALLOYING_COPPER, Items.COPPER_ORE, Items.DEEPSLATE_COPPER_ORE, Items.RAW_COPPER);
|
||||
}
|
||||
|
||||
public static void addTerrainTags(Registry<Biome> biomeRegistry) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue