Jump to content

GreatBlitz

Members
  • Posts

    22
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

GreatBlitz's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Marking as solved. The helpful people at IRC told me to use BlockEntityTag instead, this is what my code in getDrops becomes, for anyone curious: List<ItemStack> drops = Lists.newArrayList(); TileEntityTestBlock te = (TileEntityTestBlock) world.getTileEntity(pos); if (te != null && te instanceof TileEntityTestBlock) { ItemStack i = new ItemStack(ModBlocks.testblock); NBTTagCompound compound = new NBTTagCompound(); te.writeToNBT(compound); compound.removeTag("x"); compound.removeTag("y"); compound.removeTag("z"); NBTTagCompound stackTag = new NBTTagCompound(); stackTag.setTag("BlockEntityTag", compound); i.setTagCompound(stackTag);drops.add(i); } return drops; } Then I removed the onBlockPlacedBy method, as BlockEntityTag loads it on its own.
  2. But if you look at my tile entity (TileEntityTestBlock: http://pastebin.com/Aj4gCkJa), my getUpdatePacket(), getUpdateTag(), onDataPacket(), handleUpdateTag(), readFromNBT(), writeToNBT() methods seem fine...?
  3. Code: TestBlock: http://pastebin.com/nub56uNM GuiContainerTileEntityTestBlock: http://pastebin.com/ueL72uSc GuiMessage: http://pastebin.com/2idHgLsk GuiHandler: http://pastebin.com/pYC8pr4X ContainerTileEntityTestBlock: http://pastebin.com/a3GB6rNC GuiMessageHandler: http://pastebin.com/qzZEbKfP TileEntityTestBlock: http://pastebin.com/Aj4gCkJa Alright, I can't describe this problem very well, so here is exactly what I do: 1. Create a new world, place my block Special Occurrences: Nothing Log entry: 2. Place an energy source next to block and right click the block Special occurrences: I see the RF filling up (in the form of text) Log entry: 3. Break the block, place it elsewhere Special occurrences: The block gets placed as normal. Log entry: Note about the log: Where is this NPE coming from? 4. Right-click the block Special occurrences: RF appears as 0. Log entry: Note about the log: It's weird, that the block shows that there is RF, but the GUI itself and the GUI prints display as 0. 5. Exit, re-enter world, right click block Special occurrences: RF is still 0. Log entry: Note about the log: It's even weirder, that although the GUI prints continue to display RF as 0, this time the block itself displays RF as 0 (didn't happen in step 5, read note). Tell me if you need more files/logs. Appreciate all the help I can get. Regards, GreatBlitz.
  4. Just did it, appears in my Referenced Libraries. 1. Up till now, since I was trying out things in absence of Mekanism, I had placed the RF API by CoFH in my src\main\java folder. So now that I have loaded up Mekanism (which contains the RF API as well) as a library, do I need to anything about MY RF API folder? Or can it stay where it is? 2. Code in the jar file appears as .class files, which do not have sources attached. Anything I can do about that? 3. Does using this "libs" method allow me to access all the files of the mod? Is it safe practice to be doing so? Or am I still confined to the API folder?
  5. Actually can you run me through the whole process? I'm new to this "libs" method. Can you list all the steps required? 1. I'm guessing libs will be alongside the src and other folders? 2. Is listing Mekanism as a hard dep. in my mod file enough? 3. How do I add the jar to my workspace? 4. What modifications do I need to make to my build.gradle? 5. What does it mean for my end users? How do they install my mod?
  6. Two questions: 1. Where exactly is the libs/ folder? 2. If I do it this way, will I be able to use files from Mekanism and create my own gases etc? you need to create it inside the root project folder so it ould look like pathtoyourdevenv/modname/libs Thanks! and if I do it this way, will I be able to use files from Mekanism and create my own gases etc?
  7. Two questions: 1. Where exactly is the libs/ folder? 2. If I do it this way, will I be able to use files from Mekanism and create my own gases etc?
  8. Well so I decided to download the required files, but then I realized that THOSE files will have to import even more files. What should I do? Am I helpless in this scenario or should I just download like literally every file from the Mekanism repo?
  9. If you can get their source code, yes, that would fix it. As your mod has a hard dependency on Mekanism it won't matter to the end user. Mekanism should still fix their shit though. Seems to me that MekanismRenderer.FluidType should be in the API package. The source for the mod is public so I can get the files. But then wouldn't the mekanism api in my mod differ from the mekanism api in the actual mekanism jar file, thus causing conflicts for the end user?
  10. Say I had a tile entity that returned an ItemStackHandler with 3 slots, in the getCapability methods. Now, 1 slot is restricted to output, and the other 2 to input. How would I go about automating these slots (connecting pipes to specific sides etc)? Would I make three ItemStackHandlers, and return different ones for different sides? Could you explain in detail?
  11. None of the block break methods have any ItemStack param, so I presume in getDrops I return a list of ItemStacks containing a custom ItemStack which has the NBT of the TE? Does getDrops have a world parameter? No, but it does have an IBlockAccess param.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.