Mightydanp
-
Posts
225 -
Joined
-
Last visited
Posts posted by Mightydanp
-
-
59 public static Block registerBlockState(Block block, String name, ItemBlock itemBlock, int numberOfBlockStates, String[] blockBlockStates) {
60 GameRegistry.register(block.setRegistryName(name));
61 GameRegistry.register(itemBlock.setRegistryName(block.getUnlocalizedName()));
62 final String blockStates[] = blockBlockStates;
63 ResourceLocation[] resLoc = new ResourceLocation[numberOfBlockStates];
64 for (int i=0; i < numberOfBlockStates; i++)
65 resLoc = new ResourceLocation(References.MODID + ":" + blockStates);
66 ModelBakery.registerItemVariants(Item.getItemFromBlock(block), resLoc);
67 return block;
68 }
-
heres the whole log
[17:34:38] [Client thread/ERROR] [FML]: Caught exception from eot
java.lang.NullPointerException
at com.mightydanp.eot.core.handler.RegistryHandler.registerBlockState(RegistryHandler.java:60) ~[bin/:?]
at com.mightydanp.eot.block.ModBlocks.init(ModBlocks.java:45) ~[bin/:?]
at com.mightydanp.eot.Eot.preInit(Eot.java:97) ~[bin/:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_60]
at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:568) ~[forgeSrc-1.9.4-12.17.0.1963-PROJECT(EssenceofTech).jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_60]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:228) ~[forgeSrc-1.9.4-12.17.0.1963-PROJECT(EssenceofTech).jar:?]
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:206) ~[forgeSrc-1.9.4-12.17.0.1963-PROJECT(EssenceofTech).jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_60]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:135) [LoadController.class:?]
at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:586) [Loader.class:?]
at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:249) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:475) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:384) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_60]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_60]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
at GradleStart.main(GradleStart.java:26) [start/:?]
-
The code crashes my game and says that its that part of the code that crashed it. I dont see what i am doing wrong
-
i am having trouble with a code i made i get the error at com.mightydanp.eot.core.handler.RegistryHandler.registerBlockState(RegistryHandler.java:60)
here is the code
i would like some help on it. 1.9.4 is just new to me.
-
This is part of the code in my gradle build
ext.dependencies = ['**/EOT_at']
ext.coreFiles = ['com/mightydanp/eot/**',
'**/EOT_at.cfg',
'tconstruct/**',
'assets/eot/**',
'assets/minecraft/**']
ext.coreJar = "build/libs/" + archivesBaseName + "-" + version + ".jar"
jar
{
// Add necessary files, remove unnecessary ones.
includes.addAll(project.ext.coreFiles)
includes.addAll('mcmod.info')
includes.addAll('LICENSE.txt')
includes.addAll(project.ext.dependencies)
manifest {
attributes 'FMLAT': 'EOT_at.cfg'
}
}
the problem is i have put the _at file in that same place but it still will not do as it is sepost to after i do a build
-
not that hard me and diesieben07 was talking about what to do.... so basically i cannot use Reflection because i cannot it is in a calls i cannot edit and i am trying to get my access transfer to work after i do a build but no luck
-
You should read the whole topic and replies if you want to know whats going on all of the information is in the topic and replies
-
So ? How do i do such
-
i didnt mean that i am saying when i do a build and then put minecraft in the forge it still gives same error like it has done nothing with the _at when it built
-
i have
jar {
manifest {
attributes 'FMLAT': 'Eot_at.cfg'
}
}
and i have it in my src/api/resources/.....
-
Yea but the way it does it is in the manifest.mf..
it should look like this
Manifest-Version: 1.0
FMLAT: EOT_at.cfg
instead it has
Manifest-Version: 1.0
when i look in the jar
-
the dev area isnt the problem its the gradlew buid that is the problem. i am having a problem where it will not put the AT into the jar itself
-
well it was why i wanted help with my access transformer ive seen alot of modders use it in there mod >.<, but the api of thinkers gets obs into my mod itself for it to be used without tinkers construct, they are under a Creative Commons 3.0 can i change the code in that class or do i have to leave it alone because if i can change some of it i can do what you just told me to do
-
the problem with that is that the code that i am using is from tinkers api, i have it where the class that i want get obs with my mod so that it dont need tinkers construct to function so i cannot change the code in there classes i have to leave the code as it is i think
-
i am confused right now so something like this (its 5 am and i cant sleep )
public static final Field buttonList = ReflectionHelper.findField(GuiScreen.class, new String[]{"buttonList", "field_146292_n"});
static{
buttonList.setAccessible(true);
}
-
what do you mean by reuse that same instance ? to me i am thinking to do something like this
public static final Field buttonList = ReflectionHelper.findField(GuiScreen.class, new String[]{"buttonList", "field_146292_n"});
public......{
buttonList.setAccessible(true);
}
-
Alright i tried something like this
ReflectionHelper.findField(GuiScreen.class, new String[]{"buttonList", "field_146292_n"}).setAccessible(true);;
and got this error
Exception caught during firing event net.minecraftforge.client.event.GuiScreenEvent$InitGuiEvent$Post@1f0f52d6:
java.lang.IllegalAccessError: tried to access field net.minecraft.client.gui.GuiScreen.field_146292_n from class tconstruct.client.tabs.TabRegistry
-
i have just tried that and i get this error
java.lang.NoSuchFieldException: field_146292_n
at java.lang.Class.getField(Class.java:1695)
at com.mightydanp.eot.EotCore.preInit(EotCore.java:78)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
i used this code
try {
GuiScreen.class.getField("field_146292_n").setAccessible(true);
} catch (SecurityException e) {
e.printStackTrace();
} catch (NoSuchFieldException e) {
e.printStackTrace();
}
-
Darco is it really that easy ?do i need to put that in the same class that the field is in
-
the crashlog basicly says that it cannot find a field and that field is mad public in my _at file.
the code is part of a api that isnt my code, the part of the code that needs to be made public is this
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void guiPostInit (GuiScreenEvent.InitGuiEvent.Post event)
{
if ((event.gui instanceof GuiInventory))
{
int xSize = 176;
int ySize = 166;
int guiLeft = (event.gui.width - xSize) / 2;
int guiTop = (event.gui.height - ySize) / 2;
guiLeft += getPotionOffset();
updateTabValues(guiLeft, guiTop, InventoryTabVanilla.class);
addTabsToList(event.gui.buttonList);
}
}
i need to make this public
public net.minecraft.client.gui.GuiScreen field_146292_n #buttonList
-
i have my at in src\main\resources\META-INF....... when i do a build the at does not get included into the jar so it crashes if you try and play it, i would really like to know what i am doing wrong.
build.gradle
-
I have a at file but whenever do a build and then run the mod it doesn't work right.... heres my current configuration...
src\java\api\resources\tinkers construct.cfg
here is my build.gradle
and build.properties
-
i do need it i put it where it needs to go but is there something i need to put in my code or is it all in my build.gradle?
-
I dont know if this is the file but this is it right here ? https://github.com/SlimeKnights/TinkersConstruct/blob/master/resources/META-INF/TConstruct_at.cfg
1.9.4 registry error
in Modder Support
Posted
after i removed the block.getunlocalizedname i am getting this error
new block state code
59 public static Block registerBlockState(Block block, String name, ItemBlock itemBlock, int numberOfBlockStates, String[] blockBlockStates) {
60 GameRegistry.register(block.setRegistryName(name));
61 GameRegistry.register(itemBlock.setRegistryName(block.getUnlocalizedName()));
62 final String blockStates[] = blockBlockStates;
63 ResourceLocation[] resLoc = new ResourceLocation[numberOfBlockStates];
64 for (int i=0; i < numberOfBlockStates; i++)
65 resLoc = new ResourceLocation(References.MODID + ":" + blockStates);
66 ModelBakery.registerItemVariants(Item.getItemFromBlock(block), resLoc);
67 return block;
68 }
BlockEssenceOre
http://pastebin.com/FanBzc0c