
WH-Reaper
Members-
Posts
34 -
Joined
-
Last visited
Everything posted by WH-Reaper
-
Hello and thanks for your guide! Okay, I fixed all problems thanks to TheGreyGhost's examples, thank you a lot But I have one question - is it possible to render block in hand in the same way as block placed down, when it is set to render with specialRenderer? I.e. if I create new model and assign it to block via TileEntityRenderer, can I make it so the model is rendered when in hand, too?
-
"gradlew build" fails on task ":reobf" with IllegalArgumentException
WH-Reaper replied to Hunternif's topic in ForgeGradle
I had the same problem with 1.7.10. CleanCache fixed the issue. But then I updated to 1.8 and the issue was back. I tried cleanCache several times, but no luck. I hope someone here knows what went wrong, as I'm not able to build any mod for 1.8 right now. EDIT: Okay, I managed to get it built by running cleanCache command and then build command (no SetupDecompWorkspace in between). I wish there was better solution, though. -
Hello, I would like to ask if it is possible to access info stored in packets which are sent each time player moves from client. I.e. can I create event handler which is fired when client recieves packet which holds info about coordinates of other players? If so, what event should I look for? I took a look at list of forge events, but with no success. Thanks in advance
-
[1.7.2]what to use instead of onInventoryChanged() method
WH-Reaper replied to WH-Reaper's topic in Modder Support
There are methods in IInventory in Forge 10.12.0.1024 int getSizeInventory(); ItemStack getStackInSlot(int var1); ItemStack decrStackSize(int var1, int var2); ItemStack getStackInSlotOnClosing(int var1); void setInventorySlotContents(int var1, ItemStack var2); String getInventoryName(); boolean hasCustomInventoryName(); int getInventoryStackLimit(); void markDirty(); boolean isUseableByPlayer(EntityPlayer var1); void openInventory(); void closeInventory(); boolean isItemValidForSlot(int var1, ItemStack var2); And from what I have understand, markDirty does something different. Maybe it got back in newest (1025) update? I haven't had time to update yet. -
[1.7.2][Forge]Lang file problem, onCrafting player event problem
WH-Reaper replied to WH-Reaper's topic in Modder Support
Thanks for the tips for the events. I still have problems with my lang file, though. This is my lang file: tile.CocoaLeaves.name=Cocoa Leaves tile.CocoaWood.name=Cocoa Wood tile.CocoaSapling.name=Cocoa Sapling tile.Coffee.name=Coffee Plant item.Mug.name=Mug item.MugMilk.name=Milk item.MugCocoa.name=Cocoa item.MugWater.name=Water item.MugCoffee.name=Coffee item.CoffeeSeeds.name=Coffee Seeds item.RoastedCoffeeSeeds.name=Roasted Coffee Seeds And here is part of my preInit method mug = new ItemMug().setUnlocalizedName("Mug").setCreativeTab(CreativeTabs.tabMisc); mugMilk = new ItemMugMilk().setUnlocalizedName("MugMilk").setCreativeTab(CreativeTabs.tabFood); Still, "item.Mug.name" appears in game instead of "Mug" -
[1.7.2][Forge]Lang file problem, onCrafting player event problem
WH-Reaper replied to WH-Reaper's topic in Modder Support
Thanks! Works fine now Btw. is there a list (or way to tell) which event is registered in which bus? I would specifically need events that were in connection handler. Also, any help to the lang file, please? -
[1.7.2]what to use instead of onInventoryChanged() method
WH-Reaper replied to WH-Reaper's topic in Modder Support
No, it is removed. There is no deobfuscated method in IInventory and no other method that could replace it. -
[1.7.2]what to use instead of onInventoryChanged() method
WH-Reaper posted a topic in Modder Support
Hello, I used method onInventoryChanged() from IInventory in 1.6.4. Unfortunatelly, this method was removed in 1.7.2. Any idea what to use instead? I used the method to send packet about update, so the tileEntity updates on clients without activating the block. -
[1.7.2][Forge]Lang file problem, onCrafting player event problem
WH-Reaper replied to WH-Reaper's topic in Modder Support
Oh sorry, I mistakenly posted the declaration of Crafting handler twice, instead of the code in preInit. Anyway, main post corrected. So the code in preInit is this: MinecraftForge.EVENT_BUS.register(craftHandler); -
[1.7.2][Forge]Lang file problem, onCrafting player event problem
WH-Reaper replied to WH-Reaper's topic in Modder Support
In preInit method -
Hello, I'm having problems with two things in Forge 1.7.2. First, the usual way to add names was completely scrapped, so we are forced to use the lang file. I created my lang file according to this tutorial http://www.minecraftforge.net/wiki/Localizing And pasted it to src/main/resources/assets/mymodid/lang/en_US.lang but I still cannot see the names (textures in src/main/resources/assets/mymodid/textures work fine though). Any advice where should it be located or where might be the problem? The coding of the file is set to UTF-8. Second, I used custom CraftingHandler for adding achievement when player crafted certain item. This was scrapped too, insted we should use Forge event bus. Now I have instance of my crafting handler private static CraftingHandler craftHandler = new CraftingHandler(); and in preInit method, I have MinecraftForge.EVENT_BUS.register(craftHandler); and here is the crafting handler class public class CraftingHandler { /** * Adds Coffee achievement after crafting mug of coffee */ @SubscribeEvent public void onCrafting(ItemCraftedEvent event) { System.out.println("event launched"); if (event.crafting.getItem() == CocoaCraft.mugCoffee) { event.player.addStat(CocoaCraft.coffeeAchievement, 1); } } } Yet I don't get the achievement, nor see "event launched" in console. Any help would be appreciated
-
Well, the problem is, as I mentioned I HAVE them installed and path variable set. If I wouldn't, typing javac in command line (and not being in java folder) wouldn't launch the java exe
-
Hello, I run into problem with installation of Forge using gradlew.bat. I always get recompForge error, and as suggestion that I should check if I have JDK installed and added to environment path. I have JDK installed and added to environment path correctly(launching java via command line works fine). I tried it several times, cleaned the cache, refreshed dependencies, but nothing helps. I even tried to change the path variable to point to 32bit Java instead of 64bit, but with the same result. Here is error output, as obtained after using this command: gradlew.bat setupDecompWorkspace --refresh-dependencies 2> out.txt Thanks in advance for any help
-
[Solved]Transferring itemStack on shift click without loosing items
WH-Reaper replied to WH-Reaper's topic in Modder Support
Thanks, works like charm! -
[Solved]Transferring itemStack on shift click without loosing items
WH-Reaper replied to WH-Reaper's topic in Modder Support
bump -
[Solved]Transferring itemStack on shift click without loosing items
WH-Reaper replied to WH-Reaper's topic in Modder Support
bump -
[Solved]Transferring itemStack on shift click without loosing items
WH-Reaper replied to WH-Reaper's topic in Modder Support
bump -
[Solved]Transferring itemStack on shift click without loosing items
WH-Reaper replied to WH-Reaper's topic in Modder Support
bump -
[Solved]Transferring itemStack on shift click without loosing items
WH-Reaper replied to WH-Reaper's topic in Modder Support
Yes, I thought of this solution. The problem is I don't exactly know how to achieve that -
Hello, I created container with 5 slots following tutorial here on forge forums. I also properly(at least I hope so) modified transferStackInSlot method. The problem is that I want my container to have capacity only 1 per slot (not 64). I set this using getInventoryStackLimit in my TileEntity for the container. The problem is that each time I transfer stack from player inventory into the container holding shift, it removes whole stack from player inventory, but transfers only 1 piece into the container(obviously because the limit per slot is set to 1). I would like to know how to force it to pick only so many pieces that fits into container for transferring(when using shift). If this would be too difficult, I would simply like to do it so it picks only one item even when using shift. I guess I need to rewrite container method mergeItemStack? Or maybe something different? Thanks in advance to anyone who tries to help Here is my transferStackInSlot method if needed
-
Custom structures for one specific biome (vanilla biome)
WH-Reaper replied to AppliedOnce's topic in Modder Support
Yes BiomeGenBase biomegenbase = world.getWorldChunkManager().getBiomeGenAt(i, j); if(biomeGenBase instanceof BiomeGenForest) { //generate structure } -
[Solved]Is there a way to set loading order of mods?
WH-Reaper replied to WH-Reaper's topic in Modder Support
Nevermind, I figured how to sort the load order without renaming the mod. And I know recipes are normally added in init method. But adding them in postInit is also possible. -
Hello, I wanted to ask if there is a way to set loading order of mods? I have two mods. And in case you have both mods, the first one adds new recipe in postInit method. Unfortunatelly, this doesn't work, as it loads as second. I know the possible solution would be to move the creation of the recipe to the other mod, but since it is not the only "plugin" mod for my "main" mod, I wanted to have all these plugin functions in the main mod. Thanks in advance
-
Could you please provide the link to tut or write here a simple example?
-
[Unsolved]postInit method and checking for other mods
WH-Reaper replied to WH-Reaper's topic in Modder Support
Thank you, that's exactly what I was looking for! I'll give it a try