KubeJS compat

This commit is contained in:
2025-04-13 13:02:59 +02:00
parent f93f35b67a
commit c5412e404c
23 changed files with 502 additions and 37 deletions

View File

@@ -0,0 +1,18 @@
package com.oierbravo.mechanicals.utility;
import com.simibubi.create.AllShapes;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.phys.shapes.VoxelShape;
public class MechanicalShapes {
private static AllShapes.Builder shape(VoxelShape shape) {
return new AllShapes.Builder(shape);
}
private static AllShapes.Builder shape(double x1, double y1, double z1, double x2, double y2, double z2) {
return shape(cuboid(x1, y1, z1, x2, y2, z2));
}
private static VoxelShape cuboid(double x1, double y1, double z1, double x2, double y2, double z2) {
return Block.box(x1, y1, z1, x2, y2, z2);
}
}

View File

@@ -18,4 +18,12 @@ public class RegistrateLangBuilder {
registrate.addRawLang(literal,defaultTranslation);
return this;
}
public RegistrateLangBuilder addBlockTooltip(String id, String defaultTranslation){
registrate.addRawLang("block." + namespace + "." + id + ".tooltip",defaultTranslation);
return this;
}
public RegistrateLangBuilder addBlockTooltipSummary(String id, String defaultTranslation){
registrate.addRawLang("block." + namespace + "." + id + ".tooltip.summary",defaultTranslation);
return this;
}
}