added turquoise ore
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
package de.jottyfan.minecraft;
|
||||
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import de.jottyfan.minecraft.block.QuicklyBlocks;
|
||||
import de.jottyfan.minecraft.feature.QuicklyFeatures;
|
||||
import de.jottyfan.minecraft.item.QuicklyItems;
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
@@ -18,5 +21,9 @@ public class Quickly implements ModInitializer {
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
LOGGER.info("loading {}", MOD_ID);
|
||||
|
||||
QuicklyItems.registerModItems();
|
||||
QuicklyBlocks.registerModBlocks();
|
||||
QuicklyFeatures.registerFeatures();
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,5 @@ public class QuicklyClient implements ClientModInitializer {
|
||||
|
||||
@Override
|
||||
public void onInitializeClient() {
|
||||
QuicklyItems.registerModItems();
|
||||
QuicklyBlocks.registerModBlocks();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package de.jottyfan.minecraft.block;
|
||||
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import de.jottyfan.minecraft.item.QuicklyItems;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.storage.loot.LootParams.Builder;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class BlockOreDeepslateTurquoise extends BlockOreTurquoise {
|
||||
|
||||
public BlockOreDeepslateTurquoise(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<ItemStack> getDrops(BlockState state, Builder builder) {
|
||||
return Arrays.asList(new ItemStack[] { new ItemStack(QuicklyItems.RAWTURQUOISE, 2) });
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package de.jottyfan.minecraft.block;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import de.jottyfan.minecraft.item.QuicklyItems;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.block.AmethystBlock;
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.storage.loot.LootParams.Builder;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class BlockOreTurquoise extends AmethystBlock {
|
||||
|
||||
public BlockOreTurquoise(Properties properties) {
|
||||
super(properties.strength(3.0f).sound(SoundType.AMETHYST).requiresCorrectToolForDrops());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<ItemStack> getDrops(BlockState state, Builder builder) {
|
||||
return Arrays.asList(new ItemStack[] { new ItemStack(QuicklyItems.RAWTURQUOISE) });
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,19 @@ import net.minecraft.world.level.block.state.BlockBehaviour.Properties;
|
||||
*/
|
||||
public class QuicklyBlocks {
|
||||
public static final Block KELPBUNDLE = registerBlock("kelpbundle",
|
||||
Properties.of().instabreak().sound(SoundType.WET_GRASS).strength(0.1f).friction(0.95f), p -> new Block(p));
|
||||
Properties.of().instabreak().sound(SoundType.WET_GRASS).strength(0.1f).friction(0.95f));
|
||||
public static final Block TURQUOISEBLOCK = registerBlock("blockturquoise", Properties.of().strength(1.5f));
|
||||
public static final Block ORETURQUOISE = registerBlock("oreturquoise", p -> new BlockOreTurquoise(p));
|
||||
public static final Block OREDEEPSLATETURQUOISE = registerBlock("oredeepslateturquoise",
|
||||
p -> new BlockOreDeepslateTurquoise(p));
|
||||
|
||||
private static final Block registerBlock(String name, Properties properties) {
|
||||
return QuicklyBlocks.registerBlock(name, properties, p -> new Block(p));
|
||||
}
|
||||
|
||||
private static final Block registerBlock(String name, Function<Properties, Block> function) {
|
||||
return QuicklyBlocks.registerBlock(name, Properties.of(), function);
|
||||
}
|
||||
|
||||
private static final Block registerBlock(String name, Properties properties, Function<Properties, Block> function) {
|
||||
Identifier identifier = Identifier.fromNamespaceAndPath(Quickly.MOD_ID, name);
|
||||
@@ -38,6 +50,9 @@ public class QuicklyBlocks {
|
||||
public static void registerModBlocks() {
|
||||
ItemGroupEvents.modifyEntriesEvent(CreativeModeTabs.BUILDING_BLOCKS).register(block -> {
|
||||
block.accept(KELPBUNDLE);
|
||||
block.accept(TURQUOISEBLOCK);
|
||||
block.accept(ORETURQUOISE);
|
||||
block.accept(OREDEEPSLATETURQUOISE);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package de.jottyfan.minecraft.feature;
|
||||
|
||||
import de.jottyfan.minecraft.Quickly;
|
||||
import net.fabricmc.fabric.api.biome.v1.BiomeModifications;
|
||||
import net.fabricmc.fabric.api.biome.v1.BiomeSelectors;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.resources.Identifier;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.world.level.levelgen.GenerationStep;
|
||||
import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
|
||||
import net.minecraft.world.level.levelgen.placement.PlacedFeature;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class QuicklyFeatures {
|
||||
public static final ResourceKey<ConfiguredFeature<?, ?>> CF_ORETURQUOISE = genCf("oreturquoise");
|
||||
public static final ResourceKey<PlacedFeature> PF_ORETURQUOISE = genPf("oreturquoise");
|
||||
|
||||
private static final ResourceKey<ConfiguredFeature<?, ?>> genCf(String name) {
|
||||
return ResourceKey.create(Registries.CONFIGURED_FEATURE, Identifier.fromNamespaceAndPath(Quickly.MOD_ID, name));
|
||||
}
|
||||
|
||||
private static final ResourceKey<PlacedFeature> genPf(String name) {
|
||||
return ResourceKey.create(Registries.PLACED_FEATURE, Identifier.fromNamespaceAndPath(Quickly.MOD_ID, name));
|
||||
}
|
||||
|
||||
public static final void registerFeatures() {
|
||||
BiomeModifications.addFeature(BiomeSelectors.foundInOverworld(), GenerationStep.Decoration.UNDERGROUND_ORES, PF_ORETURQUOISE);
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,21 @@ import net.minecraft.world.item.Item.Properties;
|
||||
*
|
||||
*/
|
||||
public class QuicklyItems {
|
||||
public static final Item STUB = registerItem("stub", new Item.Properties(), p -> new Stub(p));
|
||||
public static final Item STUB = registerItem("stub", properties -> new Stub(properties));
|
||||
public static final Item RAWTURQUOISE = registerItem("rawturquoise");
|
||||
public static final Item TURQUOISEINGOT = registerItem("turquoiseingot");
|
||||
|
||||
private static final Item registerItem(String name) {
|
||||
return QuicklyItems.registerItem(name, new Item.Properties());
|
||||
}
|
||||
|
||||
private static final Item registerItem(String name, Item.Properties properties) {
|
||||
return QuicklyItems.registerItem(name, properties, p -> new Item(p));
|
||||
}
|
||||
|
||||
private static final Item registerItem(String name, Function<Properties, Item> function) {
|
||||
return QuicklyItems.registerItem(name, new Item.Properties(), function);
|
||||
}
|
||||
|
||||
private static final Item registerItem(String name, Item.Properties properties, Function<Properties, Item> function) {
|
||||
Identifier identifier = Identifier.fromNamespaceAndPath(Quickly.MOD_ID, name);
|
||||
@@ -31,6 +45,8 @@ public class QuicklyItems {
|
||||
public static void registerModItems() {
|
||||
ItemGroupEvents.modifyEntriesEvent(CreativeModeTabs.TOOLS_AND_UTILITIES).register(item -> {
|
||||
item.accept(STUB);
|
||||
item.accept(RAWTURQUOISE);
|
||||
item.accept(TURQUOISEINGOT);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "quickly:block/blockturquoise"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "quickly:block/oredeepslateturquoise"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "quickly:block/oreturquoise"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickly:block/blockturquoise"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickly:block/oredeepslateturquoise"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickly:block/oreturquoise"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickly:item/rawturquoise"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickly:item/turquoiseingot"
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,9 @@
|
||||
{
|
||||
"item.quickly.blockturquoise": "Türkisblock",
|
||||
"item.quickly.kelpbundle": "Seegrassbündel",
|
||||
"item.quickly.stub": "Stummel"
|
||||
"item.quickly.oredeepslateturquoise": "Türkistiefenerz",
|
||||
"item.quickly.oreturquoise": "Türkiserz",
|
||||
"item.quickly.rawturquoise": "rohes Türkis",
|
||||
"item.quickly.stub": "Stummel",
|
||||
"item.quickly.turquoiseingot": "Türkisbarren"
|
||||
}
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{
|
||||
"item.quickly.blockturquoise": "block of turquoise",
|
||||
"item.quickly.kelpbundle": "kelp bundle",
|
||||
"item.quickly.stub": "stub"
|
||||
"item.quickly.oredeepslateturquoise": "turquoise deepslate ore",
|
||||
"item.quickly.oreturquoise": "turquoise ore",
|
||||
"item.quickly.rawturquoise": "raw turquoise",
|
||||
"item.quickly.stub": "stub",
|
||||
"item.quickly.turquoiseingot": "turquoise ingot"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "quickly:block/blockturquoise"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "quickly:block/oredeepslateturquoise"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "quickly:block/oreturquoise"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/coal",
|
||||
"textures": {
|
||||
"layer0": "quickly:item/rawturquoise"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/coal",
|
||||
"textures": {
|
||||
"layer0": "quickly:item/turquoiseingot"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 621 B |
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
BIN
src/main/resources/assets/quickly/textures/item/rawturquoise.png
Normal file
BIN
src/main/resources/assets/quickly/textures/item/rawturquoise.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"quickly:oreturquoise",
|
||||
"quickly:oredeepslateturquoise"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"type": "minecraft:blasting",
|
||||
"ingredient": "quickly:rawturquoise",
|
||||
"result": {"id":"quickly:turquoiseingot"},
|
||||
"experience": 0.0,
|
||||
"cookingtime": 200
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"ttt",
|
||||
"ttt",
|
||||
"ttt"
|
||||
],
|
||||
"key": {
|
||||
"t": "quickly:turquoiseingot"
|
||||
},
|
||||
"result": {
|
||||
"id": "quickly:blockturquoise",
|
||||
"count": 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shapeless",
|
||||
"ingredients": [
|
||||
"quickly:blockturquoise"
|
||||
],
|
||||
"result": {
|
||||
"id": "quickly:turquoiseingot",
|
||||
"count": 9
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"quickly:oreturquoise"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"quickly:oreturquoise",
|
||||
"quickly:oredeepslateturquoise"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"type": "minecraft:ore",
|
||||
"config": {
|
||||
"discard_chance_on_air_exposure": 0.0,
|
||||
"size": 10,
|
||||
"targets": [
|
||||
{
|
||||
"state": {
|
||||
"Name": "quickly:oreturquoise"
|
||||
},
|
||||
"target": {
|
||||
"predicate_type": "minecraft:tag_match",
|
||||
"tag": "minecraft:stone_ore_replaceables"
|
||||
}
|
||||
},
|
||||
{
|
||||
"state": {
|
||||
"Name": "quickly:oredeepslateturquoise"
|
||||
},
|
||||
"target": {
|
||||
"predicate_type": "minecraft:tag_match",
|
||||
"tag": "minecraft:deepslate_ore_replaceables"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"feature": "quickly:oreturquoise",
|
||||
"placement": [
|
||||
{
|
||||
"type": "minecraft:count",
|
||||
"count": 8
|
||||
},
|
||||
{
|
||||
"type": "minecraft:in_square"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:height_range",
|
||||
"height": {
|
||||
"type": "minecraft:trapezoid",
|
||||
"max_inclusive": {
|
||||
"absolute": 128
|
||||
},
|
||||
"min_inclusive": {
|
||||
"absolute": -120
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "minecraft:biome"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user