
EscapeMC
Forge Modder-
Posts
337 -
Joined
-
Last visited
Everything posted by EscapeMC
-
[1.10.2] {Solved...?} Shift-Clicking Duplicates
EscapeMC replied to EscapeMC's topic in Modder Support
Still no clue to solving this. Someone please? -
[1.10.2] {Solved...?} Shift-Clicking Duplicates
EscapeMC replied to EscapeMC's topic in Modder Support
Hello? Well, I've deduced (I think) it has to do with my transferStackInSlot EIDT: Nevermind. Its not that part. Not that at all I believe... -
[1.10.2] {Solved...?} Shift-Clicking Duplicates
EscapeMC replied to EscapeMC's topic in Modder Support
Anyone know the answer? I am still clueless after spending more time looking. -
Alright, so I asked about this earlier, but I thought I would make a new thread for it, because I marked the other as solved (blah blah yes I know I could mark it as unsolved but I just thought to make a new one) Whenever I shift-click an item (from my hotbar only) into any of my custom chests, it doubles it (up to 64) I remember diesieben07 had said something about the fact that I have both transferStackInSlot and mergeItemStack. Would this be the problem? Second thing: Whenever I shift right click and item to put it in my chest (from anywhere), it puts it to the bottom right-most slot. Is there a way to fix this, so it acts normally and puts it to the top left like a normal chest? (I cannot figure it out) Git is ThingsMod in my signature.
-
Well I solved my own problem! #When you forget to register the tile entity in the main class so that is why it didn't work GitHub is also updated too.
-
I will get back to you (on this thread) when I am ready and my git repo loaded and everything
-
This is my TE, Container, and CommonContainer for my black hole. I cannot post my black hole stuff to my git hub right now. In 2 hours I can. EDIT: Also, while looking through, I noticed my CommonContainerBlackHole was using TETestChest. I just changed it. This has something to do with transferStackInSlot and mergeItemStack in CommonContainer9x5 . Why are you overriding both? Only transferStackInSlot should be needed. But in all honesty I hate shift-clicking with a passion... Implementing it that is. So with this are you saying I only need to keep transferStackInSlot, and I can get rid of mergeItemStack? EDIT: I noticed, the only time it doubles the item, is when the item is/was in the hotbar
-
No, it is not a joke. I just did that because in case I wanted to do anything else with it. Also I like it more. https://sendvid.com/za5vqhbv A few problems, 1) with the chest (thw first block opened) as you might have seen, when I shift-right clicked a block in there it became 2. Any ideas on this? 2) I have the same NBT with both TEs for BlackHole (the huge gui) and the chest (smaller one). You saw the chest worked. the Black Hole didn't. I then copy-pasta my TE for the chest into my black hole TE, and change the 1 thing to fix the names, but the NBT doesn't work. (I did this off the video)
-
If you look here https://github.com/EscapeMC/Things-Mod-1.10.2/tree/master/src/main/java/com/github/escapemc/thingsmod This is my github. Do note, I cannot edit anything on my github right now (not on the correct account on my computer and I cannot access that account until later today) Just look to my TileEntityTestChest https://github.com/EscapeMC/Things-Mod-1.10.2/blob/master/src/main/java/com/github/escapemc/thingsmod/tileentity/TileEntityTestChest.java It has the same code (minus a few things) as my BlackHole one.
-
[1.10.2] - [Solved] Textures not rendering
EscapeMC replied to BlazeAndAce's topic in Modder Support
Hey, no problem! I figured you were using both, because you had only said these things using ModelResourceLocation and that stuff... Glad I could help! -
I added super, now making it @Override public void readFromNBT(NBTTagCompound compound) { inputSlot.deserializeNBT(compound.getCompoundTag("inputSlot")); super.readFromNBT(compound); } but it still does not work.
-
[1.10.2] - [Solved] Textures not rendering
EscapeMC replied to BlazeAndAce's topic in Modder Support
Alright. The only reason I asked was this! java.lang.NullPointerException at blazeAndAce.practiseMod.init.ModBlocks.registerRenderers(ModBlocks.java:37) ~[bin/:?] at blazeAndAce.practiseMod.init.ModBlocks.registerRenderer(ModBlocks.java:33) ~[bin/:?] This was in your error console. -
[1.10.2] - [Solved] Textures not rendering
EscapeMC replied to BlazeAndAce's topic in Modder Support
This is a block, yes? registerRender(Item item) Block? No... ModelLoader.setCustomModelResourceLocation(item Block? No... -
[1.10.2] - [Solved] Textures not rendering
EscapeMC replied to BlazeAndAce's topic in Modder Support
This is true, as well as look at this: Mine: ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory")); Yours: ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(new ResourceLocation(item.getRegistryName().toString()), "inventory")); Compare these two, and think again about how you need to write yours. -
Alright, so I have a chest. And the NBT (I believe) is wrong. I put an item in, close the world, go back in, and nothing is in there. My TileEntity @Override public NBTTagCompound writeToNBT(NBTTagCompound compound) { super.writeToNBT(compound); compound.setTag("inputSlot", inputSlot.serializeNBT()); return compound; } @Override public void readFromNBT(NBTTagCompound compound) { inputSlot.deserializeNBT(compound.getCompoundTag("inputSlot")); } I am not sure why this doesn't work, but that's why there is a forums, right? Thanks in advance!
-
[1.10.2] - [Solved] Textures not rendering
EscapeMC replied to BlazeAndAce's topic in Modder Support
Because you are using the new method, you need to call proxy.init in your PreInit, not Init -
[1.10.2] {Solved} Preventing putting an item in itself
EscapeMC replied to EscapeMC's topic in Modder Support
Ok, so I have @Override public boolean isItemValid(ItemStack stack) { if(stack.getItem() != ModItems.test_bag){ return false; } return true; } And this does not work. I can still put my item in there. WAIT! *Cheeks code once more, sees !=, slams head into desk* Wow I am stupid. Solved -
[1.10.2] {Solved} Preventing putting an item in itself
EscapeMC replied to EscapeMC's topic in Modder Support
I was using something like instanceof(stack.isItemEqual(ModItems.test_bag)){ return false; } yes, I think this isn't correct (I know test_bag isn't an itemstack, i am trying to figure out what to do there...) Anyway, with that instanceof stuff I think I got it to work with "while"... while(stack.getItem() != ModItems.test_bag){ return false; } return true; } Is while ok here? -
[1.10.2] {Solved} Preventing putting an item in itself
EscapeMC replied to EscapeMC's topic in Modder Support
What can/should/do I use here then? (I was just experimenting with instanceof and no good, so that's why I ask) -
[1.10.2] {Solved} Preventing putting an item in itself
EscapeMC replied to EscapeMC's topic in Modder Support
Yes I do. Now that you say this, let me see if I can piece together this with new ideas. -
[1.10.2] {Solved} Preventing putting an item in itself
EscapeMC replied to EscapeMC's topic in Modder Support
What would I be overriding here? canTakeStack? or what else? EDIT: NEVERMIND I found isItemValid. Now, how do I say "test_bag is a no-no"? if(__ = test_bag) return false? Quick question, how much Java do you know, how much Minecraft/Forge do you know? I am not too experienced with Java, and I try to learn as much Minecraft/Forge as I can. Everything I have coded I understand (I go back and ask everything to understand it) and I understand some other stuff. Keep in mind, I am only 14, still in 8th grade. I like coding so that's why I am here. -
[1.10.2] {Solved} Preventing putting an item in itself
EscapeMC replied to EscapeMC's topic in Modder Support
What would I be overriding here? canTakeStack? or what else? EDIT: NEVERMIND I found isItemValid. Now, how do I say "test_bag is a no-no"? if(__ = test_bag) return false? -
Hello! So if you all remember from my last thread, you all helped me make an item where on right click, it would bring up a chest-like Gui. Now, I realized I need to make the item not be able to be put in itself... Anyone know how to do that?
-
[1.10.2] {Solved!!!} Right-Click Item for Chest-like GUI
EscapeMC replied to EscapeMC's topic in Modder Support
it was easy. player.inventory.... duh! Thank you so much to loordgek, Animefan, Prazzle, Draco, and everyone who helped me with this task! -
[1.11.2] [SOLVED] Destroy Item after right click
EscapeMC replied to Bektor's topic in Modder Support
1 durability. "0 durability left" is still 1 use as far as Minecraft is concerned. But doing this means that the durability bar is displayed, which is not ideal in some cases. Ah, ok. I understand that. Well, I was just giving my opinion.