Add option to allow nether portals in non overworld (close #58)
This commit is contained in:
parent
eedf6789a0
commit
712aab7c57
@ -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_))
|
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;
|
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_))
|
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_))
|
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_))
|
||||||
{
|
{
|
||||||
|
@ -10,6 +10,7 @@ import java.util.Properties;
|
|||||||
import org.spigotmc.RestartCommand;
|
import org.spigotmc.RestartCommand;
|
||||||
|
|
||||||
import cpw.mods.fml.common.FMLCommonHandler;
|
import cpw.mods.fml.common.FMLCommonHandler;
|
||||||
|
import cpw.mods.fml.common.FMLLog;
|
||||||
|
|
||||||
public class KCauldron {
|
public class KCauldron {
|
||||||
private static boolean sManifestParsed = false;
|
private static boolean sManifestParsed = false;
|
||||||
@ -109,7 +110,7 @@ public class KCauldron {
|
|||||||
|
|
||||||
public static int lookupForgeRevision() {
|
public static int lookupForgeRevision() {
|
||||||
if (sForgeRevision != 0) return sForgeRevision;
|
if (sForgeRevision != 0) return sForgeRevision;
|
||||||
int revision = 0;
|
int revision = Integer.parseInt(System.getProperty("kcauldron.forgeRevision", "0"));
|
||||||
try {
|
try {
|
||||||
Properties p = new Properties();
|
Properties p = new Properties();
|
||||||
p.load(KCauldron.class
|
p.load(KCauldron.class
|
||||||
|
@ -25,6 +25,9 @@ public class KCauldronConfig extends ConfigBase {
|
|||||||
public BoolSetting loggingMaterialInjection = new BoolSetting(this,
|
public BoolSetting loggingMaterialInjection = new BoolSetting(this,
|
||||||
"logging.materialInjection", false, "Log material injection event");
|
"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() {
|
public KCauldronConfig() {
|
||||||
super("kcauldron.yml", "kc");
|
super("kcauldron.yml", "kc");
|
||||||
register(commandEnable);
|
register(commandEnable);
|
||||||
@ -34,6 +37,7 @@ public class KCauldronConfig extends ConfigBase {
|
|||||||
register(updatecheckerAutorestart);
|
register(updatecheckerAutorestart);
|
||||||
register(updatecheckerQuite);
|
register(updatecheckerQuite);
|
||||||
register(loggingMaterialInjection);
|
register(loggingMaterialInjection);
|
||||||
|
register(commonAllowNetherPortal);
|
||||||
load();
|
load();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user