SwingTheVine / QSAND-Minecraft

A mod that adds quicksand and dungeons to Minecraft.
GNU General Public License v3.0
1 stars 0 forks source link

Combine Proxies #6

Open SwingTheVine opened 4 months ago

SwingTheVine commented 4 months ago

The proxies should be combined. However, since they function correctly, there is no rush.

Nagol12344 commented 2 weeks ago

Does https://github.com/SwingTheVine/QSAND-Minecraft/blob/1.8.9/src/main/java/com/SwingTheVine/QSAND/proxy/CommonProxy.java do anything at all? Looks to be empty files.

SwingTheVine commented 2 weeks ago

Yes. It initializes the methods for the server running Minecraft. Since they are all rendering methods, and this is running on the server which has no GUI, the methods are left blank as there is no way to render things server-side. If you look at the client proxy (which runs on the client connecting to the server) you will see it renders things in the methods.

CommonProxy could be called a "shell class" that just exists. In order for things to be rendered on the client, the client copies the CommonProxy and overrides the (empty) contents of the methods. CommonProxy also exists to be a data type as can be seen here where the "proxy" variable is of the type "CommonProxy". Tecchnically, ClientProxy and CommonProxy can be combined. However, there is no change in the functionality, so this modification is not high on my list of things to change.