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.

coolboy4531

Members
  • Joined

  • Last visited

Everything posted by coolboy4531

  1. Is your object a Block or an Item? You decide.
  2. Thank you, I actually learned a lot with reflection. Now, here's the problem, I don't know how to implement it to the events. Too much .... Exceptions (NoSuchFieldException, IllegalArgumentException, etc.) idk. I feel so retarded.
  3. Okay, hold it. I need you to restate that, because my brain - just too much work and stress happenin' right now . So you are trying to tell me that the "instance" is the SRG name ("field_****")? If so, would Forge automatically change that when the srg name is changed - to the actual value instead of field_**** to (e.g. getBlockName() )? Also, how would I use it with the event? @SubscribeEvent public void onEntityJoinedWorld(EntityJoinWorldEvent event) { if (event.entity instanceof EntitySkeleton) { //what do I do here? //do I do -- Field.set(instance, value) -- ? } }
  4. Yep, made perfect sense Yeah, I was leaning towards that, I learned a few things about Java reflection but not so deep into that. If you can teach me a thing or two about how to replace that field, that would be greatful. (You don't have to show me like noob codes, just need to get some advice ) If you would like to know how little I know about reflection I'll be happy to show what I know. I know how to use "Field" to get the private value. public class RandomClass { private String s = "hi"; } public class RandomClazz { public static void main(String[] args) throws Exception { RandomClass randClass = new RandomClass (); Field f = randClass.getClass().getDeclaredField("s"); f.setAccessible(true); System.out.println(f.get(randClass)); } } In my opinion, I don't even THINK this would work, because it was a long time ago that I learned this
  5. Learnt how to change methods in ASM, was worth it. lol Now, I'm trying to learn how to change fields. They're probably extremely similar, and probably easy to grab on to but I don't know where to learn What I'm trying to do is lower the skeleton attack speed (I probably don't need to make a coremod, imo I don't know any alternatives) Converting: private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 20, 60, 15.0F); to private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 60, 60, 15.0F); Any suggestions?
  6. We can't do anything without your code. Base class, the items you use to craft the item, etc.
  7. Look dude, wrong forum. But I'll help you out *hint* version =/= Server Version *hint*
  8. You did what? No no no no no no no no no no no no no no no. NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO. lol, just don't edit base classes pls. Okay I'll help you with your item and block names, including your ores (I'm 100% positive they won't generate) What's the problem?
  9. Have you used NBT tags to save your inventory slots?
  10. Break points are to separate things (its kinda complex don't want to explain now) Switches are used to do different things if the value of what is inside the switch corresponds to your case. For example, you should make your code like this: switch(ID){ case mainRegistry.guiIDSaltFurnace: if(entity instanceof TileEntitySaltFurnace){ return new ContainerSaltFurnace(player.inventory, (TileEntitySaltFurnace) entity); } break; case mainRegistry.guiIDgrinder: if(entity instanceof TileEntityGrinder){ return new ContainerGrinder(player.inventory, (TileEntityGrinder) entity); } break; In my opinion, I think you 'ought to know more Java before jumping into complex things.
  11. You don't get your item object from Items, because you never put it in there (its for vanilla items). You have to get the item object, from your OWN main class. Give us code, please. It was hard to understand what you were talking about, without code of course.
  12. Misread, let me see what I can do.
  13. Then why do it? mainRegistry:guiIDgrinder What is this suppose to be? The ID of the block/item? Come on dude, you should know that IDs were removed in 1.7 and uses the Block/Item object itself. Also, never use @SupressWarnings("unused") or other things that you have NO IDEA does. Another thing is to use context clues ("unused") = not being used. So why do you think it says "Connection lost?" If you give me more information of what you are trying to do with your switches, then I'll gladly help you out
  14. PlayerInteractEvent is posted on the MinecraftForge bus not the FML bus. FML Bus = FMLCommonHandler.instance().bus() MinecraftForge Bus = MinecraftForge.EVENT_BUS In other words, use the MinecraftForge EventBus.
  15. player.openGui(ExampleMod.instance, 0, world, x, y,z); dafuq is this, you are calling your mods instance and then doing nothing?
  16. @SuppressWarnings("unused")
  17. Should work unless you are using the wrong color (hex). If you look into your BiomeGenBase you can look at the other biome's { .setColor(int) } Also, have you registered your Biome? If so, can I take a peek at it?
  18. Why the **** do you have 4 characters? _ ## Underscore, space, numbersign, numbersign?
  19. Use MinecraftForge events. PlayerEvent.ItemCraftedEvent - for crafting an item (applying the enchantment) TickEvents - for making the item enchanted no matter what (creative inventory, etc.)
  20. From what I remember, I don't think you need to set it. Completely remove: this.setLightOpacity(0);
  21. Dirt = new Achievement("Dirt", "Dirt", 0, 0, Blocks.dirt, null).registerAchievement(); Source files as in Vanilla Minecraft run: gradlew.bat setupDevWorkspace
  22. You don't OPEN gradlew.bat (you need to follow the instructions on this post) http://www.minecraftforge.net/forum/index.php/topic,14048.0.html

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.