Everything posted by shadowfacts
-
Rendering ItemStack in TESR
So I've got a TileEntity that contains an ItemStack . The TESR for the TE should render the item spinning and bobbing up and down in the block. I've run into a problem because my block isn't a normal 1m^3 block, but much smaller. I've tried two approaches to rendering the item, neither of which has been completely successful. My first approach was getting the IBakedModel for the stack using RenderItem and then also use RenderItem to render that model. This worked and stayed in the proper position while rotating/bobbing. However, the item was rendered completely dark and I wasn't able to find a fix (screenshot). My second approach was to use RenderItem to get the IBakedModel for the stack and use BlockModelRenderer to render the model. This resulted in the item rendering properly lit, but the item was moving with the player (not in a 1:1 fashion, but something else).
-
Invisible zombies and optifine crash forge-1.9.4-12.17.0.1943-universal +
There's no Forge in that log and you're using OptiFine. This is almost certainly a problem with OptiFine.
-
[1.9.4][SOLVED!] Colour codes in lang (Command)
There should be a stack trace in the log, post it.
-
Forge crash!
Allocate more memory, you've only give Java 499 megabytes.
-
Get dependency from Drone.io
You'll probably need to use a custom pattern layout for an Ivy repo in Gradle to use drone.io. Exactly what that will be, you need to figure out.
-
Do you have Javadoc for 1.7.10 and 1.8 link?
There's no Forge javadocs hosted on the web. Just look at the JavaDoc comments on the methods/classes in your IDE.
-
[1.9.4] Items.apple >> Items.APPLE
Whoops, there should be a + after the letter matcher in the find expression. This is the new find expression: (Blocks|Items)\.([\p{L}|_]+) It now matches more than the first character and should capture the entire name if the name contains an underscore. The replace expression should be fine.
-
[1.9.4] Items.apple >> Items.APPLE
I used a regex find/replace to go through my entire mod and replace all the occurences. I'm not sure if it's possible in Eclipse, but it is in IDEA. This is about what I used for blocks/items. Find: (Blocks|Items)\.(\p{L}) Replace: $1.\U$2\E
-
[1.9.4] Is there a ready to use GUI framework for modders to work with?
A number of modders (myself included) have there own GUI libraries but there is no universal standard.
-
How to count killings?
You could use IEntityExtendedProperties , but you should just update. 1.8 is EOL.
-
Creating a simple "EnergyCollector" with CofhLib
You block needs to have a TileEntity and that should implement IEnergyHandler . Look at TileEnergyHandler for a reference implementation of IEnergyHandler . You'll need to add a call to IEnergyStorage#receiveEnergy in your tile's update method as well.
-
CofhLib Tutorial/Documentation?
Yes, there is.
-
[1.9.4] Using GUIs
Your mod ID in the path assets path needs to be completely lowercase too. e.g. src/main/resources/assets/yourmod not src/main/resources/assets/yourMod
-
Any series of good 1.9.4 tutorials?
<self-promotion> https://shadowfacts.net/tutorials/forge-modding-194/ </self-promotion> There's also the Forge RTD and this wiki.
-
Send message on item use
1. As Ernio said, 1.6.4 is no longer supported. 2. Go learn Java. If you knew the basics of Java you would be able to answer your own question.
-
Send message on item use
1. As Ernio said, 1.6.4 is no longer supported. 2. Go learn Java. If you knew the basics of Java you would be able to answer your own question.
-
Deprecations in 1.9.4
On those methods, Mojang appears to be using deprecation to mark that the methods are internal and should only be used by internal MC code and subclasses of Block .
-
Deprecations in 1.9.4
On those methods, Mojang appears to be using deprecation to mark that the methods are internal and should only be used by internal MC code and subclasses of Block .
-
[1.9.4] Block rendering crashes Minecraft
In Minecraft, blocks only exist in the world. In your inventory, everything is a ItemStack which contains an Item . When you register your block, you also need to register an ItemBlock , which is the in-inventory representation of your block, for your block. When you call GameRegister.register it only registers the block. To register an ItemBlock you'll need to use something like this: GameRegistry.register(new ItemBlock(cheese_block).setRegistryName(cheese_block.getRegistryName())); Also, you're registering cheese_blockName which is created in the register method but your using MyBlocks.cheese_block everywhere else.
-
[1.9.4] Block rendering crashes Minecraft
In Minecraft, blocks only exist in the world. In your inventory, everything is a ItemStack which contains an Item . When you register your block, you also need to register an ItemBlock , which is the in-inventory representation of your block, for your block. When you call GameRegister.register it only registers the block. To register an ItemBlock you'll need to use something like this: GameRegistry.register(new ItemBlock(cheese_block).setRegistryName(cheese_block.getRegistryName())); Also, you're registering cheese_blockName which is created in the register method but your using MyBlocks.cheese_block everywhere else.
-
[1.8.9] Addons
Be more specific. What errors? What have you tried?
-
[1.8.9] Addons
Be more specific. What errors? What have you tried?
-
Block mapping texture
You mean how to have multiple icons for different block faces in the same PNG file? Don't. Just use separate files, all the icons will be stitched together by MC anyways.
-
Block mapping texture
You mean how to have multiple icons for different block faces in the same PNG file? Don't. Just use separate files, all the icons will be stitched together by MC anyways.
-
Block mapping texture
Override the method that takes an int for the side and returns an IIcon and return the correct icon for the side. You'll also need to register your icons in the registerIcons method of your block.
IPS spam blocked by CleanTalk.