-
[1.12]Advancement function not running
Have you tried running the function through the /function command? I have a feeling functions in the mod itself might not work, since they're per-world.
-
[1.12] ItemStackHandler size issue(?)
Ahhhhhh, that would do it. Works now. Thanks!!!
-
[1.12] ItemStackHandler size issue(?)
I'm trying to make an inventory with five slots, but every time I try to put more than one slot on the Container file for the inventory, the game crashes as soon as I open the inventory. It says that it only has slots [0,1) available in the crash log even though I have the IStackHandler's size parameter set to 5. Am I doing something wrong? (side note: I kinda have the feeling that my container file could be a little more efficient with all the markDirty(); so if that can be improved please let me know) relevant files:
-
[1.12] GuiScreen setup with drawTexturedModalRect
That works. Thanks!!
-
[1.12] GuiScreen setup with drawTexturedModalRect
I'm not really sure what to do otherwise. I'm just going off what tutorials I can find, and I can't really find any for a client-only GUI except for one that's for Forge 1.8 and uses IGuiHandler. I don't know how to use the sided proxy to open a GUI.
-
[1.12] GuiScreen setup with drawTexturedModalRect
Hm. Even then, it doesn't seem to be working. I right-click the ItemNote and nothing happens; it doesn't even do the screen tint or freeze my character. Is there anything else I might be doing wrong?
-
[1.12] GuiScreen setup with drawTexturedModalRect
I'm trying to make an in-game tutorial-like thing for my mod, and want it to just draw a gui element on screen when you use an item. However, whenever I try, nothing happens. I don't get any error in the console, and I think I have everything set up properly, I'll attach the relevant files. Hell, I'm not even sure if you can use drawTexturedModalRext with a GuiScreen but I really hope you can or there's some other way to draw a gui without needing a whole container setup. What should I be doing that isn't being properly done?
-
[1.12] setBlockState state.CycleProperty without resetting block NBT data (or update blockState/model based on NBT data)
Worked. Thank you! For others with the problem, here's the code I used, grabbed from this Minecraft Forum post: public class TileEntitySmelter extends TileEntity { //... @Override public boolean shouldRefresh(World world, BlockPos pos, IBlockState oldState, IBlockState newState) { return (oldState.getBlock() != newState.getBlock()); } }
-
[1.12] setBlockState state.CycleProperty without resetting block NBT data (or update blockState/model based on NBT data)
I'm trying to make a block I've made change its model when I put something into its inventory. Right now, the only way I can tell how to change block states at all is with world.setBlockState(pos, state.cycleProperty(MODE, 3); (at least that's the code I'm using for it), but doing that resets the NBT and clears out the inventory. I've tried shuffling around the tile.markDirty(); commands and the setBlockUpdate ones but nothing's managed to save the inventory and the state. What should I be doing instead? The code being used, in case I'm just doing something drastically wrong with what I currently have:
-
[1.12] sendMessage(new TextComponentTranslation()); duplicating sent messages
Ah, much better. Thank you!
-
[1.12] sendMessage(new TextComponentTranslation()); duplicating sent messages
I'm trying to test out the sendMessage function with an item that sends a message through chat when you right-click with it. However, for some reason, it's having a bit of an issue: it's sending the message twice. I have no idea why it's happening, but it is. I've got a video of that happening here, and I'll include the code for the item under a spoiler. Anyone have an idea what's happening?
IPS spam blocked by CleanTalk.