Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Kukipett

Members
  • Posts

    23
  • Joined

  • Last visited

Posts posted by Kukipett

  1. I noticed that the PlayerEvent.PlayerLoggedOutEvent is not called when you quit the game, i tested it in both single and multiplayer.

    But PlayerEvent.PlayerRespawnEvent works actually

     

    Is there another event to use when you logout and quit the game to save config and such...

  2. There are no difficulties to port tools and armors to 1.7.2

    I don't remember to have got difficulties when i ported mines,

    Maybe the rendering and armormaterial was a bit different, but nothing really annoying.

     

    The main problem is partial deobfuscation that forces you to make educated guess to find the right method and variables.

  3. When i updated my mod i had the same problem, it was because i didn't registered my blocks the right way.

     

    What was working in 1.6.4 for registering block doesn't fully work in 1.7.2

     

    I had a look at the way vanilla Blocks and corresponding ItemBlocks are registered and i did the same with complete success.

     

  4. Good tutorial sirgingalot !

     

    A bit complex to understand but certainly very good to send custom packets in various cases.

     

    I had also detected the side error where you called Minecraft (client side only) in the switch method, good to know that you correct it.

     

    But i still have a little difficulty.

     

    When i need to send a packet, i need to build the packet with two prameter, the Bytebuffer data that is clear to me, but also the Context that i don't know exactly how to use.

    With the custompayload packet that was used at the beginning of this post i just had to give the channel name and the data.

    Can you give a small practical example how to handle that context parameter.

    Thanks for you time!

  5. If your blocks and items are not showing up correctly it's only because there is no ID anymore use by the game code when crafting or harvesting blocks.

     

    Before 1.7.2 IDs were used to identify and spawn the objects but now the game use Items.

     

    When you harvest a block it creates an ItemBlock and this ItemBlock has to be registered as an item to exist.

     

    The old registering method doesn't work, you have to used the extended version that also call the ItemBlock .

     

    As i had also some difficulties when the first version of Forge 1.7.2 appears i used the same registering method as the vanilla game. and it works perfectly.

  6. Does this comes from the new Minecraft code, because each time i have this event i never have the biome and with 164 it was OK.

    Now the BiomeEvent returns the biome correctly most of the time, but it gives an erreor each time the extended GetVillageBlockID shows up.

    I used the same code to change the villages block depending on the biome and it worked perfectly, i never had a single biome = null.

    And there are many other mods that do the same, so there must be a problem somewhere.

     

    With this problem it's almost impossible to get village customisation depending from biome, i tried to catch the biome event and store the biome and hope that the next GetVillageBlockiD event come frome the same biome.

    It seems to almost work, but it's just monkey work and it could give out some mixed up results.

  7. I just installed forge ...1002  with no mod fut Forge alone and i can load any map, it starts then i'm back to the Minecratf main menu.

    If i start a new map i get a crash with a null pointer :

     

    ---- Minecraft Crash Report ----
    // My bad.
    
    Time: 17.01.14 18:29
    Description: Unexpected error
    
    java.lang.NullPointerException: Unexpected error
    at cpw.mods.fml.client.FMLClientHandler.setPlayClient(FMLClientHandler.java:699)
    at net.minecraft.client.network.NetHandlerPlayClient.<init>(NetHandlerPlayClient.java:221)
    at net.minecraft.client.network.NetHandlerLoginClient.func_147232_a(NetHandlerLoginClient.java:110)
    at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:187)
    at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:2056)
    at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:952)
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:869)
    at net.minecraft.client.main.Main.main(SourceFile:103)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    
    
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------
    
    -- System Details --
    Details:
    Minecraft Version: 1.7.2
    Operating System: Windows 7 (amd64) version 6.1
    Java Version: 1.7.0_40, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 1182531192 bytes (1127 MB) / 1499987968 bytes (1430 MB) up to 2863661056 bytes (2731 MB)
    JVM Flags: 2 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx3G
    AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94
    FML: MCP v9.01-pre FML v7.2.69.1002 Minecraft Forge 10.12.0.1002 4 mods loaded, 4 mods active
    mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    FML{7.2.69.1002} [Forge Mod Loader] (forge-1.7.2-10.12.0.1002.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    Forge{10.12.0.1002} [Minecraft Forge] (forge-1.7.2-10.12.0.1002.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    JFVMod{1.0} [JFVMod] (JFVMod-1.7.2-1.0.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    Launched Version: 1.7.2-Forge10.12.0.1002
    LWJGL: 2.9.0
    OpenGL: AMD Radeon HD 7900 Series GL version 4.2.12217 Compatibility Profile Context 12.104.0.0, ATI Technologies Inc.
    Is Modded: Definitely; Client brand changed to 'fml,forge'
    Type: Client (map_client.txt)
    Resource Packs: [JFVRealism]
    Current Language: Français (France)
    Profiler Position: N/A (disabled)
    Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
    Anisotropic Filtering: On (16)
    

  8. When i tried to register my blocks and item as we used to do it for 1.6... version i encountered various problems.

    I spent the evening in finding how to solve it, maybe i'm a moron and i just missed something, but maybe this will help.

     

    In creative mod i could see my blocks but textures did not show up.

    In survival, my ores did not show, i could just see holes  where they should have been.

    When crafting  one of my  blocks i got crashes.

     

    So i examined how the vanilla blocks were registered and i did the same for mines.

     

    It worked fine, except the fact that i could not harvest my blocks and crafting one of my block lead to a crash.

     

    In fact the reason is that since there are no more ID used when harvesting and crafting, blocks also need to be registered as ItemBlock in the Item Registry.

     

    Here is an example how i did it , i have tested it during 3 houres without a bug.

     

    
    In main mod class :
    
    public static final RegistryNamespaced registryBlockNamespaced = GameData.blockRegistry;
    public static final RegistryNamespaced registryItemNamespaced = GameData.itemRegistry;
    
    public static Block testBlock;
    
    public static Item testItem;
    
    @EventHandler
    public void load(FMLPreInitializationEvent event)
    {	
    // registering the blocks in the blockRegistry with the vanilla method (made with Forge ...997 many fields are still not remapped)
    registryBlockNamespaced.func_148756_a(220, "testblock", (new BlockteleportBlock(Material.field_151578_c)).func_149715_a(1.0F).func_149711_c(1.2F).func_149663_c("testblock").func_149658_d("testblock"));
    
    //registering the items in the itemRegistery
    registryItemNamespaced.func_148756_a(5000, "testitem", (new Item()).setUnlocalizedName("testitem").setCreativeTab(CreativeTabs.tabMaterials).setTextureName("testitem"));	
    
    //retrieving a block from registry,  you need to specify your mod ID
    testBlock = (Block)Block.field_149771_c.getObject("modid:testblock");
    
    //retrieving an item from registry, you need to specify your mod ID
    testItem = (Item)Item.field_150901_e.getObject("modid:testitem");
    
    //registering your blocks as ItemBlock in the itemRegistry
    registryItemNamespaced.func_148756_a(220, "testblock", new ItemBlock(testBlock));
    }
    

  9. I should probably let someone more experienced answer but I think its that the 1.7.2 version simply isn't ready to be recommended yet -- its still has a lot of work to be done before general use.  I probably won't even fool with it until its more mature, though I have downloaded a src version and may look around (want to see how it handles blocks and world-gen now).  But I suspect I won't be able to make much since of it until more is done.

     

    I have tested that beta version and i could do some  stuff but it's very difficult as most of the code is not remapped to understandable names.

    So it's usefull to see and try to guess what has changed and do simple things.

    A very experienced coder will be able to recognize methods and variables of the code parts he uses habitually, but you better be patient and zen!

  10. I can't seem to get the workspace to work.

     

    I opened the command prompt in the forge folder, typed the first command as shown on the instructions page, waited for it to finish, then typed "gradlew.bat eclipse" and waited for it to finish. I used the folder containing the forge folder as a workspace. I copied the name of the extracted forge folder and pasted it as a project name. Eclipse notified me that it would automatically configure the project from existing source. I assume it detected the .project file, because I saw all of the referenced libraries, but there are no run configurations, and I can't figure out which class to run and with what program and VM arguments.

     

    What am I doing wrong? Or is something broken?

     

    Read carefully how to setup your workspace :

    http://www.minecraftforge.net/forum/index.php/topic,14048.0.html

  11. As it is beta ,  the minecraft source files are not completely deobfuscated, so when you parse the forge library and chech the block.class you will see that most of the variables, class and methods are not deobfuscated.

    So it's not surprising that the block.dirt gives out an error.

     

    You can try to play with the non deobfuscated fields, good luck !

     

    For my part i will have wait for a more finished version of the thing.

     

    But thanks for the Forge team for the great work anyway !

×
×
  • Create New...

Important Information

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