Create Ore Excavation

Create Ore Excavation

8M Downloads

Help KubeJS

louanfontenele opened this issue ยท 2 comments

commented

I would like to know how do I add to the drilling to excavate diamond and ancient debris infinitely using kubejs?

commented

I did it like this, is it correct?

ServerEvents.recipes(event => {
	//Drilling recipes (Items)
	//Spawning weight the bigger the number the higher chance to spawn.
	//See server config for empty chunk weight.
	//Arguments: output item(s), ore vein name in Text Component, spawning weight, extraction time in ticks at 32 RPM.
	event.recipes.createoreexcavation.drilling('minecraft:redstone', '{"text": "Redstone"}', 40, 100).alwaysInfinite().id("redstone");
	event.recipes.createoreexcavation.drilling('minecraft:diamond', '{"text": "Diamond"}', 35, 100).alwaysInfinite().id("diamond");
	event.recipes.createoreexcavation.drilling('minecraft:emerald', '{"text": "Emerald"}', 25, 100).alwaysInfinite().id("emerald");
	event.recipes.createoreexcavation.drilling('minecraft:ancient_debris', '{"text": "Ancient Debris"}', 20, 100).alwaysInfinite().id("ancientdebris");
	event.recipes.createoreexcavation.drilling('minecraft:netherite_ingot', '{"text": "Netherite"}', 10, 100).alwaysInfinite().id("netherite");
	
	//Coal vein with 5% chance for diamond and require a diamond drill and lava for drilling
	//Always finite 5x-8x base
	event.recipes.createoreexcavation.drilling([Item.of('minecraft:coal'), Item.of('minecraft:diamond').withChance(0.05)], '{"text": "My coal vein"}', 2, 1000).drill('createoreexcavation:diamond_drill').fluid('minecraft:lava').alwaysFinite().veinSize(5, 8).id("my_vein2");
	
	//Iron vein only in overworld and a stress requirement of 512 xRPM (default is 256 xRPM)
	//With a finite vein size between 3x-8.5x base (if finite veins are enabled)
	event.recipes.createoreexcavation.drilling('minecraft:raw_iron', '{"text": "My iron vein"}', 10, 100).veinSize(3, 8.5).biomeWhitelist('forge:is_overworld').stress(512).id("my_vein3");
	//biomeBlacklist is also available

	//Fluid extractor recipes (Fluids)
	event.recipes.createoreexcavation.extracting('minecraft:water 400', '{"text": "Water well"}', 10, 100).alwaysInfinite().id("water");
	event.recipes.createoreexcavation.extracting('minecraft:lava 400', '{"text": "Lava well"}', 10, 100).alwaysInfinite().id("lava");
	//The biome, stress and drill settings are the same as the drilling recipe
	
	//Set base value in config for finite veins
});

Tell me if it's correct
I want him to mine diamond and ancient debris

commented

Yes it's correct. You can use JEI to see if your vein recipes are loaded (Press U on the Drilling Machine).
Also the redstone, diamond and emerald recipes are built in by default, you don't have to add them.