Bump to latest forge and cleanup some old files.

Dieser Commit ist enthalten in:
Matthew Miller 2019-03-11 22:45:41 +10:00
Ursprung a59d994d84
Commit 6e24472af5
4 geänderte Dateien mit 2 neuen und 157 gelöschten Zeilen

Datei anzeigen

@ -2,7 +2,6 @@ language: java
notifications: notifications:
email: false email: false
before_install: chmod +x gradlew before_install: chmod +x gradlew
install: ./gradlew setupCIWorkspace -s
script: ./gradlew build -s script: ./gradlew build -s
jdk: jdk:
- oraclejdk8 - oraclejdk8

Datei anzeigen

@ -14,7 +14,7 @@ buildscript {
apply plugin: 'net.minecraftforge.gradle' apply plugin: 'net.minecraftforge.gradle'
def minecraftVersion = "1.13.2" def minecraftVersion = "1.13.2"
def forgeVersion = "25.0.70" def forgeVersion = "25.0.76"
dependencies { dependencies {
compile project(':worldedit-core') compile project(':worldedit-core')
@ -28,7 +28,7 @@ sourceCompatibility = 1.8
targetCompatibility = 1.8 targetCompatibility = 1.8
minecraft { minecraft {
mappings channel: 'snapshot', version: '20190217-1.13.1' mappings channel: 'snapshot', version: '20190311-1.13.2'
runs { runs {
client = { client = {

Datei anzeigen

@ -1,150 +0,0 @@
<project name="WorldEdit-Forge" default="main">
<property environment="env"/>
<!-- Properties -->
<property name="build.dir" value="${maven.build.directory}/forge"/>
<property name="resource.dir" value="src/forge/resources"/>
<property name="src.forge.dir" value="src/forge/java"/>
<property name="src.we.dir" value="src/main/java"/>
<property name="bukkit.src.1" value="com/sk89q/bukkit"/>
<property name="bukkit.src.2" value="com/sk89q/worldedit/bukkit"/>
<property name="wepif.src" value="com/sk89q/wepif"/>
<property name="util.yaml.src" value="com/sk89q/util/yaml"/>
<property name="we.yaml.src" value="com/sk89q/worldedit/util/YAMLConfiguration.java"/>
<property name="download.dir" value="forge-download"/>
<property name="forge.dir" value="${build.dir}/forge"/>
<property name="mcp.dir" value="${forge.dir}/mcp"/>
<property name="minecraftsrc.dir" value="${mcp.dir}/src/minecraft"/>
<property file="${minecraftsrc.dir}/fmlversion.properties" />
<property name="mc.version" value="1.6.2"/>
<property name="forge.version" value="9.10.1.850"/>
<!-- Targets -->
<target name="init-msg">
<echo message="Starting build for ${we.version} for MC ${mc.version}"/>
</target>
<target name="download">
<mkdir dir="${download.dir}"/>
<get src="http://files.minecraftforge.net/minecraftforge/minecraftforge-src-${mc.version}-${forge.version}.zip" dest="${download.dir}" usetimestamp="True"/>
<echo message="Download finished"/>
</target>
<target name="check-setup-forge" depends="download">
<available file="${download.dir}/minecraftforge-setup-${mc.version}-${forge.version}.zip" property="setup.forge.present"/>
</target>
<target name="setup-forge" depends="check-setup-forge" unless="setup.forge.present">
<unzip dest="${build.dir}" failOnEmptyArchive="true">
<fileset dir="${download.dir}">
<include name="minecraftforge-src-${mc.version}-${forge.version}.zip"/>
</fileset>
</unzip>
<!-- Set executable permission on forge's *.sh -->
<chmod dir="${forge.dir}" perm="a+rx" includes="**.sh"/>
<!-- Install forge -->
<echo message="Starting forge install process"/>
<exec dir="${forge.dir}" executable="cmd" osfamily="windows" failonerror="true">
<arg value="/c"/>
<arg value="install.cmd"/>
</exec>
<exec dir="${forge.dir}" executable="sh" osfamily="unix" failonerror="true">
<arg value="install.sh"/>
</exec>
<echo message="Forge installation finished"/>
<zip destfile="${download.dir}/minecraftforge-setup-${mc.version}-${forge.version}.zip" basedir="${build.dir}"/>
</target>
<target name="unzip-forge" depends="check-setup-forge" if="setup.forge.present">
<unzip dest="${build.dir}" failOnEmptyArchive="true">
<fileset dir="${download.dir}">
<include name="minecraftforge-setup-${mc.version}-${forge.version}.zip"/>
</fileset>
</unzip>
</target>
<target name="copySRC" >
<!-- Copy WE dependencies source -->
<copy todir="${mcp.dir}/lib" file="${jchronic.path}"/>
<copy todir="${mcp.dir}/lib" file="${truezip.path}"/>
<copy todir="${mcp.dir}/lib" file="${rhino.path}"/>
<!--<copy todir="${mcp.dir}/lib" file="${snakeyaml.path}"/>-->
<!-- Copy WE forge source -->
<copy todir="${minecraftsrc.dir}">
<fileset dir="${src.forge.dir}"/>
</copy>
<!-- Copy WE source -->
<copy todir="${minecraftsrc.dir}">
<fileset dir="${src.we.dir}"/>
</copy>
<!-- Delete bukkit related sources -->
<delete dir="${minecraftsrc.dir}/${bukkit.src.1}"/>
<delete dir="${minecraftsrc.dir}/${bukkit.src.2}"/>
<delete dir="${minecraftsrc.dir}/${wepif.src}"/>
<delete dir="${minecraftsrc.dir}/${util.yaml.src}"/>
<delete file="${minecraftsrc.dir}/${we.yaml.src}"/>
<!-- Set Version -->
<replace file="${minecraftsrc.dir}/com/sk89q/worldedit/forge/WorldEditMod.java" token="%VERSION%" value="${we.version}"/>
</target>
<target name="compile" depends="copySRC">
<echo message="Compiling version ${we.version}"/>
<!-- Recompile -->
<exec dir="${mcp.dir}" executable="cmd" osfamily="windows" failonerror="true">
<arg line="/c recompile.bat --client"/>
</exec>
<exec dir="${mcp.dir}" executable="sh" osfamily="unix" failonerror="true">
<arg line="recompile.sh --client"/>
</exec>
<!-- Reobf -->
<exec dir="${mcp.dir}" executable="cmd" osfamily="windows" failonerror="true">
<arg line="/c reobfuscate_srg.bat --client"/>
</exec>
<exec dir="${mcp.dir}" executable="sh" osfamily="unix" failonerror="true">
<arg line="reobfuscate_srg.sh --client"/>
</exec>
<echo message="Compiling finished"/>
</target>
<target name="copyclasses" depends="compile">
<echo message="Adding version ${we.version} to maven result"/>
<!-- Copy WE classes -->
<copy todir="${maven.build.directory}/classes/com/sk89q/worldedit/forge">
<fileset dir="${mcp.dir}/reobf/minecraft/com/sk89q/worldedit/forge"/>
</copy>
<!-- Copy resources -->
<copy todir="${maven.build.directory}/classes">
<fileset dir="${resource.dir}"></fileset>
</copy>
<replace file="${maven.build.directory}/classes/mcmod.info" token="%VERSION%" value="${we.version}"/>
<replace file="${maven.build.directory}/classes/mcmod.info" token="%MCVERSION%" value="${mc.version}"/>
<echo message="Adding finished"/>
</target>
<target name="main" depends="init-msg, unzip-forge, setup-forge, copyclasses"/>
</project>

Datei anzeigen

@ -22,7 +22,6 @@ package com.sk89q.worldedit.forge;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
import static com.sk89q.worldedit.forge.ForgeAdapter.adaptPlayer; import static com.sk89q.worldedit.forge.ForgeAdapter.adaptPlayer;
import com.google.common.base.Joiner;
import com.mojang.brigadier.ParseResults; import com.mojang.brigadier.ParseResults;
import com.mojang.brigadier.exceptions.CommandSyntaxException; import com.mojang.brigadier.exceptions.CommandSyntaxException;
import com.sk89q.worldedit.LocalSession; import com.sk89q.worldedit.LocalSession;
@ -57,16 +56,13 @@ import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.DistExecutor; import net.minecraftforge.fml.DistExecutor;
import net.minecraftforge.fml.ModContainer; import net.minecraftforge.fml.ModContainer;
import net.minecraftforge.fml.ModLoadingContext; import net.minecraftforge.fml.ModLoadingContext;
import net.minecraftforge.fml.SidedProvider;
import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.event.lifecycle.FMLLoadCompleteEvent; import net.minecraftforge.fml.event.lifecycle.FMLLoadCompleteEvent;
import net.minecraftforge.fml.event.server.FMLServerAboutToStartEvent; import net.minecraftforge.fml.event.server.FMLServerAboutToStartEvent;
import net.minecraftforge.fml.event.server.FMLServerStartedEvent; import net.minecraftforge.fml.event.server.FMLServerStartedEvent;
import net.minecraftforge.fml.event.server.FMLServerStoppingEvent; import net.minecraftforge.fml.event.server.FMLServerStoppingEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import net.minecraftforge.fml.loading.FMLCommonLaunchHandler;
import net.minecraftforge.fml.loading.FMLLoader; import net.minecraftforge.fml.loading.FMLLoader;
import net.minecraftforge.fml.loading.FMLPaths; import net.minecraftforge.fml.loading.FMLPaths;
import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.ForgeRegistries;