Amber ore, raw amber, amber gem, amber block
This commit is contained in:
parent
6b1029a628
commit
4a54b072d7
18 changed files with 69 additions and 19 deletions
12
src/main/java/ru/betterend/blocks/BlockAmber.java
Normal file
12
src/main/java/ru/betterend/blocks/BlockAmber.java
Normal file
|
@ -0,0 +1,12 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.MaterialColor;
|
||||
import ru.betterend.blocks.basis.BlockBase;
|
||||
|
||||
public class BlockAmber extends BlockBase {
|
||||
public BlockAmber() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.DIAMOND_BLOCK).materialColor(MaterialColor.YELLOW));
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
package ru.betterend.blocks.basis;
|
||||
|
||||
import java.io.Reader;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
@ -16,10 +17,14 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.loot.context.LootContext;
|
||||
import net.minecraft.loot.context.LootContextParameters;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import ru.betterend.patterns.BlockPatterned;
|
||||
import ru.betterend.patterns.Patterns;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
public class BlockOre extends OreBlock {
|
||||
public class BlockOre extends OreBlock implements BlockPatterned {
|
||||
private final Item dropItem;
|
||||
private final int minCount;
|
||||
private final int maxCount;
|
||||
|
@ -65,4 +70,21 @@ public class BlockOre extends OreBlock {
|
|||
}
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getStatesPattern(Reader data) {
|
||||
String block = Registry.BLOCK.getId(this).getPath();
|
||||
return Patterns.createJson(data, block, block);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModelPattern(String block) {
|
||||
Identifier blockId = Registry.BLOCK.getId(this);
|
||||
return Patterns.createJson(Patterns.BLOCK_BASE, blockId.getPath(), block);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identifier statePatternId() {
|
||||
return Patterns.STATE_SIMPLE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -110,6 +110,9 @@ public class CraftingRecipes {
|
|||
registerLantern("quartz_lantern", EndBlocks.QUARTZ_LANTERN, Blocks.QUARTZ_SLAB);
|
||||
registerLantern("purpur_lantern", EndBlocks.PURPUR_LANTERN, Blocks.PURPUR_SLAB);
|
||||
registerLantern("blackstone_lantern", EndBlocks.BLACKSTONE_LANTERN, Blocks.BLACKSTONE_SLAB);
|
||||
|
||||
GridRecipe.make("amber_gem", EndItems.AMBER_GEM).setShape("##", "##").addMaterial('#', EndItems.RAW_AMBER).build();
|
||||
GridRecipe.make("amber_block", EndBlocks.AMBER_BLOCK).setShape("###", "###", "###").addMaterial('#', EndItems.AMBER_GEM).build();
|
||||
}
|
||||
|
||||
private static void registerLantern(String name, Block lantern, Block slab) {
|
||||
|
|
|
@ -10,6 +10,7 @@ import net.minecraft.util.registry.Registry;
|
|||
import ru.betterend.BetterEnd;
|
||||
import ru.betterend.blocks.AeterniumBlock;
|
||||
import ru.betterend.blocks.AuroraCrystalBlock;
|
||||
import ru.betterend.blocks.BlockAmber;
|
||||
import ru.betterend.blocks.BlockBlueVine;
|
||||
import ru.betterend.blocks.BlockBlueVineLantern;
|
||||
import ru.betterend.blocks.BlockBlueVineSeed;
|
||||
|
@ -160,12 +161,14 @@ public class EndBlocks {
|
|||
|
||||
// Ores //
|
||||
public static final Block ENDER_ORE = registerBlock("ender_ore", new BlockOre(EndItems.ENDER_DUST, 1, 3, 5));
|
||||
public static final Block AMBER_ORE = registerBlock("amber_ore", new BlockOre(EndItems.RAW_AMBER, 1, 2, 4));
|
||||
|
||||
// Materials //
|
||||
public static final Block TERMINITE_BLOCK = registerBlock("terminite_block", new TerminiteBlock());
|
||||
public static final Block AETERNIUM_BLOCK = registerBlock("aeternium_block", new AeterniumBlock());
|
||||
public static final Block ENDER_BLOCK = registerBlock("ender_block", new EnderBlock());
|
||||
public static final Block AURORA_CRYSTAL = registerBlock("aurora_crystal", new AuroraCrystalBlock());
|
||||
public static final Block AMBER_BLOCK = registerBlock("amber_block", new BlockAmber());
|
||||
|
||||
public static final Block ANDESITE_LANTERN = registerBlock("andesite_lantern", new BlockStoneLantern(Blocks.ANDESITE));
|
||||
public static final Block DIORITE_LANTERN = registerBlock("diorite_lantern", new BlockStoneLantern(Blocks.DIORITE));
|
||||
|
|
|
@ -87,6 +87,7 @@ public class EndFeatures {
|
|||
|
||||
// Ores //
|
||||
public static final EndFeature ENDER_ORE = EndFeature.makeOreFeature("ender_ore", EndBlocks.ENDER_ORE, 6, 3, 0, 4, 96);
|
||||
public static final EndFeature AMBER_ORE = EndFeature.makeOreFeature("amber_ore", EndBlocks.AMBER_ORE, 12, 6, 0, 4, 96);
|
||||
public static final EndFeature VIOLECITE_LAYER = EndFeature.makeLayerFeature("violecite_layer", EndBlocks.VIOLECITE, 15, 4, 96, 8);
|
||||
public static final EndFeature FLAVOLITE_LAYER = EndFeature.makeLayerFeature("flavolite_layer", EndBlocks.FLAVOLITE, 12, 4, 96, 6);
|
||||
|
||||
|
|
|
@ -55,6 +55,8 @@ public class EndItems {
|
|||
public final static Item END_LILY_LEAF = registerItem("end_lily_leaf");
|
||||
public final static Item END_LILY_LEAF_DRIED = registerItem("end_lily_leaf_dried");
|
||||
public final static Item CRYSTAL_SHARDS = registerItem("crystal_shards");
|
||||
public final static Item RAW_AMBER = registerItem("raw_amber");
|
||||
public final static Item AMBER_GEM = registerItem("amber_gem");
|
||||
|
||||
// Armor //
|
||||
public static final Item TERMINITE_HELMET = registerItem("terminite_helmet", new ArmorItem(EndArmorMaterial.TERMINITE, EquipmentSlot.HEAD, makeSettings()));
|
||||
|
|
|
@ -12,6 +12,7 @@ public class BiomeAmberLand extends EndBiome {
|
|||
.setFogDensity(2.0F)
|
||||
.setPlantsColor(122, 45, 122)
|
||||
.setSurface(EndBlocks.AMBER_GRASS)
|
||||
.addFeature(EndFeatures.AMBER_ORE)
|
||||
.addFeature(EndFeatures.END_LAKE_RARE)
|
||||
.addStructureFeature(ConfiguredStructureFeatures.END_CITY)
|
||||
.addMobSpawn(EntityType.ENDERMAN, 50, 1, 4));
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "betterend:block/aeternium_block"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -326,5 +326,10 @@
|
|||
"block.betterend.tenanea_stairs": "Tenanea Stairs",
|
||||
"block.betterend.tenanea_stripped_bark": "Tenanea Stripped Bark",
|
||||
"block.betterend.tenanea_stripped_log": "Tenanea Stripped Log",
|
||||
"block.betterend.tenanea_trapdoor": "Tenanea Trapdoor"
|
||||
"block.betterend.tenanea_trapdoor": "Tenanea Trapdoor",
|
||||
|
||||
"block.betterend.amber_block": "Amber Block",
|
||||
"block.betterend.amber_ore": "Amber Ore",
|
||||
"item.betterend.amber_gem": "Amber Gem",
|
||||
"item.betterend.raw_amber": "Raw Amber"
|
||||
}
|
|
@ -328,5 +328,10 @@
|
|||
"block.betterend.tenanea_stairs": "Ступени из тенанеи",
|
||||
"block.betterend.tenanea_stripped_bark": "Обтёсанная кора тенанеи",
|
||||
"block.betterend.tenanea_stripped_log": "Обтёсанное бревно тенанеи",
|
||||
"block.betterend.tenanea_trapdoor": "Дверь из тенанеи"
|
||||
"block.betterend.tenanea_trapdoor": "Дверь из тенанеи",
|
||||
|
||||
"block.betterend.amber_block": "Блок янтаря",
|
||||
"block.betterend.amber_ore": "Янтарная руда",
|
||||
"item.betterend.amber_gem": "Огранённый янтарь",
|
||||
"item.betterend.raw_amber": "Необработанный янтарь"
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "betterend:block/aeternium_block"
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"parent": "betterend:block/aeternium_block"
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "betterend:item/amber_gem"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "betterend:item/raw_amber"
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
BIN
src/main/resources/assets/betterend/textures/block/amber_ore.png
Normal file
BIN
src/main/resources/assets/betterend/textures/block/amber_ore.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
BIN
src/main/resources/assets/betterend/textures/item/amber_gem.png
Normal file
BIN
src/main/resources/assets/betterend/textures/item/amber_gem.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
BIN
src/main/resources/assets/betterend/textures/item/raw_amber.png
Normal file
BIN
src/main/resources/assets/betterend/textures/item/raw_amber.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
Loading…
Add table
Add a link
Reference in a new issue