
Sokaya
Forge Modder-
Posts
117 -
Joined
-
Last visited
Everything posted by Sokaya
-
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?
-
I have Tessellator things to render a quad and I need to render it to halfes. But how to part that texture and render it? Thanks, Sokaya
-
That's only the example (but that funciot create... is for real). I have Item class for multiple entities, so that's why i need this.
-
I have that code: private EntityHanging createHangingEntity(World par1World, int par2, int par3, int par4, int par5) { return (EntityHanging)new EntityItem_class(par1World, par2, par3, par4, par5); } I want to replace EntityItem_class to: Class.forName("mypackage.EntityItem_class").asSubclass(EntityHanging.class) But how to execute that: (par1World, par2, par3, par4, par5) from the Class.forName()? Thanks for help, Sokaya
-
[1.7.10] Custom Painting Rendering Half Block Off
Sokaya replied to gottsch's topic in Modder Support
Anybody fixed that? -
[1.7.2] Making time of potion effect highter that 15 minutes.
Sokaya replied to Sokaya's topic in Modder Support
Can you show me where to start? Where's that method what is making time of effect infinity? -
[1.7.2] Making time of potion effect highter that 15 minutes.
Sokaya replied to Sokaya's topic in Modder Support
After addPotionEffect with highter time than 1800 ticks, the potion time changes to infinity. -
I can't understand these methods:( Can you explain these?
-
How to read 1st,2nd line of lore form item or itemstack?
-
Like in topic. Thanks for help.