Everything posted by Choonster
-
[1.9] Custom loot table for my own structures?
Forge's ChestGenHooks system was removed in 1.9. It turns out that you can use the loot table system even though Forge hasn't added any hooks for it. See this commit. You can use TileEntityChest#setLoot to set the ID of the LootTable that will be used to generate the chest contents.
-
[1.9] Custom loot table for my own structures?
Forge hasn't yet added support for custom loot tables, see this PR.
-
An ItemStack of cake
Minecraft doesn't have any mapping between these blocks and their custom items, as far as its concerned they're completely unrelated. It only maintains a mapping for blocks that use a standard ItemBlock . There are two ways you can create this mapping: Hardcode the vanilla block-placing Item s (that don't extend ItemBlock ) and their corresponding Block Iterate through the item registry, find any instances of ItemBlockSpecial / ItemReed and extract their Block The first way will obviously only work for vanilla blocks. The second way will work for any vanilla and modded blocks that use ItemBlockSpecial , but not ones that use their own unrelated Item class (e.g. Items.sign , which is an instance of ItemSign ). This mapping may not be 1:1, it's possible for there to be several Item s that place the same Block or for a single Item to place multiple Block s (e.g. ItemSign can place Blocks.standing_sign or Blocks.wall_sign ).
-
An ItemStack of cake
This is the case. Cake and a few other blocks have separate Item forms that aren't regular ItemBlock s. Items.cake stores the Item form of Cake. Look for usages of ItemBlockSpecial (1.9) or ItemReed (1.8.9 and earlier) to see which blocks have separate Item forms.
-
Ore dictionary custom furnace recipes?
Forge's ore recipes all store the List<ItemStack> for the given ore name as returned by OreDictionary.getOres , this list will be updated by the Ore Dictionary if any additional items are registered for this name. Ore Dictionary entries are often registered in the same phase as recipes are added (init), so it's entirely possible that more items will be registered for a name after you add a recipe using it.
-
Example mods
Forge's test/example mods can be found in the src/test directory of the GitHub repository.
-
Crashing on starting world
Update Neat to 1.2-5.
-
[1.9 1831] console errors
I don't think you can use 1.9 clients on 1.9.2 servers. Attempting to connect to an actual vanilla 1.9.2 server (without Spigot) from a Forge or vanilla 1.9 client just tells me that my client is outdated.
-
Handling Messages From Server
It's a class. Look at it in your IDE. Custom menus won't affect it, the raw data will always be made available by Minecraft.
-
Villager Textures
That's the class I'm talking about, yes. You're trying to return an existing instance instead of creating a new one (error 1) and returning null because you never assign a value to the field (error 2).
-
Villager Textures
Your IRenderFactory#createRenderFor implementation must create a new instance of the appropriate Render class (e.g. RenderBeeHive ) using the supplied RenderManager . You cannot create the Render instance outside of that method and return it. Your RenderFactory#createRenderFor method is currently returning null because you never assign a value to the RenderBeeHive.instance field. Do not use EntityRegistry.registerGlobalEntityID (there's a reason it's deprecated) or manually manipulate EntityList.entityEggs . All you need to register an entity is EntityRegistry.registerModEntity . If you need a spawn egg, use the overload with the two additional int arguments (the egg colours).
-
[Forge 1.7.10] -> Minimum required version problem
You're running Forge 1.7.10-10.13.4.1448 and trying to load Forge 1.7.10-10.13.4.1614 as a coremod, I'm somewhat surprised that it works at all. You need to tell your launcher to run the newer version of Forge instead of putting Forge in your mods folder. I'm not familiar with the FTB launcher, so I'm not sure how that's done.
-
[Forge 1.7.10] -> Minimum required version problem
Are you sure the FTB launcher loads Forge from the mods folder? Upload your FML log (the file mentioned in the error message) to Gist and link it here.
-
Villager Textures
The ModelVillager class is Minecraft's villager model.
-
|1.9]ISBRH replacement
Baked models (which can be JSON, OBJ or B3D) are the essentially equivalent of ISBRH in 1.9, yes. Their lack of OpenGL access allows them to be rendered quickly. If you need OpenGL access, use a TESR .
-
[1.9] Brand new modder, looking for some help updating an old mod.
These are mostly classes that have been renamed in recent versions. You can search the issues of this repository for the old class name to find out what it was renamed to. This will work for most classes that were renamed in 1.9, but may not work for earlier versions. AxisAlignedBB#fromBounds was removed when the class's constructor was made public. Use the constructor instead of fromBounds . Vanilla removed the WorldProvider#dimensionId field and its getter method in 1.9 and replaced them with the DimensionType enum and the WorldProvider#getDimensionType method. Forge re-adds the WorldProvider#dimensionId field, but the getter is now called getDimension instead of getDimensionId . WorldRenderer was renamed to VertexBuffer , so Tessellator#getWorldRenderer was renamed to Tessellator#getBuffer . MCPBot tells me that the SRG name of StructureStart#getComponents in 1.9 is func_186161_c and it was given the name getComponents two days after Forge's default 1.9 MCP mappings were generated. Either use the SRG name or update your mappings. MinecraftServer.getServer is no longer a static method. There are several methods that you can use to get the MinecraftServer instance now, use IDEA's Find Usages (or Eclipse's equivalent) feature to search for methods with return type MinecraftServer . In particular, you can use World#getMinecraftServer on a server-side World or FMLCommonHandler#getMinecraftServerInstance (prefer using the World method when possible). ServerConfigurationManager was renamed to PlayerList , so MinecraftServer#getConfigurationManager was renamed to MinecraftServer#getPlayerList . The PlayerList#playerEntityList field is now private, use the PlayerList#getPlayerList method to get it.
-
[1.8.9] gradlew setupDecompWorkspace --refresh-dependencies Fails at DecompileMC
Then I'm not too sure what's going on, sorry.
-
[1.8.9] gradlew setupDecompWorkspace --refresh-dependencies Fails at DecompileMC
Environment variables are part of your OS. Just search for "environment variables <your OS here>" and you should find plenty of websites that can tell you how to modify environment variables.
-
Adding new AI to Existing Mobs
To add new AI tasks you need to use EntityLiving#tasks and EntityLiving#targetTasks , yes. The earliest you can do this is EntityJoinWorldEvent . There's no way to globally add a new AI task that's automatically applied to every entity.
-
[1.9] registerExtendedProperties
ICapabilityProvider is something that can provide a handler for a given Capability and EnumFacing . TileEntity , Entity and ItemStack implement this so they can provide capabilities (e.g. IItemHandler for the inventory of an item, block or entity). If you want to attach capabilities to an object from vanilla or another mod using AttachCapabilitiesEvent , you need to supply an ICapabilityProvider that returns your handler object. Forge uses CapabilityDispatcher to wrap the ICapabilitiyProvider s from the event into a single ICapabilityProvider . The factory provides a new instance of the handler interface's default implementation. The doc comments of @CapabilityInject explain its purpose pretty clearly: On a field, it will set the field's value to the Capability instance for the specified handler interface when it's registered. On a method, it will call the method with the Capability instance for the specified handler interface when it's registered.
-
[1.7.10] How to change vanilla cows.
Use IExtendedEntityProperties (1.7.10-1.8. or Capabilities (1.8.9+) to store how many of the item has been given to the cow. When it reaches 3, kill the cow and spawn your mob at the same position. For IEEP , you can follow coolAlias' tutorial. For Capabilities, you can read the official documentation, look at the Capabilities provided by Forge ( CapabilityItemHandler and CapabilityAnimation ), the capability test mod or my own mod's capabilities (API, implementation). I highly recommend updating to 1.8.9 or 1.9, 1.7.10 is very outdated at this point.
-
Crashing
The mention of DamageIndicatorsMod.server.DIProxy in the stacktrace made me suspect it may not be a client-only mod (since it looks like it could be the server-side @SidedProxy class), but if it's client-only it may just be a confusingly named class.
-
[1.8.9] gradlew setupDecompWorkspace --refresh-dependencies Fails at DecompileMC
If you have the _JAVA_OPTIONS environment variable set, remove it. This should allow Gradle to use the JVM arguments you've specified in gradle.properties.
-
1.8.9 Animating 3D Models
I suggest you use Forge's animation system for this. I can't help you with it much myself, but there's an example mod here (assets). The commit that added the system briefly explains the purpose of each animation class.
-
Crashing
Damage Indicators is trying to load a client-only class on the server. The mod is either client-only or broken, but the end result is that it can't be installed on the server. Normally I'd suggest reporting this to the author, but the mod appears to be abandoned.
IPS spam blocked by CleanTalk.