Skip to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Choonster

Moderators
  • Joined

  • Last visited

Everything posted by Choonster

  1. Weeping Angels requires Origin. You're using a dev (deobfuscated) build of CoFH Core. This won't work in the normal (obfuscated) client.
  2. That is the right method, yes. This tells Minecraft to load the models, you can then tell Minecraft to use these models for your items using ModelLoader.setCustomModelResourceLocation / ModelLoader.setCustomMeshDefinition in preInit (use these instead of ItemModelMesher#register in init). You can use ResourceLocation s or ModelResourceLocation s here (since ModelResourceLocation extends ResourceLocation ), ResourceLocation s will be converted to ModelResourceLocation s with the "inventory" variant. Item.itemRegistry was renamed to Item.REGISTRY in more recent MCP mappings, use the appropriate name for your current mappings. You can also use ForgeRegistries.ITEMS instead. I suspect the doc comment is a leftover from older versions of Minecraft where blocks and items were stored in arrays indexed by their IDs. Pretty much every singleton class (e.g. Block , Item , BiomeGenBase ) is now stored in a registry. Things like block, item, recipe and IGuiHandler registration must be done on both physical sides (client and dedicated server), so do it in your @Mod class (or a class called from it). Your client proxy should only be doing client-only things like model registration. ItemBlock s are no longer automatically created and registered, you need to do this yourself (as described in the thread you linked). You can use Item.getItemFromBlock to get the ItemBlock form of a Block . You can see how I register my mod's blocks here and my item models (including ItemBlock s) here.
  3. Yes. This provides your IItemHandler instance from ItemStack#getCapability and reads from/writes to NBT. Yes, either of ItemStackHandler or your own IItemHandler implementation. You need to create a new instance of this for every instance of your provider ( ICapabilitySerializable ) class. Return a new instance of your provider class every time the Item#initCapabilities method is called.
  4. The IRenderFactory must be a separate class to the Render (it can also be a lambda, method reference or anonymous class). The whole point of IRenderFactory being introduced was to delay the creation of the Render instances until the RenderManager is ready. If you're extending Render directly, you need to override Render#doRender to actually render the player. Extend from RenderPlayer if you want the default player model to be rendered. Player renderers receive special treatment, so RenderingRegistry#registerEntityRenderingHandler probably won't work in this case. You'll need to create your Render instances in the init phase and use reflection to assign them to the RenderManager#playerRenderer field and the "default" and "slim" keys of the RenderManager#skinMap field. Note that your changes will be completely overwritten if another mod does the same thing. If you want to replace the skin for a specific player, consider doing something similar to what I did for capes here.
  5. Minecraft is only configured to use 1 GB. Do you have the _JAVA_OPTIONS environment variable set?
  6. Is the blockstates file named with your item's registry name? Post the full error, it should say exactly which files it tried to find and what went wrong with them.
  7. The class you specified in your @SidedProxy annotation doesn't exist, make sure you have the right package and class name. I suspect you wanted com.bensonchen.firsttestmod.ClientProxy , not com.bensonchen.firsttestmon.ClientProxy .
  8. Create an implementation of ICapabilitySerializable that provides an IItemHandler instance (probably an ItemStackHandler ). Override Item#initCapabilities to return a new instance of the provider. This gives your item an IItemHandler inventory that's stored in memory with the ItemStack and not written to NBT until it needs to be (unlike the old way of giving items inventories, which was using an IInventory read from and written to NBT every time it was accessed). To get this inventory from an ItemStack of your Item , use the ICapabilityProvider#getCapability method inherited by ItemStack . I don't have any examples of this exact use case, but I do have several of my own capabilities in my mod. You can see their APIs here and implementations here. ItemSlingshot and ItemLastUseTimeModel attach the ILastUseTime capability to themselves to track their last use time. The IMaxHealth capability is attached to all living entities in CapabilityMaxHealth.EventHandler to provide bonus max health and used by ItemMaxHealth{Getter/Setter} , BlockMaxHealth{Getter/Setter} and CommandMaxHealth{Add/Base/Get/Set} . The IPigSpawner capability is attached to ItemPigSpawner by itself and to Items.CLAY_BALL in CapabilityPigSpawner.EventHandler to allow them to spawn pigs and used by BlockPigSpawnerRefiller .
  9. Update LunatrisCore to 1.8-1.1.2.30. I would also recommend updating to Minecraft 1.8.9 and updating Forge, LunatrisCore and Schematica to match.
  10. Stuffed Animals is trying to load a client-only class on the server, it won't work on the dedicated server due to this.
  11. From the Dynamic Lights thread and download page:
  12. Give the gun an inventory using the Capability system and have the table use it.
  13. I suggest you set a breakpoint where the exception is thrown from the S3FPacketCustomPayload constructor. If the packet is a wrapper for an IMessage , the S3FPacketCustomPayload#channel field will be the name of the SimpleNetworkWrapper that sent it and the first byte in the S3FPacketCustomPayload#data field ( ByteBuf#getByte ) should be the discriminator of the IMessage .
  14. Use a TextComponentTranslation to send a chat message that's translated to the client's locale on arrival. If you throw a CommandException (or a subclass) from your command, it will be sent to the command sender as a TextComponentTranslation .
  15. You installed a coremod built for 1.7.10 or earlier on 1.9. Mods (especially coremods) only work for a single version of Minecraft.
  16. The issue is with Kitsune, it needs to be updated to work in Forge 1.9-12.16.0.1819-1.9 and newer.
  17. The resource path of your loot table's ResourceLocation must relative to assets/<domain>/loot_tables. You register a loot table for tetracraft:terrakon , but there is no assets/tetracraft/loot_tables/terrakon.json file. The actual path is assets/tetracraft/loot_tables/entities/terrakon.json, so register your loot table as tetracraft:entities/terrakon .
  18. Not personally, but Jabelar has a tutorial on complex entity models with animation here. I can't really help you with your issues unless you give me something to work with. I need to see the entity, the loot table file, any custom loot table classes used in it (e.g. properties, conditions) and the loot table registration.
  19. I know very little about rendering, I can't help you with animations. Use your EntityProperty in the properties section of an entity_properties conditional in your loot table JSON, like the on_fire property is used in the pig's loot table.
  20. You'll probably need to override Block#getMaterial(IBlockState) to return a different Material when the block isn't submerged in water. You don't have access to the world or position in this method, so you'll need to create an IProperty for this (probably a PropertyBool called IN_WATER ) and store it in the metadata. When the block is placed and when a neighbouring block changes, set the value of this property based on the surrounding blocks. I'm not sure exactly how to determine what qualifies as submerged and what doesn't, but start by checking if any of the horizontally adjacent blocks are something other than water or your plant.
  21. That hasn't changed in 1.9 and has little to do with the new registry system, since every Item is registered in the same way. Override Item#getUnlocalizedName(ItemStack) to return the appropriate unlocalised name based on any aspect of the ItemStack (stack size, metadata, NBT, capabilities).
  22. You also need to include the BlockLiquid.LEVEL property in your BlockStateContainer and register an IStateMapper to ignore that property in your blockstates file (if you don't want its value to affect the model). You can see my implementation of a basic water plant here, with the IStateMapper registration here (called in preInit from the client proxy).
  23. Create the TextComponentTranslation for the translated part of the header message with the page numbers as format arguments and set its colour to green. Create another TextComponentTranslation with the dashes and a formatting placeholder ( %s ) for the translated part with the first TextComponentTranslation as a format argument and set its colour to gold. Send this second TextComponentTranslation to the command sender as a chat message.
  24. ICommand#execute has a MinecraftServer argument, pass this to your applyModifier method.
  25. Use ForgeVersion.getResult to get the CheckResult of the version check for the specified ModContainer . FMLCommonHandler#findContainerFor will return the ModContainer for the specified mod ID or instance.

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.