-
Posts
5170 -
Joined
-
Last visited
-
Days Won
77
Everything posted by Choonster
-
[1.7.10] Tile Entity ceases to work after world reload
Choonster replied to TheDoctorSoda's topic in Modder Support
It's hard to help without seeing your code. Post it on Gist with syntax highlighting or post a link to your repository (e.g. GitHub, BitBucket). -
Trying to make wood be unbreakable by hand unless right tools
Choonster replied to Mr.sKrabs's topic in Modder Support
Are you still comparing event.state directly to a Block , or have you fixed that? If you've fixed it, post the latest HNEvents code on Gist with syntax highlighting (give the file the .java extension). -
Trying to make wood be unbreakable by hand unless right tools
Choonster replied to Mr.sKrabs's topic in Modder Support
You didn't post the class where the crash is happening (HarshNatureItems). For future reference, you can add multiple files to a single Gist and give each file the proper extension to enable syntax highlighting. -
Trying to make wood be unbreakable by hand unless right tools
Choonster replied to Mr.sKrabs's topic in Modder Support
event.state is an IBlockState object. It will never be equal to a Block object like Blocks.leaves. Use the method I described in my previous post to get the Block from the IBlockState. Your crash has nothing to do with this class, the exception is being thrown on line 46 of HarshNatureItems. Post that class on Gist and link it here. -
[!SOLVED!] [1.8] Getting localized block name
Choonster replied to ecbercnl's topic in Modder Support
The ClassName#memberName notation means that memberName is an instance method or field of ClassName. You can't access instance methods/fields without an instance of the class. This is a basic Java concept. You need to call getPickBlock on an instance of Block (the one you want to show the display name of). -
Trying to make wood be unbreakable by hand unless right tools
Choonster replied to Mr.sKrabs's topic in Modder Support
You can either subscribe to the event multiple times or subscribe to it once and check for each condition. BlockEvent and the events that extend from it don't have a block field in 1.8, they have a state field (of type IBlockState) instead. Use IBlockState#getBlock to get the Block. Your IDE should bring up a list of fields and methods when you type a dot after a variable. You should also be able to view the source of any Minecraft/Forge class in your IDE to see which fields and methods it has. -
Are you getting any errors in the log? Upload your FML log to Gist and link it here.
-
Trying to make wood be unbreakable by hand unless right tools
Choonster replied to Mr.sKrabs's topic in Modder Support
To determine which bus an event is fired on, look at its doc comment or use your IDE's Find Usages/Call Hierarchy feature. In this case, all the events you need are fired on MinecraftForge.EVENT_BUS. -
EntityLivingBase.sprintingSpeedBoostModifierUUID contains the UUID of the sprinting speed boost modifier (as the name suggests). I found this by looking at EntityLivingBase#setSprinting.
-
The crash has nothing to do with the number of recipes, it's caused by one of the recipes having an invalid shape string. Each shape string of a shaped recipe must be the same length, but one of your recipes has one string that's longer than the other two. The issue is with the recipe on line 15 of DMiscModRecipes, I suspect that this is the starInfusedShovel recipe. You don't need to explicitly create an array to call a varargs method like GameRegistry.addRecipe, just pass the arguments to it directly and Java will create the array for you.
-
Is there a specific reason to use one of these classes vs. the other in normal Forge mod code (i.e. not dealing with ASM)? cpw said a few years ago in this FML pull request that ReflectionHelper is internal and implied that ObfuscationReflectionHelper is essentially the "public API". Is this still the case? (I'm guessing it is since ReflectionHelper is in the fml.relauncher package whereas ObfuscationReflectionHelper is in fml.common)
-
[1.8] [Solved] Where to find deobfuscated method/field list
Choonster replied to Earthcomputer's topic in Modder Support
You can download MCP mappings (both stable and snaphots) from MCPBot. -
[SOLVED] [1.8] Buggy textures after forge update?
Choonster replied to ModernPatriot's topic in Modder Support
Did you try disabling the splash screen in config/splash.properties (like LexManos told you to)? -
I'd recommend using a lowercase mod ID to avoid any trouble. Though looking at the icon registering code in 1.7.10, the icon name always gets used in the ResourceLocation(String) constructor first; so your mod ID should be converted to lowercase for icons anyway.
-
Only use events when you need to react to things outside of your control (usually vanilla blocks, items, entities, etc.). For your own classes, you can usually override a method that's called at the appropriate time instead. Your current code is wrong in several ways: You're not registering your instance on the appropriate event bus Even if you were registering it, you'd be replacing every broken block with Main.CastleWall1 since you never check which block was broken In this case, you'll probably want to override Block#breakBlock or Block#removedByPlayer.
-
This is possible, since 1.7.10 only converts the domain of a ResourceLocation to lowercase from the ResourceLocation(String) constructor but not the ResourceLocation(String,String) constructor.
-
Override Block#onBlockActivated to do something when the Block is right clicked. Use EntityPlayer#getHeldItem to get the player's held item. To spawn an Entity, check if it's the server (world.isRemote is false), create the Entity object and then call World#spawnEntityInWorld.
-
Minecraft Forge Modding 1.8 Problem - Textures Mix
Choonster replied to Mr.sKrabs's topic in Modder Support
In that screenshot, you're calling registerRender with the non-existent item variable. What I'm telling you to do is change the code inside the registerRender method to use the item argument. -
Minecraft Forge Modding 1.8 Problem - Textures Mix
Choonster replied to Mr.sKrabs's topic in Modder Support
From your PM: public static void registerRenders() { registerRender(Small_Flint); registerRender(Twigs); } This part is correct, but inside the registerRender method you should use item instead of Small_Flint or Twigs. -
[1.8] NetworkDispatcher exception on Multiplayer only
Choonster replied to Roxane's topic in Modder Support
I'm pretty sure the error is because your SimpleNetworkWrapper channel name exceeds the maximum length of 20. -
[17.10]Custom Biome filling with own stone
Choonster replied to NeoSup2130's topic in Modder Support
genBiomeTerrain is only called by genTerrainBlocks, the latter is the method called by ChunkProviderGenerate to generate the terrain. Override genTerrainBlocks instead of genBiomeTerrain. -
Minecraft Forge Modding 1.8 Problem - Textures Mix
Choonster replied to Mr.sKrabs's topic in Modder Support
The crash report tells you exactly what went wrong: registerRenders requires an Item argument, but you tried to call it with no arguments. A method named registerRenders (which implies that it registers multiple things) shouldn't need an Item argument (since it should be registering models for multiple items, not just one). -
Minecraft Forge Modding 1.8 Problem - Textures Mix
Choonster replied to Mr.sKrabs's topic in Modder Support
Upload the contents of the crash report (crash-reports/crash-2015-07-27_18.47.15-client.txt) and your code to Gist and link them here. The part you've posted doesn't contain much useful information, I need to see the stacktrace to help you.