-
Posts
892 -
Joined
-
Last visited
-
Days Won
1
Posts posted by Awesome_Spider
-
-
Your getMetaFromState returns 0. You have to return a value or it won't save as Lhykos pointed out. I have a class that does this. You can find it here:
You would, from the state, get the value, cast it to an EnumFacing, and get the index.
- 1
-
Ok. It's working. Thanks!
-
I am updating a mod (EnviroMine) that adds a HUD to display information to the player. I have no idea how to where to start. How would I add this 1.11?
-
Ok, good to know.
-
10 minutes ago, diesieben07 said:
It's the equivalent to the new registry events.
Never heard of those either. I'll read up on that.
-
Are you registering your models anywhere then?
2 minutes ago, diesieben07 said:You need to call ModelLoader.setCustomModelResourceLocation in ModelRegistryEvent.
That's interesting. Never heard of doing it that way.
-
Hmm... Can you post your client proxy?
-
And why did you create a pack.mcmeta? That's for resource packs and is not related to modding.
-
Is your ModId lowercase? If not, change to such.
-
13 hours ago, Leomelonseeds said:
If so implement IInventory on your TileEntity.
I don't think you are supposed to implement IInventory. Capabilities is the new way.
-
36 minutes ago, clowcadia said:
What about custom machines like furnace with out copy and paste
You'll also have to implement ITickable I believe.
-
Ok, you're close. You need to override both hasCapability and getCapability. Also, who'll need to have an ItemStackHandler field in your class and write and read it to and from NBT by overriding writeToNBT and readFromNBT. I'll check my code to make sure it's correct though.
-
Ya, I guess you can do it like that. That's another way.
-
Create a block class the overrides hasTileEntity and getTileEntity and make the getTileEntity method return a new instance of your tile entity class (create one if you haven't already). In your tile entity expose a capability for an ItemStackHandler (read this).
Then if you want a gui, they are basically the same as 1.8.
Edit: I hope that was easy to understand. If it wasn't, I can explain a little more.
-
What have you done so far?
-
Well, there is shadow facts, but if you want GUIs I don't think there is any. Basically there is no IInventory anymore, you use a ItemStackHandler field in your tile entity class a use capabilities to save it.
-
Yes, but it looks like you haven't called the init method or the register method, you only called the registerRenderers method.
- 1
-
Oh, that's why. You have to register the armor items before you can register the renderers.
- 1
-
NullPointers are easy to diagnose. It means you tried to reference something when it is null. Can you show where you called the register methods?
- 1
-
Lol, oops. Thanks for pointing that out.
-
That fixed it. Thanks
-
1 minute ago, Draco18s said:
This is what's missing:
@Override public boolean isOpaqueCube(IBlockState state) { return false; }
Ok, thanks for the help.
2 minutes ago, Draco18s said:Also, make sure you annotate all override methods with @Override
Oops. I knew that, just missed one of them.
-
I make a block that has a partially transparent texture and I want it be clear like glass is. I copied the glass code and now my block sees right through the ground. How would I fix this?
Here is pictures of this and my code:
http://image.prntscr.com/image/a8f16eeef55a43c6bbf48f06e431de65.png
http://image.prntscr.com/image/c12682e8b9a34e24aadc3829689e1884.png
The block code:
public class BlockMachineFrame extends BlockBase { public BlockMachineFrame() { super(Material.IRON, "machine_frame"); setHardness(3f); setResistance(5f); setHarvestLevel("pickaxe", 0); } @Override public BlockMachineFrame setCreativeTab(CreativeTabs tab) { super.setCreativeTab(tab); return this; } @SideOnly(Side.CLIENT) public BlockRenderLayer getBlockLayer() { return BlockRenderLayer.CUTOUT; } public boolean isFullCube(IBlockState state) { return false; } }
The blockstate file:
{ "forge_marker": 1, "defaults": { "textures": { "all": "roboticraft:blocks/machine_frame" } }, "variants": { "normal": { "model": "cube_all" }, "inventory": { "model": "cube_all" } } }
-
Show the error.
[1.10.2] (Texture) Block Rotation [SOLVED]
in Modder Support
Posted
And instead of defining blockstates like this:
... "variants": { "normal": { "model": "orientable" }, "inventory": { "model": "orientable" }, "facing=north": { "model": "orientable" }, "facing=east": { "model": "orientable", "y": 90 }, "facing=south": { "model": "orientable", "y": 180 }, "facing=west": { "model": "orientable", "y": 270 } ...
Define them like this:
https://github.com/WiseOwl5/RobotiCraft/blob/master/1.11/src/main/resources/assets/roboticraft/blockstates/steam_engine.json#L11-L35