Jump to content

Recommended Posts

Posted

My modname_at.cfg works fine in the development environment, and it works when I run my mod in Eclipse, but when I build my mod and load it in the actual Minecraft client, it crashes due to a field  not being public:

 

java.lang.IllegalAccessError: tried to access field net.minecraft.world.WorldServer.field_73068_P from class lotr.common.LOTRTickHandlerServer

 

(This field is one of those made public in my modname_at.cfg, WorldServer.allPlayersSleeping)

 

Since this always seemed to work fine in 1.6, could anyone tell me if the method of doing this has changed somehow in 1.7, or what I am doing wrong and how I can fix it? Thank you.

 

This is my full access transformer file:

 

public net.minecraft.entity.player.EntityPlayer * 
public net.minecraft.entity.player.EntityPlayer *()
public net.minecraft.entity.player.EntityPlayerMP * 
public net.minecraft.entity.player.EntityPlayerMP *()
public net.minecraft.client.entity.EntityClientPlayerMP * 
public net.minecraft.client.entity.EntityClientPlayerMP *()
public net.minecraft.client.entity.EntityOtherPlayerMP * 
public net.minecraft.client.entity.EntityOtherPlayerMP *()

public net.minecraft.block.BlockCrops *()
public net.minecraft.block.BlockCarrot *()
public net.minecraft.block.BlockPotato *()

public net.minecraft.world.WorldServer *

public net.minecraft.client.renderer.entity.RenderPlayer *

public net.minecraft.potion.Potion *

public net.minecraft.entity.passive.EntityHorse *

public net.minecraft.inventory.InventoryCrafting *

public net.minecraft.block.BlockStem *

Posted

So I have to use IFMLLoadingPlugin? Okay then, I was not aware that those things had to be used for changing the visibility of fields and methods, because it worked fine before without them. And I made everything public because I haven't been able to find the srg names yet in the new gradle system.

 

Edit: Reflection is not an option for me, because the mod has to access things every tick, so there would probably be too much performance penalty.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.