Everything posted by Spyeedy
-
[1.12.2] Dynamic Textures on Item JSON Model
Ah, you get your attachment models from here And then you add this attachment model's quads to the main list in this method
-
[1.12.2] Dynamic Textures on Item JSON Model
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?
-
[1.12.2] Dynamic Textures on Item JSON Model
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.
-
[1.12.2] Dynamic Textures on Item JSON Model
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?
-
[1.12.2] Dynamic Textures on Item JSON Model
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?
-
[1.12.2] Dynamic Textures on Item JSON Model
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.
-
[1.12.2] Dynamic Textures on Item JSON Model
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.
-
[1.12.2] Fluid data not saving when block is destroyed
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()); }
-
[1.12.2] Fluid data not saving when block is destroyed
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.
-
[1.12.2] Fluid data not saving when block is destroyed
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.
-
[1.12.2] Fluid data not saving when block is destroyed
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
-
[1.12.2] Fluid data not saving when block is destroyed
uhh, i don't
-
[1.12.2] Fluid data not saving when block is destroyed
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.
-
[1.12.2] Fluid data not saving when block is destroyed
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.
-
[1.12.2] Fluid data not saving when block is destroyed
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
-
NBT Compound in ItemStack seem to not exist
I see, well, someone recommended to me to use capabilities.
-
NBT Compound in ItemStack seem to not exist
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
-
Items not saved when Container is closed
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
-
[1.10.2] [Solved] OBJ model cannot be rotated, translated or scaled
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.
-
[1.10.2] [Solved] OBJ model cannot be rotated, translated or scaled
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
-
Lang file and item texture not working [1.12]
You are basically calling for a variable that does not exist. Instead, you should be enclosing kuexam in "modid".
-
Lang file and item texture not working [1.12]
Buddy, forge is enforcing lowercase names for all resources (lang, textures, jsons). So en_US.lang should be en_us.lang
-
RenderPlayerAPI
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?
-
Probably Just Being Dumb..
Ah I see, probably should state the mc version you are working on next time in the thread's title next time.
-
Probably Just Being Dumb..
He seems to be working on a pre-1.9 mc version, hence, no main hand and offhand.
IPS spam blocked by CleanTalk.