MOre fixed warnings

This commit is contained in:
drcrazy 2017-10-01 03:15:58 +03:00
parent 1c95ca4967
commit 1c57bd0100
5 changed files with 6 additions and 6 deletions

View file

@ -130,8 +130,8 @@ public class GuiAutoCrafting extends GuiBase {
}
if (recipe instanceof ShapedOreRecipe) {
ShapedOreRecipe shapedrecipes = (ShapedOreRecipe) recipe;
recipeWidth = shapedrecipes.getWidth();
recipeHeight = shapedrecipes.getHeight();
recipeWidth = shapedrecipes.getRecipeWidth();
recipeHeight = shapedrecipes.getRecipeHeight();
}
Iterator<Ingredient> ingredients = recipe.getIngredients().iterator();
for (int rHeight = 0; rHeight < recipeHeight; ++rHeight) {

View file

@ -48,6 +48,7 @@ public abstract class GuiWidget<T extends Container> extends GuiContainer {
this.background = background;
}
@SuppressWarnings("unchecked")
public T getContainer() {
return (T) inventorySlots;
}

View file

@ -57,7 +57,7 @@ public abstract class Widget {
this.toolTip = toolTip;
}
public final void drawWidget(GuiWidget gui, int cornerX, int cornerY, int mouseX, int mouseY) {
public final void drawWidget(GuiWidget<?> gui, int cornerX, int cornerY, int mouseX, int mouseY) {
int drawX = cornerX + x;
int drawY = cornerY + y;
if (toolTip != null && drawX > mouseX && drawY > mouseY &&
@ -69,6 +69,6 @@ public abstract class Widget {
protected abstract void draw(GuiScreen guiScreen, int x, int y);
protected abstract void mouseClick(GuiWidget guiWidget, int mouseX, int mouseY);
protected abstract void mouseClick(GuiWidget<?> guiWidget, int mouseX, int mouseY);
}