Posted January 20, 201510 yr I'm making custom leaves and I would like to make leaves opaque when needed, but I have no idea how to get a players graphics level. I've tried Minecraft.isFancyGraphicsEnabled() but that only works in singleplayer (why is isOpaqueCube() needed in multiplayer?).
January 20, 201510 yr Minecraft.isFancyGraphicsEnabled() is perfectly good way to do this. To get this boolean on server side you will need to make request-answer system using packets. Server -> askForBoolean -> Client gets it -> sendAnswer -> Server does stuff. Or other way around. Note that anything that makes server dependent on client is cheatable (not that anyone would write cheat to mods... ) Btw. i have no idea why would you need Fancy graphics to do it..., proper way would be make block with custom renderer and value stored inside metadata. Let's say meta == 0 render this, else render other, where one is opaque, second is not. If you need player-dependent view then you will ofc need IExtendedEntityProperties. At this point I have no idea what exacly you want, so please write when and why should leaves display differently. 1.7.10 is no longer supported by forge, you are on your own.
January 20, 201510 yr this is probably what makes them render transparent or not transparent @Override public boolean isLeaves(IBlockAccess world, int x, int y, int z) { return true; } if you are doing custom rendering my advice would be to add a setting to your mods configuration and an option so the client can toggle it as to why isOpaqueCube is needed for multiplayer, i will explain the difference between multiplayer and singleplayer multiplayer is the client running without a server in the background and connected to an ipaddress singleplayer is the client running with a server in the background and connected directly to that server isOpaqueCube is used by the client to determine which blocks do not need to be rendered
January 20, 201510 yr Author thanks! I tried using setGraphicsLevel before but it didn't work(I just tried to use the two fields but that didn't work of course), but now it does
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.