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


  • Posts

  • Joined

  • Last visited

Everything 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. If he uses this he wuill get an error, The method returns a block not an ID, you don't have to get the iD. ID are no more used in 1.7.2, they are here just as index in the arrays. The game never calls a Block using his ID anywhere, you directly call the Block itself.
  4. The method is not remapped for the moment : Here is an example: if(world.func_147439_a(int x, int y, int z) != Blocks.coal_ore) the method returns a Block not an ID,
  5. 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.
  6. 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!
  7. 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.
  8. Which version? which shaders ? We are not magicians, we need at least the crash log to start to guess what is the problem.
  9. As there is no ID anymore when you harvest a block you need to call an Item not an ID, and this Item has to be registered or you don't get anything For example, for each Block myblock you need to have an ItemBlock myblock.
  10. 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.
  11. When i try to use this event i get a bug, as i need to know which biome this event is for i get a null. The GetVillageBlockID event doesn't return the biome. http://www.noelshack.com/2014-03-1390011895-event-village.jpg
  12. 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 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{} [Forge Mod Loader] (forge-1.7.2- Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{} [Minecraft Forge] (forge-1.7.2- 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, 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)
  13. Ok, i've done almost the same, i have made a playerhandler server side that extends from the ServerConfigurationManager who receive the packet and handle all the stuff i need server side. But in the latest 999 i have noticed that there are some event added to simplify the network handling, i will see how to use this stuff.
  14. That would be very usefull, i've tried to send a packet but i need to tell the server which player sent it and with the example above you can just send a packet and i don't know how to execute it in the server . In 1.6.4 i had done a complete network handling as showed in the forge tutorials and it worked perfectly, but i don't know how to do the same with netty.
  15. Lex Manos has posted a video to clarify the setup process because people where making things much more complicated than needed!
  16. For private or protected methods anf fields you have to specify for your field or method that you allows acces by adding field.setAccessible(true); or method.setAccessible(true);
  17. If you cannot see the game source in the Referenced Libraries in \forge-1.7.2- maybe you have setup your workspace with the command : setupDevWorkspace eclipse set it up with : setupDecompWorkspace
  18. 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)); }
  19. You also can use reflexion to access private or protected variables or methods. I had to do it to acces a protected variable in the block class and it works fine. In fact it's easy to achieve.
  20. 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!
  21. Read carefully how to setup your workspace : http://www.minecraftforge.net/forum/index.php/topic,14048.0.html
  22. 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.