|
1 | 1 | package pokecube.core; |
2 | 2 |
|
3 | | -import java.util.Map; |
4 | | - |
5 | | -import javax.annotation.Nullable; |
6 | | - |
7 | 3 | import com.google.common.collect.Maps; |
8 | 4 | import com.mojang.serialization.Codec; |
9 | | - |
10 | 5 | import net.minecraft.core.Registry; |
11 | 6 | import net.minecraft.core.particles.ParticleOptions; |
12 | 7 | import net.minecraft.resources.ResourceLocation; |
|
87 | 82 | import thut.core.common.network.PacketHandler; |
88 | 83 | import thut.wearables.ThutWearables; |
89 | 84 |
|
| 85 | +import javax.annotation.Nullable; |
| 86 | +import java.util.Map; |
| 87 | + |
90 | 88 | @Mod(value = PokecubeCore.MODID) |
91 | 89 | public class PokecubeCore |
92 | 90 | { |
@@ -219,8 +217,8 @@ public static Config getConfig() |
219 | 217 | } |
220 | 218 |
|
221 | 219 | /** |
222 | | - * For pokemob type mobs, this returns the pokedex entry for the |
223 | | - * corresponding entity type, for other mobs it returns null. |
| 220 | + * For pokemob type mobs, this returns the pokedex entry for the corresponding entity type, for other mobs it |
| 221 | + * returns null. |
224 | 222 | * |
225 | 223 | * @param type |
226 | 224 | * @return |
@@ -307,6 +305,14 @@ public PokecubeCore() |
307 | 305 |
|
308 | 306 | private void loadComplete(final FMLLoadCompleteEvent event) |
309 | 307 | { |
| 308 | + var version = Runtime.version(); |
| 309 | + if (version.feature() == 17 && version.update() >= 8 && version.update() <= 10) throw new RuntimeException( |
| 310 | + "\nBroken Java Detected: " + version + ", Refusing to start.\n" |
| 311 | + + "This version of Java has a major memory flaw, and will randomly crash.\n" |
| 312 | + + "Please update to a newer version of Java 17, at least after 17.0.10\n" |
| 313 | + + "If you need assistance with this, see the #faq channel in the Thut's Mods discord server.\n" |
| 314 | + + "https://discord.gg/sXCpFaAh2x\n"); |
| 315 | + |
310 | 316 | ItemGenerator.strippableBlocks(event); |
311 | 317 | ItemGenerator.compostables(event); |
312 | 318 | ItemGenerator.flammables(event); |
|
0 commit comments