KubeJS compat
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user