Jump to content

SuperManitu

Members
  • Posts

    21
  • Joined

  • Last visited

Everything posted by SuperManitu

  1. Ok, yeah, just commenting out the interpolation in the renderer works. Which is really weird, because I am pretty sure that I tried that initially and got only jumping movement (probably every tick). Probably had something else wrong back then and fixed that in the meantime. Thanks
  2. The tick only happens with 20 FPS, you need to lerp in the renderer for the frames in between (3 for 60FPS)
  3. Hi, I am creating a custom Entity (not a LivingEntity) and for starters I gave it a constant movement in one direction. But for some reason, the Entity jitters the whole time, unlike normal entities like the minecart and I don't really understand where this is coming from. Here is a video where you can see (some of) the jittering: https://cdn.discordapp.com/attachments/454376090362970122/756140763338899616/movement2.mp4 Entity code: https://pastebin.com/ZAmp224b Renderer: https://pastebin.com/gu34g7Ft The interpolation in the renderer is done by this method: public static <T extends Entity> Vec3d getMoveLerp(double partialTicks, T entity) { double x = MathHelper.lerp(partialTicks, entity.prevPosX, entity.getPosX()); double y = MathHelper.lerp(partialTicks, entity.prevPosY, entity.getPosY()); double z = MathHelper.lerp(partialTicks, entity.prevPosZ, entity.getPosZ()); return new Vec3d(x - entity.prevPosX, y - entity.prevPosY, z - entity.prevPosZ); } I've tried using the default update and tracking range as well as 20 and 80 respectively without visible changes. Thanks
  4. Uh, that spec is good, that should be linked in the docs. For me it is far easier to understand than the explanation already there.
  5. Am I right that something like this: { "forge_marker": 1, "variants": { "first_prop": { "foo": { "submodel": "techmod:foo" }, "bar": { "submodel": "techmod:bar" } }, "second_prop": { "foo": { "submodel": "techmod:foo2" }, "bar": { "submodel": "techmod:bar2" } }, "first_prop=foo,second_prop=foo": [{ "submodel": "techmod:doubled" }] } } with the variant first_prop=foo,second_prop=foo, won't result in a model consisting of techmod:foo, techmod:foo2 and techmod:doubled?
  6. Ok, but this also does not render anything: ModelLoader.setCustomModelResourceLocation( item, 0, new ModelResourceLocation("techmod:cablecar_track","first_end=north,second_end=south") ); I guess because then the blockstate would have to be the forge format, which cannot do this. So am I right that I have to copy + paste the model data into an vanilla item model?
  7. I put it in models, because setCustomModelResourceLocation only searches in models/item. Does this mean they have to use the same blockstate file (aka I cannot do this because the forge format cannot concisely represent my block and the vanilla format does not work for items?) Again, how? This only uses an item model, when I try to do this: ModelLoader.setCustomModelResourceLocation( item, 0, new ModelResourceLocation("techmod:blockstates/cablecar_track#first_end=north,second_end=south") ); i get this error: Yeah, sorry, that was just me and my typing
  8. That is not a spec, or a schema at all. I read that at least 10 times now and I am still not sure what is allowed and what not Is there a simple way to have the inventory variant be first_end=north,second_end=south or do I really have to resort to copy + paste? Also for now I tried to create a forge blockstate for the inventory (just one variant, with the tree submodels), by placing it in models/item: but that does not render anything at all (yes, with setCustomModelResourceLocation(item, 0, "techmod:blockstate_name"))
  9. Hi, I am writing a block that has several states. For this, I currently have a 1.9 vanilla block state with three submodels: Now, I wanted to use that blockstate file for the ItemBlock, but read in the documentation that this is not possible and I have to use the forge format. When trying to translate this to the forge format, the first two blocks where easy, as they only depend on one of the two variables, but I have not idea how to do the lower two blocks, that need information about both variables. Is this even possible with the forge format? If not I have to copy + paste the submodels from the block into the item model which I would rather avoid. Also, is there a spec or a json schema for the forge format somewhere? I find it incredibly hard to get the info out of the documentation. The vanilla format is neatly specced in the minecraft wiki.
  10. Thanks, I solved the problem by overwriting getUpdateTag @Override public NBTTagCompound getUpdateTag() { NBTTagCompound tag = super.getUpdateTag(); this.writeToNBT(tag); return tag; } as I dont need dynamic behavior (yet) I do not use the other methods
  11. Hi, I'm currently working on a block that stores it's orientation in a TileEntity (metadata hs not enough states). This is quite simple, I have two enum fields that store the orientation and save those with NBT. public class TileEntityCablecarTrack extends TileEntity { private EnumFacingExtended first_end = EnumFacingExtended.NORTH; private EnumFacingExtended second_end = EnumFacingExtended.SOUTH; @Override public NBTTagCompound writeToNBT(NBTTagCompound nbt) { nbt.setInteger("first_end", first_end.getID()); nbt.setInteger("second_end", second_end.getID()); System.out.println("Serialize first_end: " + first_end + " second_end: " + second_end); return super.writeToNBT(nbt); } @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); this.first_end = EnumFacingExtended.fromID(nbt.getInteger("first_end")); this.second_end = EnumFacingExtended.fromID(nbt.getInteger("second_end")); System.out.println("Deserialize first_end: " + first_end + " second_end: " + second_end); } } But this does not work for the client on load: [14:26:04] [Server thread/INFO] [STDOUT]: [techmod.cablecar.TileEntityCablecarTrack:readFromNBT:23]: Deserialize first_end: EAST second_end: WEST [14:26:04] [Server thread/INFO] [STDOUT]: [techmod.cablecar.TileEntityCablecarTrack:readFromNBT:23]: Deserialize first_end: EAST second_end: WEST [14:26:04] [Server thread/INFO] [STDOUT]: [techmod.cablecar.TileEntityCablecarTrack:readFromNBT:23]: Deserialize first_end: NORTH second_end: SOUTH [14:26:04] [Server thread/INFO] [STDOUT]: [techmod.cablecar.TileEntityCablecarTrack:readFromNBT:23]: Deserialize first_end: EAST second_end: WEST [14:26:04] [Server thread/INFO] [STDOUT]: [techmod.cablecar.TileEntityCablecarTrack:readFromNBT:23]: Deserialize first_end: NORTH second_end: SOUTH [14:26:04] [Server thread/INFO] [STDOUT]: [techmod.cablecar.TileEntityCablecarTrack:readFromNBT:23]: Deserialize first_end: EAST second_end: WEST [14:26:04] [Server thread/INFO] [STDOUT]: [techmod.cablecar.TileEntityCablecarTrack:readFromNBT:23]: Deserialize first_end: NORTH second_end: SOUTH [14:26:04] [Server thread/INFO] [STDOUT]: [techmod.cablecar.TileEntityCablecarTrack:readFromNBT:23]: Deserialize first_end: NORTH second_end: SOUTH [14:26:04] [Server thread/INFO]: Changing view distance to 12, from 10 [14:26:04] [Netty Local Client IO #3/INFO] [FML]: Server protocol version 2 [14:26:04] [Netty Server IO #7/INFO] [FML]: Client protocol version 2 [14:26:04] [Netty Server IO #7/INFO] [FML]: Client attempting to join with 5 mods : [email protected],[email protected],[email protected],[email protected],[email protected] [14:26:04] [Netty Local Client IO #3/INFO] [FML]: [Netty Local Client IO #3] Client side modded connection established [14:26:04] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established [14:26:04] [Server thread/INFO]: Player317[local:E:b50b1f90] logged in with entity id 90 at (240.36660389147244, 52.0, 343.8283291103376) [14:26:04] [Server thread/INFO]: Player317 joined the game [14:26:04] [Server thread/INFO]: Saving and pausing game... [14:26:04] [Server thread/INFO]: Saving chunks for level 'Superflat'/overworld [14:26:04] [Server thread/INFO] [STDOUT]: [techmod.cablecar.TileEntityCablecarTrack:writeToNBT:14]: Serialize first_end: EAST second_end: WEST [14:26:04] [Server thread/INFO] [STDOUT]: [techmod.cablecar.TileEntityCablecarTrack:writeToNBT:14]: Serialize first_end: EAST second_end: WEST [14:26:04] [Server thread/INFO] [STDOUT]: [techmod.cablecar.TileEntityCablecarTrack:writeToNBT:14]: Serialize first_end: NORTH second_end: SOUTH [14:26:04] [Server thread/INFO] [STDOUT]: [techmod.cablecar.TileEntityCablecarTrack:writeToNBT:14]: Serialize first_end: EAST second_end: WEST [14:26:04] [Server thread/INFO] [STDOUT]: [techmod.cablecar.TileEntityCablecarTrack:writeToNBT:14]: Serialize first_end: NORTH second_end: SOUTH [14:26:04] [Server thread/INFO] [STDOUT]: [techmod.cablecar.TileEntityCablecarTrack:writeToNBT:14]: Serialize first_end: EAST second_end: WEST [14:26:04] [Server thread/INFO] [STDOUT]: [techmod.cablecar.TileEntityCablecarTrack:writeToNBT:14]: Serialize first_end: NORTH second_end: SOUTH [14:26:04] [Server thread/INFO] [STDOUT]: [techmod.cablecar.TileEntityCablecarTrack:writeToNBT:14]: Serialize first_end: NORTH second_end: SOUTH [14:26:04] [Server thread/INFO]: Saving chunks for level 'Superflat'/the_nether [14:26:04] [Server thread/INFO]: Saving chunks for level 'Superflat'/the_end [14:26:04] [main/INFO]: Loaded 5 advancements [14:26:04] [main/INFO] [STDOUT]: [techmod.cablecar.TileEntityCablecarTrack:readFromNBT:23]: Deserialize first_end: NORTH second_end: NORTH [14:26:04] [main/INFO] [STDOUT]: [techmod.cablecar.TileEntityCablecarTrack:readFromNBT:23]: Deserialize first_end: NORTH second_end: NORTH [14:26:04] [main/INFO] [STDOUT]: [techmod.cablecar.TileEntityCablecarTrack:readFromNBT:23]: Deserialize first_end: NORTH second_end: NORTH [14:26:04] [main/INFO] [STDOUT]: [techmod.cablecar.TileEntityCablecarTrack:readFromNBT:23]: Deserialize first_end: NORTH second_end: NORTH [14:26:04] [main/INFO] [STDOUT]: [techmod.cablecar.TileEntityCablecarTrack:readFromNBT:23]: Deserialize first_end: NORTH second_end: NORTH [14:26:04] [main/INFO] [STDOUT]: [techmod.cablecar.TileEntityCablecarTrack:readFromNBT:23]: Deserialize first_end: NORTH second_end: NORTH [14:26:04] [main/INFO] [STDOUT]: [techmod.cablecar.TileEntityCablecarTrack:readFromNBT:23]: Deserialize first_end: NORTH second_end: NORTH [14:26:04] [main/INFO] [STDOUT]: [techmod.cablecar.TileEntityCablecarTrack:readFromNBT:23]: Deserialize first_end: NORTH second_end: NORTH Why doesnt the client load these values correctly?
  12. I was just confused because I saw this: https://gist.github.com/RainWarrior/0618131f51b8d37b80a6 From the grammer my JSON would have been valid. And because it is still `forge_marker: 1`, I assumed the grammar would still work
  13. I tried both recommended and latest, same issue (2555 and 2581)
  14. Hi, I have a rather simple block at the moment that I assemble out of submodels based on blockstates. But the rendered Block looks like this (this block is `[first_end=north,second_end=south]`) Am I misinterpreting uvlock? Or how should I solve this?
  15. Finally found the issue: I have to name the submodel. I thought this was only needed if you want to have more than one. Final blockstate json:
  16. Hello, I tried two days to get this working and have no idea why: I have a (currently) rather simple block model. If I have no Blockstates it renders just fine. Now I wanted to add variants to it, so I added two PropertyEnum fields to my Block class: Then I used the forge blockstate JSON format to define the variants: But I always get "Missing variant Exceptions" even if they are clearly stated in my Blockstate json:
  17. I did forget to look at a crafting table, but it did not change anything. I can't see the recipe neither in the "all" category nor in the "misc" category not any other category. But I do get the "new recipe available" with the correct Item symbol
  18. Hello, I'm currently trying to get my recipes to be displayed in the recipe book when the player has the necessary items to craft them. So I added an advancement json for this purpose (copied from the planks): If I collect the items, I see the "New recipes available" with the correct item, but when I open the recipe book, the new recipe is not there. What step am I missing?
  19. Hello I'm working on my Advanced Dispensers Mod, and I have a Question. Is it possible to get the EntityLivingBase of the Entity who destroyed a Block? In 1.5 there was a function called onBlockDestroyedBy, which had the LivingBase as argument, but the onDestroyedByPlayer doesn't have this any more.
×
×
  • Create New...

Important Information

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