1
0
forked from xjboss/KCauldronX

Add option to allow nether portals in non overworld (close #58)

This commit is contained in:
Prototik 2015-06-28 00:29:43 +07:00
parent eedf6789a0
commit 712aab7c57
3 changed files with 11 additions and 3 deletions

View File

@ -92,7 +92,7 @@
if (p_149841_6_.nextInt(p_149841_7_ + 10) < 5 && !p_149841_1_.canLightningStrikeAt(p_149841_2_, p_149841_3_, p_149841_4_))
{
int k1 = p_149841_7_ + p_149841_6_.nextInt(5) / 4;
@@ -297,7 +335,7 @@
@@ -297,17 +335,17 @@
{
if (!World.doesBlockHaveSolidTopSurface(p_149695_1_, p_149695_2_, p_149695_3_ - 1, p_149695_4_) && !this.canNeighborBurn(p_149695_1_, p_149695_2_, p_149695_3_, p_149695_4_))
{
@ -101,7 +101,10 @@
}
}
@@ -307,7 +345,7 @@
public void onBlockAdded(World p_149726_1_, int p_149726_2_, int p_149726_3_, int p_149726_4_)
{
- if (p_149726_1_.provider.dimensionId > 0 || !Blocks.portal.func_150000_e(p_149726_1_, p_149726_2_, p_149726_3_, p_149726_4_))
+ if (!net.minecraft.server.MinecraftServer.kcauldronConfig.commonAllowNetherPortal.getValue() && p_149726_1_.provider.dimensionId > 0 || !Blocks.portal.func_150000_e(p_149726_1_, p_149726_2_, p_149726_3_, p_149726_4_))
{
if (!World.doesBlockHaveSolidTopSurface(p_149726_1_, p_149726_2_, p_149726_3_ - 1, p_149726_4_) && !this.canNeighborBurn(p_149726_1_, p_149726_2_, p_149726_3_, p_149726_4_))
{

View File

@ -10,6 +10,7 @@ import java.util.Properties;
import org.spigotmc.RestartCommand;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.FMLLog;
public class KCauldron {
private static boolean sManifestParsed = false;
@ -109,7 +110,7 @@ public class KCauldron {
public static int lookupForgeRevision() {
if (sForgeRevision != 0) return sForgeRevision;
int revision = 0;
int revision = Integer.parseInt(System.getProperty("kcauldron.forgeRevision", "0"));
try {
Properties p = new Properties();
p.load(KCauldron.class

View File

@ -25,6 +25,9 @@ public class KCauldronConfig extends ConfigBase {
public BoolSetting loggingMaterialInjection = new BoolSetting(this,
"logging.materialInjection", false, "Log material injection event");
public BoolSetting commonAllowNetherPortal = new BoolSetting(this,
"common.allowNetherPortalBesidesOverworld", false, "Allow nether portals in dimensions besides overworld");
public KCauldronConfig() {
super("kcauldron.yml", "kc");
register(commandEnable);
@ -34,6 +37,7 @@ public class KCauldronConfig extends ConfigBase {
register(updatecheckerAutorestart);
register(updatecheckerQuite);
register(loggingMaterialInjection);
register(commonAllowNetherPortal);
load();
}