Merge pull request #259 from TehNut/master
Add teleposer blacklist + Remove server files from repo
This commit is contained in:
commit
df776f0323
26 changed files with 36 additions and 42 deletions
|
@ -1 +0,0 @@
|
||||||
[]
|
|
|
@ -1 +0,0 @@
|
||||||
[]
|
|
3
eula.txt
3
eula.txt
|
@ -1,3 +0,0 @@
|
||||||
#By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).
|
|
||||||
#Thu Feb 19 14:13:34 EST 2015
|
|
||||||
eula=true
|
|
1
ops.json
1
ops.json
|
@ -1 +0,0 @@
|
||||||
[]
|
|
|
@ -1,33 +0,0 @@
|
||||||
#Minecraft server properties
|
|
||||||
#Thu Feb 19 17:21:32 EST 2015
|
|
||||||
generator-settings=
|
|
||||||
op-permission-level=4
|
|
||||||
allow-nether=true
|
|
||||||
level-name=world
|
|
||||||
enable-query=false
|
|
||||||
allow-flight=false
|
|
||||||
announce-player-achievements=true
|
|
||||||
server-port=25565
|
|
||||||
level-type=DEFAULT
|
|
||||||
enable-rcon=false
|
|
||||||
force-gamemode=false
|
|
||||||
level-seed=
|
|
||||||
server-ip=
|
|
||||||
max-build-height=256
|
|
||||||
spawn-npcs=true
|
|
||||||
white-list=false
|
|
||||||
spawn-animals=true
|
|
||||||
hardcore=false
|
|
||||||
snooper-enabled=true
|
|
||||||
online-mode=true
|
|
||||||
resource-pack=
|
|
||||||
pvp=true
|
|
||||||
difficulty=1
|
|
||||||
enable-command-block=false
|
|
||||||
gamemode=0
|
|
||||||
player-idle-timeout=0
|
|
||||||
max-players=20
|
|
||||||
spawn-monsters=true
|
|
||||||
generate-structures=true
|
|
||||||
view-distance=10
|
|
||||||
motd=A Minecraft Server
|
|
|
@ -34,6 +34,9 @@ public class BloodMagicConfiguration
|
||||||
public static final String CATEGORY_GAMEPLAY = "gameplay";
|
public static final String CATEGORY_GAMEPLAY = "gameplay";
|
||||||
|
|
||||||
|
|
||||||
|
public static String[] teleposerBlacklist;
|
||||||
|
public static String[] blacklist = {};
|
||||||
|
|
||||||
public static void init(File configFile)
|
public static void init(File configFile)
|
||||||
{
|
{
|
||||||
for (String s : DEFAULT_COLOR_LIST.split(";"))
|
for (String s : DEFAULT_COLOR_LIST.split(";"))
|
||||||
|
@ -137,6 +140,8 @@ public class BloodMagicConfiguration
|
||||||
AlchemicalWizardry.ritualDisabledVeilOfEvil = config.get("Ritual Blacklist", "Veil of Evil", false).getBoolean(false);
|
AlchemicalWizardry.ritualDisabledVeilOfEvil = config.get("Ritual Blacklist", "Veil of Evil", false).getBoolean(false);
|
||||||
AlchemicalWizardry.ritualDisabledFullStomach = config.get("Ritual Blacklist", "Requiem of the Satiated Stomach", false).getBoolean(false);
|
AlchemicalWizardry.ritualDisabledFullStomach = config.get("Ritual Blacklist", "Requiem of the Satiated Stomach", false).getBoolean(false);
|
||||||
|
|
||||||
|
teleposerBlacklist = config.get("Teleposer Blacklist", "Blacklist", blacklist, "Stops specified blocks from being teleposed. Put entries on new lines. Valid syntax is: \nmodid:blockname:meta").getStringList();
|
||||||
|
|
||||||
String tempDemonConfigs = "Demon Configs";
|
String tempDemonConfigs = "Demon Configs";
|
||||||
TEDemonPortal.buildingGridDelay = config.get(tempDemonConfigs, "Building Grid Delay", 25).getInt();
|
TEDemonPortal.buildingGridDelay = config.get(tempDemonConfigs, "Building Grid Delay", 25).getInt();
|
||||||
TEDemonPortal.roadGridDelay = config.get(tempDemonConfigs, "Road Grid Delay", 10).getInt();
|
TEDemonPortal.roadGridDelay = config.get(tempDemonConfigs, "Road Grid Delay", 10).getInt();
|
||||||
|
|
|
@ -30,6 +30,8 @@ public class ConfigGui extends GuiConfig {
|
||||||
list.add(new ConfigElement<ConfigCategory>(config.getCategory("wellofsufferingblacklist".toLowerCase())));
|
list.add(new ConfigElement<ConfigCategory>(config.getCategory("wellofsufferingblacklist".toLowerCase())));
|
||||||
list.add(new ConfigElement<ConfigCategory>(config.getCategory("wimpysettings".toLowerCase())));
|
list.add(new ConfigElement<ConfigCategory>(config.getCategory("wimpysettings".toLowerCase())));
|
||||||
list.add(new ConfigElement<ConfigCategory>(config.getCategory("ritual blacklist".toLowerCase())));
|
list.add(new ConfigElement<ConfigCategory>(config.getCategory("ritual blacklist".toLowerCase())));
|
||||||
|
list.add(new ConfigElement<ConfigCategory>(config.getCategory("teleposer blacklist".toLowerCase())));
|
||||||
|
list.add(new ConfigElement<ConfigCategory>(config.getCategory("demon configs".toLowerCase())));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,8 @@ import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import WayofTime.alchemicalWizardry.api.event.TeleposeEvent;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.IProjectile;
|
import net.minecraft.entity.IProjectile;
|
||||||
|
@ -31,6 +33,7 @@ import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent;
|
||||||
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
|
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
|
||||||
import net.minecraftforge.event.entity.living.LivingHurtEvent;
|
import net.minecraftforge.event.entity.living.LivingHurtEvent;
|
||||||
import net.minecraftforge.event.entity.living.LivingSpawnEvent.CheckSpawn;
|
import net.minecraftforge.event.entity.living.LivingSpawnEvent.CheckSpawn;
|
||||||
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
import vazkii.botania.api.internal.IManaBurst;
|
import vazkii.botania.api.internal.IManaBurst;
|
||||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||||
import WayofTime.alchemicalWizardry.BloodMagicConfiguration;
|
import WayofTime.alchemicalWizardry.BloodMagicConfiguration;
|
||||||
|
@ -676,6 +679,31 @@ public class AlchemicalWizardryEventHooks
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent(priority = EventPriority.LOWEST)
|
||||||
|
public void onTelepose(TeleposeEvent event) {
|
||||||
|
for (int i = 0; i < BloodMagicConfiguration.teleposerBlacklist.length; i++) {
|
||||||
|
String[] blockData = BloodMagicConfiguration.teleposerBlacklist[i].split(":");
|
||||||
|
|
||||||
|
if (blockData.length == 3) {
|
||||||
|
|
||||||
|
Block block = GameRegistry.findBlock(blockData[0], blockData[1]);
|
||||||
|
int meta;
|
||||||
|
|
||||||
|
// Check if it's an int, if so, parse it. If not, set to 0 to avoid crashing.
|
||||||
|
if (blockData[2].matches("-?\\d+"))
|
||||||
|
meta = Integer.parseInt(blockData[2]);
|
||||||
|
else if (blockData[2].equals("*"))
|
||||||
|
meta = OreDictionary.WILDCARD_VALUE;
|
||||||
|
else
|
||||||
|
meta = 0;
|
||||||
|
|
||||||
|
if (block != null)
|
||||||
|
if (( block == event.initialBlock || block == event.finalBlock) && ( meta == event.initialMetadata || meta == event.finalMetadata || meta == OreDictionary.WILDCARD_VALUE))
|
||||||
|
event.setCanceled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) {
|
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) {
|
||||||
if (event.modID.equals("AWWayofTime")) {
|
if (event.modID.equals("AWWayofTime")) {
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
[]
|
|
|
@ -1 +0,0 @@
|
||||||
[]
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
world/level.dat
BIN
world/level.dat
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue