Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

7804364

Members
  • Joined

  • Last visited

Everything posted by 7804364

  1. This is really easy. Do a GuyOverlay that only displays a grey/textured rectangle when the 'u' key is pressed. I did it like this and it works great. To get a GuyOverlay working, youll have to creat a new class that has the following few things in it: public class YourOverlay extends Gui{ public YOurOverlay(Minecraft mc){ this.mc = mc; } @SubscribeEvent(priority = EventPriority.NORMAL) public void renderOverlay(RenderGameOverlayEvent event){ ScaledResolution scaledresolution = new ScaledResolution(this.mc, this.mc.displayWidth, this.mc.displayHeight); int k = scaledresolution.getScaledWidth(); int l = scaledresolution.getScaledHeight(); if (event.type != ElementType.ALL) { return; } if (Keyboard.isKeyDown(Keyboard.KEY_U)){ GL11.glPushMatrix(); //Your code here (Youll have to use k as width and l as height!!) GL11.glPopMatrix(); } } } Then youll have to define a new field in your ClientProxy and register the YourOverlay-class like this in your ClientProxy : private final Minecraft mc = Minecraft.getMinecraft(); MinecraftForge.EVENT_BUS.register(new YourOverlay(mc)); How do i setup a client proxie?
  2. i have this currently: @SubscribeEvent(priority= EventPriority.NORMAL, receiveCanceled=true) public void onEvent(LivingDropsEvent event) { random = new Random(); dropped = random.nextInt(2) + 1; if (event.entity instanceof EntityZombie) { zombieItem = random.nextInt(1); event.drops.clear(); switch (zombieItem) { case 0: ItemStack itemStoneSword = new ItemStack(Items.stone_sword, dropped); itemStoneSword.getAttributeModifiers(); event.drops.add(new EntityItem(event.entity.worldObj, event.entity.posX,event.entity.posY, event.entity.posZ, itemStoneSword)); break; case 1: ItemStack itemIronSword = new ItemStack(Items.iron_sword, dropped); itemIronSword.getAttributeModifiers(); event.drops.add(new EntityItem(event.entity.worldObj, event.entity.posX,event.entity.posY, event.entity.posZ, itemIronSword)); break; } } } But what i want to do is for the items that drop liek the stone_sword, i want it to have a random damage, and some things added in description that is different from other items.
  3. think you can give me fast example, a bit lost
  4. Hm ok, how do i use the modifers? where can i see a list of parameters?
  5. Ok awesome it works, but how do i add damage and maybe a description to the itemstack when its called? if (event.entity instanceof EntityZombie) { System.out.println("EntityZombie drops event"); event.drops.clear(); ItemStack itemStoneSword = new ItemStack(Items.stone_sword, 1); itemStoneSword.setItemDamage(10); event.drops.add(new EntityItem(event.entity.worldObj, event.entity.posX, event.entity.posY, event.entity.posZ, itemStoneSword)); }
  6. Ok so, package com.rpgframework.npc; import net.minecraft.entity.monster.EntityZombie; import net.minecraftforge.event.entity.living.LivingDropsEvent; import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; /** * Created by 7804364 on 2015-06-26. */ public final class DropHandler { @SubscribeEvent(priority= EventPriority.NORMAL, receiveCanceled=true) public void onEvent(LivingDropsEvent event) { if (event.entity instanceof EntityZombie) { System.out.println("EntityZombie drops event"); event.drops.clear(); } } } Even though its not being called from the main class, it will still be registered? How do i add a stone sword with edited properties liek damage?
  7. i made a new class package com.rpgframework.npc; import net.minecraft.entity.monster.EntityZombie; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.event.entity.living.LivingDropsEvent; import net.minecraftforge.fml.common.Mod; /** * Created by 7804364 on 2015-06-26. */ public final class DropHandler { @Mod.EventHandler public static void onEntityDrop(LivingDropsEvent event) { if(event.entityLiving instanceof EntityZombie) { event.entityLiving.entityDropItem(new ItemStack(Item.getItemById(272)), 1); } } } How would i call this from my main class???
  8. Ok i want to hit like the "u" key and a small little window with grey background and some text to pop up, ive followed any tutorials but none really helped for 1.8, i was wondering if someone can maybe point me in the right direction?
  9. Ok so i was wondering if it were to be possible for lets say, when a zombie dies, it has a chance to drop a stone sword, are we able to modify the stone swords properties for that drop? EX: i kill zombie, and there is an event register and it when it drops the stone sword is modifies the damage as a random float, and the name of it? so it can be like +10 damage? so monster loot has a chance for different and cooler stats?
  10. i had no idea im able to do this all in forge if i can make guis, and scoreboards on the screen then no need at all for spigot!
  11. pretty much, i have spigot 1.8 for forge 1.8, i have the gui, and i want to insert values obtained from a plugin.
  12. Ok so i made a gui that opens up when you press a button, it shots like level, exp, stats ect ect, how do i call these int variables from a plugin or must i set them for every player via the mod ?

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.