Jump to content

Choonster

Moderators
  • Posts

    5161
  • Joined

  • Last visited

  • Days Won

    76

Everything posted by Choonster

  1. Slot#getStack can only throw a NullPointerException if its IInventory is null .
  2. The TileEntity isn't usually intact when Block#getDrops is called, look at Forge's patch to BlockFlowerPot to see how it delays the removal of the TileEntity until after Block#getDrops has been called.
  3. Pixelmon is broken, update it to the latest 1.7.10 version.
  4. Universal Electricity is broken. You're also using a dev build of it. You're using a version of BuildCraft Compat built for 1.8+ on 1.7.10.
  5. Have you registered the event handler? I suggest reading a tutorial on event handlers, like this one.
  6. Weeping Angels requires Origin. You're using a dev (deobfuscated) build of CoFH Core. This won't work in the normal (obfuscated) client.
  7. 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.
  8. 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.
  9. 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.
  10. Minecraft is only configured to use 1 GB. Do you have the _JAVA_OPTIONS environment variable set?
  11. 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.
  12. 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 .
  13. 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 .
  14. 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.
  15. Stuffed Animals is trying to load a client-only class on the server, it won't work on the dedicated server due to this.
  16. From the Dynamic Lights thread and download page:
  17. Give the gun an inventory using the Capability system and have the table use it.
  18. 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 .
  19. 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 .
  20. 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.
  21. The issue is with Kitsune, it needs to be updated to work in Forge 1.9-12.16.0.1819-1.9 and newer.
  22. 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 .
  23. 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.
  24. 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.
  25. 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.
×
×
  • Create New...

Important Information

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