Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Spyeedy

Forge Modder
  • Joined

  • Last visited

Everything posted by Spyeedy

  1. Ah, you get your attachment models from here And then you add this attachment model's quads to the main list in this method
  2. I see, so with the cards textures, create a card model that fits into the 1st slot, then whenever a card is slotted, take the model of that card and apply the transformations where needed? But before we get into all of that, how will I combine the models?
  3. I plan to add more cards, hence why I created this thread for the purpose of changing the card's textures dynamically to prevent writing so maaaany variants for all the combinations of cards.
  4. From the looks of it, your gun mod uses items' whose models are 3D-ed from 2D textures, like most vanilla items doesn't it? But for my item, I created a 3D model, with a part of my model having a slot to put in 3 cards. Given that I could render extra quads onto the model, I'm not too sure where I could tell these quads to move to the exact position within the slot?
  5. hmm, what if I were to use a custom Baked Model or something that allows me to change the texture location, of any of the values applied to the card part, defined in textures of the JSON model? Is that possible? If so, I would have to add all the card textures to the texture atlas right?
  6. From my understanding of ItemMeshDefinition, it replaces the model entirely, but that's not what I want to do here, I want to apply any texture I want to a portion of my item model. And I think I didn't specify as to what kind of model it is, it's a JSON model, modelled in 3D.
  7. So a portion of my item model has 3 cards, they can be stacked starting from the bottom. I want to be able to interchangeably apply any card texture on any of the 3 cards (provided there is a card below to place on top). So I guess it's like a box of cards, the cards can be shuffled however they want. I guess that's what I want, my cards to be moved to any position in the stack in the model. I'm not too sure where I should start, or if this is even possible. Additional Note: I'm using MeshDefinitions for this model for a boolean state of closing/opening, well, i suppose that won't make any difference here, but, just an extra note.
  8. I'm already sending a packet tho @Override public void onDataPacket(NetworkManager net, SPacketUpdateTileEntity pkt) { //handleUpdateTag(pkt.getNbtCompound()); readFromNBT(pkt.getNbtCompound()); } @Override public SPacketUpdateTileEntity getUpdatePacket() { return new SPacketUpdateTileEntity(this.pos, 0, this.getUpdateTag()); } @Override public NBTTagCompound getUpdateTag() { return writeToNBT(super.getUpdateTag()); }
  9. I suppose I should remove the Empty key before the NBT data is being read into the fluid tank data, to prevent the FluidTank class from resetting the data.
  10. hmm, printing inside TileEntity#readFromNBT yields this output, which seems to add Empty key to fluid data. Investigating into the FluidTank class shows that with Empty key, it will set the fluid's data to null, hence defaulting to no empty data. [23:14:14] [Client thread/INFO] [STDOUT]: [spyeedy.mods.privy.utilities.block.BlockRainCollector:onBlockPlacedBy:100]: {BlockEntityTag:{timer:23,maxTimer:100,id:"spyprivy:rain_collector",inventory:{Size:3,Items:[]},FluidTankWater:{FluidName:"water",Amount:440}},display:{Lore:["(+NBT)"]}} [23:14:14] [Server thread/INFO] [STDOUT]: [spyeedy.mods.privy.utilities.block.TileEntityRainCollector:readFromNBT:92]: {timer:23,maxTimer:100,x:914,y:4,z:-300,id:"spyprivy:rain_collector",inventory:{Size:3,Items:[]},FluidTankWater:{Empty:"",FluidName:"water",Amount:440}} [23:14:14] [Server thread/INFO] [STDOUT]: [spyeedy.mods.privy.utilities.block.BlockRainCollector:onBlockPlacedBy:100]: {BlockEntityTag:{timer:23,maxTimer:100,id:"spyprivy:rain_collector",inventory:{Size:3,Items:[]},FluidTankWater:{FluidName:"water",Amount:440}},display:{Lore:["(+NBT)"]}} [23:14:14] [Client thread/INFO] [STDOUT]: [spyeedy.mods.privy.utilities.block.TileEntityRainCollector:readFromNBT:92]: {timer:23,maxTimer:100,x:914,y:4,z:-300,id:"spyprivy:rain_collector",inventory:{Size:3,Items:[]},FluidTankWater:{Empty:""}} Hmm, why is the Empty key being added into the tag though? i'm not adding Empty on purpose.
  11. oh oops, i think i misunderstood your question there, but just now, i checked the stack's data when placing the block down, the nbt checks out fine on both server and client. I overrode the onBlockPlacedBy and used the ItemStack provided by the method, to retrieve the stack's tag and printed that. Edited code in the same gist: https://gist.github.com/Spyeedy/00d51baab4ad10b1c694da42e09ce2ba
  12. The problem is that when placing the block, the fluid data isn't intact, it's being reset, defaulted to 0. My apologies, my writing in the original post was incorrect.
  13. first: ah i see, ok, i'll change it when i get the fluid data missing solved. second: I dropped the item and used entitydata command to look at the item's data, it indeed has the fluid data inside.
  14. So, when my block is destroyed, the tile entity NBT data is saved to the dropped itemstack, and it saves the TileEntity's inventory successfully. But it doesn't seem to save the fluid data. https://gist.github.com/Spyeedy/00d51baab4ad10b1c694da42e09ce2ba
  15. I see, well, someone recommended to me to use capabilities.
  16. So I'm having a capability attached onto my Item to store NBT datas. However, each time I get the capability from the ItemStack, it seems to think that the stack has no tag compound at all. So it keeps resetting the data. https://gist.github.com/Spyeedy/23e51fcf00f4ec2aec4a263943af1d08
  17. Alright, so my problem here is that my custom inventory slots aren't saving the items when the gui/container is closed. I'm not too sure where I'll need to save the items. Code: https://github.com/Spyeedy/Custom-Abilities-Test/tree/master/src/main/java/spyeedy/mods/testhero/common/iteminv
  18. I've managed to solve the issue, it appears that I when I included the extension ".obj" to the custom ModelResourceLocation, it loaded the obj directly, hence, I wouldn't be able to do anything about scale, rotation, and translation with the blockstates as Minecraft did not require a blockstates json when ".obj" is included.
  19. I'm not so sure as to why my OBJ model cannot be rotated, translated or scaled with my blockstates json. Perhaps I did something wrong in my code? Registration Model Registration Blockstates
  20. You are basically calling for a variable that does not exist. Instead, you should be enclosing kuexam in "modid".
  21. Buddy, forge is enforcing lowercase names for all resources (lang, textures, jsons). So en_US.lang should be en_us.lang
  22. What are the benefits and consequences as to using RenderPlayerAPI in my mod? I would like to know them as I am considering using RenderPlayerAPI for flight animations in my mod. Will it break compatibility with other mods that uses their own animations?
  23. Ah I see, probably should state the mc version you are working on next time in the thread's title next time.
  24. He seems to be working on a pre-1.9 mc version, hence, no main hand and offhand.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.