Jump to content

BrainFace

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by BrainFace

  1. So i tried this change and my inventory list doesnt contain air anymore but it still doesnt work.
  2. 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.
  3. I tried but i was not able to find the class. Could you tell me the name?
  4. And is there a way to set the slow the entity?
  5. Thanks for the fast answer. Seems to work.
  6. 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.
  7. Thanks again.
  8. 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();
  9. Now i'm having another problem. Now the positioning is odd. How could i correct it?
  10. Thanks diesieben07. Worked perfectly.
  11. 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.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.