Update JEI integration
This commit is contained in:
parent
cb096ae6a8
commit
ddd0108a90
@ -42,10 +42,25 @@ public class SiegeWorkbenchRecipeCategory implements IRecipeCategory<SiegeWorkbe
|
|||||||
return Component.translatable("category." + SiegeMachines.ID + ".siege_workbench_crafting");
|
return Component.translatable("category." + SiegeMachines.ID + ".siege_workbench_crafting");
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Override
|
@Override
|
||||||
// public IDrawable getBackground() {
|
public int getWidth() {
|
||||||
// return this.background;
|
IDrawable background = this.background;
|
||||||
// }
|
if (background == null) {
|
||||||
|
throw new IllegalStateException("getWidth() and getHeight() must be overridden if background is null");
|
||||||
|
} else {
|
||||||
|
return background.getWidth();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getHeight() {
|
||||||
|
IDrawable background = this.background;
|
||||||
|
if (background == null) {
|
||||||
|
throw new IllegalStateException("getWidth() and getHeight() must be overridden if background is null");
|
||||||
|
} else {
|
||||||
|
return background.getHeight();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IDrawable getIcon() {
|
public IDrawable getIcon() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user