Skip to content

Commit ce6327c

Browse files
committed
Allow namespaces on AbstractCraftingMultiblockBlockEntity
1 parent 5c91622 commit ce6327c

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/main/java/aztech/modern_industrialization/machines/blockentities/multiblocks/AbstractCraftingMultiblockBlockEntity.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,13 @@
3535
import aztech.modern_industrialization.machines.multiblocks.ShapeMatcher;
3636
import aztech.modern_industrialization.machines.multiblocks.ShapeTemplate;
3737
import aztech.modern_industrialization.util.Tickable;
38+
import net.minecraft.resources.ResourceLocation;
3839

3940
public abstract class AbstractCraftingMultiblockBlockEntity extends MultiblockMachineBlockEntity implements Tickable,
4041
MultiblockInventoryComponentHolder, CrafterComponentHolder {
41-
public AbstractCraftingMultiblockBlockEntity(BEP bep, String name, OrientationComponent.Params orientationParams,
42+
private AbstractCraftingMultiblockBlockEntity(BEP bep, MachineGuiParameters.Builder guiParams, OrientationComponent.Params orientationParams,
4243
ShapeTemplate[] shapeTemplates) {
43-
super(bep, new MachineGuiParameters.Builder(name, false).backgroundHeight(200).build(), orientationParams);
44+
super(bep, guiParams.backgroundHeight(200).build(), orientationParams);
4445

4546
this.activeShape = new ActiveShapeComponent(shapeTemplates);
4647
this.inventory = new MultiblockInventoryComponent();
@@ -50,6 +51,16 @@ public AbstractCraftingMultiblockBlockEntity(BEP bep, String name, OrientationCo
5051
registerComponents(activeShape, crafter, isActive);
5152
}
5253

54+
public AbstractCraftingMultiblockBlockEntity(BEP bep, String name, OrientationComponent.Params orientationParams,
55+
ShapeTemplate[] shapeTemplates) {
56+
this(bep, new MachineGuiParameters.Builder(name, false), orientationParams, shapeTemplates);
57+
}
58+
59+
public AbstractCraftingMultiblockBlockEntity(BEP bep, ResourceLocation blockId, OrientationComponent.Params orientationParams,
60+
ShapeTemplate[] shapeTemplates) {
61+
this(bep, new MachineGuiParameters.Builder(blockId, false), orientationParams, shapeTemplates);
62+
}
63+
5364
/**
5465
* Only called once in the constructor to allow for inner classes in subclasses.
5566
*/

0 commit comments

Comments
 (0)