-
Posts
5160 -
Joined
-
Last visited
-
Days Won
76
Everything posted by Choonster
-
"creativemd" is broken, report it to the author. Include the link to your FML log in the report. Edit: I misread, as diesieben07 pointed out below.
-
[1.10.2] Forge Energy Capability in Item class
Choonster replied to Tomson124's topic in Modder Support
Your ICapabilityProvider class should store an instance of this custom IEnergyStorage implementation and return it from ICapabilityProvider#getCapability when the Capability argument is CapabilityEnergy.ENERGY. This is what allows other mods to access your IEnergyStorage instance. You can either create the IEnergyStorage instance in the ICapabilityProvider or create it in the Item#initCapabilities override and pass it to the ICapabilityProvider's constructor. -
[1.10.2] Check players position every x seconds
Choonster replied to LichtHund's topic in Modder Support
Subscribe to TickEvent.PlayerTickEvent, it will be fired twice per tick per player per side: once at the start of the tick with TickEvent.Phase.START and once at the end of the tick with TickEvent.Phase.END. -
[1.10.2] Forge Energy Capability in Item class
Choonster replied to Tomson124's topic in Modder Support
The ICapabilityProvider is responsible for storing the IEnergyStorage instance and providing it to external code. The IEnergyStorage implementation should be a completely separate class that stores the energy value and allows interaction with it through the IEnergyStorage methods. You will need to create your own ICapabilityProvider implementation, Forge doesn't provide a stand-alone implementation for your use-case. The only implementations apart from vanilla classes are CapabilityDispatcher, which is designed to wrap multiple ICapabilityProviders into one; and FluidHandlerItemStack, FluidHandlerItemStackSimple and FluidBucketWrapper, which implement IFluidHandlerItem in various ways. If you want the RF IEnergyContainerItem and Forge IEnergyStorage interfaces to interact with the same energy value, you'll need to implement that yourself. There are two ways to do this: Keep the current IEnergyContainerItem implementation and create an IEnergyStorage implementation that delegates to it Use the default IEnergyStorage implementation (EnergyStorage) and change the IEnergyContainerItem implementation to delegate to it -
1.7.10 is no longer supported on this forum, you won't get any help with it.
-
You can find the FML log at logs/fml-client-latest.log in the game directory. Post it in a spoiler here or upload it to Gist/Pastebin and link it here.
-
Did you contact the Lucraft author(s) before posting here? Lucraft is using an invalid character (U+0131 LATIN SMALL LETTER DOTLESS I) in a property name, report this to the author along with the crash report.
-
[1.10.2] Forge Energy Capability in Item class
Choonster replied to Tomson124's topic in Modder Support
Item capabilities are handled differently to Entity/TileEntity capabilities because Items are singletons, i.e. there's only one instance per item type. Instead of Item implementing ICapabilityProvider directly, it has a method (Item#initCapabilities) that creates and returns a separate ICapabilityProvider instance. ItemStack (which implements ICapabilityProvider) calls this method from its constructors and stores the returned ICapabilityProvider, using it in its own implementation of the interface. You can see some examples of items with capabilities here, here, here, here and here. These all use one of two ICapabilityProvider implementations: CapabilityProviderSimple (only implements ICapabilityProvider, doesn't save/load capability data) and CapabilityProviderSerializable (implements both ICapabilityProvider and INBTSerialializable so it saves/loads capability data). -
I suggest looking at the classes in the net.minecraft.client.audio package. You can probably use SoundHandler#getAccessor to get the SoundEventAccessor of a vanilla SoundEvent and use SoundEventAccessor#addSound to add a sound to it.
-
If you want to check if two IBlockStates are the same, just compare them with ==. Otherwise you can use BlockStateMatcher to compare two IBlockStates using a Predicate for zero or more properties.
-
[1.10.2] Potion effect on complete set of armor is worn
Choonster replied to caliban's topic in Modder Support
The solution is to override the method in the class that already extends Item (i.e. Chestplate, Helmet, etc.), not to make your registration class extend Item. -
LegacyJavaFixer is designed to allow 1.7.10 and earlier versions of Forge to run on Java 8, but you're using Forge for 1.11.2 on Java 7. This means that it won't work and isn't required, so remove it.
-
Help Can't run anything modded idk why..
Choonster replied to tomo7's topic in Support & Bug Reports
Applied Energistics requires Java 8, but you're only running Java 7. -
Getting EntityPlayer in a TickEvent to call another method.
Choonster replied to Geometrically's topic in Modder Support
Then you need to get the players from the World, as ctbe demonstrated. It's not directly related to your problem, but it should be noted that WorldTickEvent fires twice per tick per loaded dimension, so ticker will be incremented at least twice per tick with your current code. You need to check the event's Phase and the dimension being ticked to avoid this. You should avoid storing things related to game state in your event handler classes as these are shared between both logical sides (so you could potentially be accessing the fields from two threads at once) and aren't persisted in any way (so the data won't be saved when the client/server is stopped). Use data storage methods like World Saved Data or Capabilities to safely store per-dimension or per-map data that will be persisted with the save. You also need to consider which dimensions are affected by this "Solar Apocalypse", is it all dimensions or only the Overworld? Does each dimension have its own timer, or do they all use the same timer? -
[1.10.2] Potion effect on complete set of armor is worn
Choonster replied to caliban's topic in Modder Support
Your ModArmors class doesn't extend Item, so there's no onArmorTick method to override. You need to override it from the Item class used for your armour, not the class that registers the Items. -
PlayerCloneEvent is fired when a copy of a player is created before they respawn. Use this to copy data from the old player to the new one.
-
[1.10.2] Potion effect on complete set of armor is worn
Choonster replied to caliban's topic in Modder Support
onArmorTick is a method of Item, so you need to override it from a class that extends Item (or a subclass of it). It's only called on the Items that the player has equipped, so override it in your armour's Item class. It's not an event, I think Draco is confused. -
It's still the same as it was. This page is the most up-to-date guide on setting up a ForgeGradle workspace and it explains what each step does in a bit more detail.
-
Getting EntityPlayer in a TickEvent to call another method.
Choonster replied to Geometrically's topic in Modder Support
Draco isn't asking where you want to use the player, he's asking which player you're actually trying to use. If there are 20 players on a server, which one do you want to call the method for? -
Minecraft only added the SoundEvent system in 1.9, it doesn't exist in 1.8.9. The SoundEvent class you're referencing is the base class for Forge's sound-related events. I don't remember exactly how the sound system worked in 1.8.9, but I'm pretty sure you just needed the sounds.json file; all the registration was handled automatically.
-
Yes, it wouldn't be caused by not having Forge installed. Post the FML log (logs/fml-client-latest.log in the game directory) using Gist/Pastebin if you want help with the crash. In future, you should post in the Support & Bug Reports section. This thread should be moved there once a moderator comes online.
-
FML and Forge come in the same JAR/installer. You have both installed.
-
Click the Files link at the top of the site or go to https://files.minecraftforge.net/.
-
The FML log can be found at logs/fml-client-latest.log in the game directory. Either copy it into your post here inside a spoiler (the eye icon) or upload it to Gist/Pastebin and link it here.
-
You're running Minecraft 1.11.2, but you have a whole lot of 1.7.10 mods installed. Mods (especially coremods) generally only work in the Minecraft version they were built for; very few (if any) 1.7.10 mods will work in 1.11.2. If you're using Mojang's Minecraft launcher, you can set a separate game directory for each profile; allowing each profile to have its own set of mods installed.