mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-18 19:39:14 +00:00
Added config option to disable capture of bosses in soul vessel.
This commit is contained in:
1 parent
edd24e94e9
commit
58fbe6c71b
2 files changed
+11
-1
No files matched your search
@@ -255,6 +255,7 @@ public final class Config {
|
||||
public static String isGasConduitEnabled = "auto";
|
||||
|
||||
public static String[] soulVesselBlackList = new String[0];
|
||||
public static boolean soulVesselCapturesBosses = false;
|
||||
|
||||
public static void load(FMLPreInitializationEvent event) {
|
||||
|
||||
@@ -680,7 +681,11 @@ public final class Config {
|
||||
isGasConduitEnabled = config.getString("isGasConduitEnabled", sectionItems.name, isGasConduitEnabled,
|
||||
"Can be set to 'auto', 'true' or 'false'. When set to auto the gas conduit will only be enabled when Mekanism is installed.");
|
||||
|
||||
soulVesselBlackList = config.getStringList("soulVesselBlackList", sectionItems.name, soulVesselBlackList, "Entities listed here will can not be captured in a 'Vessel of Souls'");
|
||||
soulVesselBlackList = config.getStringList("soulVesselBlackList", sectionItems.name, soulVesselBlackList,
|
||||
"Entities listed here will can not be captured in a 'Vessel of Souls'");
|
||||
|
||||
soulVesselCapturesBosses = config.getBoolean("soulVesselCapturesBosses", sectionItems.name, soulVesselCapturesBosses,
|
||||
"When set to false, any mob with a 'boss bar' won't be able to be captured in the 'Vessel of Souls'");
|
||||
}
|
||||
|
||||
private Config() {
|
||||
|
||||
@@ -21,6 +21,7 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.boss.IBossDisplayData;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
@@ -164,6 +165,10 @@ public class ItemSoulVessel extends Item implements IResourceTooltipProvider {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!Config.soulVesselCapturesBosses && entity instanceof IBossDisplayData) {
|
||||
return false;
|
||||
}
|
||||
|
||||
NBTTagCompound root = new NBTTagCompound();
|
||||
root.setString("id", entityId);
|
||||
entity.writeToNBT(root);
|
||||
|
||||
Reference in new issue
Block a user