-
Posts
588 -
Joined
-
Last visited
Everything posted by shadowfacts
-
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).
-
[1.9.4][SOLVED!] Colour codes in lang (Command)
shadowfacts replied to MCrafterzz's topic in Modder Support
There should be a stack trace in the log, post it. -
Allocate more memory, you've only give Java 499 megabytes.
-
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.
-
There's no Forge javadocs hosted on the web. Just look at the JavaDoc comments on the methods/classes in your IDE.
-
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.
-
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
-
You could use IEntityExtendedProperties , but you should just update. 1.8 is EOL.
-
Creating a simple "EnergyCollector" with CofhLib
shadowfacts replied to MikeZ's topic in Modder Support
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. -
Yes, there is.
-
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
-
<self-promotion> https://shadowfacts.net/tutorials/forge-modding-194/ </self-promotion> There's also the Forge RTD and this wiki.
-
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.
-
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.
-
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 .
-
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
shadowfacts replied to Radiophex's topic in Modder Support
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
shadowfacts replied to Radiophex's topic in Modder Support
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. -
Be more specific. What errors? What have you tried?
-
Be more specific. What errors? What have you tried?
-
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.
-
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.
-
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.