Initial 1.14.3 update.

This commit is contained in:
LexManos committed 2019-06-24 19:01:03 -07:00
1 parent e5acea60e6
commit ff0bb8c83c
104 files changed
+637 -654

No files matched your search

@@ -198,11 +198,11 @@ public class DimensionManager
@SuppressWarnings("deprecation")
public static ServerWorld initWorld(MinecraftServer server, DimensionType dim)
{
Validate.isTrue(dim != DimensionType.OVERWORLD, "Can not hotload overworld. This must be loaded at all times by main Server.");
Validate.isTrue(dim != DimensionType.field_223227_a_, "Can not hotload overworld. This must be loaded at all times by main Server.");
Validate.notNull(server, "Must provide server when creating world");
Validate.notNull(dim, "Must provide dimension when creating world");
ServerWorld overworld = getWorld(server, DimensionType.OVERWORLD, false, false);
ServerWorld overworld = getWorld(server, DimensionType.field_223227_a_, false, false);
Validate.notNull(overworld, "Cannot Hotload Dim: Overworld is not Loaded!");
@SuppressWarnings("resource")
@@ -802,7 +802,7 @@ public class ForgeHooks
}
@Nullable
public static LootTable loadLootTable(Gson gson, ResourceLocation name, String data, boolean custom, LootTableManager lootTableManager)
public static LootTable loadLootTable(Gson gson, ResourceLocation name, JsonObject data, boolean custom, LootTableManager lootTableManager)
{
Deque<LootTableContext> que = lootContext.get();
if (que == null)
@@ -1151,4 +1151,10 @@ public class ForgeHooks
}
return id;
}
public static boolean canEntityDestroy(World world, BlockPos pos, LivingEntity entity)
{
BlockState state = world.getBlockState(pos);
return ForgeEventFactory.getMobGriefingEvent(world, entity) && state.canEntityDestroy(world, pos, entity) && ForgeEventFactory.onEntityDestroyBlock(entity, pos, state);
}
}
@@ -290,7 +290,7 @@ public interface IForgeDimension
*/
default boolean shouldMapSpin(String entity, double x, double z, double rotation)
{
return getDimension().getType() == DimensionType.NETHER;
return getDimension().getType() == DimensionType.field_223228_b_;
}
/**
@@ -25,6 +25,7 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screen.CreateBuffetWorldScreen;
import net.minecraft.client.gui.screen.CreateFlatWorldScreen;
import net.minecraft.client.gui.screen.CreateWorldScreen;
import net.minecraft.world.IWorld;
import net.minecraft.world.World;
import net.minecraft.world.WorldType;
import net.minecraft.world.gen.ChunkGenerator;
@@ -39,7 +40,6 @@ import net.minecraft.world.gen.layer.ZoomLayer;
import net.minecraft.world.gen.layer.LayerUtil;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.fml.client.config.IArrayEntry;
public interface IForgeWorldType
{
@@ -70,7 +70,7 @@ public interface IForgeWorldType
mc.displayGuiScreen(new CreateBuffetWorldScreen(gui, gui.chunkProviderSettingsJson));
}
default boolean handleSlimeSpawnReduction(java.util.Random random, World world)
default boolean handleSlimeSpawnReduction(java.util.Random random, IWorld world)
{
return this == WorldType.FLAT ? random.nextInt(4) != 1 : false;
}
@@ -64,6 +64,7 @@ import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.text.ChatType;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.world.Explosion;
import net.minecraft.world.GameRules;
import net.minecraft.world.IWorld;
import net.minecraft.world.World;
import net.minecraft.world.ServerWorld;
@@ -670,7 +671,7 @@ public class ForgeEventFactory
MinecraftForge.EVENT_BUS.post(event);
Result result = event.getResult();
return result == Result.DEFAULT ? world.getGameRules().getBoolean("mobGriefing") : result == Result.ALLOW;
return result == Result.DEFAULT ? world.getGameRules().func_223586_b(GameRules.field_223599_b) : result == Result.ALLOW;
}
public static boolean saplingGrowTree(IWorld world, Random rand, BlockPos pos)