-
Posts
5153 -
Joined
-
Last visited
-
Days Won
76
Everything posted by Choonster
-
[1.8.9] Entity rendering registering recently changed?
Choonster replied to 61352151511's topic in Modder Support
An IRenderFactory is just a class that creates a new instance of the appropriate Render class. Instead of creating the Render instance as you register it, you create an IRenderFactory that creates the Render instance later in the load process. -
[1.7.10] Changing texture based on item in Gui slot
Choonster replied to shmcrae's topic in Modder Support
Override Item#getIconIndex to load the InventoryStaff from the ItemStack 's NBT, check for the appropriate item and then return an IIcon based on it. -
[1.8.9] Entity rendering registering recently changed?
Choonster replied to 61352151511's topic in Modder Support
If you look at the implementation of RenderingRegistry.loadEntityRenderers , you'll see that it copies the renderers from RenderingRegistry#entityRenderers into the entityRenderMap argument. It's called in FMLClientHandler#finishMinecraftLoading to load mod entity renderers into the vanilla map. Use RenderingRegistry#registerEntityRenderingHandler to register an entity renderer. -
[1.8.8] Getting a stack in my custom inventory slot
Choonster replied to HappyKiller1O1's topic in Modder Support
Surely you know how to access your custom inventory for a particular EntityPlayer ? Once you have a reference to the inventory, you just need to check each slot to see if it contains the item. If the item can only be placed in a particular slot, you only need to check that slot. -
[SOLVED][1.8.9] Using Forge Mod Update Check system
Choonster replied to Bektor's topic in Modder Support
Geforce has a tutorial on the system here. -
[1.8.9] [SOLVED] TileEntity Doesn 't work anymore
Choonster replied to rowan662's topic in Modder Support
IUpdatePlayerListBox was renamed to ITickable in 1.8.8. You don't implement either of these interfaces, so your TileEntity doesn't tick. You should add @Override to override methods (including interface method implementations) so you get a compiler error if it doesn't override a method of the superclass (or implement an interface method). -
Please help. Error after the command /give.
Choonster replied to Vestnik's topic in Support & Bug Reports
You'll need to use an NBT editor like NBTExplorer to remove the item from your inventory in the level.dat file. In the Data -> Player -> Inventory list, the first 0-9 entries will be your hotbar items (empty slots aren't written to NBT). You can find the mapping from item names to IDs in the Data -> FML -> ItemData list. -
Item.registerItems instantiates and registers all vanilla items. The static initialiser of Items gets the Item instances from the item registry and assigns them to the static fields. Item creation and registration hasn't really changed in 1.8, only the model system has. BedrockMiner has a tutorial on creating a basic item in 1.8 here. I register my mod's items using this class. I register my models using this class. This code is for 1.8. Switch to the 1.8.8 branch to see the 1.8.9 code.
-
Yes, I'd recommend using a for-each loop when just iterating (which uses the Iterator under the hood) or explicitly using the Iterator when you need to remove elements while iterating.
-
[1.8.8][SOLVED] Getting an instance of RendererLivingEntity?
Choonster replied to HappyKiller1O1's topic in Modder Support
When you add a layer to a renderer, you should pass that renderer to the layer's constructor (so both the renderer and layer have references to each other). The values of RenderManager#skinMap are the instances of RenderPlayer used to render each skin type, so pass these to the layers as you create them. -
I suspect OptiFine is screwing things up. Try removing it.
-
It's an issue with your ServerTools configuration.
-
[1.7.10] How would I damage the player's held item from a keybind?
Choonster replied to Ms_Raven's topic in Modder Support
Just send a packet to the server saying "the player pressed the fire key", you don't actually need to send any data in it. On the server side, you'll have access to the player that sent the packet so you can check if they're holding a rod and then spawn the fireball and damage the rod (I'd recommend creating a method to do this in your Rod class). Forge's Read the Docs site has a section on networking here. This includes the Simple Network Implementation, which is what you should use to send the packet. -
It sounds like you need IExtendedEntityProperties . coolAlias has a tutorial on the system here. Jabelar has one here.
-
sa is the Notch (obfuscated) name of the Entity class. I have no idea why it can't find the class. Try running gradlew clean before building again. If you're still getting the same error, try running gradlew cleanCache and setting up your workspace again. Be warned that will delete everything in your Gradle cache, so you'll need to set up every workspace again.
-
[1.8.8] [SOLVED] Overlay String on itemstack
Choonster replied to ADonkeyTaboggan's topic in Modder Support
I can't seem to find a reference to this event? That's because it doesn't exist. shadowfacts was suggesting it be added to Forge. -
You have a trailing comma after the east variant, which is a syntax error. Did you not get a message in the log telling you this? I suggest running your JSON files through JSONLint when you're having model issues. If it still doesn't work after fixing that, follow The Grey Ghost's guide to troubleshooting block and item rendering. If you follow the guide and still can't find the error, upload your FML log to Gist and link it here.
-
Post the full output from Gradle.
-
The latest log is the one we want. Always post it when you have an issue. I recommend uploading the log to Gist and linking it here rather than including it in your post. You're running Minecraft 1.8, but Better Sprinting requires 1.8.8.
-
That message just means that Microsoft Edge won't run websites that use the Java plugin. You can still download and install Java to run Java applications like Minecraft.
-
Microsoft Edge is a web browser and has nothing to do with Forge. This wiki page explains how to install Forge.
-
You can register models in init using the overloads of ItemModelMesher#register , yes.
-
The RenderItem instance is created between preInit and init, so you can't use it in preInit. To register models in preInit, use ModelLoader.setCustomModelResourceLocation and ModelLoader.setCustomMeshDefinition .
-
You installed FML by itself. FML has been merged into Forge itself, so remove FML and just install Forge from files.minecraftforge.net.
-
All recent versions of Forge support Java 8 without issue, only 1.7.2 versions and old 1.6.4 versions don't (1.6.4-9.11.1.1345 fixed the Java 8 incompatibility). If it's not working for you, upload your FML log to Gist or Pastebin and link it here.