Everything posted by Choonster
-
Error at Rootmodel??
Post the full stack trace. This method is called recursively, so it's possible you'll get a StackOverflowError if a model has a cyclic inheritance graph (e.g. A has parent B, B has parent A).
-
[Solved] [1.8] IBlockState Help
You need to think about how each property's value will be stored in the metadata and then convert to and from the metadata appropriately. For a single boolean, you can just use metadata values 0 and 1.
-
[1.8] Setting up CCC and NEI
Why add them as dependencies in the buildscript block? Isn't that only for the build script's dependencies?
-
[Solved] [1.8] How to update Forge version
There's no need to run Gradle for the MDK download, just copy the ForgeGradle plugin declaration and Forge version from the build.gradle file into yours and run the Gradle commands I mentioned for your project.
-
[1.7.10] how do I know when I need the world to be client or server?
Yes, the server is the authority on pretty much any calculation; including damage. As long as the potion is active on the server, its effects should work.
-
[Solved] [1.8] How to update Forge version
For Eclipse, run gradlew setupDecompWorkspace cleanEclipse eclipse . For IDEA, run the setupDecompWorkspace task and then refresh it in the Gradle tab. Download and extract the version 1506 MDK (the new name for the src download), open its build.gradle file in a text editor and compare it to your current one. You'll want to replace the buildscript block and apply plugin line of your build.gradle with the plugins block of the new build.gradle.
-
[1.7.10] how do I know when I need the world to be client or server?
Most things should either be done only on the server (if a packet is automatically sent to the clients) or on both sides (if a packet isn't automatically sent). In this case, the server will automatically send a packet to the clients when you add, change or remove a potion effect; so you only need to do it on the server.
-
[Solved] [1.8] How to update Forge version
It's the same for any version of Forge that uses ForgeGradle: change the minecraft.version field in your build.gradle script to the appropriate version from files.minecraftforge.net and refresh or regenerate your IDE project. Recent versions of 1.8 have changed the way that the ForgeGradle plugin is applied (since there's now a stable version rather than a snapshot), so if you're updating to version 1503 or newer you should copy the changes to your build.gradle script.
-
[1.8]Crafting reciepe error[SOLVED]
You've added a recipe for an ItemStack with a null Item . You should instantiate and register your Block s and Item s in preInit and then add your recipes in init.
-
[1.8]Obtain crafting table output? [SOLVED]
PlayerEvent.ItemCraftedEvent is fired on the FML event bus when a player crafts something.
-
[1.8]Crafting table GUI help
Ah, you need to register your IGuiHandler in the init phase with NetworkRegistry#registerGuiHandler .
-
[1.8]Crafting table GUI help
Add a static field of type tutmod to your tutmod class and give it the @Instance annotation.
-
[1.8]Crafting table GUI help
You haven't added an @Instance field to your tutmod class.
-
[1.7.10] Spawn egg names messed up after swapping from global entity IDs
Spawn eggs only work with global IDs in 1.7.10. For spawn eggs without global IDs, either make your own item or upgrade to 1.8 (where Forge allows spawn eggs to work without global IDs).
-
[1.8]Crafting table GUI help
Post your main mod class, your IGuiHandler class and the class where you call player.openGUI on Gist (use the .java file extension so syntax highlighting works) and link them here.
-
[1.8]Crafting table GUI help
That's the instance of your main mod class (the class with the @Mod ) annotation. If you have a static field in the mod class of the same type, you can add the @Instance annotation to it and FML will fill it with your mod's instance.
-
[1.7.10] Give myself a dev item
This is possible with some limitations and hacks, but it's not all that simple since IRecipe has no direct access to the player crafting it. Do you really a need a dev-only item? Is creative-only not enough?
-
[1.8][SOLVED] Player F3 information
The debug text is assembled in GuiOverlayDebug#call (for the text on the left) and GuiOverlayDebug#getDebugInfoRight (for the text on the right).
-
Event Problems
In single player, the integrated server will fire all server-side events (including BreakEvent and ServerChatEvent ).
-
Send values from one Block(TileEntity) to another [1.8]
If you want a ticking TileEntity in 1.8, implement IUpdatePlayerListBox . Block#randomDisplayTick is client-only, so it's not really suitable for processes that need to run on the server (like energy transfers).
-
[1.7.10] IItemRenderer bug.
You need to override Item#requiresMultipleRenderPasses to return true and Item#getIcon(ItemStack stack, int pass) to return the particle icon on pass 0 and the book icon on pass 1. Look at the vanilla overrides of Item#getIconFromDamageForRenderPass for examples of multi-layer items.
-
[Solved] A block that is affected by gravity but you can also walk through
To allow falling blocks to collide with the block but other entities to pass through it, you need to override Block#addCollisionBoxesToList to only call the super method if the Entity is an instance of EntityFallingBlock . I have an example of this here.
-
[1.8] Crafting Recipe Glitches
This exception is thrown when the ingredient ItemStack for one of the characters in the pattern string is null (a character with a null ingredient is not the same as a character with no ingredient specified). For this recipe, I think you'll need to assemble the pattern strings dynamically - for each ingredient index: if the ingredient for the index exists, use the corresponding character; else use a space.
-
[SOLVED][1.7.10] drop sapling with right id
Why are you creating a new ItemStack with the same Item and stack size but using the Block 's metadata instead of the existing ItemStack 's metadata? The metadata values used by Saplings aren't the same values as those used by Leaves. Block#getDrops already returns a list of ItemStack s with the correct metadata values for you, there's no need to subvert it. You shouldn't need to create a new Random for each iteration of the loop, create an instance once, store it as an instance field of your class and use that.
-
Registering Events
Each event is fired on a specific event bus, you need to register your handler with the right bus to receive the event. Forge's events are fired on one of its three event buses (usually MinecraftForge.EVENT_BUS , but there's also TERRAIN_GEN_BUS and ORE_GEN_BUS ); FML's events are fired on its own event bus ( FMLCommonHandler.instance().bus() ). The doc comment of an event class will often tell you which bus it's fired on, but you can also use your IDE's Find Usages/Call Hierarchy tool to see where it's instantiated and thus which bus it's fired on.
IPS spam blocked by CleanTalk.