Everything posted by Draco18s
-
[1.10.2] Gui help
The client that sent the packet is the player that sent the packet. Duh.
-
Gui icon for stairs is rotated 90 deg
He means that stairs and the furnace have their "forward" pointing away from the camera when using metadata 0. In order for the item icon to render properly it needs to be "rotated" 90 degrees clockwise (IIRC). The solution is to make your item use a metadata other than 0.
-
[1.10.2] When to register custom EventHandler?
Oooh, that's handy. I probably won't ever do it that way, but so slick, so clean. The only event I'm are of that could get fired before your own mod's preInit that you might want to know about would be the OreDict registration event (as a mod loading before yours could register an ore during preInit).
-
Custom Crop Crashes w/ Unknown Error Upon Planting.
Actually what usually happens is that they've set up their code in such a way that swapping the two results in a similar, but different, crash. Because they're trying to pass the seed to the block constructor and the block to the seed constructor. Not the case here (they posted the block class, which is not taking the seed as a parameter) but they didn't post the Item class, so who knows what it's doing.
-
[1.10.2] Is it possible to dynamically add or remove recipes ?
See also: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/RecipesUtil.java
-
[1.10.2] Question about syncing tile entity data
1) Mark dirty says "this needs to be saved to disk" not "send this to the client." 2) I believe the method you want is now called worldObj.markAndNotifyBlock(pos, chunk, iblockstate, newState, flags); 3) The client isn't updating its own values on its end because you did if (worldObj.isRemote) return; (you can safely remove that for the most part)
-
onItemRightClick method
That AABB is both 0 in size and centered near the origin of the world. You should be using new AxisAlignedBB(playerIn.pos.getX() - 10, playerIn.pos.getY() - 10, playerIn.pos.getZ() - 10, playerIn.pos.getX() + 10, playerIn.pos.getY() + 10, playerIn.pos.getZ() + 10)
-
[1.10.2][SOLVED] Item rendering does not work
Sigh. Why do people subvert the proxy system by putting client side code in a common location that's only called from the client proxy? That common location still needs to contain valid code as far as the server is concerned, which references to non-existent classes is not.
-
[1.10.2] Question about syncing tile entity data
Override getUpdatePacket and getUpdateTag() getUpdatePacket will return a new package with the contents returned from getUpdateTag, where you write all the TE's information in it. You can get away with just using the same nbt that's saved to disk, as long as there isn't a ton of data the client doesn't need.
-
[1.10.2] Question about syncing tile entity data
Then sync the data.
-
[1.10.2] Question about syncing tile entity data
That depends: Does the client ever need to know this information?
-
JSON OBJ models really dark.
JSON is not OBJ so don't call it a "JSON OBJ model." It's a JSON model. You have also posted literally no code.
-
[1.10.2] How to change ItemStack item?
Hash-tag: no one is surprised.
-
set model to items
Its because you set your item's registry name as "Hoja" with a capital (go look at your code).
-
set model to items
make sure your file and folder names are in all lower case.
-
set model to items
Item Variants. Duh. Did you really think that all 16 wool colors had the same unlocalized name? No, they don't. Also, setUnlocalizedName will not throw an error if an unlocalized name has already been set. setRegistryName absolutely will.
-
[1.10.2] Add custom data to a chunk, not a world
Step 1: Hold the data in your own, native data structure during runtime Step 2: When the chunk saves, loads, or unloads do the appropriate thing with that data to save it into the chunk's nbt. https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/flowers/util/OreDataHooks.java https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/flowers/FlowerEventHandler.java#L71-L97
-
[1.10.2][SOLVED] Better way of registering models for items and blocks?
Something something there will be problems.
-
Random Entity Id
The ID value is yours, it will never clash with another mod's. Just make it a fixed value, there's no reason for it to be random.
-
[1.10.2] How to change ItemStack item?
If you're replacing an item in the hotbar (the currently active item) you should be able to figure out which slot is currently active. Even if not you can loop over the hotbar and compare item stack instances directly (one will return true for stack == otherStack )
-
[1.10.2][SOLVED] Better way of registering models for items and blocks?
From what I understand it has to be called in Init, but before some things and after others and was just prone to problems that if not properly dealt with would cause issues. You might have code that works fine in 1.8, but you should update to using ModelLoader.setCustomModelResourceLocation on newer version of MC anyway.
-
[SOLVED] Generating an IBlockState based on an item in the player's hotbar
You need to look at the item's metadata and convert from meta to state.
-
[1.10.2][SOLVED] Better way of registering models for items and blocks?
Yes, because using the ModelMesher directly has issues. Which is why the ModelLoader method exists.
-
[1.10.2] How to change ItemStack item?
You can just replace the itemstack in the player's inventory.
-
[1.10.2] [UNSOLVED] Block EnumFacing crash
You should rename that to "lib" or "library."
IPS spam blocked by CleanTalk.