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