Everything posted by Draco18s
-
How to send and receive packets between spigot and forge
On the server: The player in the message context IS the player that sent the packet On the client: The player that received the message IS the player that is playing... What more do you need?
-
(1.12.2)[SOLVED] Questions about Recipes
That's...not even related to container items...
-
(1.12.2)[SOLVED] Questions about Recipes
Override hasContainerItem and getContainerItem :| Probably not. I mean how would that work, a bucket of milk returns a glass bottle, but a bucket of water returns a bucket?
-
Sending/Receiving Packets from TileEntity/GUI
You want to know what data the TE has? Yes, you override those three methods. Yes there are three. getDataPacket: sending getUpdateTag: sending onDataPacket: recieving
-
Sending/Receiving Packets from TileEntity/GUI
When the button is clicked -> send a packet to the server with the relevant information (TE's pos, what button was clicked). Server gets the packet, reads the data, gets the TileEntity from the position encoded in the packet, and does things (if valid to perform).
-
Sending/Receiving Packets from TileEntity/GUI
http://mcforge.readthedocs.io/en/latest/networking/simpleimpl/
-
Item placing a block. <solved>
Hmm, if only vanilla had some items that do this... ?
-
[Solved] Weird bug when rendering to FBO.
Post your code.
-
[Solved] Weird bug when rendering to FBO.
uh Code?
-
[1.12] Forge Blockstate Item Block Model error
And that's why I wrote my Easy Registry class. I liked the simplicity of the GameRegistry from earlier versions. I realized I was going to need more than "register block, register item" but I wanted to do as little copying and pasting of things as possible.
-
[1.12] Forge Blockstate Item Block Model error
1. This is wrong: https://github.com/Shane2482/Deadly-World-1.10/blob/master/src/main/java/shane2482/deadlyworld/proxy/ClientProxy.java#L37 2: What do you call this? https://github.com/Shane2482/Deadly-World-1.10/blob/master/src/main/java/shane2482/deadlyworld/blocks/block_lamps.java#L77-L82 Looks like a function written over and over and over. Now check how I did it: One line, done. One line, done. One line, done. Even the item I have that uses NBT data to display different icons? One line, done.
-
[1.12] Forge Blockstate Item Block Model error
Sort of not really. 1) You still need to handle the model registry via your client proxy as the event itself is client-side-only 2) You have to write the same function over and over and over
-
[1.12] Forge Blockstate Item Block Model error
It doesn't save you anything. What do you have access to inside the class object that you don't have access to from outside? Everything you need is public...
-
[1.12] Forge Blockstate Item Block Model error
You can't do it like that in 1.12, the GameRegistry is private: the events exist to make sure that everything gets registered at the proper time in the proper order. You cannot get around this.
-
Problem by using custom crafting recipe
Vanilla is not set up to handle recipe stacks being anything other than 1. So don't do that.
-
[1.12] Forge Blockstate Item Block Model error
You need this: https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/hardlib/client/ClientEasyRegistry.java#L66-L71 Line 70 in that code is equivalent to ModelLoader.setCustomModelResourceLocation (with the indicated parameters) called during the ModelRegistryEvent. That is: You need to ask a block what states it has Get the metadata for those states† Convert those states to variant strings Register an item model for those metadatas and variant strings †There is no canonical block-saved-metadata to item-stack-metadata conversion, however, vanilla (and most mods) treat them as being the same for simplicity's sake.‡ The only place it is explicitly assumed to always be that way is in vanilla's custom world gen settings. ‡Of course, the same would be said of enum values as well, but vanilla went and fucked that up with their colors. WHITE is 15, but also 0.
-
[1.12] Forge Blockstate Item Block Model error
You're just blindly copying things. That isn't going to DO anything by itself. The point was "you need to do these things <link to a function that does these things>" not "Copy-paste my code, cross your fingers, and run it." The one function that you didn't know what it did... all it does is what you were already doing.
-
[1.12] Forge Blockstate Item Block Model error
It goes here: https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/hardlib/client/ClientEasyRegistry.java#L170-L177 The list its adding to gets used here: https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/hardlib/client/ClientEasyRegistry.java#L198
-
[1.12] Forge Blockstate Item Block Model error
You want metadata blocks? https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/hardlib/client/ClientEasyRegistry.java#L66-L71
-
[1.12] Forge Blockstate Item Block Model error
See this? new ModelResourceLocation(new ResourceLocation(Reference.MOD_ID, fileName), "inventory")); Make it this: new ModelResourceLocation(item.getRegistryName(), "inventory")); Here's how I do it: https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/hardlib/client/ClientEasyRegistry.java#L103 (Commented out is pre-ModelRegistryEvent, but the same information is cached and handed off during said event).
-
[1.12] Forge Blockstate Item Block Model error
Don't construct resource locations yourself. block.getRegistryName() (and item.getRegistryName()) returns a ResourceLocation, use it.
-
[1.12] Forge Blockstate Item Block Model error
Caused by: java.io.FileNotFoundException: cbm:models/item/block_steel_steel_plating.json Also, show your registration code.
-
Help with item texture/model.
"layer0" is the name of the texture reference used by the 3D model. It's not magic.
-
TileEntity is missing a mapping [1.12]
Why is your class not Upper Cased? https://www.javatpoint.com/java-naming-conventions @diesieben07 can we add that to the common Code Style list?
-
why is the element "body" in ModelQuadruped.java created 90 degrees off?
The only thing I can think of is texture coordinates: fitting all the boxes cleanly onto the texturemap without overlapping or leaving large void areas.
IPS spam blocked by CleanTalk.