Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. Yes you can override vanilla recipe jsons. Mods function as datapacks. You just need to make sure you direct the recipe to your IRecipeSerializer by specifying the type as yours.
  2. You need a custom IRecipeSerializer and a custom IRecipe that extends the specific one. IRecipe is fine for normal crafting and a AbstractFurnaceRecipe is needed for the furnace ones.
  3. You can't do this in an event class. They are singletons. Just do the areItemStacksEqual check every tick. Also the event parameter has a getPlayer method use that instead of Minecraft.getMinecraft().player because that is client only and thus you are reaching across logical sides.
  4. No, because you can send the Capability data you need to render in the packet. As diesieben and I have both said it is impossible to always have the player on the client side. Therefore you can only send the data.
  5. In Item#initCapabilities return an ICapabilitySerializable that exposes an LazyOptional<IItemHandler>. Your own instance of INamedContainerProvider.
  6. Thus the two constructors, though you could send it in getServerGuiElement. You can find them there or in the Container's constructor that takes a player. Then send the packet.
  7. For the client. The client shouldn't care. Once you get it. I'm not sure what you mean by this. When do you get the information? You can do it in the constructor that takes a player. To the client. You'd schedule it via Minecraft#scheduleTask and then you would get the openContainer field from the client player Minecraft#player. If the openContainer is an instanceof your Container. Then take the data out of the message and put it in the openContainer. This would just be a waste of packets. The server knows that a gui is opening and the uuid of the player in question and therefore is fully capable of sending the packet it needs.
  8. Well you dont need the rng on the client...you need the results of the rng. So you need two constructors one that takes a player(server side) and an empty one to use for when you create the gui. Then a packet needs to get sent with the rng information you've got on the server to the client.
  9. Exactly make sure your fillStateContainer is being called though. I'm curious if something is broken.
  10. What do you need about the player? I assure that you cannot always obtain the EntityPlayer of that player on the client. However you can have specific values. Also you only need one packet server to client.
  11. Double check that in your fillStateContainer method you add your age property to the Builder parameter.
  12. Is the player from the server the one that opened the container/gui?
  13. The problem doesnt lie within the json. The problem lies within the code. Specifically why your block isnt getting the age property. Have you looked at the f3 screen while looking at your block to see if it has the age property on the right hand side of the screen?
  14. Then you are passing it a null string via the constructor. But the real problem here is that you dont know what you are doing. What information are you trying to get on the client from the server?
  15. Sounds like a culling problem...forgive me rendering isnt something I'm the most fluent in. I guess my main question is why is it an obj model and not a json model. I assume its something to do with the model file.
  16. For some reason it isnt recognizing that your block has an age property and when it is reading the blockstate json its seeing this and going "HUH?!?!"
  17. What rendering problems? What about it isnt right I cant see what you are talking about in the pictures.
  18. Override Item#onItemRightClick in your Item class and call NetworkHooks.openGui to open the ContainerScreen and Container for your gui.
  19. No. Aka when you give dog_house a value you need to use your own class and that class needs to override getRenderLayer. If this is something you don't understand I recommend that you look up some tutorials on Java,
  20. That was basic Java. What specifically are you having problems with?
  21. His tutorials are notoriously bad there have been several posts on here where they've said they've followed them and many bad practices later they end up with problems and come here. You need a model for the item as well if you need an example take a look in the minecraft jars under assets/models/items/any_block.json where any_block is any block in the game. The problem you are having with seeing through the world is solved by overriding getRenderLayer in your blocks class. If it doesn't have a class right now make one. The return value for this method should be BlockRenderLayer.CUTOUT.
×
×
  • Create New...

Important Information

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