Refactoring

This commit is contained in:
Marcel Konrad
2018-07-01 13:31:56 +02:00
parent 4b865d6861
commit 3b976d6ae9
9 changed files with 2037 additions and 2037 deletions

View File

@@ -43,7 +43,7 @@ public class ElementPageList<T, K> extends Element
if(this.values.getObject() == null)
{
this.values.setObject(0);
this.values.setIndex(Math.max(0, this.list.indexOf(this.logic.convert(initial))));
this.values.setIndex(Math.max(0, this.list.indexOf(this.logic.getObject(initial))));
if(initial == null)
{

View File

@@ -13,5 +13,5 @@ public interface ILogicPageList<T, K> extends ILogic
void onClick(T clicked);
void onRegister(int id, int x, int y, int width, int height, String display, String registryKey, boolean enabled, T value, Container container);
T convert(K object);
T getObject(K object);
}

View File

@@ -83,7 +83,7 @@ public class ContentAdvancements extends Content
}
@Override
public Advancement convert(String object)
public Advancement getObject(String object)
{
return helper.ADVANCEMENT_MANAGER.getAdvancement(Type.parseResourceLocation(object));
}

View File

@@ -138,7 +138,7 @@ public class ContentCustomItem extends Content
}
@Override
public ResourceLocation convert(String object)
public ResourceLocation getObject(String object)
{
if(object != null)
{
@@ -189,7 +189,7 @@ public class ContentCustomItem extends Content
}
@Override
public EnumAttributes convert(Object object)
public EnumAttributes getObject(Object object)
{
return null;
}

View File

@@ -68,7 +68,7 @@ public class ContentEnchantment extends Content
}
@Override
public ResourceLocation convert(String object)
public ResourceLocation getObject(String object)
{
return Type.parseResourceLocation(object);
}

View File

@@ -94,7 +94,7 @@ public class ContentGamerules extends Content
}
@Override
public String convert(String object)
public String getObject(String object)
{
return object;
}

View File

@@ -89,7 +89,7 @@ public class ContentPotions extends ContentChild
}
@Override
public ResourceLocation convert(Potion object)
public ResourceLocation getObject(Potion object)
{
if(object != null)
{

View File

@@ -83,7 +83,7 @@ public class ContentRecipes extends Content
}
@Override
public IRecipe convert(String object)
public IRecipe getObject(String object)
{
return CraftingManager.REGISTRY.getObject(Type.parseResourceLocation(object));
}

View File

@@ -146,7 +146,7 @@ public class ContentSummon extends Content
}
@Override
public EnumAttributes convert(Object object)
public EnumAttributes getObject(Object object)
{
return null;
}