diff options
| author | Unknown <shekwancheung0528@gmail.com> | 2019-03-29 00:26:28 +0800 |
|---|---|---|
| committer | Unknown <shekwancheung0528@gmail.com> | 2019-03-29 00:26:28 +0800 |
| commit | d5b270a829f5488ba6ab72778745da1f64769ff8 (patch) | |
| tree | d9a54849b1c1d2e55ad38baa5d8055a5fcdf9617 /src/main/java/me/shedaniel/rei/plugin | |
| parent | ef6b2038f1aae2659e98e503324fb2aee85c1d2b (diff) | |
| download | RoughlyEnoughItems-d5b270a829f5488ba6ab72778745da1f64769ff8.tar.gz RoughlyEnoughItems-d5b270a829f5488ba6ab72778745da1f64769ff8.tar.bz2 RoughlyEnoughItems-d5b270a829f5488ba6ab72778745da1f64769ff8.zip | |
Update to 19w13a
Diffstat (limited to 'src/main/java/me/shedaniel/rei/plugin')
8 files changed, 26 insertions, 26 deletions
diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultBlastingCategory.java b/src/main/java/me/shedaniel/rei/plugin/DefaultBlastingCategory.java index 6da79d504..e407a19f7 100644 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultBlastingCategory.java +++ b/src/main/java/me/shedaniel/rei/plugin/DefaultBlastingCategory.java @@ -49,11 +49,11 @@ public class DefaultBlastingCategory implements RecipeCategory<DefaultBlastingDi GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); GuiLighting.disable(); MinecraftClient.getInstance().getTextureManager().bindTexture(DISPLAY_TEXTURE); - drawTexturedRect(startPoint.x, startPoint.y, 0, 54, 82, 54); + blit(startPoint.x, startPoint.y, 0, 54, 82, 54); int height = MathHelper.ceil((System.currentTimeMillis() / 250 % 14d) / 1f); - drawTexturedRect(startPoint.x + 2, startPoint.y + 21 + (14 - height), 82, 77 + (14 - height), 14, height); + blit(startPoint.x + 2, startPoint.y + 21 + (14 - height), 82, 77 + (14 - height), 14, height); int width = MathHelper.ceil((System.currentTimeMillis() / 250 % 24d) / 1f); - drawTexturedRect(startPoint.x + 24, startPoint.y + 18, 82, 91, width, 17); + blit(startPoint.x + 24, startPoint.y + 18, 82, 91, width, 17); } })); List<List<ItemStack>> input = recipeDisplay.getInput(); diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultBrewingCategory.java b/src/main/java/me/shedaniel/rei/plugin/DefaultBrewingCategory.java index 235170633..1cc7dc424 100644 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultBrewingCategory.java +++ b/src/main/java/me/shedaniel/rei/plugin/DefaultBrewingCategory.java @@ -50,9 +50,9 @@ public class DefaultBrewingCategory implements RecipeCategory<DefaultBrewingDisp GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); GuiLighting.disable(); MinecraftClient.getInstance().getTextureManager().bindTexture(DISPLAY_TEXTURE); - drawTexturedRect(startPoint.x, startPoint.y, 0, 108, 103, 59); + blit(startPoint.x, startPoint.y, 0, 108, 103, 59); int width = MathHelper.ceil((System.currentTimeMillis() / 250 % 18d) / 1f); - drawTexturedRect(startPoint.x + 44, startPoint.y + 28, 103, 163, width, 4); + blit(startPoint.x + 44, startPoint.y + 28, 103, 163, width, 4); } })); widgets.add(new ItemSlotWidget(startPoint.x + 1, startPoint.y + 1, Arrays.asList(new ItemStack(Items.BLAZE_POWDER)), false, true, true)); diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultCampfireCategory.java b/src/main/java/me/shedaniel/rei/plugin/DefaultCampfireCategory.java index 694393a10..425edcfd0 100644 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultCampfireCategory.java +++ b/src/main/java/me/shedaniel/rei/plugin/DefaultCampfireCategory.java @@ -48,11 +48,11 @@ public class DefaultCampfireCategory implements RecipeCategory<DefaultCampfireDi GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); GuiLighting.disable(); MinecraftClient.getInstance().getTextureManager().bindTexture(DISPLAY_TEXTURE); - drawTexturedRect(startPoint.x, startPoint.y, 0, 167, 82, 54); + blit(startPoint.x, startPoint.y, 0, 167, 82, 54); int height = MathHelper.ceil((System.currentTimeMillis() / 250 % 14d) / 1f); - drawTexturedRect(startPoint.x + 2, startPoint.y + 31 + (14 - height), 82, 77 + (14 - height), 14, height); + blit(startPoint.x + 2, startPoint.y + 31 + (14 - height), 82, 77 + (14 - height), 14, height); int width = MathHelper.ceil((System.currentTimeMillis() / 250 % 24d) / 1f); - drawTexturedRect(startPoint.x + 24, startPoint.y + 18, 82, 91, width, 17); + blit(startPoint.x + 24, startPoint.y + 18, 82, 91, width, 17); String text = I18n.translate("category.rei.campfire.time", MathHelper.floor(recipeDisplaySupplier.get().getCookTime() / 20d)); int length = MinecraftClient.getInstance().textRenderer.getStringWidth(text); MinecraftClient.getInstance().textRenderer.draw(text, bounds.x + bounds.width - length - 5, startPoint.y + 54 - 8, 4210752); diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultCraftingCategory.java b/src/main/java/me/shedaniel/rei/plugin/DefaultCraftingCategory.java index e26e25412..5f69049a8 100644 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultCraftingCategory.java +++ b/src/main/java/me/shedaniel/rei/plugin/DefaultCraftingCategory.java @@ -48,7 +48,7 @@ public class DefaultCraftingCategory implements RecipeCategory<DefaultCraftingDi GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); GuiLighting.disable(); MinecraftClient.getInstance().getTextureManager().bindTexture(DISPLAY_TEXTURE); - drawTexturedRect(startPoint.x, startPoint.y, 0, 0, 116, 54); + blit(startPoint.x, startPoint.y, 0, 0, 116, 54); } })); List<List<ItemStack>> input = recipeDisplaySupplier.get().getInput(); diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java b/src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java index b74f97911..139d46485 100644 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java +++ b/src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java @@ -3,7 +3,7 @@ package me.shedaniel.rei.plugin; import com.google.common.collect.Lists; import me.shedaniel.rei.RoughlyEnoughItemsCore; import me.shedaniel.rei.api.*; -import me.shedaniel.rei.mixin.GhostSlotsHook; +import me.shedaniel.rei.listeners.GhostSlotsHooks; import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.Screen; import net.minecraft.client.gui.container.BlastFurnaceScreen; @@ -137,12 +137,12 @@ public class DefaultPlugin implements REIPlugin { if (!recipe.getRecipe().isPresent()) return false; if (screen.getClass().isAssignableFrom(CraftingTableScreen.class)) - ((GhostSlotsHook) (((CraftingTableScreen) screen).getRecipeBookGui())).rei_getGhostSlots().reset(); + ((GhostSlotsHooks) (((CraftingTableScreen) screen).getRecipeBookGui())).rei_getGhostSlots().reset(); else if (screen.getClass().isAssignableFrom(PlayerInventoryScreen.class)) - ((GhostSlotsHook) (((PlayerInventoryScreen) screen).getRecipeBookGui())).rei_getGhostSlots().reset(); + ((GhostSlotsHooks) (((PlayerInventoryScreen) screen).getRecipeBookGui())).rei_getGhostSlots().reset(); else return false; - MinecraftClient.getInstance().interactionManager.clickRecipe(MinecraftClient.getInstance().player.container.syncId, (Recipe) recipe.getRecipe().get(), Screen.isShiftPressed()); + MinecraftClient.getInstance().interactionManager.clickRecipe(MinecraftClient.getInstance().player.container.syncId, (Recipe) recipe.getRecipe().get(), Screen.hasShiftDown()); return true; } @@ -162,10 +162,10 @@ public class DefaultPlugin implements REIPlugin { if (!recipe.getRecipe().isPresent()) return false; if (screen instanceof FurnaceScreen) - ((GhostSlotsHook) (((FurnaceScreen) screen).getRecipeBookGui())).rei_getGhostSlots().reset(); + ((GhostSlotsHooks) (((FurnaceScreen) screen).getRecipeBookGui())).rei_getGhostSlots().reset(); else return false; - MinecraftClient.getInstance().interactionManager.clickRecipe(MinecraftClient.getInstance().player.container.syncId, (Recipe) recipe.getRecipe().get(), Screen.isShiftPressed()); + MinecraftClient.getInstance().interactionManager.clickRecipe(MinecraftClient.getInstance().player.container.syncId, (Recipe) recipe.getRecipe().get(), Screen.hasShiftDown()); return true; } @@ -185,10 +185,10 @@ public class DefaultPlugin implements REIPlugin { if (!recipe.getRecipe().isPresent()) return false; if (screen instanceof SmokerScreen) - ((GhostSlotsHook) (((SmokerScreen) screen).getRecipeBookGui())).rei_getGhostSlots().reset(); + ((GhostSlotsHooks) (((SmokerScreen) screen).getRecipeBookGui())).rei_getGhostSlots().reset(); else return false; - MinecraftClient.getInstance().interactionManager.clickRecipe(MinecraftClient.getInstance().player.container.syncId, (Recipe) recipe.getRecipe().get(), Screen.isShiftPressed()); + MinecraftClient.getInstance().interactionManager.clickRecipe(MinecraftClient.getInstance().player.container.syncId, (Recipe) recipe.getRecipe().get(), Screen.hasShiftDown()); return true; } @@ -213,10 +213,10 @@ public class DefaultPlugin implements REIPlugin { if (!recipe.getRecipe().isPresent()) return false; if (screen instanceof BlastFurnaceScreen) - ((GhostSlotsHook) (((BlastFurnaceScreen) screen).getRecipeBookGui())).rei_getGhostSlots().reset(); + ((GhostSlotsHooks) (((BlastFurnaceScreen) screen).getRecipeBookGui())).rei_getGhostSlots().reset(); else return false; - MinecraftClient.getInstance().interactionManager.clickRecipe(MinecraftClient.getInstance().player.container.syncId, (Recipe) recipe.getRecipe().get(), Screen.isShiftPressed()); + MinecraftClient.getInstance().interactionManager.clickRecipe(MinecraftClient.getInstance().player.container.syncId, (Recipe) recipe.getRecipe().get(), Screen.hasShiftDown()); return true; } }); diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultSmeltingCategory.java b/src/main/java/me/shedaniel/rei/plugin/DefaultSmeltingCategory.java index 222ad724d..32e0240d0 100644 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultSmeltingCategory.java +++ b/src/main/java/me/shedaniel/rei/plugin/DefaultSmeltingCategory.java @@ -48,11 +48,11 @@ public class DefaultSmeltingCategory implements RecipeCategory<DefaultSmeltingDi GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); GuiLighting.disable(); MinecraftClient.getInstance().getTextureManager().bindTexture(DISPLAY_TEXTURE); - drawTexturedRect(startPoint.x, startPoint.y, 0, 54, 82, 54); + blit(startPoint.x, startPoint.y, 0, 54, 82, 54); int height = MathHelper.ceil((System.currentTimeMillis() / 250 % 14d) / 1f); - drawTexturedRect(startPoint.x + 2, startPoint.y + 21 + (14 - height), 82, 77 + (14 - height), 14, height); + blit(startPoint.x + 2, startPoint.y + 21 + (14 - height), 82, 77 + (14 - height), 14, height); int width = MathHelper.ceil((System.currentTimeMillis() / 250 % 24d) / 1f); - drawTexturedRect(startPoint.x + 24, startPoint.y + 18, 82, 91, width, 17); + blit(startPoint.x + 24, startPoint.y + 18, 82, 91, width, 17); } })); List<List<ItemStack>> input = recipeDisplaySupplier.get().getInput(); diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultSmokingCategory.java b/src/main/java/me/shedaniel/rei/plugin/DefaultSmokingCategory.java index 6e6def9c2..cf5be6f19 100644 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultSmokingCategory.java +++ b/src/main/java/me/shedaniel/rei/plugin/DefaultSmokingCategory.java @@ -48,11 +48,11 @@ public class DefaultSmokingCategory implements RecipeCategory<DefaultSmokingDisp GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); GuiLighting.disable(); MinecraftClient.getInstance().getTextureManager().bindTexture(DISPLAY_TEXTURE); - drawTexturedRect(startPoint.x, startPoint.y, 0, 54, 82, 54); + blit(startPoint.x, startPoint.y, 0, 54, 82, 54); int height = MathHelper.ceil((System.currentTimeMillis() / 250 % 14d) / 1f); - drawTexturedRect(startPoint.x + 2, startPoint.y + 21 + (14 - height), 82, 77 + (14 - height), 14, height); + blit(startPoint.x + 2, startPoint.y + 21 + (14 - height), 82, 77 + (14 - height), 14, height); int width = MathHelper.ceil((System.currentTimeMillis() / 250 % 24d) / 1f); - drawTexturedRect(startPoint.x + 24, startPoint.y + 18, 82, 91, width, 17); + blit(startPoint.x + 24, startPoint.y + 18, 82, 91, width, 17); } })); List<List<ItemStack>> input = recipeDisplaySupplier.get().getInput(); diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultStoneCuttingCategory.java b/src/main/java/me/shedaniel/rei/plugin/DefaultStoneCuttingCategory.java index a874f9f1f..6dd5b40bd 100644 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultStoneCuttingCategory.java +++ b/src/main/java/me/shedaniel/rei/plugin/DefaultStoneCuttingCategory.java @@ -47,7 +47,7 @@ public class DefaultStoneCuttingCategory implements RecipeCategory<DefaultStoneC GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); GuiLighting.disable(); MinecraftClient.getInstance().getTextureManager().bindTexture(DISPLAY_TEXTURE); - drawTexturedRect(startPoint.x, startPoint.y, 0, 221, 82, 26); + blit(startPoint.x, startPoint.y, 0, 221, 82, 26); } })); widgets.add(new ItemSlotWidget(startPoint.x + 4, startPoint.y + 5, recipeDisplaySupplier.get().getInput().get(0), true, true, true)); |
