CrucibleMC / Crucible

Crucible, a fork of Thermos, is a CraftBukkit and Forge server implementation for 1.7.10, providing the ability to load both Forge mods and Bukkit plugins alongside each other.
https://discord.gg/jWSTJ4d
GNU General Public License v3.0
184 stars 63 forks source link

Can't Use different Server-Icon.png sizes #38

Closed KAMKEEL closed 3 years ago

KAMKEEL commented 4 years ago

When you have a server-icon.png that is of different size from 64 pixels. This occurs. It doesn't seem to happen on KCauldron or UraniumMC

java.lang.IllegalArgumentException: Must be 64 pixels wide at org.apache.commons.lang.Validate.isTrue(Validate.java:136) ~[Validate.class:2.6] at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadServerIcon0(CraftServer.java:262) ~[CraftServer.class:1.7.10-4.1] at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadServerIcon0(CraftServer.java:256) ~[CraftServer.class:1.7.10-4.1] at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadIcon(CraftServer.java:824) [CraftServer.class:1.7.10-4.1] at org.bukkit.craftbukkit.v1_7_R4.CraftServer.(CraftServer.java:236) [CraftServer.class:1.7.10-4.1] at net.minecraft.server.management.ServerConfigurationManager.(ServerConfigurationManager.java:130) [oi.class:?] at net.minecraft.server.dedicated.DedicatedPlayerList.(SourceFile:14) [ls.class:?] at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:234) [lt.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:641) [MinecraftServer.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0_231] [18:55:12 WARN]: Couldn't load server icon java.lang.IllegalArgumentException: Must be 64 pixels wide at org.apache.commons.lang.Validate.isTrue(Validate.java:136) ~[Validate.class:2.6] at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadServerIcon0(CraftServer.java:262) ~[CraftServer.class:1.7.10-4.1] at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadServerIcon0(CraftServer.java:256) ~[CraftServer.class:1.7.10-4.1] at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadIcon(CraftServer.java:824) [CraftServer.class:1.7.10-4.1] at org.bukkit.craftbukkit.v1_7_R4.CraftServer.(CraftServer.java:240) [CraftServer.class:1.7.10-4.1] at net.minecraft.server.management.ServerConfigurationManager.(ServerConfigurationManager.java:130) [oi.class:?] at net.minecraft.server.dedicated.DedicatedPlayerList.(SourceFile:14) [ls.class:?] at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:234) [lt.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:641) [MinecraftServer.class:?]

EverNife commented 4 years ago

Crucible code: https://github.com/CrucibleMC/Crucible/blob/bd5db79d02f3af2e1fd185187857c0de6b244607/src/main/java/org/bukkit/craftbukkit/CraftServer.java#L259-L268

Uranium code: https://github.com/UraniumMC/Uranium/blob/7686a6bd7781d69a17832dc2b0c5dcd0a4c9980a/src/main/java/org/bukkit/craftbukkit/CraftServer.java#L1746-L1755

Codes are the same for both Uranium and Crucible, i will test it soon on other version.

KAMKEEL commented 4 years ago

I know for a fact that server-icons of different sizes for both the Dev and Stable versions of Uranium, so it must be another line somewhere else. The png file I was using was 600x600 pixels if you were wondering.

EverNife commented 4 years ago

Ok, tested it on other platforms. Its not a bug, its an intended behavior.

Not even on 1.12.2 this is allowed (tested on Mohist).

But this is something we may be able to get done.

juanmuscaria commented 3 years ago

You can disable this check by enabling crucible.unsafe