add new ore, some documents and fix loot_tables error. ore gen test pass

This commit is contained in:
yyc12345 2021-04-22 22:40:05 +08:00
parent e9bda0415b
commit f958749ed6
21 changed files with 428 additions and 102 deletions

75
helps/ResourcesMapping.md Normal file
View File

@ -0,0 +1,75 @@
|**材料**|可种植|用原版代替|和村民交易|可由加工得来|野外采集|矿物|未映射|
|:---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
|嘟嘟莲|||||√|||
|石珀||||||√||
|蒲公英籽|||||√|||
|绝云椒椒|||||√|||
|小灯草|||||√|||
|琉璃袋|||||√|||
|蘑菇||棕色蘑菇||||||
|禽肉||生鸡肉||||||
|鸟蛋||鸡蛋||||||
|兽肉||猪肉||||||
|白萝卜|√|||||||
|薄荷|||||√|||
|鱼肉||原版可食用鱼肉||||||
|胡椒|||√|||||
|番茄|√|||||||
|面粉||||√||||
|甜甜花|||||√|||
|洋葱|√|||||||
|熏禽肉|||||||√|
|卷心菜|√|||||||
|树莓|||||√|||
|土豆||√||||||
|牛奶||√||||||
|糖||√||||||
|杏仁|||√|||||
|金鱼草|||||√|||
|豆腐|||√|||||
|莲蓬||荷叶||||||
|松茸|||||√|||
|稻米|√|||||||
|虾仁|||√|||||
|胡萝卜||√||||||
|奶油||||√||||
|螃蟹|||||√|||
|奶酪||||√||||
|松果|||||√|||
|果酱||||√||||
|盐|||√|||||
|黄油||||√||||
|火腿|||√|||||
|培根|||√|||||
|香肠|||√|||||
|青蛙|||||√|||
|电气水晶||||||√||
|蜥蜴尾巴|||||||√|
|冰雾花花朵|||||||√|
|烈焰花花蕊|||||||√|
|蝴蝶翅膀|||||||√|
|晶核|||||||√|
|铁块||||||√||
|白铁块||||||√||
|水晶块||||||√||
|蟹黄||||√||||
|小麦||√||||||
|魔晶块||||||√||
|鳅鳅宝玉|||||√|||
|竹笋|||||||√|
|发光髓|||||||√|
|「冷鲜肉」|||||||√|
|星银矿石||||||√||
|奇异的「牙齿」|||||||√|
|汲取了生命力的龙牙|||||||√|
|马尾|||||√|||
|嬗变之尘|||||||√|
|北陆单手剑原胚|||||||√|
|北陆双手剑原胚|||||||√|
|北陆长柄武器原胚|||||||√|
|北陆弓原胚|||||||√|
|北陆法器原胚|||||||√|
|苹果||√||||||
|日落果|||||√|||
所有可种植物品,加入农民一级收购列表,尝试将这些作物设为农民可接受的作物,就像原版作物一样,如果不行就将作物种子设定为流浪商人贩卖

View File

@ -7,4 +7,5 @@
岩 geo
雷 electro
风 anemo
冰 cryo
冰 cryo

View File

@ -6,6 +6,8 @@ import net.minecraft.util.registry.Registry;
import net.minecraft.util.registry.RegistryKey;
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricMaterialBuilder;
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
import net.fabricmc.fabric.api.biome.v1.BiomeModifications;
import net.fabricmc.fabric.api.biome.v1.BiomeSelectors;
import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder;
@ -17,6 +19,8 @@ import net.minecraft.block.Blocks;
import net.minecraft.util.Rarity;
import net.minecraft.block.Block;
import net.minecraft.block.Material;
import net.minecraft.block.MaterialColor;
import net.minecraft.block.OreBlock;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraft.world.gen.GenerationStep;
@ -78,15 +82,17 @@ public class RegisterManager {
);
// ==================== ore
public static final Block MAGICAL_CRYSTAL_CHUNK_ORE = new Block(FabricBlockSettings.of(Material.METAL).hardness(4.0f));
public static final Block CRYSTAL_CHUNK_ORE = new Block(FabricBlockSettings.of(Material.METAL).hardness(4.0f));
public static final Block WHITE_IRON_CHUNK_ORE = new Block(FabricBlockSettings.of(Material.METAL).hardness(4.0f));
public static final Block IRON_CHUNK_ORE = new Block(FabricBlockSettings.of(Material.STONE).hardness(4.0f));
public static final Block MAGICAL_CRYSTAL_CHUNK_ORE = new OreBlock(FabricBlockSettings.of(new FabricMaterialBuilder(MaterialColor.STONE).build()).breakByTool(FabricToolTags.PICKAXES, 4).requiresTool().strength(4.0F, 4.0F));
public static final Block CRYSTAL_CHUNK_ORE = new OreBlock(FabricBlockSettings.of(new FabricMaterialBuilder(MaterialColor.STONE).build()).breakByTool(FabricToolTags.PICKAXES, 3).requiresTool().strength(4.0F, 4.0F));
public static final Block WHITE_IRON_CHUNK_ORE = new OreBlock(FabricBlockSettings.of(new FabricMaterialBuilder(MaterialColor.STONE).build()).breakByTool(FabricToolTags.PICKAXES, 2).requiresTool().strength(3.0F, 3.0F));
public static final Block IRON_CHUNK_ORE = new OreBlock(FabricBlockSettings.of(new FabricMaterialBuilder(MaterialColor.STONE).build()).breakByTool(FabricToolTags.PICKAXES, 1).requiresTool().strength(3.0F, 3.0F));
public static final Block STARSILVER_ORE = new OreBlock(FabricBlockSettings.of(new FabricMaterialBuilder(MaterialColor.STONE).build()).breakByTool(FabricToolTags.PICKAXES, 1).requiresTool().strength(2.0F, 2.0F));
public static final Item MAGICAL_CRYSTAL_CHUNK = new Item(new FabricItemSettings().group(ITEM_GROUP));
public static final Item CRYSTAL_CHUNK = new Item(new FabricItemSettings().group(ITEM_GROUP));
public static final Item WHITE_IRON_CHUNK = new Item(new FabricItemSettings().group(ITEM_GROUP));
public static final Item IRON_CHUNK = new Item(new FabricItemSettings().group(ITEM_GROUP));
public static final Item STARSILVER = new Item(new FabricItemSettings().group(ITEM_GROUP));
public static final Item MYSTIC_ENHANCEMENT_ORE = new Item(new FabricItemSettings().group(ITEM_GROUP));
public static final Item FINE_ENHANCEMENT_ORE = new Item(new FabricItemSettings().group(ITEM_GROUP));
@ -100,7 +106,7 @@ public class RegisterManager {
1)) // vein size
.decorate(Decorator.RANGE.configure(new RangeDecoratorConfig(0, 0, 12)))
.spreadHorizontally()
.repeat(1); // number of veins per chunk
.repeat(5); // number of veins per chunk
private static ConfiguredFeature<?, ?> OREGEN_CRYSTAL_CHUNK_ORE = Feature.ORE
.configure(new OreFeatureConfig(
@ -129,6 +135,15 @@ public class RegisterManager {
.spreadHorizontally()
.repeat(24);
private static ConfiguredFeature<?, ?> OREGEN_STARSILVER_ORE = Feature.ORE
.configure(new OreFeatureConfig(
OreFeatureConfig.Rules.BASE_STONE_OVERWORLD,
IRON_CHUNK_ORE.getDefaultState(),
4))
.decorate(Decorator.RANGE.configure(new RangeDecoratorConfig(0, 0, 64)))
.spreadHorizontally()
.repeat(24);
private static void RegisterOreGeneration(String mIdentifier, ConfiguredFeature<?, ?> genStasticas) {
RegistryKey<ConfiguredFeature<?, ?>> regKey = RegistryKey.of(Registry.CONFIGURED_FEATURE_WORLDGEN,
new Identifier("teyvatcraft", mIdentifier));
@ -149,6 +164,7 @@ public class RegisterManager {
Registry.register(Registry.ITEM, new Identifier("teyvatcraft", "crystal_chunk"), CRYSTAL_CHUNK);
Registry.register(Registry.ITEM, new Identifier("teyvatcraft", "white_iron_chunk"), WHITE_IRON_CHUNK);
Registry.register(Registry.ITEM, new Identifier("teyvatcraft", "iron_chunk"), IRON_CHUNK);
Registry.register(Registry.ITEM, new Identifier("teyvatcraft", "starsilver"), STARSILVER);
Registry.register(Registry.ITEM, new Identifier("teyvatcraft", "mystic_enhancement_ore"), MYSTIC_ENHANCEMENT_ORE);
Registry.register(Registry.ITEM, new Identifier("teyvatcraft", "fine_enhancement_ore"), FINE_ENHANCEMENT_ORE);
@ -158,6 +174,7 @@ public class RegisterManager {
Registry.register(Registry.BLOCK, new Identifier("teyvatcraft", "crystal_chunk_ore"), CRYSTAL_CHUNK_ORE);
Registry.register(Registry.BLOCK, new Identifier("teyvatcraft", "white_iron_chunk_ore"), WHITE_IRON_CHUNK_ORE);
Registry.register(Registry.BLOCK, new Identifier("teyvatcraft", "iron_chunk_ore"), IRON_CHUNK_ORE);
Registry.register(Registry.BLOCK, new Identifier("teyvatcraft", "starsilver_ore"), STARSILVER_ORE);
Registry.register(Registry.ITEM, new Identifier("teyvatcraft", "magical_crystal_chunk_ore"),
new BlockItem(MAGICAL_CRYSTAL_CHUNK_ORE, new Item.Settings().group(ITEM_GROUP)));
Registry.register(Registry.ITEM, new Identifier("teyvatcraft", "crystal_chunk_ore"),
@ -166,11 +183,14 @@ public class RegisterManager {
new BlockItem(WHITE_IRON_CHUNK_ORE, new Item.Settings().group(ITEM_GROUP)));
Registry.register(Registry.ITEM, new Identifier("teyvatcraft", "iron_chunk_ore"),
new BlockItem(IRON_CHUNK_ORE, new Item.Settings().group(ITEM_GROUP)));
Registry.register(Registry.ITEM, new Identifier("teyvatcraft", "starsilver_ore"),
new BlockItem(STARSILVER_ORE, new Item.Settings().group(ITEM_GROUP)));
RegisterOreGeneration("oregen_magical_crystal_ore", OREGEN_MAGICAL_CRYSTAL_CHUNK_ORE);
RegisterOreGeneration("oregen_crystal_ore", OREGEN_CRYSTAL_CHUNK_ORE);
RegisterOreGeneration("oregen_white_iron_ore", OREGEN_WHITE_IRON_CHUNK_ORE);
RegisterOreGeneration("oregen_iron_ore", OREGEN_IRON_CHUNK_ORE);
RegisterOreGeneration("oregen_starsilver_ore", OREGEN_STARSILVER_ORE);
}
}

View File

@ -1,15 +0,0 @@
package net.yyc12345.teyvatcraft.world;
import net.minecraft.block.Blocks;
import net.minecraft.world.gen.decorator.Decorator;
import net.minecraft.world.gen.decorator.RangeDecoratorConfig;
import net.minecraft.world.gen.feature.ConfiguredFeature;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.OreFeatureConfig;
public class OreGenerate {
public void RegisterAll() {
}
}

View File

@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "teyvatcraft:block/starsilver_ore"
}
}
}

View File

@ -13,6 +13,7 @@
"item.teyvatcraft.crystal_chunk": "Crystal Chunk",
"item.teyvatcraft.white_iron_chunk": "White Iron Chunk",
"item.teyvatcraft.iron_chunk": "Iron Chunk",
"item.teyvatcraft.starsilver": "Starsilver",
"item.teyvatcraft.mystic_enhancement_ore": "Mystic Enhancement Ore",
"item.teyvatcraft.fine_enhancement_ore": "Fine Enhancement Ore",
@ -21,5 +22,6 @@
"block.teyvatcraft.magical_crystal_chunk_ore": "Magical Crystal Chunk Ore",
"block.teyvatcraft.crystal_chunk_ore": "Crystal Chunk Ore",
"block.teyvatcraft.white_iron_chunk_ore": "White Iron Chunk Ore",
"block.teyvatcraft.iron_chunk_ore": "Iron Chunk Ore"
"block.teyvatcraft.iron_chunk_ore": "Iron Chunk Ore",
"block.teyvatcraft.starsilver_ore": "Starsilver Ore"
}

View File

@ -13,13 +13,15 @@
"item.teyvatcraft.crystal_chunk": "水晶块",
"item.teyvatcraft.white_iron_chunk": "白铁块",
"item.teyvatcraft.iron_chunk": "铁块",
"item.teyvatcraft.starsilver": "星银矿石",
"item.teyvatcraft.mystic_enhancement_ore": "精锻用魔矿",
"item.teyvatcraft.fine_enhancement_ore": "精锻用良矿",
"item.teyvatcraft.enhancement_ore": "精锻用杂矿",
"block.teyvatcraft.magical_crystal_chunk_ore": "魔晶块矿石",
"block.teyvatcraft.crystal_chunk_ore": "水晶块矿石",
"block.teyvatcraft.white_iron_chunk_ore": "白铁块矿石",
"block.teyvatcraft.iron_chunk_ore": "铁块矿石"
"block.teyvatcraft.magical_crystal_chunk_ore": "魔晶块原矿",
"block.teyvatcraft.crystal_chunk_ore": "水晶块原矿",
"block.teyvatcraft.white_iron_chunk_ore": "白铁块原矿",
"block.teyvatcraft.iron_chunk_ore": "铁块原矿",
"block.teyvatcraft.starsilver_ore": "星银矿石原矿"
}

View File

@ -1,19 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "teyvatcraft:crystal_chunk"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,19 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "teyvatcraft:iron_chunk"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,19 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "teyvatcraft:magical_crystal_chunk"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,19 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "teyvatcraft:white_iron_chunk"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "teyvatcraft:block/starsilver_ore"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "teyvatcraft:item/starsilver"
}
}

View File

@ -0,0 +1,3 @@
{
"parent": "teyvatcraft:block/starsilver_ore"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 605 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -0,0 +1,59 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:alternatives",
"children": [
{
"type": "minecraft:item",
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
],
"name": "teyvatcraft:crystal_chunk_ore"
},
{
"type": "minecraft:item",
"functions": [
{
"function": "minecraft:set_count",
"count": {
"min": 2.0,
"max": 3.0,
"type": "minecraft:uniform"
}
},
{
"function": "minecraft:apply_bonus",
"enchantment": "minecraft:fortune",
"formula": "minecraft:uniform_bonus_count",
"parameters": {
"bonusMultiplier": 1
}
},
{
"function": "minecraft:explosion_decay"
}
],
"name": "teyvatcraft:crystal_chunk"
}
]
}
]
}
]
}

View File

@ -0,0 +1,59 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:alternatives",
"children": [
{
"type": "minecraft:item",
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
],
"name": "teyvatcraft:iron_chunk_ore"
},
{
"type": "minecraft:item",
"functions": [
{
"function": "minecraft:set_count",
"count": {
"min": 4.0,
"max": 5.0,
"type": "minecraft:uniform"
}
},
{
"function": "minecraft:apply_bonus",
"enchantment": "minecraft:fortune",
"formula": "minecraft:uniform_bonus_count",
"parameters": {
"bonusMultiplier": 1
}
},
{
"function": "minecraft:explosion_decay"
}
],
"name": "teyvatcraft:iron_chunk"
}
]
}
]
}
]
}

View File

@ -0,0 +1,59 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:alternatives",
"children": [
{
"type": "minecraft:item",
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
],
"name": "teyvatcraft:magical_crystal_chunk_ore"
},
{
"type": "minecraft:item",
"functions": [
{
"function": "minecraft:set_count",
"count": {
"min": 1.0,
"max": 2.0,
"type": "minecraft:uniform"
}
},
{
"function": "minecraft:apply_bonus",
"enchantment": "minecraft:fortune",
"formula": "minecraft:uniform_bonus_count",
"parameters": {
"bonusMultiplier": 1
}
},
{
"function": "minecraft:explosion_decay"
}
],
"name": "teyvatcraft:magical_crystal_chunk"
}
]
}
]
}
]
}

View File

@ -0,0 +1,59 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:alternatives",
"children": [
{
"type": "minecraft:item",
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
],
"name": "teyvatcraft:starsilver_ore"
},
{
"type": "minecraft:item",
"functions": [
{
"function": "minecraft:set_count",
"count": {
"min": 4.0,
"max": 5.0,
"type": "minecraft:uniform"
}
},
{
"function": "minecraft:apply_bonus",
"enchantment": "minecraft:fortune",
"formula": "minecraft:uniform_bonus_count",
"parameters": {
"bonusMultiplier": 1
}
},
{
"function": "minecraft:explosion_decay"
}
],
"name": "teyvatcraft:starsilver"
}
]
}
]
}
]
}

View File

@ -0,0 +1,59 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:alternatives",
"children": [
{
"type": "minecraft:item",
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
],
"name": "teyvatcraft:white_iron_chunk_ore"
},
{
"type": "minecraft:item",
"functions": [
{
"function": "minecraft:set_count",
"count": {
"min": 3.0,
"max": 4.0,
"type": "minecraft:uniform"
}
},
{
"function": "minecraft:apply_bonus",
"enchantment": "minecraft:fortune",
"formula": "minecraft:uniform_bonus_count",
"parameters": {
"bonusMultiplier": 1
}
},
{
"function": "minecraft:explosion_decay"
}
],
"name": "teyvatcraft:white_iron_chunk"
}
]
}
]
}
]
}