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.

chimera27

Members
  • Joined

  • Last visited

Everything posted by chimera27

  1. Ok, that helps a bit, but how do I make a packet do something once it's sent, like say, spawn an entity?
  2. I noticed this in the log: 2014-04-22 22:18:22 [sEVERE] [ForgeModLoader] The minecraft jar file:/C:/Users/JERRY/.gradle/caches/minecraft/net/minecraftforge/forge/1.6.4-9.11.1.964/forge-1.6.4-9.11.1.964-mcp.jar!/net/minecraft/client/ClientBrandRetriever.class appears to be corrupt! There has been CRITICAL TAMPERING WITH MINECRAFT, it is highly unlikely minecraft will work! STOP NOW, get a clean copy and try again! I would do what it says and deobfuscate minecraft again with a clean copy.
  3. I'm not really sure how to use packets. I've followed this tutorial: http://www.minecraftforge.net/wiki/Tutorials/Packet_Handling I've set up a handler and such, yet I still don't know how to USE a packet. Can someone provide an explanation or example(even better) of how to use them?? (Note: It also tells me to register my channel handler with: EnumMap<Side, FMLEmbeddedChannel> channels = NetworkRegistry.INSTANCE.newChannel("MetroidChannel", new MetroidChannelHandler()); But I have no idea where i'm supposed to register it.) Sorry if i'm being stupid or missing something obvious here, but I've looked around a bit and haven't been able to really find anything on this
  4. I transferred it into my items onUpdate method, and it's still acting the same as it was, spawning the projectile about half the time and getting exactly as far as it did before when it doesn't... I'm probs REALLY stupid for having to ask this but what do I need to use packets for? I'm really not 100% sure what I would be telling the server that it doesn't already know, the bullets that DO spawn do damage to mobs, which do die and drop their items... EDIT: Confirmed, i'm an idiot. The reason the entities are spawning half the time is because the other half the world is remote, meaning i'd have to send packets to the server those times, right? Time to set up a packet handler... Still not sure what differentiates the times where the world is and isn't remote, seems arbitrary to me...
  5. Thanks! This makes a hell of a lot more sense then putting my item code in a tickhandler
  6. There are plenty of good tutorials on how to set up a client proxy, also you have to make a renderer for your bullet for it to be visible (Again, plenty of tutorials on how to do that)
  7. Doesn't that slow the player down while they're firing though? Not sure if that's be a problem, just wondering... Also I have a setup that uses the code I showed to spawn entities and it works (it's a bit erratic though and only seems to run through the code completely half the time, but I don't think it's because of that.... Could be wrong though, I suck at this )
  8. I was having trouble getting an item to do some things, namely change state via keypress and not slow down the player when they are charging it, so I (probably stupidly) moved alot of it's code to my PlayerTickHandler class and had it run if the player held the item and was right clicking/pressing the right button. I immediately ran into a problem. Much of the code I have set to run on the occasions specified will sometimes only run part of the way through only SOMETIMES. Here's the first set of code, it is called when the player has the item in their hand and right click. I have some debug messages in it and it will either stop after initializing all the projectiles, or go all the way through: The second set of code (relating to changing a variable called mode depending on different keybinds) behaves the EXACT same way as the first, only working about half the time. Anyone know what the heck is causing this, or a better solution I could use instead of moving the code to my playertickhandler? (Keeping the code in my item class isn't an option as far as I know, as the only time onStoppedUsingItem is called is when the player stopped 'using' it, which means the player must start 'using' it, which slows down the player while they're 'using' it. I've tried to stop or counter this slowdown by boosting the players speed, and using player.setEating(false);, both to no avail)
  9. Huh, I thought that ran every tick... Well there is another method, but this one is more complicated. You have to use a tickhandler to check if your player is holding your item and right clicking, and if so spawn the bullet and do the stuff. Here's a snippit of code as an example (this would be in your tickhandler): //Make sure the player is holding an item if (player.getHeldItem() != null) { //Make sure that item is your item if (player.getHeldItem().getItem() instanceof YOURITEM) { //Cast the held item to your item so you can do stuff with it youritem = (YOURITEM) player.getHeldItem().getItem(); if(Mouse.isButtonDown(1)){ //Spawn the bullets here, logic to wait X ticks between shots goes here too //You also have access to the instance of your item the player is holding here, so you //can modify variables and such } } } EDIT: It MIGHT be a little buggy depending on your setup, should work though
  10. Yep, if post your item class here I might be able to give you a better solution
  11. I wish, I would have been done an hour ago
  12. I was wondering if there was a way to check if a key is down every tick. The reason I need to do this is because there are a few weapons in my mod that do things if a player is holding a button. The keypressed event only updates the keybindings every time a key is pressed, and for some reason if I use TickEvent it thinks the keys never get pressed. Anyone know how to check them every tick?
  13. The easiest way to do this IMO would be to make a custom armor renderer (you can find out how to do that here: http://www.minecraftforum.net/topic/2001807-164how-to-code-custom-3d-armor-models-tutorial-by-senpaisubaraki/) Just make a model of how you want the texture to overlay over the player, and use (a slightly modified) version of that texture with it. That tutorial should have everything you need.
  14. I would recommend just going straight to 1.7.2, as alot of things have changed and it will be even more confusing if you get used to 1.6.4 again. Most 1.6.4 tutorials have details on how to update that code to 1.7.2, so it really doesn't end up being that forign
  15. You could do what Godis_apan said and add code to delete the portal as soon as it spawns, not an elegant solution but it might work
  16. There are a few different methods of doing it depending on when it should happen. When do you want the player to have the effect?
  17. I'm wondering this too, Minecraft.GetMinecraft().fontRenderer is always null for me, and I don't know how to get it
  18. 80 times a second? What do you need that kind of speed for... I think I have a workaround solution though.... Say you want to make it fire every half tick, you could make it spawn 2 nearly identical projectiles every tick, one of which would have special code in it's onupdate meathod to move it forward half the difference it would travel in a tick as soon as it spawns, staggering them. This technique could be modified for any RoF you need.
  19. Wouldn't that just open the chat? The problem happens if there is a chat message on-screen like this: http://imgur.com/RexPHgB.png and the overlay is trying to render. THEN it blacks out like I showed above. (The only reason it isn't in this picture is because I disabled the overlay so I could get a screenshot) As soon as the chat message fades, the screen is visible again
  20. It rendered over the game like it was supposed to, except when there was chat displayed, then it looked like this http://imgur.com/ZcgG7c4.png
  21. Changing the type from RenderTickEvent to RenderGameOverlayEvent (and registering it with the minecraft forge event bus instead of the fml one) makes it ALWAYS black with the overlay when you have the helmet on
  22. Here's the classes for the items I showed: ItemBeam (This one's massive, sorry....) ItemCircuit ItemLightCrystal The weird thing about the keybinding is that all the others work, just not that one...
  23. I'm currently in the process of updating my mod to 1.7.2. But, along the way, i've encountered some problems that I don't really know what's going wrong or how to fix, and that searching the internet has so far been little help with. First, my lang file isn't working for any items except one, and I have no idea why. Here's the a snippit of the files showing what I mean: Declaration: Registration: Lang entries: In this, only itembeam is having its name localized, and I don't know what's different between the three. Another thing that I can't figure out is one of my keybinds is deciding to not work. Again, I can't find a difference between it and the others: Keybindings class KeyBindingHandler class The only one that doesn't work is missile, no code that uses it responds to keypresses, (the others do), and I know it's not even registering because it's not in the list of keybinds in the settings menu (all the others are) Next, I have a HUD overlay that is applied when the player is wearing a helmet from my mod. Again, for reasons I have yet to find, whenever there is a chat messsage displayed and i'm not in the chat interface (IE if I use player.addChatMessage(); ) The screen goes completely black except for the overlay is still shown over the black, and I have no idea why. Here's my renderHUD class: Which is registered via: FMLCommonHandler.instance().bus().register(new RenderHUD()); in my clientproxy I've been trying to fix these for quite a while now, with no luck. Anybody know what I did wrong?
  24. Is it just a singular item that's shooting it, or a consumable? If it's a singluar item then if the shooting is happening in the items onUsingTick method I think that's the fastest it can get, seeing it's called every tick and you can't really do anything between ticks... (Could be wrong though)

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.