Permalink
Browse files

[forge] Update Forge to 1.12.2

  • Loading branch information...
kenzierocks committed Nov 17, 2018
1 parent 08fc855 commit 58651de781aa188c1a9d1c8369d54785f4c76ccf
@@ -87,8 +87,8 @@ subprojects {
ext.internalVersion = version + ";" + gitCommitHash
sourceCompatibility = 1.7
targetCompatibility = 1.7
sourceCompatibility = 1.8
targetCompatibility = 1.8
checkstyle.configFile = new File(rootProject.projectDir, "config/checkstyle/checkstyle.xml")
checkstyle.toolVersion = '7.6.1'
@@ -9,7 +9,7 @@ dependencies {
compile 'com.sk89q:jchronic:0.2.4a'
compile 'com.google.code.findbugs:jsr305:1.3.9'
compile 'com.thoughtworks.paranamer:paranamer:2.6'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.sk89q.lib:jlibnoise:1.0.0'
//compile 'net.sf.trove4j:trove4j:3.0.3'
testCompile 'org.mockito:mockito-core:1.9.0-rc1'
@@ -16,7 +16,7 @@ apply plugin: 'net.minecraftforge.gradle.forge'
dependencies {
compile project(':worldedit-core')
compile 'org.spongepowered:spongeapi:6.0.0-SNAPSHOT'
compileOnly 'org.spongepowered:spongeapi:6.0.0-SNAPSHOT'
testCompile group: 'org.mockito', name: 'mockito-core', version: '1.9.0-rc1'
}
@@ -30,11 +30,11 @@ repositories {
}
}
ext.forgeVersion = "14.22.0.2456"
ext.forgeVersion = "14.23.5.2768"
minecraft {
version = "1.12.1-${project.forgeVersion}"
mappings = "snapshot_20170815"
version = "1.12.2-${project.forgeVersion}"
mappings = "stable_39"
runDir = 'run'
replaceIn "com/sk89q/worldedit/forge/ForgeWorldEdit.java"
@@ -79,14 +79,14 @@ public int resolveItem(String name) {
for (Item item : Item.REGISTRY) {
if (item == null) continue;
if (item.getUnlocalizedName() == null) continue;
if (item.getUnlocalizedName().startsWith("item.")) {
if (item.getUnlocalizedName().equalsIgnoreCase("item." + name)) return Item.getIdFromItem(item);
if (item.getTranslationKey() == null) continue;
if (item.getTranslationKey().startsWith("item.")) {
if (item.getTranslationKey().equalsIgnoreCase("item." + name)) return Item.getIdFromItem(item);
}
if (item.getUnlocalizedName().startsWith("tile.")) {
if (item.getUnlocalizedName().equalsIgnoreCase("tile." + name)) return Item.getIdFromItem(item);
if (item.getTranslationKey().startsWith("tile.")) {
if (item.getTranslationKey().equalsIgnoreCase("tile." + name)) return Item.getIdFromItem(item);
}
if (item.getUnlocalizedName().equalsIgnoreCase(name)) return Item.getIdFromItem(item);
if (item.getTranslationKey().equalsIgnoreCase(name)) return Item.getIdFromItem(item);
}
return -1;
}
@@ -164,7 +164,7 @@ public boolean setBlock(Vector position, BaseBlock block, boolean notifyAndLight
int z = position.getBlockZ();
// First set the block
Chunk chunk = world.getChunkFromChunkCoords(x >> 4, z >> 4);
Chunk chunk = world.getChunk(x >> 4, z >> 4);
BlockPos pos = new BlockPos(x, y, z);
IBlockState old = chunk.getBlockState(pos);
@SuppressWarnings("deprecation")
@@ -226,7 +226,7 @@ public boolean setBiome(Vector2D position, BaseBiome biome) {
checkNotNull(position);
checkNotNull(biome);
Chunk chunk = getWorld().getChunkFromBlockCoords(new BlockPos(position.getBlockX(), 0, position.getBlockZ()));
Chunk chunk = getWorld().getChunk(new BlockPos(position.getBlockX(), 0, position.getBlockZ()));
if ((chunk != null) && (chunk.isLoaded())) {
chunk.getBiomeArray()[((position.getBlockZ() & 0xF) << 4 | position.getBlockX() & 0xF)] = (byte) biome.getId();
return true;
@@ -284,7 +284,7 @@ public boolean regenerate(Region region, EditSession editSession) {
// We need to also pull one more chunk in every direction
CuboidRegion expandedPreGen = new CuboidRegion(region.getMinimumPoint().subtract(16, 0, 16), region.getMaximumPoint().add(16, 0, 16));
for (Vector2D chunk : expandedPreGen.getChunks()) {
freshWorld.getChunkFromChunkCoords(chunk.getBlockX(), chunk.getBlockZ());
freshWorld.getChunk(chunk.getBlockX(), chunk.getBlockZ());
}
ForgeWorld from = new ForgeWorld(freshWorld);
@@ -33,7 +33,7 @@
@Override
public IMessage onMessage(LeftClickAirEventMessage message, final MessageContext ctx) {
ctx.getServerHandler().player.mcServer.addScheduledTask(new Runnable() {
ctx.getServerHandler().player.server.addScheduledTask(new Runnable() {
@Override
public void run() {

0 comments on commit 58651de

Please sign in to comment.