mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-21 04:32:18 +00:00
#1116 Soul Binder recipes not working with Special Mobs
This commit is contained in:
1 parent
421d09ffe6
commit
b33caa57eb
5 files changed
+28
-14
No files matched your search
@@ -19,15 +19,24 @@ public abstract class AbstractSoulBinderRecipe implements IMachineRecipe, ISoulB
|
||||
|
||||
private int energyRequired;
|
||||
private String uid;
|
||||
private Class<?> entityClass;
|
||||
private int xpRequired;
|
||||
|
||||
private List<String> supportedEntities = new ArrayList<String>();
|
||||
|
||||
protected AbstractSoulBinderRecipe(int energyRequired, int xpRequired, String uid, Class<?> entityClass) {
|
||||
this.energyRequired = energyRequired;
|
||||
this.xpRequired = xpRequired;
|
||||
this.uid = uid;
|
||||
this.entityClass = entityClass;
|
||||
this.uid = uid;
|
||||
supportedEntities.add((String)EntityList.classToStringMapping.get(entityClass));
|
||||
}
|
||||
|
||||
protected AbstractSoulBinderRecipe(int energyRequired, int xpRequired, String uid, String... entityNames) {
|
||||
this.energyRequired = energyRequired;
|
||||
this.xpRequired = xpRequired;
|
||||
this.uid = uid;
|
||||
for(String name : entityNames) {
|
||||
supportedEntities.add(name);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -87,8 +96,9 @@ public abstract class AbstractSoulBinderRecipe implements IMachineRecipe, ISoulB
|
||||
}
|
||||
int slot = input.slotNumber;
|
||||
ItemStack item = input.item;
|
||||
if(slot == 0) {
|
||||
return getSupportedSouls().contains(EnderIO.itemSoulVessel.getMobTypeFromStack(item));
|
||||
if(slot == 0) {
|
||||
String type = EnderIO.itemSoulVessel.getMobTypeFromStack(item);
|
||||
return getSupportedSouls().contains(type);
|
||||
}
|
||||
if(slot == 1) {
|
||||
return item.isItemEqual(getInputStack());
|
||||
@@ -121,7 +131,7 @@ public abstract class AbstractSoulBinderRecipe implements IMachineRecipe, ISoulB
|
||||
|
||||
@Override
|
||||
public List<String> getSupportedSouls() {
|
||||
return Collections.singletonList((String)EntityList.classToStringMapping.get(entityClass));
|
||||
return supportedEntities;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -13,7 +13,7 @@ public class SoulBinderEnderCystalRecipe extends AbstractSoulBinderRecipe {
|
||||
public static SoulBinderEnderCystalRecipe instance = new SoulBinderEnderCystalRecipe();
|
||||
|
||||
private SoulBinderEnderCystalRecipe() {
|
||||
super(Config.soulBinderEnderCystalRF,Config.soulBinderEnderCystalLevels, "SoulBinderEnderCystalRecipe", EntityEnderman.class);
|
||||
super(Config.soulBinderEnderCystalRF,Config.soulBinderEnderCystalLevels, "SoulBinderEnderCystalRecipe", "Enderman", "SpecialMobs.SpecialEnderman");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -19,7 +19,7 @@ public class SoulBinderReanimationRecipe extends AbstractSoulBinderRecipe {
|
||||
public static SoulBinderReanimationRecipe instance = new SoulBinderReanimationRecipe();
|
||||
|
||||
private SoulBinderReanimationRecipe() {
|
||||
super(Config.soulBinderReanimationRF, Config.soulBinderReanimationLevels, "SoulBinderReanimationRecipe", EntityZombie.class);
|
||||
super(Config.soulBinderReanimationRF, Config.soulBinderReanimationLevels, "SoulBinderReanimationRecipe", "Zombie", "SpecialMobs.SpecialZombie");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user