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.

Ernio

Forge Modder
  • Joined

  • Last visited

Everything posted by Ernio

  1. Buttons and anything that belongs to Gui stuff is CLIENT side. Doing anything directly in gui will change stuff only on client. To set stuff on server you need to setup packets that will send info that you clicked button and change ItemStack on server. Tricks: While being a normal player the network system (of ItemStack updates) is sided - updates go from server to client (always), thus cahnging on client will do nothing. BUT, the Vanilla has its own system that if the player is in creative mode - the ItemStacks updates are bipolar - that means if you change something in client - it will also change on server. Notes: You shouldn't allow any players to tell server what to do. Make sure your stuff will work securily and apply some limits. Links: http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/2137055-1-7-x-1-8-customizing-packet-handling-with Short: http://www.minecraftforge.net/forum/index.php/topic,20135.0.html
  2. If you would look into Forge you would notice that only loader (aside from .json and direct .java format) currently present is for B3D. Noone knows when .obj will be reimplemented and Fry seems to not be working on it at the moment (lookup his Git, he's dealing with B3D mainly). http://lmgtfy.com/?q=B3D%20exporter There are several scripts for Blender -> B3D.
  3. You need to make it. You create class with methods in it that have @SubscribeEvent on them. EDIT There are tons of tuts on how to use events. Look them up please.
  4. Forge has only access to LivingUpdates (LivingUpdateEvent), BUT there is also event that would allow you to get access to non-living entities. EntityEvent.CanUpdate Would allow you to run code when ANY Entity is being updated. Note that I have NO IDEA what will actually happen - never used it, but seems like it would work. @SubscribeEvent should work. You also need to register MyEvent.class FMLCommonHandler.instance().bus().register(new FMLEvents()); MinecraftForge.EVENT_BUS.register(new ForgeEvents()); Use one of those in preInit of common proxy. ("one of" - depending what events are you using, events can be recognized by package). EDIT If my wild idea (EntityEvent.CanUpdate) won't work - then you need to extend EntityItem as mentioned before. Only way
  5. @SubscribeEvent Not @EventHandler
  6. Next thing you know - everyone argues about short's size.
  7. Unless you know ASM, which is overkill, there is not. What is your goal - you might be able to use Events to do something.
  8. So there is this new (for me at least) interface "IInteractionObject". How does it go with Forge's system and GuiHandler? Looking at it - I don't really see forge's hooks in there. Should IInteractionObject be used oustide vanilla (for mods) or should I stay with GuiHandler and handle openings on my own?
  9. I shall leave problem to someone who knows oreDict better, before I say something stupid (I haven't used oreDict in a long while), sorry. If you won't find what you want - you can make recipes: leather -> customLeather and customLeather -> leather.
  10. Just so I understand correctly: You want that so player loots vanilla leather, crafts some other leather from it, and then uses this custom leather to craft stuff, yes? And what you want is to make other mods use your leather instead of vanillas? I just don't get it, logically speaking I see your problem as infinite loop: vanillas -> yours -> vanillas -> yours -> ...
  11. If your definition of "energy" is literally or close to what IC have, then for you as a person who is "newbie with forge" this is going to be really hard. Your best shot in even understanding how to code system like that is ONLY by looking at how redstone and/or IC's energy work. Once you understand how power flows through minecraft's 3d world via blocks (cables) - you might be able to start coding something - then you can come back here for direct help with code. Without that - we simply can't help you - the task you choosen is simply too difficult to just describe how-to in forum post. EDIT No, there are no tuts for stuff like that, it's advanced level. Yes, you should. Additionally: There are APIs for energy - why can't you use them?
  12. What help are you expecting? I mean - what do you need exacly? Have look at BC or IC code, or any other code.
  13. Spawn one EntityFX in middle of block and make it render expanding circle using OpenGL mad skillz or spawn shitload of small particles and make them move in every direction making a "circle". In both cases - do it client side and learn OpenGL. There is no "how-to" for this, sadly. :C
  14. In my opinion your best shot is to add 4 BakedQuads (or edit existing ones, explained in edit) like the chessboard does. 4 Quads as in: 1 and 2 digit on front and on back of item. As for textures - you have 2 options: Register 10 textures (atlas sprite) of every digit and use them to make BakedQuads OR use vanilla's Fonts - you can get number texture and draw it as Quad. Problem with layers is the fact that one item.json can have ONLY 5 layers (0-4). That is hardcoded. There might be possibility of editing it tho. "I've looked at the various options available, and from what I can see none of them are aware of which layer is being rendered at any given point" They kinda do. Every BakedQuad has tintIndex - that is your renderPass quad.getTintIndex() is the layerX used to bake quad from item.json. (I think this is what you are after) Sadly as mentioned before - you can only have 5 layers in item. EDIT I got lost in writing this. More clear answer - in getGeneralQuads() you can iterate through "baseItemModel.getGeneralQuads()" and check if BakedQuad has tint index of your layer (1st or 2nd digit). Then you can grab that Quad and change its texture. EDIT 2 Might be useful: front and back face of item is NORTH and SOUTH. (seems like always)
  15. Then sorry I can't help you. 1. Have you tried turning it off and on again? (Eclipse) 2. Do you have 'forgeSrc-...' in your Referenced Libraries? 3. Resetup your workspace: http://www.minecraftforge.net/forum/index.php/topic,14048.0.html
  16. Read my post again. Hint:
  17. net.minecraftforge.event.ServerChatEvent Check this import or import it manually.
  18. Hmm, I was wondering how the heck you managed to set it up in literally 1 min and 14 sec (not counting writing your post and reloading pages). Anyway - what version are you on? Tho I have no idea when that event was introduced, my bet is that it is not very old one, so if you have ancient MC version, you might be outdated. Other problem (more likely) is your workspace setup - are you sure your workspace is "working"?
  19. Can't really help you without your code, can we? "java.lang.IllegalArgumentException: n must be positive" Provide code or look deeply into that line.
  20. ClientChatReceivedEvent or ServerChatEvent or CommandEvent ...depending on what you need exacly. And yes - they do exist.
  21. Yup, thanks. int itemDamage; ... public NBTTagCompound writeToNBT(NBTTagCompound nbt) { ... nbt.setShort("Damage", (short)this.itemDamage); ... } And this is why I have trust issues with Vanilla ;_;
  22. I started coding something a while ago and totally forgot that - while Blocks have metadata that holds 16 states, item's metadata is actually whole damn Integer. I am currently saving few values (short and booleans) that can be packed into one int. I've never in my life used itemDamage (metadata) outside "the current durability of tool idea", question is - is it safe to use itemDamage for something that is not the durability (like, totally)? Up to this point I don't really see anything that might cause errors later, but just asking. Yes/No will suffice.
  23. Logical way would be to rewrite whole client's motion input (keyboard/mouse/keyBindings). You would also need to move and lock camera. This would obviously need coremodding (ASM) in order to work WELL. As to forge way (less or maybe no coremodding) - I think it would still be possible - there are events responsible for mouse and keyboard input. Changing camera is also possible - There are mods that do that, you could look at e.g Pixelmon Mod - does that during combat. Hardest part would be actually not applying your own code (because as mentioned - there are hooks for that), but removing vanillas code itself (thus ASM or other tricky ways). So if you want an opinion - yes it is possible and is not that super-hard, yet - it would need a good reason to do so and would most likely break most of stuff that include client input. Not recommended, if you want to play diablo, go play diablo. If you want "cool project" - I'd think of something easier for now, different at least - minecraft is FPS in 3D world, jumping in isometric view would be real pain.
  24. Not enough code. Need Main class and proxies most likely (block and item init). Use @Override annotation. If the client crashes right away (during launch) it's not fault of this particular method. Error is elsewhere.
  25. ResourceLocation points at location. You and/or anyonne else can put there anything they want. If they replace it - it will be replaced. "minecraft:" + location points at minecraft pack, "modid:" + location would point at some mod's assets. What is your question, because i don't see a problem. :c

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.