Everything posted by Siqhter
-
Custom GUI Setting Slots
Thank you, I'm taking a look at that. I'm wondering in your example, where do you set a display name for the container? Originally I had something like "container.name" after the createContainer method. But I believe that's from IInventory.
-
What's the proper way to register a tileEntity?
Thanks.
-
What's the proper way to register a tileEntity?
How I do it is something like: and then call the method in your Main.java init method.
-
Missing texture
1) Don't use IHasModel, it's just more code you don't need to write. 2) There's no need for an itembase, just use Item. 3) Don't use static initialization in your ModItems class. I might be mistaken, but I think registry names need to be lowercase, yours are not and that could be the problem. This includes your json files. Furthermore, you are directing your models/item file to a path with a different modid of "tm".
-
Redstone Lamp issues and questions.
Well, in the crash log it looks like you're missing a file. That might be part of the issue.
-
Custom GUI Setting Slots
Edit: I've done some research on IItemHandler and Capabilites, so rather, where am I supposed to implement using capabilities. The tileentity? And what needs to change in my container class so that I'm not implementing IInventory.
-
[1.12.2] Can't find IItemHandler isItemValid
I believe that isItemValid is a method in Slot. I have a custom inventory slot that extends the Slot class, and that's where I control which items can be placed in certain slots. Not sure if this is what you're looking for.
-
Custom GUI Setting Slots
I guess I'm just unclear as to what I am supposed to replace with IItemHandler.
-
Custom GUI Setting Slots
Now when you told me to get rid of IInventory and use IItemHandler, is that because I'm using InventoryPlayer? How do switch it?
-
Custom GUI Setting Slots
Thanks for the explanation. I got it working, but I don't quite understand what I did: The "single slot" index is 9. How does the "index" relate to the "actual" slot in which an item can be placed?
-
Custom GUI Setting Slots
I know, that's why it duplicates the item because it's essentially the same slot. I don't know how to give it it's own index after looping through the first row. It's crashes the game with an out of bounds exception.
-
Custom GUI Setting Slots
Sorry. public CustomContainer(InventoryPlayer player, TestTileEntity tileEntity) { this.tileEntity = tileEntity; // single slot this.addSlotToContainer(new Slot(tileEntity, 0, 80, 32)); // row of 9 for (int i = 0; i < 9; i++) { this.addSlotToContainer(new Slot(tileEntity, i, 8 + i * 18, 53)); } /* Player Inventory and Hotbar */ for (int y = 0; y < 3; y++) { for (int x = 0; x < 9; x++) { this.addSlotToContainer(new Slot(player, x + y * 9 + 9, 8 + x * 18, 84 + y * 18)); } } for (int x = 0; x < 9; x++) { this.addSlotToContainer(new Slot(player, x, 8 + x * 18, 142)); } }
-
Custom GUI Setting Slots
So I have a custom GUI with one row of 9 slots, and then a single slot above them all (which is supposed to act just like all the others, it's not an output). I loop through the row of 9 slots and add them to the container, which works fine. Then I add just the top slot and it's coordinates to the container. However, everytime I put an item in the top slot, it duplicates into the corresponding slot in the for loop. I know it's a logical error, but I'm not able to figure out how to fix it.
-
Changing Text Color of Inventory
Thanks, I was pretty sure of that. There's no downfall of using GuiChest if I don't want to customize anything other than the amount of slots, right?
-
No texture is displayed.
I don't know why I assumed that his modid was "tutorialmod". That would make sense that that would be the issue.
-
Changing Text Color of Inventory
I have created a GUI for a container block that opens on right click. I am using ContainerChest and GuiChest since I don't need a custom GUI at this moment. That being said, is there any way to change the text color of the inventory title for my container block?
-
No texture is displayed.
Ok, it looks like you're directing it to the correct texture, so you might have registered it with a different name or you're directing the json to the wrong path. Either way we would need to see more code.
-
No texture is displayed.
Post your json or a github link.
-
Missing block texture (should be something simple)
Sorry, I missed that. I'm honestly not sure, but you might be accessing the wrong resources path:
-
Missing block texture (should be something simple)
Are you sure the png is named correctly?
-
Missing block texture (should be something simple)
Can you post your json files for the block?
-
Changing Block Model Based on Neighbor
Thanks, I think I breezed over that but I'll take a closer look at it now.
-
Changing Block Model Based on Neighbor
Thanks, this is what I was looking for. Is there an example of how I should modify the blockstate in the neighborChanged method?
-
Changing Block Model Based on Neighbor
I have taken a look at BlockStairs.java, but I'm not sure I understand what's going on. Basically I just want to change a neighboring block based on the direction and position of the just-placed block. I don't know what I should use to do this (neighborChanged method?) so a point in the right direction would be appreciated. Thanks.
-
[SOLVED] Problem Registering Item Block Variants
Also don't use a static initializer to register blocks/items.
IPS spam blocked by CleanTalk.