From 7879be157eeb1dfa17ad4ca17e0c9812abbd52f4 Mon Sep 17 00:00:00 2001 From: Kenzie Togami Date: Sat, 22 Jun 2019 12:42:20 -0700 Subject: [PATCH] [Forge] Update to newer 1.14.2 forge, mappings --- worldedit-forge/build.gradle | 4 ++-- .../src/main/java/com/sk89q/worldedit/forge/ForgeWorld.java | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/worldedit-forge/build.gradle b/worldedit-forge/build.gradle index ab0e28fd2..7696d677a 100644 --- a/worldedit-forge/build.gradle +++ b/worldedit-forge/build.gradle @@ -15,7 +15,7 @@ apply plugin: 'eclipse' apply plugin: 'net.minecraftforge.gradle' def minecraftVersion = "1.14.2" -def forgeVersion = "26.0.25" +def forgeVersion = "26.0.48" configurations.all { Configuration it -> it.resolutionStrategy { ResolutionStrategy rs -> @@ -36,7 +36,7 @@ sourceCompatibility = 1.8 targetCompatibility = 1.8 minecraft { - mappings channel: 'snapshot', version: "20190614-${minecraftVersion}" + mappings channel: 'snapshot', version: "20190621-${minecraftVersion}" runs { client = { diff --git a/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeWorld.java b/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeWorld.java index 0e2c50ad7..840680e1a 100644 --- a/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeWorld.java +++ b/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeWorld.java @@ -496,8 +496,7 @@ public class ForgeWorld extends AbstractWorld { @Override public BaseBlock getFullBlock(BlockVector3 position) { BlockPos pos = new BlockPos(position.getBlockX(), position.getBlockY(), position.getBlockZ()); - // Avoid creation by using the CHECK mode -- if it's needed, it'll be re-created anyways - TileEntity tile = getWorld().getChunk(pos).getTileEntity(pos, Chunk.CreateEntityType.CHECK); + TileEntity tile = getWorld().getChunk(pos).getTileEntity(pos); if (tile != null) { return getBlock(position).toBaseBlock(NBTConverter.fromNative(TileEntityUtils.copyNbtData(tile))); @@ -550,7 +549,7 @@ public class ForgeWorld extends AbstractWorld { @Override public Entity createEntity(Location location, BaseEntity entity) { World world = getWorld(); - final Optional> entityType = EntityType.getTypeFromString(entity.getType().getId()); + final Optional> entityType = EntityType.byKey(entity.getType().getId()); if (!entityType.isPresent()) return null; net.minecraft.entity.Entity createdEntity = entityType.get().create(world); if (createdEntity != null) {