Jump to content

Mightydanp

Members
  • Posts

    225
  • Joined

  • Last visited

Posts posted by Mightydanp

  1. 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

  2. 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 }

  3. 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/:?]

     

     

  4. 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

  5. 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 ???

     

  6. 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 ???

  7. i am confused right now so something like this (its 5 am and i cant sleep xD )

    public static final Field buttonList = ReflectionHelper.findField(GuiScreen.class, new String[]{"buttonList", "field_146292_n"});

     

    static{

        buttonList.setAccessible(true);

        }

  8. 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);

    }

  9. 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

  10. 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();

    }

  11. 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

×
×
  • Create New...

Important Information

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