Replaced spaces, proper biome getter, imports cleanup
This commit is contained in:
parent
91e7bab993
commit
58310d020c
26 changed files with 979 additions and 981 deletions
|
@ -16,24 +16,24 @@ import java.util.Random;
|
|||
|
||||
public class LumecornSeedBlock extends EndPlantWithAgeBlock {
|
||||
|
||||
@Override
|
||||
public void growAdult(WorldGenLevel world, Random random, BlockPos pos) {
|
||||
((Feature<NoneFeatureConfiguration>) (EndFeatures.LUMECORN.getFeature())).place(new FeaturePlaceContext<>(
|
||||
Optional.empty(),
|
||||
world,
|
||||
null,
|
||||
random,
|
||||
pos,
|
||||
(NoneFeatureConfiguration) null));
|
||||
}
|
||||
@Override
|
||||
public void growAdult(WorldGenLevel world, Random random, BlockPos pos) {
|
||||
((Feature<NoneFeatureConfiguration>) (EndFeatures.LUMECORN.getFeature())).place(new FeaturePlaceContext<>(
|
||||
Optional.empty(),
|
||||
world,
|
||||
null,
|
||||
random,
|
||||
pos,
|
||||
(NoneFeatureConfiguration) null));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isTerrain(BlockState state) {
|
||||
return state.is(EndBlocks.END_MOSS);
|
||||
}
|
||||
@Override
|
||||
protected boolean isTerrain(BlockState state) {
|
||||
return state.is(EndBlocks.END_MOSS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockBehaviour.OffsetType getOffsetType() {
|
||||
return BlockBehaviour.OffsetType.NONE;
|
||||
}
|
||||
@Override
|
||||
public BlockBehaviour.OffsetType getOffsetType() {
|
||||
return BlockBehaviour.OffsetType.NONE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ public class PedestalBlock extends BaseBlockNotFull implements EntityBlock {
|
|||
/**
|
||||
* Register new Pedestal block with specified mod id.
|
||||
*
|
||||
* @param id pedestal id
|
||||
* @param id pedestal id
|
||||
* @param source source block
|
||||
* @return new Pedestal block with specified id.
|
||||
*/
|
||||
|
|
|
@ -48,452 +48,452 @@ import ru.betterend.registry.EndBlocks;
|
|||
import ru.betterend.registry.EndItems;
|
||||
|
||||
public class MetalMaterial {
|
||||
public final Block ore;
|
||||
public final Block block;
|
||||
public final Block tile;
|
||||
public final Block bars;
|
||||
public final Block pressurePlate;
|
||||
public final Block door;
|
||||
public final Block trapdoor;
|
||||
public final Block chain;
|
||||
public final Block stairs;
|
||||
public final Block slab;
|
||||
public final Block ore;
|
||||
public final Block block;
|
||||
public final Block tile;
|
||||
public final Block bars;
|
||||
public final Block pressurePlate;
|
||||
public final Block door;
|
||||
public final Block trapdoor;
|
||||
public final Block chain;
|
||||
public final Block stairs;
|
||||
public final Block slab;
|
||||
|
||||
public final Block chandelier;
|
||||
public final Block bulb_lantern;
|
||||
public final ColoredMaterial bulb_lantern_colored;
|
||||
public final Block chandelier;
|
||||
public final Block bulb_lantern;
|
||||
public final ColoredMaterial bulb_lantern_colored;
|
||||
|
||||
public final Block anvilBlock;
|
||||
public final Block anvilBlock;
|
||||
|
||||
public final Item rawOre;
|
||||
public final Item nugget;
|
||||
public final Item ingot;
|
||||
public final Item rawOre;
|
||||
public final Item nugget;
|
||||
public final Item ingot;
|
||||
|
||||
public final Item shovelHead;
|
||||
public final Item pickaxeHead;
|
||||
public final Item axeHead;
|
||||
public final Item hoeHead;
|
||||
public final Item swordBlade;
|
||||
public final Item swordHandle;
|
||||
public final Item shovelHead;
|
||||
public final Item pickaxeHead;
|
||||
public final Item axeHead;
|
||||
public final Item hoeHead;
|
||||
public final Item swordBlade;
|
||||
public final Item swordHandle;
|
||||
|
||||
public final Item shovel;
|
||||
public final Item sword;
|
||||
public final Item pickaxe;
|
||||
public final Item axe;
|
||||
public final Item hoe;
|
||||
public final Item hammer;
|
||||
public final Item shovel;
|
||||
public final Item sword;
|
||||
public final Item pickaxe;
|
||||
public final Item axe;
|
||||
public final Item hoe;
|
||||
public final Item hammer;
|
||||
|
||||
public final Item forgedPlate;
|
||||
public final Item helmet;
|
||||
public final Item chestplate;
|
||||
public final Item leggings;
|
||||
public final Item boots;
|
||||
public final Item forgedPlate;
|
||||
public final Item helmet;
|
||||
public final Item chestplate;
|
||||
public final Item leggings;
|
||||
public final Item boots;
|
||||
|
||||
public final Tag.Named<Item> alloyingOre;
|
||||
public final Tag.Named<Item> alloyingOre;
|
||||
|
||||
public static MetalMaterial makeNormal(String name, MaterialColor color, Tier material, ArmorMaterial armor) {
|
||||
return new MetalMaterial(
|
||||
name,
|
||||
true,
|
||||
FabricBlockSettings.copyOf(Blocks.IRON_BLOCK).mapColor(color),
|
||||
EndItems.makeEndItemSettings(),
|
||||
material,
|
||||
armor
|
||||
);
|
||||
}
|
||||
public static MetalMaterial makeNormal(String name, MaterialColor color, Tier material, ArmorMaterial armor) {
|
||||
return new MetalMaterial(
|
||||
name,
|
||||
true,
|
||||
FabricBlockSettings.copyOf(Blocks.IRON_BLOCK).mapColor(color),
|
||||
EndItems.makeEndItemSettings(),
|
||||
material,
|
||||
armor
|
||||
);
|
||||
}
|
||||
|
||||
public static MetalMaterial makeNormal(String name, MaterialColor color, float hardness, float resistance, Tier material, ArmorMaterial armor) {
|
||||
return new MetalMaterial(
|
||||
name,
|
||||
true,
|
||||
FabricBlockSettings.copyOf(Blocks.IRON_BLOCK)
|
||||
.mapColor(color)
|
||||
.hardness(hardness)
|
||||
.resistance(resistance),
|
||||
EndItems.makeEndItemSettings(),
|
||||
material,
|
||||
armor
|
||||
);
|
||||
}
|
||||
public static MetalMaterial makeNormal(String name, MaterialColor color, float hardness, float resistance, Tier material, ArmorMaterial armor) {
|
||||
return new MetalMaterial(
|
||||
name,
|
||||
true,
|
||||
FabricBlockSettings.copyOf(Blocks.IRON_BLOCK)
|
||||
.mapColor(color)
|
||||
.hardness(hardness)
|
||||
.resistance(resistance),
|
||||
EndItems.makeEndItemSettings(),
|
||||
material,
|
||||
armor
|
||||
);
|
||||
}
|
||||
|
||||
public static MetalMaterial makeOreless(String name, MaterialColor color, Tier material, ArmorMaterial armor) {
|
||||
return new MetalMaterial(
|
||||
name,
|
||||
false,
|
||||
FabricBlockSettings.copyOf(Blocks.IRON_BLOCK).mapColor(color),
|
||||
EndItems.makeEndItemSettings(),
|
||||
material,
|
||||
armor
|
||||
);
|
||||
}
|
||||
public static MetalMaterial makeOreless(String name, MaterialColor color, Tier material, ArmorMaterial armor) {
|
||||
return new MetalMaterial(
|
||||
name,
|
||||
false,
|
||||
FabricBlockSettings.copyOf(Blocks.IRON_BLOCK).mapColor(color),
|
||||
EndItems.makeEndItemSettings(),
|
||||
material,
|
||||
armor
|
||||
);
|
||||
}
|
||||
|
||||
public static MetalMaterial makeOreless(String name, MaterialColor color, float hardness, float resistance, Tier material, ArmorMaterial armor) {
|
||||
return new MetalMaterial(
|
||||
name,
|
||||
false,
|
||||
FabricBlockSettings.copyOf(Blocks.IRON_BLOCK)
|
||||
.mapColor(color)
|
||||
.hardness(hardness)
|
||||
.resistance(resistance),
|
||||
EndItems.makeEndItemSettings(),
|
||||
material,
|
||||
armor
|
||||
);
|
||||
}
|
||||
public static MetalMaterial makeOreless(String name, MaterialColor color, float hardness, float resistance, Tier material, ArmorMaterial armor) {
|
||||
return new MetalMaterial(
|
||||
name,
|
||||
false,
|
||||
FabricBlockSettings.copyOf(Blocks.IRON_BLOCK)
|
||||
.mapColor(color)
|
||||
.hardness(hardness)
|
||||
.resistance(resistance),
|
||||
EndItems.makeEndItemSettings(),
|
||||
material,
|
||||
armor
|
||||
);
|
||||
}
|
||||
|
||||
private MetalMaterial(String name, boolean hasOre, FabricBlockSettings settings, Properties itemSettings, Tier material, ArmorMaterial armor) {
|
||||
BlockBehaviour.Properties lanternProperties = FabricBlockSettings.copyOf(settings)
|
||||
.hardness(1)
|
||||
.resistance(1)
|
||||
.luminance(15)
|
||||
.sound(SoundType.LANTERN);
|
||||
final int level = material.getLevel();
|
||||
private MetalMaterial(String name, boolean hasOre, FabricBlockSettings settings, Properties itemSettings, Tier material, ArmorMaterial armor) {
|
||||
BlockBehaviour.Properties lanternProperties = FabricBlockSettings.copyOf(settings)
|
||||
.hardness(1)
|
||||
.resistance(1)
|
||||
.luminance(15)
|
||||
.sound(SoundType.LANTERN);
|
||||
final int level = material.getLevel();
|
||||
|
||||
rawOre = hasOre ? EndItems.registerEndItem(name + "_raw", new ModelProviderItem(itemSettings)) : null;
|
||||
ore = hasOre ? EndBlocks.registerBlock(name + "_ore", new BaseOreBlock(()->rawOre, 1, 3, 1)) : null;
|
||||
alloyingOre = hasOre ? TagAPI.makeItemTag(BetterEnd.MOD_ID, name + "_alloying") : null;
|
||||
if (hasOre) {
|
||||
TagAPI.addTag(alloyingOre, ore, rawOre);
|
||||
}
|
||||
rawOre = hasOre ? EndItems.registerEndItem(name + "_raw", new ModelProviderItem(itemSettings)) : null;
|
||||
ore = hasOre ? EndBlocks.registerBlock(name + "_ore", new BaseOreBlock(()->rawOre, 1, 3, 1)) : null;
|
||||
alloyingOre = hasOre ? TagAPI.makeItemTag(BetterEnd.MOD_ID, name + "_alloying") : null;
|
||||
if (hasOre) {
|
||||
TagAPI.addTag(alloyingOre, ore, rawOre);
|
||||
}
|
||||
|
||||
block = EndBlocks.registerBlock(name + "_block", new BaseBlock(settings));
|
||||
tile = EndBlocks.registerBlock(name + "_tile", new BaseBlock(settings));
|
||||
stairs = EndBlocks.registerBlock(name + "_stairs", new BaseStairsBlock(tile));
|
||||
slab = EndBlocks.registerBlock(name + "_slab", new BaseSlabBlock(tile));
|
||||
door = EndBlocks.registerBlock(name + "_door", new BaseDoorBlock(block));
|
||||
trapdoor = EndBlocks.registerBlock(name + "_trapdoor", new BaseTrapdoorBlock(block));
|
||||
bars = EndBlocks.registerBlock(name + "_bars", new BaseMetalBarsBlock(block));
|
||||
chain = EndBlocks.registerBlock(name + "_chain", new BaseChainBlock(block.defaultMaterialColor()));
|
||||
pressurePlate = EndBlocks.registerBlock(name + "_plate", new WoodenPressurePlateBlock(block));
|
||||
block = EndBlocks.registerBlock(name + "_block", new BaseBlock(settings));
|
||||
tile = EndBlocks.registerBlock(name + "_tile", new BaseBlock(settings));
|
||||
stairs = EndBlocks.registerBlock(name + "_stairs", new BaseStairsBlock(tile));
|
||||
slab = EndBlocks.registerBlock(name + "_slab", new BaseSlabBlock(tile));
|
||||
door = EndBlocks.registerBlock(name + "_door", new BaseDoorBlock(block));
|
||||
trapdoor = EndBlocks.registerBlock(name + "_trapdoor", new BaseTrapdoorBlock(block));
|
||||
bars = EndBlocks.registerBlock(name + "_bars", new BaseMetalBarsBlock(block));
|
||||
chain = EndBlocks.registerBlock(name + "_chain", new BaseChainBlock(block.defaultMaterialColor()));
|
||||
pressurePlate = EndBlocks.registerBlock(name + "_plate", new WoodenPressurePlateBlock(block));
|
||||
|
||||
chandelier = EndBlocks.registerBlock(name + "_chandelier", new ChandelierBlock(block));
|
||||
bulb_lantern = EndBlocks.registerBlock(name + "_bulb_lantern", new BulbVineLanternBlock(lanternProperties));
|
||||
bulb_lantern_colored = new ColoredMaterial(BulbVineLanternColoredBlock::new, bulb_lantern, false);
|
||||
chandelier = EndBlocks.registerBlock(name + "_chandelier", new ChandelierBlock(block));
|
||||
bulb_lantern = EndBlocks.registerBlock(name + "_bulb_lantern", new BulbVineLanternBlock(lanternProperties));
|
||||
bulb_lantern_colored = new ColoredMaterial(BulbVineLanternColoredBlock::new, bulb_lantern, false);
|
||||
|
||||
nugget = EndItems.registerEndItem(name + "_nugget", new ModelProviderItem(itemSettings));
|
||||
ingot = EndItems.registerEndItem(name + "_ingot", new ModelProviderItem(itemSettings));
|
||||
nugget = EndItems.registerEndItem(name + "_nugget", new ModelProviderItem(itemSettings));
|
||||
ingot = EndItems.registerEndItem(name + "_ingot", new ModelProviderItem(itemSettings));
|
||||
|
||||
shovelHead = EndItems.registerEndItem(name + "_shovel_head");
|
||||
pickaxeHead = EndItems.registerEndItem(name + "_pickaxe_head");
|
||||
axeHead = EndItems.registerEndItem(name + "_axe_head");
|
||||
hoeHead = EndItems.registerEndItem(name + "_hoe_head");
|
||||
swordBlade = EndItems.registerEndItem(name + "_sword_blade");
|
||||
swordHandle = EndItems.registerEndItem(name + "_sword_handle");
|
||||
shovelHead = EndItems.registerEndItem(name + "_shovel_head");
|
||||
pickaxeHead = EndItems.registerEndItem(name + "_pickaxe_head");
|
||||
axeHead = EndItems.registerEndItem(name + "_axe_head");
|
||||
hoeHead = EndItems.registerEndItem(name + "_hoe_head");
|
||||
swordBlade = EndItems.registerEndItem(name + "_sword_blade");
|
||||
swordHandle = EndItems.registerEndItem(name + "_sword_handle");
|
||||
|
||||
shovel = EndItems.registerEndTool(name + "_shovel", new BaseShovelItem(material, 1.5F, -3.0F, itemSettings));
|
||||
sword = EndItems.registerEndTool(name + "_sword", new BaseSwordItem(material, 3, -2.4F, itemSettings));
|
||||
pickaxe = EndItems.registerEndTool(name + "_pickaxe", new EndPickaxe(material, 1, -2.8F, itemSettings));
|
||||
axe = EndItems.registerEndTool(name + "_axe", new BaseAxeItem(material, 6.0F, -3.0F, itemSettings));
|
||||
hoe = EndItems.registerEndTool(name + "_hoe", new BaseHoeItem(material, -3, 0.0F, itemSettings));
|
||||
hammer = EndItems.registerEndTool(
|
||||
name + "_hammer",
|
||||
new EndHammerItem(material, 5.0F, -3.2F, 0.3D, itemSettings)
|
||||
);
|
||||
shovel = EndItems.registerEndTool(name + "_shovel", new BaseShovelItem(material, 1.5F, -3.0F, itemSettings));
|
||||
sword = EndItems.registerEndTool(name + "_sword", new BaseSwordItem(material, 3, -2.4F, itemSettings));
|
||||
pickaxe = EndItems.registerEndTool(name + "_pickaxe", new EndPickaxe(material, 1, -2.8F, itemSettings));
|
||||
axe = EndItems.registerEndTool(name + "_axe", new BaseAxeItem(material, 6.0F, -3.0F, itemSettings));
|
||||
hoe = EndItems.registerEndTool(name + "_hoe", new BaseHoeItem(material, -3, 0.0F, itemSettings));
|
||||
hammer = EndItems.registerEndTool(
|
||||
name + "_hammer",
|
||||
new EndHammerItem(material, 5.0F, -3.2F, 0.3D, itemSettings)
|
||||
);
|
||||
|
||||
forgedPlate = EndItems.registerEndItem(name + "_forged_plate");
|
||||
helmet = EndItems.registerEndItem(name + "_helmet", new EndArmorItem(armor, EquipmentSlot.HEAD, itemSettings));
|
||||
chestplate = EndItems.registerEndItem(
|
||||
name + "_chestplate",
|
||||
new EndArmorItem(armor, EquipmentSlot.CHEST, itemSettings)
|
||||
);
|
||||
leggings = EndItems.registerEndItem(
|
||||
name + "_leggings",
|
||||
new EndArmorItem(armor, EquipmentSlot.LEGS, itemSettings)
|
||||
);
|
||||
boots = EndItems.registerEndItem(name + "_boots", new EndArmorItem(armor, EquipmentSlot.FEET, itemSettings));
|
||||
forgedPlate = EndItems.registerEndItem(name + "_forged_plate");
|
||||
helmet = EndItems.registerEndItem(name + "_helmet", new EndArmorItem(armor, EquipmentSlot.HEAD, itemSettings));
|
||||
chestplate = EndItems.registerEndItem(
|
||||
name + "_chestplate",
|
||||
new EndArmorItem(armor, EquipmentSlot.CHEST, itemSettings)
|
||||
);
|
||||
leggings = EndItems.registerEndItem(
|
||||
name + "_leggings",
|
||||
new EndArmorItem(armor, EquipmentSlot.LEGS, itemSettings)
|
||||
);
|
||||
boots = EndItems.registerEndItem(name + "_boots", new EndArmorItem(armor, EquipmentSlot.FEET, itemSettings));
|
||||
|
||||
anvilBlock = EndBlocks.registerBlock(
|
||||
name + "_anvil",
|
||||
new EndAnvilBlock(this, block.defaultMaterialColor(), level)
|
||||
);
|
||||
anvilBlock = EndBlocks.registerBlock(
|
||||
name + "_anvil",
|
||||
new EndAnvilBlock(this, block.defaultMaterialColor(), level)
|
||||
);
|
||||
|
||||
if (hasOre) {
|
||||
FurnaceRecipe.make(BetterEnd.MOD_ID, name + "_ingot_furnace_ore", ore, ingot)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setGroup("end_ingot")
|
||||
.buildWithBlasting();
|
||||
FurnaceRecipe.make(BetterEnd.MOD_ID, name + "_ingot_furnace_raw", rawOre, ingot)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setGroup("end_ingot")
|
||||
.buildWithBlasting();
|
||||
AlloyingRecipe.Builder.create(name + "_ingot_alloy")
|
||||
.setInput(alloyingOre, alloyingOre)
|
||||
.setOutput(ingot, 3)
|
||||
.setExpiriense(2.1F)
|
||||
.build();
|
||||
}
|
||||
if (hasOre) {
|
||||
FurnaceRecipe.make(BetterEnd.MOD_ID, name + "_ingot_furnace_ore", ore, ingot)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setGroup("end_ingot")
|
||||
.buildWithBlasting();
|
||||
FurnaceRecipe.make(BetterEnd.MOD_ID, name + "_ingot_furnace_raw", rawOre, ingot)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setGroup("end_ingot")
|
||||
.buildWithBlasting();
|
||||
AlloyingRecipe.Builder.create(name + "_ingot_alloy")
|
||||
.setInput(alloyingOre, alloyingOre)
|
||||
.setOutput(ingot, 3)
|
||||
.setExpiriense(2.1F)
|
||||
.build();
|
||||
}
|
||||
|
||||
// Basic recipes
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_ingot_from_nuggets", ingot)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setShape("###", "###", "###")
|
||||
.addMaterial('#', nugget)
|
||||
.setGroup("end_metal_ingots_nug")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_nuggets_from_ingot", nugget)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setOutputCount(9)
|
||||
.setList("#")
|
||||
.addMaterial('#', ingot)
|
||||
.setGroup("end_metal_nuggets_ing")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_block", block)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setShape("###", "###", "###")
|
||||
.addMaterial('#', ingot)
|
||||
.setGroup("end_metal_blocks")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_ingot_from_block", ingot)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setOutputCount(9)
|
||||
.setList("#")
|
||||
.addMaterial('#', block)
|
||||
.setGroup("end_metal_ingots")
|
||||
.build();
|
||||
// Basic recipes
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_ingot_from_nuggets", ingot)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setShape("###", "###", "###")
|
||||
.addMaterial('#', nugget)
|
||||
.setGroup("end_metal_ingots_nug")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_nuggets_from_ingot", nugget)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setOutputCount(9)
|
||||
.setList("#")
|
||||
.addMaterial('#', ingot)
|
||||
.setGroup("end_metal_nuggets_ing")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_block", block)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setShape("###", "###", "###")
|
||||
.addMaterial('#', ingot)
|
||||
.setGroup("end_metal_blocks")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_ingot_from_block", ingot)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setOutputCount(9)
|
||||
.setList("#")
|
||||
.addMaterial('#', block)
|
||||
.setGroup("end_metal_ingots")
|
||||
.build();
|
||||
|
||||
// Block recipes
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_tile", tile)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setOutputCount(4)
|
||||
.setShape("##", "##")
|
||||
.addMaterial('#', block)
|
||||
.setGroup("end_metal_tiles")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_bars", bars)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setOutputCount(16)
|
||||
.setShape("###", "###")
|
||||
.addMaterial('#', ingot)
|
||||
.setGroup("end_metal_bars")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_pressure_plate", pressurePlate)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setShape("##")
|
||||
.addMaterial('#', ingot)
|
||||
.setGroup("end_metal_plates")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_door", door)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setOutputCount(3)
|
||||
.setShape("##", "##", "##")
|
||||
.addMaterial('#', ingot)
|
||||
.setGroup("end_metal_doors")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_trapdoor", trapdoor)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setShape("##", "##")
|
||||
.addMaterial('#', ingot)
|
||||
.setGroup("end_metal_trapdoors")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_stairs", stairs)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setOutputCount(4)
|
||||
.setShape("# ", "## ", "###")
|
||||
.addMaterial('#', block, tile)
|
||||
.setGroup("end_metal_stairs")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_slab", slab)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setOutputCount(6)
|
||||
.setShape("###")
|
||||
.addMaterial('#', block, tile)
|
||||
.setGroup("end_metal_slabs")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_chain", chain)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setShape("N", "#", "N")
|
||||
.addMaterial('#', ingot)
|
||||
.addMaterial('N', nugget)
|
||||
.setGroup("end_metal_chain")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_anvil", anvilBlock)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setShape("###", " I ", "III")
|
||||
.addMaterial('#', block, tile)
|
||||
.addMaterial('I', ingot)
|
||||
.setGroup("end_metal_anvil")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_bulb_lantern", bulb_lantern)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setShape("C", "I", "#")
|
||||
.addMaterial('C', chain)
|
||||
.addMaterial('I', ingot)
|
||||
.addMaterial('#', EndItems.GLOWING_BULB)
|
||||
.build();
|
||||
// Block recipes
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_tile", tile)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setOutputCount(4)
|
||||
.setShape("##", "##")
|
||||
.addMaterial('#', block)
|
||||
.setGroup("end_metal_tiles")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_bars", bars)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setOutputCount(16)
|
||||
.setShape("###", "###")
|
||||
.addMaterial('#', ingot)
|
||||
.setGroup("end_metal_bars")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_pressure_plate", pressurePlate)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setShape("##")
|
||||
.addMaterial('#', ingot)
|
||||
.setGroup("end_metal_plates")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_door", door)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setOutputCount(3)
|
||||
.setShape("##", "##", "##")
|
||||
.addMaterial('#', ingot)
|
||||
.setGroup("end_metal_doors")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_trapdoor", trapdoor)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setShape("##", "##")
|
||||
.addMaterial('#', ingot)
|
||||
.setGroup("end_metal_trapdoors")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_stairs", stairs)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setOutputCount(4)
|
||||
.setShape("# ", "## ", "###")
|
||||
.addMaterial('#', block, tile)
|
||||
.setGroup("end_metal_stairs")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_slab", slab)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setOutputCount(6)
|
||||
.setShape("###")
|
||||
.addMaterial('#', block, tile)
|
||||
.setGroup("end_metal_slabs")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_chain", chain)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setShape("N", "#", "N")
|
||||
.addMaterial('#', ingot)
|
||||
.addMaterial('N', nugget)
|
||||
.setGroup("end_metal_chain")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_anvil", anvilBlock)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setShape("###", " I ", "III")
|
||||
.addMaterial('#', block, tile)
|
||||
.addMaterial('I', ingot)
|
||||
.setGroup("end_metal_anvil")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_bulb_lantern", bulb_lantern)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setShape("C", "I", "#")
|
||||
.addMaterial('C', chain)
|
||||
.addMaterial('I', ingot)
|
||||
.addMaterial('#', EndItems.GLOWING_BULB)
|
||||
.build();
|
||||
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_chandelier", chandelier)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setShape("I#I", " # ")
|
||||
.addMaterial('#', ingot)
|
||||
.addMaterial('I', EndItems.LUMECORN_ROD)
|
||||
.setGroup("end_metal_chandelier")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_chandelier", chandelier)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setShape("I#I", " # ")
|
||||
.addMaterial('#', ingot)
|
||||
.addMaterial('I', EndItems.LUMECORN_ROD)
|
||||
.setGroup("end_metal_chandelier")
|
||||
.build();
|
||||
|
||||
// Tools & armor into nuggets
|
||||
FurnaceRecipe.make(BetterEnd.MOD_ID, name + "_axe_nugget", axe, nugget)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setGroup("end_nugget")
|
||||
.buildWithBlasting();
|
||||
FurnaceRecipe.make(BetterEnd.MOD_ID, name + "_hoe_nugget", hoe, nugget)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setGroup("end_nugget")
|
||||
.buildWithBlasting();
|
||||
FurnaceRecipe.make(BetterEnd.MOD_ID, name + "_pickaxe_nugget", pickaxe, nugget)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setGroup("end_nugget")
|
||||
.buildWithBlasting();
|
||||
FurnaceRecipe.make(BetterEnd.MOD_ID, name + "_sword_nugget", sword, nugget)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setGroup("end_nugget")
|
||||
.buildWithBlasting();
|
||||
FurnaceRecipe.make(BetterEnd.MOD_ID, name + "_hammer_nugget", hammer, nugget)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setGroup("end_nugget")
|
||||
.buildWithBlasting();
|
||||
FurnaceRecipe.make(BetterEnd.MOD_ID, name + "_helmet_nugget", helmet, nugget)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setGroup("end_nugget")
|
||||
.buildWithBlasting();
|
||||
FurnaceRecipe.make(BetterEnd.MOD_ID, name + "_chestplate_nugget", chestplate, nugget)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setGroup("end_nugget")
|
||||
.buildWithBlasting();
|
||||
FurnaceRecipe.make(BetterEnd.MOD_ID, name + "_leggings_nugget", leggings, nugget)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setGroup("end_nugget")
|
||||
.buildWithBlasting();
|
||||
FurnaceRecipe.make(BetterEnd.MOD_ID, name + "_boots_nugget", boots, nugget)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setGroup("end_nugget")
|
||||
.buildWithBlasting();
|
||||
// Tools & armor into nuggets
|
||||
FurnaceRecipe.make(BetterEnd.MOD_ID, name + "_axe_nugget", axe, nugget)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setGroup("end_nugget")
|
||||
.buildWithBlasting();
|
||||
FurnaceRecipe.make(BetterEnd.MOD_ID, name + "_hoe_nugget", hoe, nugget)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setGroup("end_nugget")
|
||||
.buildWithBlasting();
|
||||
FurnaceRecipe.make(BetterEnd.MOD_ID, name + "_pickaxe_nugget", pickaxe, nugget)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setGroup("end_nugget")
|
||||
.buildWithBlasting();
|
||||
FurnaceRecipe.make(BetterEnd.MOD_ID, name + "_sword_nugget", sword, nugget)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setGroup("end_nugget")
|
||||
.buildWithBlasting();
|
||||
FurnaceRecipe.make(BetterEnd.MOD_ID, name + "_hammer_nugget", hammer, nugget)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setGroup("end_nugget")
|
||||
.buildWithBlasting();
|
||||
FurnaceRecipe.make(BetterEnd.MOD_ID, name + "_helmet_nugget", helmet, nugget)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setGroup("end_nugget")
|
||||
.buildWithBlasting();
|
||||
FurnaceRecipe.make(BetterEnd.MOD_ID, name + "_chestplate_nugget", chestplate, nugget)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setGroup("end_nugget")
|
||||
.buildWithBlasting();
|
||||
FurnaceRecipe.make(BetterEnd.MOD_ID, name + "_leggings_nugget", leggings, nugget)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setGroup("end_nugget")
|
||||
.buildWithBlasting();
|
||||
FurnaceRecipe.make(BetterEnd.MOD_ID, name + "_boots_nugget", boots, nugget)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setGroup("end_nugget")
|
||||
.buildWithBlasting();
|
||||
|
||||
// Tool parts from ingots
|
||||
AnvilRecipe.create(name + "_shovel_head")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(ingot)
|
||||
.setOutput(shovelHead)
|
||||
.setAnvilLevel(level)
|
||||
.setToolLevel(level)
|
||||
.setDamage(level)
|
||||
.build();
|
||||
AnvilRecipe.create(name + "_pickaxe_head")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(ingot)
|
||||
.setInputCount(3)
|
||||
.setOutput(pickaxeHead)
|
||||
.setAnvilLevel(level)
|
||||
.setToolLevel(level)
|
||||
.setDamage(level)
|
||||
.build();
|
||||
AnvilRecipe.create(name + "_axe_head")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(ingot)
|
||||
.setInputCount(3)
|
||||
.setOutput(axeHead)
|
||||
.setAnvilLevel(level)
|
||||
.setToolLevel(level)
|
||||
.setDamage(level)
|
||||
.build();
|
||||
AnvilRecipe.create(name + "_hoe_head")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(ingot)
|
||||
.setInputCount(2)
|
||||
.setOutput(hoeHead)
|
||||
.setAnvilLevel(level)
|
||||
.setToolLevel(level)
|
||||
.setDamage(level)
|
||||
.build();
|
||||
AnvilRecipe.create(name + "_sword_blade")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(ingot)
|
||||
.setOutput(swordBlade)
|
||||
.setAnvilLevel(level)
|
||||
.setToolLevel(level)
|
||||
.setDamage(level)
|
||||
.build();
|
||||
AnvilRecipe.create(name + "_forged_plate")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(ingot)
|
||||
.setOutput(forgedPlate)
|
||||
.setAnvilLevel(level)
|
||||
.setToolLevel(level)
|
||||
.setDamage(level)
|
||||
.build();
|
||||
// Tool parts from ingots
|
||||
AnvilRecipe.create(name + "_shovel_head")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(ingot)
|
||||
.setOutput(shovelHead)
|
||||
.setAnvilLevel(level)
|
||||
.setToolLevel(level)
|
||||
.setDamage(level)
|
||||
.build();
|
||||
AnvilRecipe.create(name + "_pickaxe_head")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(ingot)
|
||||
.setInputCount(3)
|
||||
.setOutput(pickaxeHead)
|
||||
.setAnvilLevel(level)
|
||||
.setToolLevel(level)
|
||||
.setDamage(level)
|
||||
.build();
|
||||
AnvilRecipe.create(name + "_axe_head")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(ingot)
|
||||
.setInputCount(3)
|
||||
.setOutput(axeHead)
|
||||
.setAnvilLevel(level)
|
||||
.setToolLevel(level)
|
||||
.setDamage(level)
|
||||
.build();
|
||||
AnvilRecipe.create(name + "_hoe_head")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(ingot)
|
||||
.setInputCount(2)
|
||||
.setOutput(hoeHead)
|
||||
.setAnvilLevel(level)
|
||||
.setToolLevel(level)
|
||||
.setDamage(level)
|
||||
.build();
|
||||
AnvilRecipe.create(name + "_sword_blade")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(ingot)
|
||||
.setOutput(swordBlade)
|
||||
.setAnvilLevel(level)
|
||||
.setToolLevel(level)
|
||||
.setDamage(level)
|
||||
.build();
|
||||
AnvilRecipe.create(name + "_forged_plate")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(ingot)
|
||||
.setOutput(forgedPlate)
|
||||
.setAnvilLevel(level)
|
||||
.setToolLevel(level)
|
||||
.setDamage(level)
|
||||
.build();
|
||||
|
||||
// Tools from parts
|
||||
SmithingTableRecipe.create(BetterEnd.MOD_ID, name + "_hammer")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setResult(hammer)
|
||||
.setBase(block)
|
||||
.setAddition(Items.STICK)
|
||||
.build();
|
||||
SmithingTableRecipe.create(BetterEnd.MOD_ID, name + "_axe")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setResult(axe)
|
||||
.setBase(axeHead)
|
||||
.setAddition(Items.STICK)
|
||||
.build();
|
||||
SmithingTableRecipe.create(BetterEnd.MOD_ID, name + "_pickaxe")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setResult(pickaxe)
|
||||
.setBase(pickaxeHead)
|
||||
.setAddition(Items.STICK)
|
||||
.build();
|
||||
SmithingTableRecipe.create(BetterEnd.MOD_ID, name + "_hoe")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setResult(hoe)
|
||||
.setBase(hoeHead)
|
||||
.setAddition(Items.STICK)
|
||||
.build();
|
||||
SmithingTableRecipe.create(BetterEnd.MOD_ID, name + "_sword_handle")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setResult(swordHandle)
|
||||
.setBase(ingot)
|
||||
.setAddition(Items.STICK)
|
||||
.build();
|
||||
SmithingTableRecipe.create(BetterEnd.MOD_ID, name + "_sword")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setResult(sword)
|
||||
.setBase(swordBlade)
|
||||
.setAddition(swordHandle)
|
||||
.build();
|
||||
SmithingTableRecipe.create(BetterEnd.MOD_ID, name + "_shovel")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setResult(shovel)
|
||||
.setBase(shovelHead)
|
||||
.setAddition(Items.STICK)
|
||||
.build();
|
||||
// Tools from parts
|
||||
SmithingTableRecipe.create(BetterEnd.MOD_ID, name + "_hammer")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setResult(hammer)
|
||||
.setBase(block)
|
||||
.setAddition(Items.STICK)
|
||||
.build();
|
||||
SmithingTableRecipe.create(BetterEnd.MOD_ID, name + "_axe")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setResult(axe)
|
||||
.setBase(axeHead)
|
||||
.setAddition(Items.STICK)
|
||||
.build();
|
||||
SmithingTableRecipe.create(BetterEnd.MOD_ID, name + "_pickaxe")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setResult(pickaxe)
|
||||
.setBase(pickaxeHead)
|
||||
.setAddition(Items.STICK)
|
||||
.build();
|
||||
SmithingTableRecipe.create(BetterEnd.MOD_ID, name + "_hoe")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setResult(hoe)
|
||||
.setBase(hoeHead)
|
||||
.setAddition(Items.STICK)
|
||||
.build();
|
||||
SmithingTableRecipe.create(BetterEnd.MOD_ID, name + "_sword_handle")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setResult(swordHandle)
|
||||
.setBase(ingot)
|
||||
.setAddition(Items.STICK)
|
||||
.build();
|
||||
SmithingTableRecipe.create(BetterEnd.MOD_ID, name + "_sword")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setResult(sword)
|
||||
.setBase(swordBlade)
|
||||
.setAddition(swordHandle)
|
||||
.build();
|
||||
SmithingTableRecipe.create(BetterEnd.MOD_ID, name + "_shovel")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setResult(shovel)
|
||||
.setBase(shovelHead)
|
||||
.setAddition(Items.STICK)
|
||||
.build();
|
||||
|
||||
// Armor crafting
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_helmet", helmet)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setShape("###", "# #")
|
||||
.addMaterial('#', forgedPlate)
|
||||
.setGroup("end_metal_helmets")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_chestplate", chestplate)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setShape("# #", "###", "###")
|
||||
.addMaterial('#', forgedPlate)
|
||||
.setGroup("end_metal_chestplates")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_leggings", leggings)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setShape("###", "# #", "# #")
|
||||
.addMaterial('#', forgedPlate)
|
||||
.setGroup("end_metal_leggings")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_boots", boots)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setShape("# #", "# #")
|
||||
.addMaterial('#', forgedPlate)
|
||||
.setGroup("end_metal_boots")
|
||||
.build();
|
||||
// Armor crafting
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_helmet", helmet)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setShape("###", "# #")
|
||||
.addMaterial('#', forgedPlate)
|
||||
.setGroup("end_metal_helmets")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_chestplate", chestplate)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setShape("# #", "###", "###")
|
||||
.addMaterial('#', forgedPlate)
|
||||
.setGroup("end_metal_chestplates")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_leggings", leggings)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setShape("###", "# #", "# #")
|
||||
.addMaterial('#', forgedPlate)
|
||||
.setGroup("end_metal_leggings")
|
||||
.build();
|
||||
GridRecipe.make(BetterEnd.MOD_ID, name + "_boots", boots)
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setShape("# #", "# #")
|
||||
.addMaterial('#', forgedPlate)
|
||||
.setGroup("end_metal_boots")
|
||||
.build();
|
||||
|
||||
TagAPI.addTag(BlockTags.ANVIL, anvilBlock);
|
||||
TagAPI.addTag(BlockTags.BEACON_BASE_BLOCKS, block);
|
||||
TagAPI.addTag(ItemTags.BEACON_PAYMENT_ITEMS, ingot);
|
||||
TagAPI.addTag(TagAPI.BLOCK_DRAGON_IMMUNE, ore, bars);
|
||||
TagAPI.addTag(TagAPI.ITEM_HAMMERS, hammer);
|
||||
}
|
||||
TagAPI.addTag(BlockTags.ANVIL, anvilBlock);
|
||||
TagAPI.addTag(BlockTags.BEACON_BASE_BLOCKS, block);
|
||||
TagAPI.addTag(ItemTags.BEACON_PAYMENT_ITEMS, ingot);
|
||||
TagAPI.addTag(TagAPI.BLOCK_DRAGON_IMMUNE, ore, bars);
|
||||
TagAPI.addTag(TagAPI.ITEM_HAMMERS, hammer);
|
||||
}
|
||||
}
|
|
@ -19,66 +19,66 @@ import ru.betterend.world.biome.EndBiome;
|
|||
import java.util.List;
|
||||
|
||||
public class NightshadeRedwoods extends EndBiome.Config {
|
||||
public NightshadeRedwoods() {
|
||||
super("nightshade_redwoods");
|
||||
}
|
||||
public NightshadeRedwoods() {
|
||||
super("nightshade_redwoods");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addCustomBuildData(BCLBiomeBuilder builder) {
|
||||
Biome biome = Integrations.BYG.getBiome("nightshade_forest");
|
||||
BiomeSpecialEffects effects = biome.getSpecialEffects();
|
||||
@Override
|
||||
protected void addCustomBuildData(BCLBiomeBuilder builder) {
|
||||
Biome biome = Integrations.BYG.getBiome("nightshade_forest");
|
||||
BiomeSpecialEffects effects = biome.getSpecialEffects();
|
||||
|
||||
builder.fogColor(140, 108, 47)
|
||||
.fogDensity(1.5F)
|
||||
.waterAndFogColor(55, 70, 186)
|
||||
.foliageColor(122, 17, 155)
|
||||
.particles(
|
||||
ParticleTypes.REVERSE_PORTAL,
|
||||
0.002F
|
||||
)
|
||||
//TODO: 1.18 surface rules
|
||||
// .setSurface(biome.getGenerationSettings()
|
||||
// .getSurfaceBuilder()
|
||||
// .get())
|
||||
.grassColor(48, 13, 89)
|
||||
.plantsColor(200, 125, 9)
|
||||
.feature(EndFeatures.END_LAKE_RARE)
|
||||
.feature(BYGFeatures.NIGHTSHADE_REDWOOD_TREE)
|
||||
.feature(BYGFeatures.NIGHTSHADE_MOSS_WOOD)
|
||||
.feature(BYGFeatures.NIGHTSHADE_MOSS);
|
||||
builder.fogColor(140, 108, 47)
|
||||
.fogDensity(1.5F)
|
||||
.waterAndFogColor(55, 70, 186)
|
||||
.foliageColor(122, 17, 155)
|
||||
.particles(
|
||||
ParticleTypes.REVERSE_PORTAL,
|
||||
0.002F
|
||||
)
|
||||
//TODO: 1.18 surface rules
|
||||
// .setSurface(biome.getGenerationSettings()
|
||||
// .getSurfaceBuilder()
|
||||
// .get())
|
||||
.grassColor(48, 13, 89)
|
||||
.plantsColor(200, 125, 9)
|
||||
.feature(EndFeatures.END_LAKE_RARE)
|
||||
.feature(BYGFeatures.NIGHTSHADE_REDWOOD_TREE)
|
||||
.feature(BYGFeatures.NIGHTSHADE_MOSS_WOOD)
|
||||
.feature(BYGFeatures.NIGHTSHADE_MOSS);
|
||||
|
||||
if (BCLib.isClient()) {
|
||||
SoundEvent loop = effects.getAmbientLoopSoundEvent()
|
||||
.get();
|
||||
SoundEvent music = effects.getBackgroundMusic()
|
||||
.get()
|
||||
.getEvent();
|
||||
SoundEvent additions = effects.getAmbientAdditionsSettings()
|
||||
.get()
|
||||
.getSoundEvent();
|
||||
SoundEvent mood = effects.getAmbientMoodSettings()
|
||||
.get()
|
||||
.getSoundEvent();
|
||||
builder.loop(loop)
|
||||
.music(music)
|
||||
.additions(additions)
|
||||
.mood(mood);
|
||||
}
|
||||
biome.getGenerationSettings()
|
||||
.features()
|
||||
.forEach((list) -> {
|
||||
list.forEach((feature) -> {
|
||||
builder.feature(Decoration.VEGETAL_DECORATION, feature.get());
|
||||
});
|
||||
});
|
||||
if (BCLib.isClient()) {
|
||||
SoundEvent loop = effects.getAmbientLoopSoundEvent()
|
||||
.get();
|
||||
SoundEvent music = effects.getBackgroundMusic()
|
||||
.get()
|
||||
.getEvent();
|
||||
SoundEvent additions = effects.getAmbientAdditionsSettings()
|
||||
.get()
|
||||
.getSoundEvent();
|
||||
SoundEvent mood = effects.getAmbientMoodSettings()
|
||||
.get()
|
||||
.getSoundEvent();
|
||||
builder.loop(loop)
|
||||
.music(music)
|
||||
.additions(additions)
|
||||
.mood(mood);
|
||||
}
|
||||
biome.getGenerationSettings()
|
||||
.features()
|
||||
.forEach((list) -> {
|
||||
list.forEach((feature) -> {
|
||||
builder.feature(Decoration.VEGETAL_DECORATION, feature.get());
|
||||
});
|
||||
});
|
||||
|
||||
for (MobCategory group : MobCategory.values()) {
|
||||
List<SpawnerData> list = biome.getMobSettings()
|
||||
.getMobs(group)
|
||||
.unwrap();
|
||||
list.forEach((entry) -> {
|
||||
builder.spawn((EntityType<? extends Mob>) entry.type, 1, entry.minCount, entry.maxCount);
|
||||
});
|
||||
}
|
||||
}
|
||||
for (MobCategory group : MobCategory.values()) {
|
||||
List<SpawnerData> list = biome.getMobSettings()
|
||||
.getMobs(group)
|
||||
.unwrap();
|
||||
list.forEach((entry) -> {
|
||||
builder.spawn((EntityType<? extends Mob>) entry.type, 1, entry.minCount, entry.maxCount);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,91 +27,91 @@ import java.util.function.Supplier;
|
|||
|
||||
|
||||
public class OldBulbisGardens extends EndBiome.Config {
|
||||
public OldBulbisGardens() {
|
||||
super("old_bulbis_gardens");
|
||||
}
|
||||
public OldBulbisGardens() {
|
||||
super("old_bulbis_gardens");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addCustomBuildData(BCLBiomeBuilder builder) {
|
||||
Biome biome = Integrations.BYG.getBiome("bulbis_gardens");
|
||||
BiomeSpecialEffects effects = biome.getSpecialEffects();
|
||||
@Override
|
||||
protected void addCustomBuildData(BCLBiomeBuilder builder) {
|
||||
Biome biome = Integrations.BYG.getBiome("bulbis_gardens");
|
||||
BiomeSpecialEffects effects = biome.getSpecialEffects();
|
||||
|
||||
Block ivis = Integrations.BYG.getBlock("ivis_phylium");
|
||||
// Block origin = biome.getGenerationSettings()
|
||||
// .getSurfaceBuilderConfig()
|
||||
// .getTopMaterial()
|
||||
// .getBlock();
|
||||
builder.fogColor(215, 132, 207)
|
||||
.fogDensity(1.8F)
|
||||
.waterAndFogColor(40, 0, 56)
|
||||
.foliageColor(122, 17, 155)
|
||||
.particles(
|
||||
ParticleTypes.REVERSE_PORTAL,
|
||||
0.002F
|
||||
)
|
||||
//TODO: 1.18 surface rules
|
||||
//.surface(ivis, origin)
|
||||
.feature(EndFeatures.END_LAKE_RARE)
|
||||
.feature(BYGFeatures.OLD_BULBIS_TREE);
|
||||
Block ivis = Integrations.BYG.getBlock("ivis_phylium");
|
||||
// Block origin = biome.getGenerationSettings()
|
||||
// .getSurfaceBuilderConfig()
|
||||
// .getTopMaterial()
|
||||
// .getBlock();
|
||||
builder.fogColor(215, 132, 207)
|
||||
.fogDensity(1.8F)
|
||||
.waterAndFogColor(40, 0, 56)
|
||||
.foliageColor(122, 17, 155)
|
||||
.particles(
|
||||
ParticleTypes.REVERSE_PORTAL,
|
||||
0.002F
|
||||
)
|
||||
//TODO: 1.18 surface rules
|
||||
//.surface(ivis, origin)
|
||||
.feature(EndFeatures.END_LAKE_RARE)
|
||||
.feature(BYGFeatures.OLD_BULBIS_TREE);
|
||||
|
||||
if (BCLib.isClient()) {
|
||||
SoundEvent loop = effects.getAmbientLoopSoundEvent()
|
||||
.get();
|
||||
SoundEvent music = effects.getBackgroundMusic()
|
||||
.get()
|
||||
.getEvent();
|
||||
SoundEvent additions = effects.getAmbientAdditionsSettings()
|
||||
.get()
|
||||
.getSoundEvent();
|
||||
SoundEvent mood = effects.getAmbientMoodSettings()
|
||||
.get()
|
||||
.getSoundEvent();
|
||||
builder.loop(loop)
|
||||
.music(music)
|
||||
.additions(additions)
|
||||
.mood(mood);
|
||||
}
|
||||
if (BCLib.isClient()) {
|
||||
SoundEvent loop = effects.getAmbientLoopSoundEvent()
|
||||
.get();
|
||||
SoundEvent music = effects.getBackgroundMusic()
|
||||
.get()
|
||||
.getEvent();
|
||||
SoundEvent additions = effects.getAmbientAdditionsSettings()
|
||||
.get()
|
||||
.getSoundEvent();
|
||||
SoundEvent mood = effects.getAmbientMoodSettings()
|
||||
.get()
|
||||
.getSoundEvent();
|
||||
builder.loop(loop)
|
||||
.music(music)
|
||||
.additions(additions)
|
||||
.mood(mood);
|
||||
}
|
||||
|
||||
for (MobCategory group : MobCategory.values()) {
|
||||
List<SpawnerData> list = biome.getMobSettings()
|
||||
.getMobs(group)
|
||||
.unwrap();
|
||||
list.forEach((entry) -> {
|
||||
builder.spawn((EntityType<? extends Mob>) entry.type, 1, entry.minCount, entry.maxCount);
|
||||
});
|
||||
}
|
||||
for (MobCategory group : MobCategory.values()) {
|
||||
List<SpawnerData> list = biome.getMobSettings()
|
||||
.getMobs(group)
|
||||
.unwrap();
|
||||
list.forEach((entry) -> {
|
||||
builder.spawn((EntityType<? extends Mob>) entry.type, 1, entry.minCount, entry.maxCount);
|
||||
});
|
||||
}
|
||||
|
||||
List<List<Supplier<PlacedFeature>>> features = biome.getGenerationSettings()
|
||||
.features();
|
||||
List<Supplier<PlacedFeature>> vegetal = features.get(Decoration.VEGETAL_DECORATION.ordinal());
|
||||
if (vegetal.size() > 2) {
|
||||
Supplier<PlacedFeature> getter;
|
||||
// Trees (first two features)
|
||||
// I couldn't process them with conditions, so that's why they are hardcoded (paulevs)
|
||||
for (int i = 0; i < 2; i++) {
|
||||
getter = vegetal.get(i);
|
||||
PlacedFeature feature = getter.get();
|
||||
ResourceLocation id = BetterEnd.makeID("obg_feature_" + i);
|
||||
feature = Registry.register(
|
||||
BuiltinRegistries.PLACED_FEATURE,
|
||||
id,
|
||||
//TODO: 1.18 Check if this is correct
|
||||
feature//.decorated(FeaturesAccesor.shadowHEIGHTMAP_SQUARE).countRandom(1)
|
||||
);
|
||||
builder.feature(Decoration.VEGETAL_DECORATION, feature);
|
||||
}
|
||||
// Grasses and other features
|
||||
for (int i = 2; i < vegetal.size(); i++) {
|
||||
getter = vegetal.get(i);
|
||||
PlacedFeature feature = getter.get();
|
||||
builder.feature(Decoration.VEGETAL_DECORATION, feature);
|
||||
}
|
||||
}
|
||||
List<List<Supplier<PlacedFeature>>> features = biome.getGenerationSettings()
|
||||
.features();
|
||||
List<Supplier<PlacedFeature>> vegetal = features.get(Decoration.VEGETAL_DECORATION.ordinal());
|
||||
if (vegetal.size() > 2) {
|
||||
Supplier<PlacedFeature> getter;
|
||||
// Trees (first two features)
|
||||
// I couldn't process them with conditions, so that's why they are hardcoded (paulevs)
|
||||
for (int i = 0; i < 2; i++) {
|
||||
getter = vegetal.get(i);
|
||||
PlacedFeature feature = getter.get();
|
||||
ResourceLocation id = BetterEnd.makeID("obg_feature_" + i);
|
||||
feature = Registry.register(
|
||||
BuiltinRegistries.PLACED_FEATURE,
|
||||
id,
|
||||
//TODO: 1.18 Check if this is correct
|
||||
feature//.decorated(FeaturesAccesor.shadowHEIGHTMAP_SQUARE).countRandom(1)
|
||||
);
|
||||
builder.feature(Decoration.VEGETAL_DECORATION, feature);
|
||||
}
|
||||
// Grasses and other features
|
||||
for (int i = 2; i < vegetal.size(); i++) {
|
||||
getter = vegetal.get(i);
|
||||
PlacedFeature feature = getter.get();
|
||||
builder.feature(Decoration.VEGETAL_DECORATION, feature);
|
||||
}
|
||||
}
|
||||
|
||||
builder.feature(EndFeatures.PURPLE_POLYPORE)
|
||||
.feature(BYGFeatures.IVIS_MOSS_WOOD)
|
||||
.feature(BYGFeatures.IVIS_MOSS)
|
||||
.feature(BYGFeatures.IVIS_VINE)
|
||||
.feature(BYGFeatures.IVIS_SPROUT);
|
||||
}
|
||||
builder.feature(EndFeatures.PURPLE_POLYPORE)
|
||||
.feature(BYGFeatures.IVIS_MOSS_WOOD)
|
||||
.feature(BYGFeatures.IVIS_MOSS)
|
||||
.feature(BYGFeatures.IVIS_VINE)
|
||||
.feature(BYGFeatures.IVIS_SPROUT);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,5 +5,5 @@ import net.minecraft.world.level.levelgen.feature.StructureFeature;
|
|||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
|
||||
public interface StructureFeaturesAccessor {
|
||||
ConfiguredStructureFeature<NoneFeatureConfiguration, ? extends StructureFeature<NoneFeatureConfiguration>> getEND_CITY();
|
||||
ConfiguredStructureFeature<NoneFeatureConfiguration, ? extends StructureFeature<NoneFeatureConfiguration>> getEND_CITY();
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ public class EndPodiumFeatureMixin {
|
|||
WorldGenLevel world = featurePlaceContext.level();
|
||||
BlockPos pos = be_updatePortalPos(world);
|
||||
return new FeaturePlaceContext<NoneFeatureConfiguration>(
|
||||
Optional.empty(),
|
||||
Optional.empty(),
|
||||
world,
|
||||
featurePlaceContext.chunkGenerator(),
|
||||
featurePlaceContext.random(),
|
||||
|
|
|
@ -11,9 +11,9 @@ import ru.betterend.interfaces.StructureFeaturesAccessor;
|
|||
|
||||
@Mixin(StructureFeatures.class)
|
||||
public class StructureFeaturesMixin implements StructureFeaturesAccessor {
|
||||
@Shadow @Final private static ConfiguredStructureFeature<NoneFeatureConfiguration, ? extends StructureFeature<NoneFeatureConfiguration>> END_CITY;
|
||||
@Shadow @Final private static ConfiguredStructureFeature<NoneFeatureConfiguration, ? extends StructureFeature<NoneFeatureConfiguration>> END_CITY;
|
||||
|
||||
public ConfiguredStructureFeature<NoneFeatureConfiguration, ? extends StructureFeature<NoneFeatureConfiguration>> getEND_CITY(){
|
||||
return END_CITY;
|
||||
}
|
||||
public ConfiguredStructureFeature<NoneFeatureConfiguration, ? extends StructureFeature<NoneFeatureConfiguration>> getEND_CITY(){
|
||||
return END_CITY;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,78 +7,78 @@ import ru.betterend.item.material.EndToolMaterial;
|
|||
import ru.betterend.registry.EndItems;
|
||||
|
||||
public class AnvilRecipes {
|
||||
public static void register() {
|
||||
AnvilRecipe.create("ender_pearl_to_dust")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(Items.ENDER_PEARL)
|
||||
.setOutput(EndItems.ENDER_DUST)
|
||||
.setToolLevel(4)
|
||||
.setDamage(5)
|
||||
.build();
|
||||
AnvilRecipe.create("ender_shard_to_dust")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(EndItems.ENDER_SHARD)
|
||||
.setOutput(EndItems.ENDER_DUST)
|
||||
.setToolLevel(0)
|
||||
.setDamage(3)
|
||||
.build();
|
||||
public static void register() {
|
||||
AnvilRecipe.create("ender_pearl_to_dust")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(Items.ENDER_PEARL)
|
||||
.setOutput(EndItems.ENDER_DUST)
|
||||
.setToolLevel(4)
|
||||
.setDamage(5)
|
||||
.build();
|
||||
AnvilRecipe.create("ender_shard_to_dust")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(EndItems.ENDER_SHARD)
|
||||
.setOutput(EndItems.ENDER_DUST)
|
||||
.setToolLevel(0)
|
||||
.setDamage(3)
|
||||
.build();
|
||||
|
||||
int anvilLevel = EndToolMaterial.AETERNIUM.getLevel();
|
||||
AnvilRecipe.create("aeternium_axe_head")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(EndItems.AETERNIUM_INGOT)
|
||||
.setOutput(EndItems.AETERNIUM_AXE_HEAD)
|
||||
.setAnvilLevel(anvilLevel)
|
||||
.setToolLevel(anvilLevel)
|
||||
.setDamage(6)
|
||||
.build();
|
||||
AnvilRecipe.create("aeternium_pickaxe_head")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(EndItems.AETERNIUM_INGOT)
|
||||
.setOutput(EndItems.AETERNIUM_PICKAXE_HEAD)
|
||||
.setAnvilLevel(anvilLevel)
|
||||
.setToolLevel(anvilLevel)
|
||||
.setDamage(6)
|
||||
.build();
|
||||
AnvilRecipe.create("aeternium_shovel_head")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(EndItems.AETERNIUM_INGOT)
|
||||
.setOutput(EndItems.AETERNIUM_SHOVEL_HEAD)
|
||||
.setAnvilLevel(anvilLevel)
|
||||
.setToolLevel(anvilLevel)
|
||||
.setDamage(6)
|
||||
.build();
|
||||
AnvilRecipe.create("aeternium_hoe_head")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(EndItems.AETERNIUM_INGOT)
|
||||
.setOutput(EndItems.AETERNIUM_HOE_HEAD)
|
||||
.setAnvilLevel(anvilLevel)
|
||||
.setToolLevel(anvilLevel)
|
||||
.setDamage(6)
|
||||
.build();
|
||||
AnvilRecipe.create("aeternium_hammer_head")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(EndItems.AETERNIUM_INGOT)
|
||||
.setOutput(EndItems.AETERNIUM_HAMMER_HEAD)
|
||||
.setAnvilLevel(anvilLevel)
|
||||
.setToolLevel(EndToolMaterial.THALLASIUM.getLevel())
|
||||
.setDamage(6)
|
||||
.build();
|
||||
AnvilRecipe.create("aeternium_sword_blade")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(EndItems.AETERNIUM_INGOT)
|
||||
.setOutput(EndItems.AETERNIUM_SWORD_BLADE)
|
||||
.setAnvilLevel(anvilLevel)
|
||||
.setToolLevel(anvilLevel)
|
||||
.setDamage(6)
|
||||
.build();
|
||||
AnvilRecipe.create("aeternium_forged_plate")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(EndItems.AETERNIUM_INGOT)
|
||||
.setOutput(EndItems.AETERNIUM_FORGED_PLATE)
|
||||
.setAnvilLevel(anvilLevel)
|
||||
.setToolLevel(anvilLevel)
|
||||
.setDamage(6)
|
||||
.build();
|
||||
}
|
||||
int anvilLevel = EndToolMaterial.AETERNIUM.getLevel();
|
||||
AnvilRecipe.create("aeternium_axe_head")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(EndItems.AETERNIUM_INGOT)
|
||||
.setOutput(EndItems.AETERNIUM_AXE_HEAD)
|
||||
.setAnvilLevel(anvilLevel)
|
||||
.setToolLevel(anvilLevel)
|
||||
.setDamage(6)
|
||||
.build();
|
||||
AnvilRecipe.create("aeternium_pickaxe_head")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(EndItems.AETERNIUM_INGOT)
|
||||
.setOutput(EndItems.AETERNIUM_PICKAXE_HEAD)
|
||||
.setAnvilLevel(anvilLevel)
|
||||
.setToolLevel(anvilLevel)
|
||||
.setDamage(6)
|
||||
.build();
|
||||
AnvilRecipe.create("aeternium_shovel_head")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(EndItems.AETERNIUM_INGOT)
|
||||
.setOutput(EndItems.AETERNIUM_SHOVEL_HEAD)
|
||||
.setAnvilLevel(anvilLevel)
|
||||
.setToolLevel(anvilLevel)
|
||||
.setDamage(6)
|
||||
.build();
|
||||
AnvilRecipe.create("aeternium_hoe_head")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(EndItems.AETERNIUM_INGOT)
|
||||
.setOutput(EndItems.AETERNIUM_HOE_HEAD)
|
||||
.setAnvilLevel(anvilLevel)
|
||||
.setToolLevel(anvilLevel)
|
||||
.setDamage(6)
|
||||
.build();
|
||||
AnvilRecipe.create("aeternium_hammer_head")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(EndItems.AETERNIUM_INGOT)
|
||||
.setOutput(EndItems.AETERNIUM_HAMMER_HEAD)
|
||||
.setAnvilLevel(anvilLevel)
|
||||
.setToolLevel(EndToolMaterial.THALLASIUM.getLevel())
|
||||
.setDamage(6)
|
||||
.build();
|
||||
AnvilRecipe.create("aeternium_sword_blade")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(EndItems.AETERNIUM_INGOT)
|
||||
.setOutput(EndItems.AETERNIUM_SWORD_BLADE)
|
||||
.setAnvilLevel(anvilLevel)
|
||||
.setToolLevel(anvilLevel)
|
||||
.setDamage(6)
|
||||
.build();
|
||||
AnvilRecipe.create("aeternium_forged_plate")
|
||||
.checkConfig(Configs.RECIPE_CONFIG)
|
||||
.setInput(EndItems.AETERNIUM_INGOT)
|
||||
.setOutput(EndItems.AETERNIUM_FORGED_PLATE)
|
||||
.setAnvilLevel(anvilLevel)
|
||||
.setToolLevel(anvilLevel)
|
||||
.setDamage(6)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -694,9 +694,9 @@ public class EternalRitual {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param world World for search
|
||||
* @param checkPos Start search position
|
||||
* @param radius Search radius
|
||||
* @param world World for search
|
||||
* @param checkPos Start search position
|
||||
* @param radius Search radius
|
||||
* @param searchBlock Target block
|
||||
* @param condition Predicate for test block states in the chunk section
|
||||
* @return Position of the first found block or null.
|
||||
|
@ -733,9 +733,9 @@ public class EternalRitual {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param world World for search
|
||||
* @param checkPos Start search position
|
||||
* @param radius Search radius
|
||||
* @param world World for search
|
||||
* @param checkPos Start search position
|
||||
* @param radius Search radius
|
||||
* @param searchBlock Target block
|
||||
* @param condition Predicate for test block states in the chunk section
|
||||
* @return List of positions of the all found blocks or empty list.
|
||||
|
|
|
@ -12,42 +12,42 @@ import ru.betterend.registry.EndSounds;
|
|||
import ru.betterend.world.biome.EndBiome;
|
||||
|
||||
public class AmberLandBiome extends EndBiome.Config {
|
||||
public AmberLandBiome() {
|
||||
super("amber_land");
|
||||
}
|
||||
public AmberLandBiome() {
|
||||
super("amber_land");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addCustomBuildData(BCLBiomeBuilder builder) {
|
||||
builder.fogColor(255, 184, 71)
|
||||
.fogDensity(2.0F)
|
||||
.plantsColor(219, 115, 38)
|
||||
.waterAndFogColor(145, 108, 72)
|
||||
.music(EndSounds.MUSIC_FOREST)
|
||||
.loop(EndSounds.AMBIENT_AMBER_LAND)
|
||||
.particles(EndParticles.AMBER_SPHERE, 0.001F)
|
||||
.feature(EndFeatures.AMBER_ORE)
|
||||
.feature(EndFeatures.END_LAKE_RARE)
|
||||
.feature(EndFeatures.HELIX_TREE)
|
||||
.feature(EndFeatures.LANCELEAF)
|
||||
.feature(EndFeatures.GLOW_PILLAR)
|
||||
.feature(EndFeatures.AMBER_GRASS)
|
||||
.feature(EndFeatures.AMBER_ROOT)
|
||||
.feature(EndFeatures.BULB_MOSS)
|
||||
.feature(EndFeatures.BULB_MOSS_WOOD)
|
||||
.feature(EndFeatures.CHARNIA_ORANGE)
|
||||
.feature(EndFeatures.CHARNIA_RED)
|
||||
.structure(VANILLA_FEATURES.getEND_CITY())
|
||||
.spawn(EntityType.ENDERMAN, 50, 1, 4)
|
||||
.spawn(EndEntities.END_SLIME, 30, 1, 2);
|
||||
}
|
||||
@Override
|
||||
protected void addCustomBuildData(BCLBiomeBuilder builder) {
|
||||
builder.fogColor(255, 184, 71)
|
||||
.fogDensity(2.0F)
|
||||
.plantsColor(219, 115, 38)
|
||||
.waterAndFogColor(145, 108, 72)
|
||||
.music(EndSounds.MUSIC_FOREST)
|
||||
.loop(EndSounds.AMBIENT_AMBER_LAND)
|
||||
.particles(EndParticles.AMBER_SPHERE, 0.001F)
|
||||
.feature(EndFeatures.AMBER_ORE)
|
||||
.feature(EndFeatures.END_LAKE_RARE)
|
||||
.feature(EndFeatures.HELIX_TREE)
|
||||
.feature(EndFeatures.LANCELEAF)
|
||||
.feature(EndFeatures.GLOW_PILLAR)
|
||||
.feature(EndFeatures.AMBER_GRASS)
|
||||
.feature(EndFeatures.AMBER_ROOT)
|
||||
.feature(EndFeatures.BULB_MOSS)
|
||||
.feature(EndFeatures.BULB_MOSS_WOOD)
|
||||
.feature(EndFeatures.CHARNIA_ORANGE)
|
||||
.feature(EndFeatures.CHARNIA_RED)
|
||||
.structure(VANILLA_FEATURES.getEND_CITY())
|
||||
.spawn(EntityType.ENDERMAN, 50, 1, 4)
|
||||
.spawn(EndEntities.END_SLIME, 30, 1, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SurfaceMaterialProvider surfaceMaterial() {
|
||||
return new EndBiome.DefaultSurfaceMaterialProvider() {
|
||||
@Override
|
||||
public BlockState getTopMaterial() {
|
||||
return EndBlocks.AMBER_MOSS.defaultBlockState();
|
||||
}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
protected SurfaceMaterialProvider surfaceMaterial() {
|
||||
return new EndBiome.DefaultSurfaceMaterialProvider() {
|
||||
@Override
|
||||
public BlockState getTopMaterial() {
|
||||
return EndBlocks.AMBER_MOSS.defaultBlockState();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,61 +16,61 @@ import ru.betterend.world.surface.UmbraSurfaceNoiseCondition;
|
|||
import java.util.List;
|
||||
|
||||
public class UmbraValleyBiome extends EndBiome.Config {
|
||||
public UmbraValleyBiome() {
|
||||
super("umbra_valley");
|
||||
}
|
||||
public UmbraValleyBiome() {
|
||||
super("umbra_valley");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addCustomBuildData(BCLBiomeBuilder builder) {
|
||||
builder.fogColor(100, 100, 100)
|
||||
.plantsColor(172, 189, 190)
|
||||
.waterAndFogColor(69, 104, 134)
|
||||
.particles(EndParticles.AMBER_SPHERE, 0.0001F)
|
||||
.loop(EndSounds.UMBRA_VALLEY)
|
||||
.music(EndSounds.MUSIC_DARK)
|
||||
.feature(EndFeatures.UMBRALITH_ARCH)
|
||||
.feature(EndFeatures.THIN_UMBRALITH_ARCH)
|
||||
.feature(EndFeatures.INFLEXIA)
|
||||
.feature(EndFeatures.FLAMMALIX);
|
||||
}
|
||||
@Override
|
||||
protected void addCustomBuildData(BCLBiomeBuilder builder) {
|
||||
builder.fogColor(100, 100, 100)
|
||||
.plantsColor(172, 189, 190)
|
||||
.waterAndFogColor(69, 104, 134)
|
||||
.particles(EndParticles.AMBER_SPHERE, 0.0001F)
|
||||
.loop(EndSounds.UMBRA_VALLEY)
|
||||
.music(EndSounds.MUSIC_DARK)
|
||||
.feature(EndFeatures.UMBRALITH_ARCH)
|
||||
.feature(EndFeatures.THIN_UMBRALITH_ARCH)
|
||||
.feature(EndFeatures.INFLEXIA)
|
||||
.feature(EndFeatures.FLAMMALIX);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SurfaceMaterialProvider surfaceMaterial() {
|
||||
return new EndBiome.DefaultSurfaceMaterialProvider() {
|
||||
@Override
|
||||
public BlockState getTopMaterial() {
|
||||
return EndBlocks.UMBRALITH.stone.defaultBlockState();
|
||||
}
|
||||
@Override
|
||||
protected SurfaceMaterialProvider surfaceMaterial() {
|
||||
return new EndBiome.DefaultSurfaceMaterialProvider() {
|
||||
@Override
|
||||
public BlockState getTopMaterial() {
|
||||
return EndBlocks.UMBRALITH.stone.defaultBlockState();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getAltTopMaterial() {
|
||||
return EndBlocks.PALLIDIUM_FULL.defaultBlockState();
|
||||
}
|
||||
@Override
|
||||
public BlockState getAltTopMaterial() {
|
||||
return EndBlocks.PALLIDIUM_FULL.defaultBlockState();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean generateFloorRule() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean generateFloorRule() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SurfaceRuleBuilder surface() {
|
||||
return super
|
||||
.surface()
|
||||
.rule(2,
|
||||
SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR,
|
||||
new SwitchRuleSource(
|
||||
new UmbraSurfaceNoiseCondition(),
|
||||
List.of(
|
||||
SurfaceRules.state(surfaceMaterial().getAltTopMaterial()),
|
||||
PALLIDIUM_HEAVY,
|
||||
PALLIDIUM_THIN,
|
||||
PALLIDIUM_TINY,
|
||||
SurfaceRules.state(surfaceMaterial().getTopMaterial())
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public SurfaceRuleBuilder surface() {
|
||||
return super
|
||||
.surface()
|
||||
.rule(2,
|
||||
SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR,
|
||||
new SwitchRuleSource(
|
||||
new UmbraSurfaceNoiseCondition(),
|
||||
List.of(
|
||||
SurfaceRules.state(surfaceMaterial().getAltTopMaterial()),
|
||||
PALLIDIUM_HEAVY,
|
||||
PALLIDIUM_THIN,
|
||||
PALLIDIUM_TINY,
|
||||
SurfaceRules.state(surfaceMaterial().getTopMaterial())
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ public class BiomeIslandFeature extends DefaultFeature {
|
|||
final BlockPos pos = featureConfig.origin();
|
||||
final WorldGenLevel world = featureConfig.level();
|
||||
Biome biome = world.getBiome(pos);
|
||||
int dist = BlocksHelper.downRay(world, pos, 10) + 1;
|
||||
int dist = BlocksHelper.downRay(world, pos, 10) + 1;
|
||||
BlockPos surfacePos = new BlockPos(pos.getX(), pos.getY()-dist, pos.getZ());
|
||||
BlockState topMaterial = EndBiome.findTopMaterial(world, surfacePos);;
|
||||
|
||||
|
|
|
@ -23,55 +23,55 @@ import ru.betterend.noise.OpenSimplexNoise;
|
|||
import java.util.Random;
|
||||
|
||||
public class ThinArchFeature extends DefaultFeature {
|
||||
private Block block;
|
||||
|
||||
public ThinArchFeature(Block block) {
|
||||
this.block = block;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean place(FeaturePlaceContext<NoneFeatureConfiguration> featurePlaceContext) {
|
||||
final WorldGenLevel world = featurePlaceContext.level();
|
||||
BlockPos origin = featurePlaceContext.origin();
|
||||
Random random = featurePlaceContext.random();
|
||||
private Block block;
|
||||
|
||||
public ThinArchFeature(Block block) {
|
||||
this.block = block;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean place(FeaturePlaceContext<NoneFeatureConfiguration> featurePlaceContext) {
|
||||
final WorldGenLevel world = featurePlaceContext.level();
|
||||
BlockPos origin = featurePlaceContext.origin();
|
||||
Random random = featurePlaceContext.random();
|
||||
|
||||
BlockPos pos = getPosOnSurfaceWG(world, new BlockPos((origin.getX() & 0xFFFFFFF0) | 7, 0, (origin.getZ() & 0xFFFFFFF0) | 7));
|
||||
if (!world.getBlockState(pos.below(5)).is(TagAPI.BLOCK_GEN_TERRAIN)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
SDF sdf = null;
|
||||
float bigRadius = MHelper.randRange(15F, 20F, random);
|
||||
float variation = bigRadius * 0.3F;
|
||||
int count = MHelper.randRange(2, 4, random);
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
float smallRadius = MHelper.randRange(0.6F, 1.3F, random);
|
||||
SDF arch = new SDFTorus().setBigRadius(bigRadius - random.nextFloat() * variation).setSmallRadius(smallRadius).setBlock(block);
|
||||
float angle = (i - count * 0.5F) * 0.3F + random.nextFloat() * 0.05F + (float) Math.PI * 0.5F;
|
||||
arch = new SDFRotation().setRotation(Vector3f.XP, angle).setSource(arch);
|
||||
sdf = sdf == null ? arch : new SDFUnion().setSourceA(sdf).setSourceB(arch);
|
||||
}
|
||||
|
||||
sdf = new SDFRotation().setRotation(MHelper.randomHorizontal(random), random.nextFloat() * MHelper.PI2).setSource(sdf);
|
||||
|
||||
OpenSimplexNoise noise = new OpenSimplexNoise(random.nextLong());
|
||||
sdf = new SDFCoordModify().setFunction(vec -> {
|
||||
float dx = (float) noise.eval(vec.y() * 0.02, vec.z() * 0.02);
|
||||
float dy = (float) noise.eval(vec.x() * 0.02, vec.z() * 0.02);
|
||||
float dz = (float) noise.eval(vec.x() * 0.02, vec.y() * 0.02);
|
||||
vec.add(dx * 10, dy * 10, dz * 10);
|
||||
}).setSource(sdf);
|
||||
sdf = new SDFDisplacement().setFunction(vec -> {
|
||||
float offset = vec.y() / bigRadius - 0.5F;
|
||||
return Mth.clamp(offset * 3, -10F, 0F);
|
||||
}).setSource(sdf);
|
||||
|
||||
float side = (bigRadius + 2.5F) * 2;
|
||||
if (side > 47) {
|
||||
side = 47;
|
||||
}
|
||||
sdf.fillArea(world, pos, AABB.ofSize(Vec3.atCenterOf(pos), side, side, side));
|
||||
return true;
|
||||
}
|
||||
BlockPos pos = getPosOnSurfaceWG(world, new BlockPos((origin.getX() & 0xFFFFFFF0) | 7, 0, (origin.getZ() & 0xFFFFFFF0) | 7));
|
||||
if (!world.getBlockState(pos.below(5)).is(TagAPI.BLOCK_GEN_TERRAIN)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
SDF sdf = null;
|
||||
float bigRadius = MHelper.randRange(15F, 20F, random);
|
||||
float variation = bigRadius * 0.3F;
|
||||
int count = MHelper.randRange(2, 4, random);
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
float smallRadius = MHelper.randRange(0.6F, 1.3F, random);
|
||||
SDF arch = new SDFTorus().setBigRadius(bigRadius - random.nextFloat() * variation).setSmallRadius(smallRadius).setBlock(block);
|
||||
float angle = (i - count * 0.5F) * 0.3F + random.nextFloat() * 0.05F + (float) Math.PI * 0.5F;
|
||||
arch = new SDFRotation().setRotation(Vector3f.XP, angle).setSource(arch);
|
||||
sdf = sdf == null ? arch : new SDFUnion().setSourceA(sdf).setSourceB(arch);
|
||||
}
|
||||
|
||||
sdf = new SDFRotation().setRotation(MHelper.randomHorizontal(random), random.nextFloat() * MHelper.PI2).setSource(sdf);
|
||||
|
||||
OpenSimplexNoise noise = new OpenSimplexNoise(random.nextLong());
|
||||
sdf = new SDFCoordModify().setFunction(vec -> {
|
||||
float dx = (float) noise.eval(vec.y() * 0.02, vec.z() * 0.02);
|
||||
float dy = (float) noise.eval(vec.x() * 0.02, vec.z() * 0.02);
|
||||
float dz = (float) noise.eval(vec.x() * 0.02, vec.y() * 0.02);
|
||||
vec.add(dx * 10, dy * 10, dz * 10);
|
||||
}).setSource(sdf);
|
||||
sdf = new SDFDisplacement().setFunction(vec -> {
|
||||
float offset = vec.y() / bigRadius - 0.5F;
|
||||
return Mth.clamp(offset * 3, -10F, 0F);
|
||||
}).setSource(sdf);
|
||||
|
||||
float side = (bigRadius + 2.5F) * 2;
|
||||
if (side > 47) {
|
||||
side = 47;
|
||||
}
|
||||
sdf.fillArea(world, pos, AABB.ofSize(Vec3.atCenterOf(pos), side, side, side));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,54 +20,54 @@ import ru.betterend.world.structures.piece.NBTPiece;
|
|||
import java.util.Random;
|
||||
|
||||
public class EternalPortalStructure extends FeatureBaseStructure {
|
||||
private static final ResourceLocation STRUCTURE_ID = BetterEnd.makeID("portal/eternal_portal");
|
||||
private static final StructureTemplate STRUCTURE = StructureHelper.readStructure(STRUCTURE_ID);
|
||||
private static final ResourceLocation STRUCTURE_ID = BetterEnd.makeID("portal/eternal_portal");
|
||||
private static final StructureTemplate STRUCTURE = StructureHelper.readStructure(STRUCTURE_ID);
|
||||
|
||||
public EternalPortalStructure() {
|
||||
super(PieceGeneratorSupplier.simple(
|
||||
EternalPortalStructure::checkLocation,
|
||||
EternalPortalStructure::generatePieces
|
||||
));
|
||||
}
|
||||
public EternalPortalStructure() {
|
||||
super(PieceGeneratorSupplier.simple(
|
||||
EternalPortalStructure::checkLocation,
|
||||
EternalPortalStructure::generatePieces
|
||||
));
|
||||
}
|
||||
|
||||
protected static boolean checkLocation(PieceGeneratorSupplier.Context<NoneFeatureConfiguration> context) {
|
||||
if (!BCLStructureFeature.isValidBiome(context)) return false;
|
||||
protected static boolean checkLocation(PieceGeneratorSupplier.Context<NoneFeatureConfiguration> context) {
|
||||
if (!BCLStructureFeature.isValidBiome(context)) return false;
|
||||
|
||||
final ChunkPos chunkPos = context.chunkPos();
|
||||
final ChunkGenerator chunkGenerator = context.chunkGenerator();
|
||||
final LevelHeightAccessor levelHeightAccessor = context.heightAccessor();
|
||||
final ChunkPos chunkPos = context.chunkPos();
|
||||
final ChunkGenerator chunkGenerator = context.chunkGenerator();
|
||||
final LevelHeightAccessor levelHeightAccessor = context.heightAccessor();
|
||||
|
||||
long x = (long) chunkPos.x * (long) chunkPos.x;
|
||||
long z = (long) chunkPos.z * (long) chunkPos.z;
|
||||
if (x + z < 1024L) {
|
||||
return false;
|
||||
}
|
||||
if (chunkGenerator.getBaseHeight(
|
||||
chunkPos.getBlockX(8),
|
||||
chunkPos.getBlockZ(8),
|
||||
Heightmap.Types.WORLD_SURFACE_WG,
|
||||
levelHeightAccessor
|
||||
) < 5) {
|
||||
return false;
|
||||
}
|
||||
return FeatureBaseStructure.checkLocation(context);
|
||||
}
|
||||
long x = (long) chunkPos.x * (long) chunkPos.x;
|
||||
long z = (long) chunkPos.z * (long) chunkPos.z;
|
||||
if (x + z < 1024L) {
|
||||
return false;
|
||||
}
|
||||
if (chunkGenerator.getBaseHeight(
|
||||
chunkPos.getBlockX(8),
|
||||
chunkPos.getBlockZ(8),
|
||||
Heightmap.Types.WORLD_SURFACE_WG,
|
||||
levelHeightAccessor
|
||||
) < 5) {
|
||||
return false;
|
||||
}
|
||||
return FeatureBaseStructure.checkLocation(context);
|
||||
}
|
||||
|
||||
protected static void generatePieces(StructurePiecesBuilder structurePiecesBuilder, PieceGenerator.Context<NoneFeatureConfiguration> context) {
|
||||
final Random random = context.random();
|
||||
final ChunkPos chunkPos = context.chunkPos();
|
||||
final ChunkGenerator chunkGenerator = context.chunkGenerator();
|
||||
final LevelHeightAccessor levelHeightAccessor = context.heightAccessor();
|
||||
int x = chunkPos.getBlockX(8);
|
||||
int z = chunkPos.getBlockZ(8);
|
||||
int y = chunkGenerator.getBaseHeight(x, z, Types.WORLD_SURFACE_WG, levelHeightAccessor);
|
||||
structurePiecesBuilder.addPiece(new NBTPiece(
|
||||
STRUCTURE_ID,
|
||||
STRUCTURE,
|
||||
new BlockPos(x, y - 4, z),
|
||||
random.nextInt(5),
|
||||
true,
|
||||
random
|
||||
));
|
||||
}
|
||||
protected static void generatePieces(StructurePiecesBuilder structurePiecesBuilder, PieceGenerator.Context<NoneFeatureConfiguration> context) {
|
||||
final Random random = context.random();
|
||||
final ChunkPos chunkPos = context.chunkPos();
|
||||
final ChunkGenerator chunkGenerator = context.chunkGenerator();
|
||||
final LevelHeightAccessor levelHeightAccessor = context.heightAccessor();
|
||||
int x = chunkPos.getBlockX(8);
|
||||
int z = chunkPos.getBlockZ(8);
|
||||
int y = chunkGenerator.getBaseHeight(x, z, Types.WORLD_SURFACE_WG, levelHeightAccessor);
|
||||
structurePiecesBuilder.addPiece(new NBTPiece(
|
||||
STRUCTURE_ID,
|
||||
STRUCTURE,
|
||||
new BlockPos(x, y - 4, z),
|
||||
random.nextInt(5),
|
||||
true,
|
||||
random
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,33 +16,32 @@ import ru.betterend.world.structures.piece.LakePiece;
|
|||
import java.util.Random;
|
||||
|
||||
public class MegaLakeSmallStructure extends FeatureBaseStructure {
|
||||
public MegaLakeSmallStructure() {
|
||||
super(PieceGeneratorSupplier.simple(
|
||||
FeatureBaseStructure::checkLocation,
|
||||
MegaLakeSmallStructure::generatePieces
|
||||
));
|
||||
}
|
||||
public MegaLakeSmallStructure() {
|
||||
super(PieceGeneratorSupplier.simple(
|
||||
FeatureBaseStructure::checkLocation,
|
||||
MegaLakeSmallStructure::generatePieces
|
||||
));
|
||||
}
|
||||
|
||||
protected static void generatePieces(StructurePiecesBuilder structurePiecesBuilder, PieceGenerator.Context<NoneFeatureConfiguration> context) {
|
||||
final Random random = context.random();
|
||||
final ChunkPos chunkPos = context.chunkPos();
|
||||
final ChunkGenerator chunkGenerator = context.chunkGenerator();
|
||||
final LevelHeightAccessor levelHeightAccessor = context.heightAccessor();
|
||||
protected static void generatePieces(StructurePiecesBuilder structurePiecesBuilder, PieceGenerator.Context<NoneFeatureConfiguration> context) {
|
||||
final Random random = context.random();
|
||||
final ChunkPos chunkPos = context.chunkPos();
|
||||
final ChunkGenerator chunkGenerator = context.chunkGenerator();
|
||||
final LevelHeightAccessor levelHeightAccessor = context.heightAccessor();
|
||||
|
||||
|
||||
int x = chunkPos.getBlockX(MHelper.randRange(4, 12, random));
|
||||
int z = chunkPos.getBlockZ(MHelper.randRange(4, 12, random));
|
||||
int y = chunkGenerator.getBaseHeight(x, z, Types.WORLD_SURFACE_WG, levelHeightAccessor);
|
||||
int x = chunkPos.getBlockX(MHelper.randRange(4, 12, random));
|
||||
int z = chunkPos.getBlockZ(MHelper.randRange(4, 12, random));
|
||||
int y = chunkGenerator.getBaseHeight(x, z, Types.WORLD_SURFACE_WG, levelHeightAccessor);
|
||||
|
||||
Biome biome = chunkGenerator.getNoiseBiome(x >> 2, y >> 2, z >> 2);
|
||||
if (y > 5) {
|
||||
float radius = MHelper.randRange(20, 40, random);
|
||||
float depth = MHelper.randRange(5, 10, random);
|
||||
LakePiece piece = new LakePiece(new BlockPos(x, y, z), radius, depth, random, biome);
|
||||
structurePiecesBuilder.addPiece(piece);
|
||||
}
|
||||
|
||||
//TODO: 1.18 right way to get biome?
|
||||
Biome biome = chunkGenerator.getNoiseBiome(x, y, z);
|
||||
if (y > 5) {
|
||||
float radius = MHelper.randRange(20, 40, random);
|
||||
float depth = MHelper.randRange(5, 10, random);
|
||||
LakePiece piece = new LakePiece(new BlockPos(x, y, z), radius, depth, random, biome);
|
||||
structurePiecesBuilder.addPiece(piece);
|
||||
}
|
||||
|
||||
//this.calculateBoundingBox();
|
||||
}
|
||||
//this.calculateBoundingBox();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,34 +18,33 @@ import java.util.Random;
|
|||
public class MegaLakeStructure extends FeatureBaseStructure {
|
||||
|
||||
|
||||
public MegaLakeStructure() {
|
||||
super(PieceGeneratorSupplier.simple(
|
||||
FeatureBaseStructure::checkLocation,
|
||||
MegaLakeStructure::generatePieces
|
||||
));
|
||||
}
|
||||
public MegaLakeStructure() {
|
||||
super(PieceGeneratorSupplier.simple(
|
||||
FeatureBaseStructure::checkLocation,
|
||||
MegaLakeStructure::generatePieces
|
||||
));
|
||||
}
|
||||
|
||||
protected static void generatePieces(StructurePiecesBuilder structurePiecesBuilder, PieceGenerator.Context<NoneFeatureConfiguration> context) {
|
||||
final Random random = context.random();
|
||||
final ChunkPos chunkPos = context.chunkPos();
|
||||
final ChunkGenerator chunkGenerator = context.chunkGenerator();
|
||||
final LevelHeightAccessor levelHeightAccessor = context.heightAccessor();
|
||||
protected static void generatePieces(StructurePiecesBuilder structurePiecesBuilder, PieceGenerator.Context<NoneFeatureConfiguration> context) {
|
||||
final Random random = context.random();
|
||||
final ChunkPos chunkPos = context.chunkPos();
|
||||
final ChunkGenerator chunkGenerator = context.chunkGenerator();
|
||||
final LevelHeightAccessor levelHeightAccessor = context.heightAccessor();
|
||||
|
||||
int x = chunkPos.getBlockX(MHelper.randRange(4, 12, random));
|
||||
int z = chunkPos.getBlockZ(MHelper.randRange(4, 12, random));
|
||||
int y = chunkGenerator.getBaseHeight(x, z, Types.WORLD_SURFACE_WG, levelHeightAccessor);
|
||||
int x = chunkPos.getBlockX(MHelper.randRange(4, 12, random));
|
||||
int z = chunkPos.getBlockZ(MHelper.randRange(4, 12, random));
|
||||
int y = chunkGenerator.getBaseHeight(x, z, Types.WORLD_SURFACE_WG, levelHeightAccessor);
|
||||
|
||||
if (y > 5) {
|
||||
//TODO: 1.18 right way to get biome?
|
||||
Biome biome = chunkGenerator.getNoiseBiome(x, y, z);
|
||||
if (y > 5) {
|
||||
Biome biome = chunkGenerator.getNoiseBiome(x >> 2, y >> 2, z >> 2);
|
||||
|
||||
float radius = MHelper.randRange(32, 64, random);
|
||||
float depth = MHelper.randRange(7, 15, random);
|
||||
LakePiece piece = new LakePiece(new BlockPos(x, y, z), radius, depth, random, biome);
|
||||
structurePiecesBuilder.addPiece(piece);
|
||||
}
|
||||
float radius = MHelper.randRange(32, 64, random);
|
||||
float depth = MHelper.randRange(7, 15, random);
|
||||
LakePiece piece = new LakePiece(new BlockPos(x, y, z), radius, depth, random, biome);
|
||||
structurePiecesBuilder.addPiece(piece);
|
||||
}
|
||||
|
||||
//this.calculateBoundingBox();
|
||||
}
|
||||
//this.calculateBoundingBox();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -17,39 +17,39 @@ import java.util.Random;
|
|||
|
||||
public class MountainStructure extends FeatureBaseStructure {
|
||||
|
||||
public MountainStructure() {
|
||||
super(PieceGeneratorSupplier.simple(
|
||||
FeatureBaseStructure::checkLocation,
|
||||
MountainStructure::generatePieces
|
||||
));
|
||||
}
|
||||
public MountainStructure() {
|
||||
super(PieceGeneratorSupplier.simple(
|
||||
FeatureBaseStructure::checkLocation,
|
||||
MountainStructure::generatePieces
|
||||
));
|
||||
}
|
||||
|
||||
protected static void generatePieces(StructurePiecesBuilder structurePiecesBuilder, PieceGenerator.Context<NoneFeatureConfiguration> context) {
|
||||
final Random random = context.random();
|
||||
final ChunkPos chunkPos = context.chunkPos();
|
||||
final ChunkGenerator chunkGenerator = context.chunkGenerator();
|
||||
final LevelHeightAccessor levelHeightAccessor = context.heightAccessor();
|
||||
protected static void generatePieces(StructurePiecesBuilder structurePiecesBuilder, PieceGenerator.Context<NoneFeatureConfiguration> context) {
|
||||
final Random random = context.random();
|
||||
final ChunkPos chunkPos = context.chunkPos();
|
||||
final ChunkGenerator chunkGenerator = context.chunkGenerator();
|
||||
final LevelHeightAccessor levelHeightAccessor = context.heightAccessor();
|
||||
|
||||
int x = chunkPos.getBlockX(MHelper.randRange(4, 12, random));
|
||||
int z = chunkPos.getBlockZ(MHelper.randRange(4, 12, random));
|
||||
int y = chunkGenerator.getBaseHeight(x, z, Types.WORLD_SURFACE_WG, levelHeightAccessor);
|
||||
if (y > 5) {
|
||||
//TODO: 1.18 right way to get biome?
|
||||
Biome biome = chunkGenerator.getNoiseBiome(x, y, z);
|
||||
int x = chunkPos.getBlockX(MHelper.randRange(4, 12, random));
|
||||
int z = chunkPos.getBlockZ(MHelper.randRange(4, 12, random));
|
||||
int y = chunkGenerator.getBaseHeight(x, z, Types.WORLD_SURFACE_WG, levelHeightAccessor);
|
||||
if (y > 5) {
|
||||
//TODO: 1.18 right way to get biome?
|
||||
Biome biome = chunkGenerator.getNoiseBiome(x, y, z);
|
||||
|
||||
float radius = MHelper.randRange(50, 100, random);
|
||||
float height = radius * MHelper.randRange(0.8F, 1.2F, random);
|
||||
CrystalMountainPiece piece = new CrystalMountainPiece(
|
||||
new BlockPos(x, y, z),
|
||||
radius,
|
||||
height,
|
||||
random,
|
||||
biome
|
||||
);
|
||||
structurePiecesBuilder.addPiece(piece);
|
||||
}
|
||||
float radius = MHelper.randRange(50, 100, random);
|
||||
float height = radius * MHelper.randRange(0.8F, 1.2F, random);
|
||||
CrystalMountainPiece piece = new CrystalMountainPiece(
|
||||
new BlockPos(x, y, z),
|
||||
radius,
|
||||
height,
|
||||
random,
|
||||
biome
|
||||
);
|
||||
structurePiecesBuilder.addPiece(piece);
|
||||
}
|
||||
|
||||
//this.calculateBoundingBox();
|
||||
}
|
||||
//this.calculateBoundingBox();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ public class CavePiece extends BasePiece {
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public void postProcess(WorldGenLevel world, StructureFeatureManager arg, ChunkGenerator chunkGenerator, Random random, BoundingBox blockBox, ChunkPos chunkPos, BlockPos blockPos) {
|
||||
int x1 = MHelper.max(this.boundingBox.minX(), blockBox.minX());
|
||||
int z1 = MHelper.max(this.boundingBox.minZ(), blockBox.minZ());
|
||||
|
|
|
@ -9,20 +9,20 @@ import ru.betterend.noise.OpenSimplexNoise;
|
|||
* Noise source that returns a value in [0, 3]
|
||||
*/
|
||||
public class SulphuricSurfaceNoiseCondition implements NumericProvider {
|
||||
private static final OpenSimplexNoise NOISE = new OpenSimplexNoise(5123);
|
||||
private static final OpenSimplexNoise NOISE = new OpenSimplexNoise(5123);
|
||||
|
||||
@Override
|
||||
public int getNumber(SurfaceRulesContextAccessor context) {
|
||||
final int x = context.getBlockX();
|
||||
final int z = context.getBlockZ();
|
||||
final double value = NOISE.eval(x * 0.03, z * 0.03) + NOISE.eval(x * 0.1, z * 0.1) * 0.3 + MHelper.randRange(
|
||||
-0.1,
|
||||
0.1,
|
||||
MHelper.RANDOM
|
||||
);
|
||||
if (value < -0.6) return 0;
|
||||
if (value < -0.3) return 1;
|
||||
if (value < -0.5) return 2;
|
||||
return 3;
|
||||
}
|
||||
@Override
|
||||
public int getNumber(SurfaceRulesContextAccessor context) {
|
||||
final int x = context.getBlockX();
|
||||
final int z = context.getBlockZ();
|
||||
final double value = NOISE.eval(x * 0.03, z * 0.03) + NOISE.eval(x * 0.1, z * 0.1) * 0.3 + MHelper.randRange(
|
||||
-0.1,
|
||||
0.1,
|
||||
MHelper.RANDOM
|
||||
);
|
||||
if (value < -0.6) return 0;
|
||||
if (value < -0.3) return 1;
|
||||
if (value < -0.5) return 2;
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,21 +9,21 @@ import ru.betterend.noise.OpenSimplexNoise;
|
|||
* Noise source that returns a value in [0, 4]
|
||||
*/
|
||||
public class UmbraSurfaceNoiseCondition implements NumericProvider {
|
||||
private static final OpenSimplexNoise NOISE = new OpenSimplexNoise(1512);
|
||||
private static final OpenSimplexNoise NOISE = new OpenSimplexNoise(1512);
|
||||
|
||||
@Override
|
||||
public int getNumber(SurfaceRulesContextAccessor context) {
|
||||
final int x = context.getBlockX();
|
||||
final int z = context.getBlockZ();
|
||||
final double value = NOISE.eval(x * 0.03, z * 0.03) + NOISE.eval(x * 0.1, z * 0.1) * 0.3 + MHelper.randRange(
|
||||
-0.1,
|
||||
0.1,
|
||||
MHelper.RANDOM
|
||||
);
|
||||
if (value > 0.4) return 0;
|
||||
if (value > 0.15) return 1;
|
||||
if (value > -0.15) return 2;
|
||||
if (value > -0.4) return 3;
|
||||
return 4;
|
||||
}
|
||||
@Override
|
||||
public int getNumber(SurfaceRulesContextAccessor context) {
|
||||
final int x = context.getBlockX();
|
||||
final int z = context.getBlockZ();
|
||||
final double value = NOISE.eval(x * 0.03, z * 0.03) + NOISE.eval(x * 0.1, z * 0.1) * 0.3 + MHelper.randRange(
|
||||
-0.1,
|
||||
0.1,
|
||||
MHelper.RANDOM
|
||||
);
|
||||
if (value > 0.4) return 0;
|
||||
if (value > 0.15) return 1;
|
||||
if (value > -0.15) return 2;
|
||||
if (value > -0.4) return 3;
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue