-
Posts
5160 -
Joined
-
Last visited
-
Days Won
76
Everything posted by Choonster
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
IExtendedEntityProperties was deprecated in favour of the Capability system in 1.8.9, it's now been removed completely in 1.9. For examples, you can look at the capabilities provided by Forge ( CapabilityItemHandler and CapabilityAnimation ), the capability test mod or my own mod's capabilities (API, implementation).
-
There's no way to intercept chat messages on the client before they're sent to the server without some ASM or possibly messing around with Netty to intercept the packet. Why not just create an ICommand and register it with ClientCommandHandler .
-
[1.8.9] Backpack inventory is duping [Solved]
Choonster replied to TrashCaster's topic in Modder Support
It's not directly related to your problem, but you may want to consider moving your inventory to the IItemHandler capability. This will allow the inventory to be stored in memory and only read from/written to NBT when needed instead of having to read/write every time you want to do something. -
Forge hasn't yet added support for modded SoundEvent s, see this issue.
-
[1.7.10]Minecraft Server Crashes at Intializing.
Choonster replied to BenCat07's topic in Modder Support
Your log is almost unreadable, but it looks like you tried to use a client-only class on the server. It also looks like you're using MCreator, which we can't help you with. These articles explain why you shouldn't use it. If you want help with MCreator, ask on its forum. If you decide to develop a mod properly and want help with an issue or want help with an issue unrelated to your own mod, use Gist or Pastebin to post logs (the full FML log from the logs folder, not the console output) and code with syntax highlighting. To get syntax highlighting on Gist, give each file the appropriate extension (.java for Java code). To get syntax highlighting on Pastebin, select the language from the dropdown at the bottom of the page. It's much easier to read code with proper formatting and syntax highlighting. -
[1.8.9] Different item model for inventory/held in hand
Choonster replied to Roboguy99's topic in Modder Support
You can probably use IPerspectiveAwareModel for this, but I don't know enough about it to help you much further. -
[1.9] Unable to access any fields on Forge events
Choonster replied to Cendrb's topic in Modder Support
Most event fields were made private with public getters in 1.9-12.16.0.1805. Use the getters. -
Did you not read the big red text at the top of the site's home page telling you to post your FML log? We can't help you without seeing the log, so upload it to Gist and link it here. The Modder Support section is for help developing mods. The Support section is for help using mods. Your thread should be moved there shortly.
-
AE is open source, have you tried looking at how it manages its networks?
-
[1.9] Executing a Client command when client joins a server
Choonster replied to TommyHoogstra's topic in Modder Support
It turns out that FMLNetworkEvent.ClientConnectedToServerEvent is fired before the client player is created and the server has finished the handshake process, so you can't use Minecraft#thePlayer or send packets. What you can do is have a separate event handler for EntityJoinWorldEvent that you register from the FMLNetworkEvent.ClientConnectedToServerEvent handler. When the client player joins the world, send the chat message and then unregister the event handler. I've written an example of this here. -
The state engine was in incorrect state CONSTRUCTING help pls
Choonster replied to Said_noah's topic in Support & Bug Reports
You have two copies of Tinkers' Construct installed. The Modder Support section is for help developing mods. The Support section is for help using mods. Your thread should be moved there shortly. -
Unfortunately, I can't help you with that. I suggest looking at the changes in vanilla's renderers, searching for forum threads relevant to the topic and/or waiting for someone who knows the rendering system to post.
-
[1.9] Entity only first spawned entity visible
Choonster replied to BusyBeever's topic in Modder Support
The second argument of the RenderFireball constructor is the scale to render the fireball at, it's not a unique identifier of any kind. -
This is what the enchantment table does, so it is indeed possible. Just set the block's model to the basic cube using the standard model system and have your TESR render the hologram above it.
-
[1.9] Executing a Client command when client joins a server
Choonster replied to TommyHoogstra's topic in Modder Support
That should work, since it's the same method used by the chat GUI to send chat messages to the server. Does it work if you send some text that isn't a slash command? -
[1.9] Executing a Client command when client joins a server
Choonster replied to TommyHoogstra's topic in Modder Support
Use EntityPlayerSP#sendChatMessage to send a chat message packet to the server.