Everything posted by chimera27
-
[1.7.2] {SOLVED!!} Using packets
Ok, that helps a bit, but how do I make a packet do something once it's sent, like say, spawn an entity?
-
Minecraft wont run
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.
-
[1.7.2] {SOLVED!!} Using packets
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
-
PlayerTickEvent behaving erratically
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...
-
PlayerTickEvent behaving erratically
Thanks! This makes a hell of a lot more sense then putting my item code in a tickhandler
-
[1.7.4] Need Help With Guns
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)
-
How to make a weapon [gun] fire faster than default speed?
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 )
-
PlayerTickEvent behaving erratically
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)
-
How to make a weapon [gun] fire faster than default speed?
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
-
[1.6.4>>1.7.2]Major problems updating mod from 1.6.4 to 1.7.2
It was already in ANSI
-
How to make a weapon [gun] fire faster than default speed?
Yep, if post your item class here I might be able to give you a better solution
-
[1.7.2] {SOLVED} Checking if a key is down every tick
I wish, I would have been done an hour ago
-
[1.7.2] {SOLVED} Checking if a key is down every tick
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?
-
[1.7.2] Player Overlay like Creeper when Powered
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.
-
[DEPRECATED][1.6.4] Unable to install 1.6.4 as part of mod recode to 1.7.2
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
-
[1.7.2] Dimensional teleporting, without the portals
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
-
[1.7.2] Player Overlay like Creeper when Powered
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?
-
[1.7.2] Drawing text
I'm wondering this too, Minecraft.GetMinecraft().fontRenderer is always null for me, and I don't know how to get it
-
How to make a weapon [gun] fire faster than default speed?
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.
-
[1.6.4>>1.7.2]Major problems updating mod from 1.6.4 to 1.7.2
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
-
[1.6.4>>1.7.2]Major problems updating mod from 1.6.4 to 1.7.2
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
-
[1.6.4>>1.7.2]Major problems updating mod from 1.6.4 to 1.7.2
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
-
[1.6.4>>1.7.2]Major problems updating mod from 1.6.4 to 1.7.2
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...
-
[1.6.4>>1.7.2]Major problems updating mod from 1.6.4 to 1.7.2
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?
-
How to make a weapon [gun] fire faster than default speed?
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)
IPS spam blocked by CleanTalk.