-
Posts
6157 -
Joined
-
Last visited
-
Days Won
59
Everything posted by Animefan8888
-
[SOLVED][1.14.4] Disable Player Crafting/Smelting
Animefan8888 replied to TheMikeste1's topic in Modder Support
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. -
[SOLVED][1.14.4] Disable Player Crafting/Smelting
Animefan8888 replied to TheMikeste1's topic in Modder Support
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. -
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.
-
[1.12] How to get stuff from server when doing the client GUI
Animefan8888 replied to Samaritans's topic in Modder Support
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. -
1.14 Open GUI when item is rightclicked
Animefan8888 replied to RaphGamingz's topic in Modder Support
Yes -
1.14 Open GUI when item is rightclicked
Animefan8888 replied to RaphGamingz's topic in Modder Support
In Item#initCapabilities return an ICapabilitySerializable that exposes an LazyOptional<IItemHandler>. Your own instance of INamedContainerProvider. -
[1.12] How to get stuff from server when doing the client GUI
Animefan8888 replied to Samaritans's topic in Modder Support
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. -
[1.12] How to get stuff from server when doing the client GUI
Animefan8888 replied to Samaritans's topic in Modder Support
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. -
[1.12] How to get stuff from server when doing the client GUI
Animefan8888 replied to Samaritans's topic in Modder Support
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. -
Exactly make sure your fillStateContainer is being called though. I'm curious if something is broken.
-
[1.12] How to get stuff from server when doing the client GUI
Animefan8888 replied to Samaritans's topic in Modder Support
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. -
Double check that in your fillStateContainer method you add your age property to the Builder parameter.
-
[1.12] How to get stuff from server when doing the client GUI
Animefan8888 replied to Samaritans's topic in Modder Support
Is the player from the server the one that opened the container/gui? -
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?
-
[1.12] How to get stuff from server when doing the client GUI
Animefan8888 replied to Samaritans's topic in Modder Support
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? -
Custom block models not rendering correctly
Animefan8888 replied to TesterTesting135's topic in Modder Support
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. -
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?!?!"
-
Custom block models not rendering correctly
Animefan8888 replied to TesterTesting135's topic in Modder Support
What rendering problems? What about it isnt right I cant see what you are talking about in the pictures. -
Show what you tried.
-
1.14 Open GUI when item is rightclicked
Animefan8888 replied to RaphGamingz's topic in Modder Support
Override Item#onItemRightClick in your Item class and call NetworkHooks.openGui to open the ContainerScreen and Container for your gui. -
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.