Sokaya
Forge Modder-
Posts
117 -
Joined
-
Last visited
Converted
-
Gender
Male
Sokaya's Achievements
Creeper Killer (4/8)
0
Reputation
-
java.lang.IllegalArgumentException: bound must be positive
Sokaya replied to _Lightning_'s topic in Modder Support
It's seems that ImmersiveEngineering world generator cause crash, because it pass negative value to Random.nextInt method. You should report it, because the author can repair that error. -
[1.7.2] Replacing vanilla abstract method in EntityLivingBase
Sokaya replied to Sokaya's topic in Modder Support
I know what I to achieve and I'm 100 percent sure it will not break other mods functionality. According to my last request: "I have one more question according to ASM. In Potion class there's a field named "public static final Potion[] potionTypes". I'm using a Java Reflection to change it accesibility and increase initial array size (from 32 to n/a). But how do this in ASM?" -
[1.7.2] Replacing vanilla abstract method in EntityLivingBase
Sokaya replied to Sokaya's topic in Modder Support
@jabelar I'm not replacing an ItemPotion work, I have own class already. But the Entity NBT Data when entity join game is a point."readEntityFromNBT" loads an PotionEffect, so most of functions aren't working, because game thinks it's normal PotionEffect instead of ElixirEffect. So that's why I must override "readCustomPotionEffectFromNBT" in PotionEffect class to return an ElixirEffect. But I already managed to make it work. I need it because I'm make my effects handle in ElixirEffect class, not in EventHandler. I'm also increasing maximum potion duration to Integer.MAX_VALUE. I have one more question according to ASM. In Potion class there's a field named "public static final Potion[] potionTypes". I'm using a Java Reflection to change it accesibility and increase initial array size (from 32 to n/a). But how do this in ASM? Thanks for advice, Martin -
[1.7.2] Replacing vanilla abstract method in EntityLivingBase
Sokaya replied to Sokaya's topic in Modder Support
Well as I said, I need this to implement my elixir system. But method 'public static PotionEffect readCustomPotionEffectFromNBT(NBTTagCompound par0NBTTagCompound)', prevent me to load my ElixirEffect class instead of it's base. -
Hello! I'm creating my own potion system, and I need to add new PotionEffect handler. I have an ElixirEffect class. When I restart the game, 'public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)' loads an PotionEffect instead of ElixirEffect. So that's why i need to override this method. Any ideas? Regards, Martin
-
I do it like that: @SubscribeEvent public void tickStart(TickEvent.ClientTickEvent event) { EntityPlayer player = Minecraft.getMinecraft().thePlayer; if (player != null) { Entity ent = player.ridingEntity; boolean state = false; if (ent != null && ent instanceof EntityMyPig) { state = Keyboard.isKeyDown(ClientKeyHandler.up.getKeyCode()) || Keyboard.isKeyDown(ClientKeyHandler.down.getKeyCode()); if(!state) Main.proxy.channel.sendToServer(PacketHandler.getPacket(1, Side.SERVER)); } } } And my method isn't called:(
-
Wow really? InputEvent.KeyInputEvent only is called when key is pressed, but no when key is released.
-
Like in topic. Thanks for help!
-
There're helpful informations: http://www.minecraftforge.net/forum/index.php?topic=2050.0 But use a search option too, you will find many topic about same problem.
-
[1.7.2] Get that door is upper or lower from metadata
Sokaya replied to Sokaya's topic in Modder Support
I know how, but why in code (metadata & for bottom return 8, no 1(like minecraft gamepedia says)? -
[1.7.2] Get that door is upper or lower from metadata
Sokaya replied to Sokaya's topic in Modder Support
Not helpfull, these things looks different in code:( -
Like in topic. Thanks for help.
-
Yea and waste time for finding the piece of text about U/V. Normally I render that top half with this: tessellator.addVertexWithUV(-8, -8, 0, 0, 0.5); tessellator.addVertexWithUV(-8, 8, 0, 0, 0); tessellator.addVertexWithUV(8, 8, 0, 1, 0); tessellator.addVertexWithUV(8, -8, 0, 1, 0.5);
-
Have something like that (render top half): tessellator.addVertexWithUV(8, 8, 0, 0, 0); tessellator.addVertexWithUV(8, -8, 0, 0, 0); tessellator.addVertexWithUV(-8, -8, 0, 1, 0.5); tessellator.addVertexWithUV(-8, 8, 0, 1, 0.5); And now how to render that bottom half?