Add fix for issue 6286. Changed null return to throw exception as per IExtensibleEnum

This commit is contained in:
Brian Chim committed 2020-03-08 21:21:49 -04:00
1 parent 6aadd20f5f
commit 2e2fe6c199
3 files changed
+131 -2

No files matched your search

@@ -22,7 +22,7 @@ package net.minecraftforge.common;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IWorldReader;
public enum PlantType
public enum PlantType implements IExtensibleEnum
{
Plains,
Desert,
@@ -45,5 +45,8 @@ public enum PlantType
* @param name the name of the type of plant, you had better follow the style above
* @return the acquired {@link PlantType}, a new one if not found.
*/
public static PlantType create(String name){ return null; }
public static PlantType create(String name)
{
throw new IllegalStateException("Enum not extended");
}
}