Fix invalid input falling back to pig as input
This commit is contained in:
@@ -68,8 +68,9 @@ public class EntitySummonArgument implements IDeserializableArgument
|
|||||||
if(entity != null)
|
if(entity != null)
|
||||||
{
|
{
|
||||||
EntityType<?> type = ForgeRegistries.ENTITIES.getValue(entity);
|
EntityType<?> type = ForgeRegistries.ENTITIES.getValue(entity);
|
||||||
|
ResourceLocation location = ForgeRegistries.ENTITIES.getKey(type);
|
||||||
|
|
||||||
if(type != null)
|
if(!ForgeRegistries.ENTITIES.getDefaultKey().equals(location) || location.equals(entity))
|
||||||
{
|
{
|
||||||
this.set(type);
|
this.set(type);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user