Skip to content

Crafttweaker Ore Cluster

pWn3d1337 edited this page Jul 30, 2022 · 8 revisions

From version 2.0.1.3 onwards Ore Clusters can be manipulated with crafttweaker

imports:
import mods.techguns.OreCluster;

for adding/removing ore there are 4 exposed functions: https://github.com/pWn3d1337/Techguns2/blob/master/src/main/java/techguns/plugins/crafttweaker/OreClusterTweaker.java#L25-L43
OreCluster.addOre(String clustertype, IItemStack ore, int weight);
OreCluster.addFluid(String clustertype, ILiquidStack fluid, int weight);
OreCluster.removeOre(String clustertype, IItemStack ore);
OreCluster.removeFluid(String clustertype, ILiquidStack fluid);

The ore cluster types are defined here: https://github.com/pWn3d1337/Techguns2/blob/master/src/main/java/techguns/blocks/EnumOreClusterType.java#L5-L13
those values are passed as string: "COAL", "COMMON_METAL", ...

Examples:

OreCluster.addOre("COAL", <minecraft:planks>, 5);

For weight reference, see the default implementation: https://github.com/pWn3d1337/Techguns2/blob/master/src/main/java/techguns/TGOreClusters.java#L45-L86

Clone this wiki locally