mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2024-12-15 04:41:37 +08:00
Update buildscript to Gradle 2.14 & Forge to 1.9.4 (1965)
This commit is contained in:
parent
f689d53d62
commit
5afd2bbbf3
50
build.gradle
50
build.gradle
@ -1,6 +1,6 @@
|
||||
println """
|
||||
*******************************************
|
||||
You are building WorldEdit!
|
||||
You are building WorldEdit!
|
||||
|
||||
If you encounter trouble:
|
||||
1) Read COMPILING.md if you haven't yet
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
dependencies {
|
||||
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
|
||||
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:3.0.1'
|
||||
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.4.0'
|
||||
classpath 'org.ajoberstar:gradle-git:1.4.2'
|
||||
}
|
||||
}
|
||||
@ -50,12 +50,34 @@
|
||||
ext.gitCommitHash = "no_git_id"
|
||||
}
|
||||
|
||||
apply plugin: 'com.jfrog.artifactory'
|
||||
artifactory {
|
||||
contextUrl = "${artifactory_contextUrl}"
|
||||
publish {
|
||||
repository {
|
||||
repoKey = project.version.contains("SNAPSHOT") ? 'libs-snapshot-local' : 'libs-release-local'
|
||||
username = "${artifactory_user}"
|
||||
password = "${artifactory_password}"
|
||||
maven = true
|
||||
}
|
||||
}
|
||||
|
||||
resolve {
|
||||
repository {
|
||||
repoKey = 'repo'
|
||||
username = "${artifactory_user}"
|
||||
password = "${artifactory_password}"
|
||||
maven = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
subprojects {
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'maven'
|
||||
apply plugin: 'checkstyle'
|
||||
apply plugin: 'com.github.johnrengelman.shadow'
|
||||
apply plugin: 'com.jfrog.artifactory-upload'
|
||||
apply plugin: 'com.jfrog.artifactory'
|
||||
|
||||
group = 'com.sk89q.worldedit'
|
||||
version = '6.1.3-SNAPSHOT'
|
||||
@ -117,26 +139,4 @@ task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
exclude '.cache'
|
||||
exclude 'LICENSE*'
|
||||
}
|
||||
|
||||
artifactory {
|
||||
contextUrl = "${artifactory_contextUrl}"
|
||||
publish {
|
||||
repository {
|
||||
repoKey = project.version.contains("SNAPSHOT") ? 'libs-snapshot-local' : 'libs-release-local'
|
||||
username = "${artifactory_user}"
|
||||
password = "${artifactory_password}"
|
||||
maven = true
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
resolve {
|
||||
repository {
|
||||
repoKey = 'repo'
|
||||
username = "${artifactory_user}"
|
||||
password = "${artifactory_password}"
|
||||
maven = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,12 +27,12 @@ compile project(':worldedit-core')
|
||||
}
|
||||
|
||||
//version = "6.1.2"
|
||||
ext.forgeVersion = "12.16.1.1891"
|
||||
ext.forgeVersion = "12.17.0.1965"
|
||||
//ext.internalVersion = version + ";" + gitCommitHash
|
||||
|
||||
minecraft {
|
||||
version = "1.9-${project.forgeVersion}"
|
||||
mappings = "snapshot_20160505"
|
||||
version = "1.9.4-${project.forgeVersion}"
|
||||
mappings = "snapshot_20160617"
|
||||
runDir = 'run'
|
||||
|
||||
replaceIn "com/sk89q/worldedit/forge/ForgeWorldEdit.java"
|
||||
|
@ -23,10 +23,9 @@
|
||||
import com.sk89q.worldedit.world.biome.BiomeData;
|
||||
import com.sk89q.worldedit.world.registry.BiomeRegistry;
|
||||
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
|
||||
/**
|
||||
* Provides access to biome data in Forge.
|
||||
@ -41,29 +40,29 @@ public BaseBiome createFromId(int id) {
|
||||
@Override
|
||||
public List<BaseBiome> getBiomes() {
|
||||
List<BaseBiome> list = new ArrayList<BaseBiome>();
|
||||
for (BiomeGenBase biome : BiomeGenBase.REGISTRY) {
|
||||
list.add(new BaseBiome(BiomeGenBase.getIdForBiome(biome)));
|
||||
for (Biome biome : Biome.REGISTRY) {
|
||||
list.add(new BaseBiome(Biome.getIdForBiome(biome)));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BiomeData getData(BaseBiome biome) {
|
||||
return new ForgeBiomeData(BiomeGenBase.getBiome(biome.getId()));
|
||||
return new ForgeBiomeData(Biome.getBiome(biome.getId()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Cached biome data information.
|
||||
*/
|
||||
private static class ForgeBiomeData implements BiomeData {
|
||||
private final BiomeGenBase biome;
|
||||
private final Biome biome;
|
||||
|
||||
/**
|
||||
* Create a new instance.
|
||||
*
|
||||
* @param biome the base biome
|
||||
*/
|
||||
private ForgeBiomeData(BiomeGenBase biome) {
|
||||
private ForgeBiomeData(Biome biome) {
|
||||
this.biome = biome;
|
||||
}
|
||||
|
||||
|
@ -119,7 +119,7 @@ public void dispatchCUIEvent(CUIEvent event) {
|
||||
}
|
||||
PacketBuffer buffer = new PacketBuffer(Unpooled.copiedBuffer(send.getBytes(WECUIPacketHandler.UTF_8_CHARSET)));
|
||||
SPacketCustomPayload packet = new SPacketCustomPayload(ForgeWorldEdit.CUI_PLUGIN_CHANNEL, buffer);
|
||||
this.player.playerNetServerHandler.sendPacket(packet);
|
||||
this.player.connection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -154,7 +154,7 @@ private void sendColorized(String msg, TextFormatting formatting) {
|
||||
|
||||
@Override
|
||||
public void setPosition(Vector pos, float pitch, float yaw) {
|
||||
this.player.playerNetServerHandler.setPlayerLocation(pos.getX(), pos.getY(), pos.getZ(), yaw, pitch);
|
||||
this.player.connection.setPlayerLocation(pos.getX(), pos.getY(), pos.getZ(), yaw, pitch);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -59,9 +59,9 @@
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.ChunkCoordIntPair;
|
||||
import net.minecraft.util.math.ChunkPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.gen.ChunkProviderServer;
|
||||
@ -205,7 +205,7 @@ public boolean clearContainerBlockContents(Vector position) {
|
||||
@Override
|
||||
public BaseBiome getBiome(Vector2D position) {
|
||||
checkNotNull(position);
|
||||
return new BaseBiome(BiomeGenBase.getIdForBiome(getWorld().getBiomeGenForCoords(new BlockPos(position.getBlockX(), 0, position.getBlockZ()))));
|
||||
return new BaseBiome(Biome.getIdForBiome(getWorld().getBiomeForCoordsBody(new BlockPos(position.getBlockX(), 0, position.getBlockZ()))));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -260,7 +260,7 @@ public boolean regenerate(Region region, EditSession editSession) {
|
||||
}
|
||||
ChunkProviderServer chunkServer = (ChunkProviderServer) provider;
|
||||
for (Vector2D coord : chunks) {
|
||||
long pos = ChunkCoordIntPair.chunkXZ2Int(coord.getBlockX(), coord.getBlockZ());
|
||||
long pos = ChunkPos.chunkXZ2Int(coord.getBlockX(), coord.getBlockZ());
|
||||
Chunk mcChunk;
|
||||
if (chunkServer.chunkExists(coord.getBlockX(), coord.getBlockZ())) {
|
||||
mcChunk = chunkServer.loadChunk(coord.getBlockX(), coord.getBlockZ());
|
||||
@ -269,8 +269,7 @@ public boolean regenerate(Region region, EditSession editSession) {
|
||||
chunkServer.droppedChunksSet.remove(pos);
|
||||
chunkServer.id2ChunkMap.remove(pos);
|
||||
mcChunk = chunkServer.provideChunk(coord.getBlockX(), coord.getBlockZ());
|
||||
chunkServer.id2ChunkMap.add(pos, mcChunk);
|
||||
chunkServer.loadedChunks.add(mcChunk);
|
||||
chunkServer.id2ChunkMap.put(pos, mcChunk);
|
||||
if (mcChunk != null) {
|
||||
mcChunk.onChunkLoad();
|
||||
mcChunk.populateChunk(chunkServer, chunkServer.chunkGenerator);
|
||||
|
@ -96,7 +96,7 @@ static void setTileEntity(World world, Vector position, Class<? extends TileEnti
|
||||
static void setTileEntity(World world, Vector position, @Nullable NBTTagCompound tag) {
|
||||
if (tag != null) {
|
||||
updateForSet(tag, position);
|
||||
TileEntity tileEntity = TileEntity.createTileEntity(world.getMinecraftServer(), tag);
|
||||
TileEntity tileEntity = TileEntity.create(tag);
|
||||
if (tileEntity != null) {
|
||||
world.setTileEntity(new BlockPos(position.getBlockX(), position.getBlockY(), position.getBlockZ()), tileEntity);
|
||||
}
|
||||
|
@ -1,4 +1 @@
|
||||
public net.minecraft.world.gen.ChunkProviderServer field_73248_b # droppedChunksSet
|
||||
public net.minecraft.world.gen.ChunkProviderServer field_73244_f # id2ChunkMap
|
||||
public net.minecraft.world.gen.ChunkProviderServer field_73245_g # loadedChunks
|
||||
public net.minecraft.world.gen.ChunkProviderServer field_186029_c # chunkGenerator
|
||||
|
Loading…
Reference in New Issue
Block a user