Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getSubBlocks should not be SideOnly.CLIENT. #103

Closed
KingLemming opened this issue Apr 9, 2018 · 4 comments
Closed

getSubBlocks should not be SideOnly.CLIENT. #103

KingLemming opened this issue Apr 9, 2018 · 4 comments
Assignees
Labels

Comments

@KingLemming
Copy link

KingLemming commented Apr 9, 2018

Basically as topic. I don't know how many of your blocks this is in, but I know it's in EnumBlock at least.

In prior versions I'm aware that it was a client only thing, but this is no longer the case, and there are lots of valid reasons for iterating over this on the server.

I'm trying to track down potential weirdness with Natura and while I can't say for certain this is the cause...it could be? :)

@bonii-xx
Copy link
Contributor

You are correct, it's from the days of clientside-only-creative-items-thing. Curious why you are iterating over it though? I don't think it's a good idea to use it for any non-display purposes.

@KingLemming
Copy link
Author

KingLemming commented Apr 10, 2018

Because when things are Oredict'd using the Wildcard value instead of individually, there is no other option. There's literally no other method to try and determine what "valid" stacks are.

Basically, to figure out Natura's logs from the "logWood" list to create the Sawmill recipes, I have to call getSubBlocks to get each actual log.

@bonii-xx
Copy link
Contributor

Ah yes, that one.. I usually did a -> getStateFromMeta -> getMetaFromState and checked if they're the same. Since, if you pass in an invalid meta, you should get the default state.. and there's only 16 metadata values for blocks. However that can crash if mods don't handle their stuff properly.. or vanilla.

bonii-xx added a commit that referenced this issue Apr 10, 2018
* Begin Mantle's update to 1.11. Not everything is 100% completed.

* Add jenkinsfile for building using jenkins 2 blue ocean

* Bump Mod version, and fix the required Forge version and Minecraft versions.

* cleanup build.gradle

* add missing gradle plugin

* more gradle cleanup/updates

* Update Mantle to 1.11.2 + update 1.11 code to match master (1.10.2).

* Whoops undo this change!

* Clean up some checks to use isEmpty(), which is the same as checking the count is equal to 0.

* Reinstate recipematchregistry api

* Update RecipeMatch API to return an Optional

* Itemstacklist util

* Bring itemstacklist.withSize in line with vanilla implementation

* Finish optional update

* Fix connected block textures

* Fix tile inventory

* Fix itemstacklist derp

* More 1.11 fixes/adjustments

* More itemstacklist utility

* Validation annotations to make itemstack shenanigans more obvious

* Inventory support for itemstacklist

* Update Mantle to 1.12, Some things might not work/need to be tested!

* Fix "acceptedMinecraftVersions" not accepting 1.12, and bump the required forge version.

* Allow Pulse Modules to use the new registration events added with the registry rewrite.

* Fix GUI's not having a background as drawDefaultBackground isn't called by drawScreen anymore.

* Bump Forge + Mod version, and clean up any Item using addInformation to incude @nullable for the World input.

* Fix use of tab instead of spaces.

* Fix tooltips not being rendered anymore inside guis.

* Fix loading ITooltipFlag on server side.

* Change up book loading order to load books after they're registered in preInit

* Remove unneeded imports inside Mantle.java and bump the required forge version to the current recommended build.

* Fix mantle not calling init() from the proxy, which is used to reload the books

* Added two helper classes for trading with villagers (#75)

Vanilla only implements this for items instead of stacks. Methods provided allow adding a trade using two inputs for an output and a random input for a random output. Any of those can be empty to default to emeralds

* Change books to be lazily loaded. This also kills all of our loading dependency problems.

* Version bump

* jar tasks gets finalized by reobfJar task

- Fixes #94

* Update Configurate

* Remove @SideOnly(Side.CLIENT) from getSubBlocks as it is no longer only a client side method. (#103) MinecraftForge/MinecraftForge@368d206

* Remove last clientside only from getSubBlocks #103

* Have heart rendering loop correctly if it surpasses 12 rows of hearts #102

* Fix book crashing when trying to display missing items #99

* Bump version to 1.3.2
@weirleader
Copy link

That did the trick -- thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants