
deadrecon98
Forge Modder-
Posts
316 -
Joined
Everything posted by deadrecon98
-
I have made an Item Model but no matter what I do the model renders sideways. Does anyone have a solution? (Render) GL11.glPushMatrix(); GL11.glScalef(0.5F, 0.3F, 0.3F); GL11.glTranslatef(0.5F, 1.5F, -0.15F); GL11.glRotatef(180F, 0F, 5F, -5F); Minecraft.getMinecraft().renderEngine.bindTexture(tex); model.renderModel(.0625F); GL11.glPopMatrix();
-
[SOLVED] [1.6.4] Keybinds, remove conflicts?
deadrecon98 replied to deadrecon98's topic in Modder Support
Nevermind everyone, I fixed it. It was an issue in my ClientTickHandler. Thank every one of you for helping me! +1 to all of you! -
[SOLVED] [1.6.4] Keybinds, remove conflicts?
deadrecon98 replied to deadrecon98's topic in Modder Support
It does not fire every 100 times a second, I meant the keybind will be fired every fired 100 times a second. I am using this as a limiter to how often the bullets can be shot. -
[SOLVED] [1.6.4] Keybinds, remove conflicts?
deadrecon98 replied to deadrecon98's topic in Modder Support
Here is my packet handler class. Like I have said above, I cannot use onItemRightClick because they limit the amount of times that it is fired, the way that I have mine set up it will fire 100 times a second which is the exact amount needed. package com.Cyphereion.CyphereionsRetribution.Packet; import java.io.ByteArrayInputStream; import java.io.DataInputStream; import java.io.IOException; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.network.INetworkManager; import net.minecraft.network.packet.Packet250CustomPayload; import com.Cyphereion.CyphereionsRetribution.Item.ItemGun; import cpw.mods.fml.common.network.IPacketHandler; import cpw.mods.fml.common.network.Player; public class PacketHandler implements IPacketHandler { @Override public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player playerEntity) { if(packet.channel.equals("C.R.")){ EntityPlayerMP player = (EntityPlayerMP)playerEntity; handlePacket(packet, player); } } private void handlePacket(Packet250CustomPayload packet, EntityPlayerMP player) { DataInputStream inputStream = new DataInputStream(new ByteArrayInputStream(packet.data)); int data = 0; int id = 0; try{ data = inputStream.readInt(); id = inputStream.readInt(); }catch(IOException e){ e.printStackTrace(); } if(id == 0){ ItemGun.reload(player, data); } if(id == 1){ ItemGun.secondaryFire(player, data); } if(id == 2){ ItemGun.shoot(player, data); } } } -
[SOLVED] [1.6.4] Keybinds, remove conflicts?
deadrecon98 replied to deadrecon98's topic in Modder Support
Not anymore, I am now using the vanilla keybind. Could you help me out on how to handle it for the server however? I currently have it set up to send a packet to my packet handler which then goes into my ItemGun class, in there I have a method that spawns the entity. It works perfectly client side but not server side. Here is some code to help you understand what i'm talking about. public static void shootBullet(EntityPlayerMP player, boolean explosion, float explosiondamage, int speed, boolean flare , double damage, int knockback, boolean singleShot, String shot){ World world = player.worldObj; Random rand = new Random(); int i = rand.nextInt(100) + 1; boolean b; if(i < 3){ b = true; world.spawnParticle("smoke", player.posX, player.posY, player.posZ, 0, 0.1, 0); }else{ b = false; } if(!hasFired){ EntityBullet bullet = new EntityBullet(world, player, speed * 2.0F);{ bullet.explosion = explosion; bullet.ExplosionDamage = explosiondamage; bullet.speed = speed; bullet.setFlare = flare; bullet.canBePickedUp = 0; bullet.damage = damage; bullet.setKnockbackStrength(knockback); world.spawnEntityInWorld(bullet); if(singleShot){ hasFired = true; } player.getCurrentEquippedItem().damageItem(1, player); gunTick = ClientTickHandler.tick; } } } -
[SOLVED] [1.6.4] Keybinds, remove conflicts?
deadrecon98 replied to deadrecon98's topic in Modder Support
Wait, now I can't spawn in the entity on the server. I am getting the world by using EntityPlayerMP. Any ideas? -
[SOLVED] [1.6.4] Keybinds, remove conflicts?
deadrecon98 replied to deadrecon98's topic in Modder Support
Nevermind everyone, I fixed it! Thanks you tons coolAlias! This has solved my problem and has done exactly what I needed it to do! -
[SOLVED] [1.6.4] Keybinds, remove conflicts?
deadrecon98 replied to deadrecon98's topic in Modder Support
You guys don't seem to understand what I am saying for some reason so let me try again. I need my keybind to work with the vanilla keybind. They BOTH need to be right click. At the moment mine overrides the vanilla one and the vanilla right click no longer works. I have to have my own keybind because minecraft has a limit on how many times the key is fired. -
[SOLVED] [1.6.4] Keybinds, remove conflicts?
deadrecon98 replied to deadrecon98's topic in Modder Support
Well if I pull it directly from vanilla then there are limitations on it such as how fast the key is fired which will not work for me. I need the key to fire every time the server ticks and the key is held which is the way it is set up now. -
I am currently working on a mod that needs to use the right click as a keybind as well. I was wondering if there was a way to do this and still retain the vanilla keybind for right click. At the moment mine is taking priority and the vanilla no longer works. Note that this has to be done with a custom keybind instead of onItemRightClick due to a few issues. Thanks to everyone who reads and even more to replies!
-
I have absolutely no idea how to make those.
-
I briefly looked at that code and I can tell you that it is outdated and incorrect. For one you are using modloader methods which they have gotten rid of completely and two you are using the wrong thing to set the gui texture. It is not longer getTexture, I have made a gui a while back but forgot how. Thanks for trying to help though.
-
I was wondering how to make a custom workbench for 1.6.4. I have tried many times but to no avail. Thanks to anyone who reads this and even more to those who help. I already have the basic classes set up (Core, Block, etc..) but do not have anything else like the gui or the crafting manager.
-
Lol I actually do remember and want to say sorry for all of that stuff. But no this was just becoming a huge mess of people thinking that I don't know what the static modifier is . Buuut thank you
-
You do not understand. It is not visible to other classes no matter what modifier I add to the method. Mine was something like this: public static int addInt(){ }
-
I've tried that but it will not show up whenever it call it like ClassName.IncreaseFunction
-
Does not work because setDirty(); does not work for other classes.
-
Which is option B. Problem is I don't know if that's what he actually wants to happen because it would mean that ALL players on the server would be modifying the SAME value. B) ALL INSTANCES OF THAT ITEM will modify the SAME counter But I cannot figure out how to call it from that class.
-
No! That is not what I am trying to do! Would you just read it! I want it to add one to it whenever you right click. I do not want it only on the item.
-
That is not how you should be saving this info. Well then could you please tell me what to do? We are 3 pages into this am I am getting no closer.
-
How would I call it from another class though? I need it to add a counter to it on an item right click.
-
So I managed to get it to work but ish. It does not stay saved to the world or anything so whenever I reload the game it resets itself...
-
I really appreciate the help but seeing as how this is not my code, I have no idea how to get started using it. Could you please help me?
-
No no no, the file is yet to be created, is all it will be used for is to save data, it is not a config file.
-
Bump