-
[1.12.2] Test if Inventory contains multiple Items
So i tried this change and my inventory list doesnt contain air anymore but it still doesnt work.
-
[1.12.2] Test if Inventory contains multiple Items
I'm having the following problem, i'm trying to create a Witchery like cauldron and i need to check wether multiple Items (saved in a list) are contained in another list. List<ItemStack> items = new ArrayList<ItemStack>(); for (int i = 0; i < tile.getInventory().getSlots(); i++){ if (tile.getItem().getStackInSlot(i) != new ItemStack(Items.AIR)){ items.add(tile.getItem().getStackInSlot(i)); } } if (items.containsAll(recipe.catalysator)) { // TODO } The recipe.catalysator is a list that contains one item and the same item is also in the inventory.
-
[1.12.2] Custom Potion doesnt perform effect
I tried but i was not able to find the class. Could you tell me the name?
-
[1.12.2] Custom Potion doesnt perform effect
And is there a way to set the slow the entity?
-
[1.12.2] Custom Potion doesnt perform effect
Thanks for the fast answer. Seems to work.
-
[1.12.2] Custom Potion doesnt perform effect
So i'm creating a potion and i register it and i can give me the new effect but the performEffect function doesn't get executed. My Potion: @Override public void performEffect(EntityLivingBase entityLivingBaseIn, int amplifier) { System.out.println("effect"); } My ModPotions class for registration: public static PotionFreeze freeze = new PotionFreeze(true, 0); public static void register(IForgeRegistry<Potion> registry) { registry.registerAll( freeze ); } Here it gets called: @Mod.EventBusSubscriber public static class RegistrationHandler { @SubscribeEvent public static void registerPotions(RegistryEvent.Register<Potion> event) { System.out.println("Potions registered"); ModPotions.register(event.getRegistry()); } } Thanks.
-
[1.12.1] Scaling Sprite in GUI Overlay
Thanks again.
-
[1.12.1] Scaling Sprite in GUI Overlay
So normally when i position the sprite at 100, 100 its near the middle and if i scale it its almost in the corner. GL11.glPushMatrix(); GlStateManager.color(1, 1, 1, 1); Minecraft.getMinecraft().getTextureManager().bindTexture(MANA_ICON); GL11.glScalef(0.06f, 0.06f, 0.06f); drawTexturedModalRect(100, 100, 0, 0, 256, 256); GL11.glPopMatrix();
-
[1.12.1] Scaling Sprite in GUI Overlay
Now i'm having another problem. Now the positioning is odd. How could i correct it?
-
[1.12.1] Scaling Sprite in GUI Overlay
Thanks diesieben07. Worked perfectly.
-
[1.12.1] Scaling Sprite in GUI Overlay
So i'm trying to display a small icon in a GUI (resolution 16x16) on the same size as the hearts of the health bar. But using the Gl11.scalef() function also scales the infentory gui. What would be the proper way to do this? GlStateManager.color(1, 1, 1, 1); mc.getTextureManager().bindTexture(MANA_ICON); GL11.glScalef(0.1f, 0.1f, 0.1f); drawTexturedModalRect(30, 30, 0, 0, 256, 256); Thanks in advance.
IPS spam blocked by CleanTalk.