From f9563e5a34da6ed0230e51e934c376c7b0cc562b Mon Sep 17 00:00:00 2001 From: AbrarSyed Date: Sat, 9 Nov 2013 15:44:50 -0600 Subject: [PATCH 01/11] Step 1: The Purge --- apply_patches.py | 95 ---------- build.py | 34 ---- changelog.py | 113 ------------ forge.py | 139 -------------- install/install.cmd | 3 - install/install.py | 78 -------- install/install.sh | 2 - release.py | 417 ------------------------------------------ setup.py | 113 ------------ submodule_changlog.py | 51 ------ update_patches.py | 83 --------- 11 files changed, 1128 deletions(-) delete mode 100644 apply_patches.py delete mode 100644 build.py delete mode 100644 changelog.py delete mode 100644 forge.py delete mode 100644 install/install.cmd delete mode 100644 install/install.py delete mode 100644 install/install.sh delete mode 100644 release.py delete mode 100644 setup.py delete mode 100644 submodule_changlog.py delete mode 100644 update_patches.py diff --git a/apply_patches.py b/apply_patches.py deleted file mode 100644 index 98caab34a..000000000 --- a/apply_patches.py +++ /dev/null @@ -1,95 +0,0 @@ -import os -import sys -import fnmatch -import shlex -import difflib -import time, subprocess -from optparse import OptionParser - -def cmdsplit(args): - if os.sep == '\\': - args = args.replace('\\', '\\\\') - return shlex.split(args) - -def main(): - print("Applying patches") - - parser = OptionParser() - parser.add_option('-m', '--mcp-dir', action='store', dest='mcp_dir', help='Path to MCP', default=None) - parser.add_option('-p', '--patch-dir', action='store', dest='patch_dir', help='Patches Directory', default=None) - parser.add_option('-t', '--target-dir', action='store', dest='target_dir', help='Target Directory', default=None) - options, _ = parser.parse_args() - - if options.mcp_dir is None: - print 'Must supply MCP directory with --mcp-dir' - return - elif options.patch_dir is None: - print 'Must supply patches directory with --patch-dir' - return - elif options.target_dir is None: - print 'Must supplt target directory with --target-dir' - return - - print "Applying patches from '%s' to '%s'" % (options.patch_dir, options.target_dir) - apply_patches(options.mcp_dir, options.patch_dir, options.target_dir) - -def apply_patches(mcp_dir, patch_dir, target_dir, find=None, rep=None): - # Attempts to apply a directory full of patch files onto a target directory. - sys.path.append(mcp_dir) - - temp = os.path.abspath('temp.patch') - cmd = cmdsplit('patch -p2 -i "%s" ' % temp) - - if os.name == 'nt': - applydiff = os.path.abspath(os.path.join(mcp_dir, 'runtime', 'bin', 'applydiff.exe')) - cmd = cmdsplit('"%s" -uf -p2 -i "%s"' % (applydiff, temp)) - - for path, _, filelist in os.walk(patch_dir, followlinks=True): - for cur_file in fnmatch.filter(filelist, '*.patch'): - patch_file = os.path.normpath(os.path.join(patch_dir, path[len(patch_dir)+1:], cur_file)) - target_file = os.path.join(target_dir, fix_patch(patch_file, temp, find, rep)) - process = subprocess.Popen(cmd, cwd=target_dir, bufsize=-1) - process.communicate() - - if os.path.isfile(temp): - os.remove(temp) - -def fix_patch(in_file, out_file, find=None, rep=None): - #Fixes the following issues in the patch file if they exist: - # Normalizes the path seperators for the current OS - # Normalizes the line endings - # Returns the path that the file wants to apply to - - in_file = os.path.normpath(in_file) - if out_file is None: - tmp_file = in_file + '.tmp' - else: - out_file = os.path.normpath(out_file) - tmp_file = out_file - dir_name = os.path.dirname(out_file) - if dir_name: - if not os.path.exists(dir_name): - os.makedirs(dir_name) - - file = 'not found' - with open(in_file, 'rb') as inpatch: - with open(tmp_file, 'wb') as outpatch: - for line in inpatch: - line = line.rstrip('\r\n') - if line[:3] in ['+++', '---', 'Onl', 'dif']: - if not find == None and not rep == None: - line = line.replace('\\', '/').replace(find, rep).replace('/', os.sep) - else: - line = line.replace('\\', '/').replace('/', os.sep) - outpatch.write(line + os.linesep) - else: - outpatch.write(line + os.linesep) - if line[:3] == '---': - file = line[line.find(os.sep, line.find(os.sep)+1)+1:] - - if out_file is None: - shutil.move(tmp_file, in_file) - return file - -if __name__ == '__main__': - main() diff --git a/build.py b/build.py deleted file mode 100644 index 43f08267a..000000000 --- a/build.py +++ /dev/null @@ -1,34 +0,0 @@ -import os, os.path, sys -from optparse import OptionParser - -forge_dir = os.path.dirname(os.path.abspath(__file__)) -mcp_dir = os.path.abspath('..') - -from forge import build_forge_dev - -def main(): - - parser = OptionParser() - parser.add_option('-m', '--mcp-dir', action='store', dest='mcp_dir', help='MCP Path', default=None) - parser.add_option('-b', '--build', action='store', dest='build', help='Build number', default=None) - options, _ = parser.parse_args() - - build_num = 0 - if not options.build is None: - try: - build_num = int(options.build) - except: - pass - - fml_dir = os.path.join(forge_dir, 'fml') - mcp_dir = os.path.join(forge_dir, 'mcp') - - if not options.mcp_dir is None: - mcp_dir = os.path.abspath(options.mcp_dir) - elif os.path.isfile(os.path.join('..', 'runtime', 'commands.py')): - mcp_dir = os.path.abspath('..') - - sys.exit(build_forge_dev(mcp_dir, forge_dir, fml_dir, build_num)) - -if __name__ == '__main__': - main() \ No newline at end of file diff --git a/changelog.py b/changelog.py deleted file mode 100644 index bd4f2b900..000000000 --- a/changelog.py +++ /dev/null @@ -1,113 +0,0 @@ -import os, os.path, sys, re -import json, urllib2 -from pprint import pprint -from urlparse import urlparse -import base64 -import optparse, ast - -class PreemptiveBasicAuthHandler(urllib2.BaseHandler): - def __init__(self, password_mgr=None): - if password_mgr is None: - password_mgr = urllib2.HTTPPasswordMgrWithDefaultRealm() - self.passwd = password_mgr - self.add_password = self.passwd.add_password - - def http_request(self,req): - uri = req.get_full_url() - user, pw = self.passwd.find_user_password(None,uri) - if pw is None: return req - raw = "%s:%s" % (user, pw) - auth = 'Basic %s' % base64.b64encode(raw).strip() - req.add_unredirected_header('Authorization', auth) - return req - - def https_request(self,req): - return self.http_request(req) - -def read_url(url): - handler = PreemptiveBasicAuthHandler() - handler.add_password(None, 'ci.jenkins.minecraftforge.net', 'console_script', 'dc6d48ca20a474beeac280a9a16a926e') - file = urllib2.build_opener(handler).open(url) - data = file.read() - file.close() - return data - -def getBuildInfo(url, current_version=None): - data = read_url(url) - data = ast.literal_eval(data)['allBuilds'] - data = sorted(data, key=lambda key: key['number'], reverse=False) - - items = [] - output = [] - - for build in data: - build['actions'] = filter(lambda act: act is not None, build['actions']) - build['actions'] = filter(lambda act: 'text' in act, build['actions']) - build['actions'] = filter(lambda act: not ' ' in act['text'], build['actions']) - if len(build['actions']) == 0: - build['version'] = current_version - current_version = None - else: - build['version'] = build['actions'][0]['text'] - build['items'] = build['changeSet']['items'] - for item in build['items']: - item['author'] = item['author']['fullName'] - if build['result'] != 'SUCCESS': - items += build['items'] - else: - build['items'] = items + build['items'] - items = [] - output += [build] - build.pop('changeSet') - build.pop('actions') - return sorted(output, key=lambda key: key['number'], reverse=True) - -def add_latest_build(url, builds, current_version=None): - data = read_url(url) - data = ast.literal_eval(data) - number = data['number'] - - if builds[0]['number'] == data['number']: - return builds - - for item in data['changeSet']['items']: - item['author'] = item['author']['fullName'] - - build = { - 'number' : data['number'], - 'result' : 'SUCCESS', #Currently build should always be success... Else things derp after words - 'version' : current_version, - 'items' : data['changeSet']['items'] - } - return [build] + builds - -def make_changelog(job_path, target_build, change_file, current_version=None): - builds = getBuildInfo('%s/api/python?tree=allBuilds[result,number,actions[text],changeSet[items[author[fullName],comment]]]&pretty=true' % job_path, current_version) - builds = add_latest_build('%s/lastBuild/api/python?pretty=true&tree=number,changeSet[items[author[fullName],comment]]' % job_path, builds, current_version) - - log = [ "Changelog:" ] - - for build in builds: - if int(build['number']) > target_build: continue - if len(build['items']) == 0: continue - log.append('') - if build['version'] is None: - log.append('Build %s' % build['number']) - else: - log.append('Build %s' % build['version']) - for change in build['items']: - comments = filter(lambda cmt: len(cmt) > 0, change['comment'].split('\n')) - if len(comments) > 1: - log.append('\t' + change['author']) - for comment in comments: - log.append('\t\t' + comment) - elif len(comments) == 1: - log.append('\t%s: %s' % (change['author'], comments[0])) - - file = open(change_file, 'wb') - for line in log: - file.write('%s\n' % line) - file.close() - -if __name__ == '__main__': - make_changelog("http://ci.jenkins.minecraftforge.net/job/minecraftforge/", 70000, 'changelog.txt', 'pinecone') \ No newline at end of file diff --git a/forge.py b/forge.py deleted file mode 100644 index 0615bc06e..000000000 --- a/forge.py +++ /dev/null @@ -1,139 +0,0 @@ -import os, os.path, sys -import urllib, zipfile -import shutil, glob, fnmatch -import subprocess, logging, re -import csv, shutil -import pprint - -forge_dir = os.path.dirname(os.path.abspath(__file__)) - -def reset_logger(): - log = logging.getLogger() - while len(log.handlers) > 0: - log.removeHandler(log.handlers[0]) - -version_reg = re.compile(r'(([a-z]+)Version[\s]+=[\s]+)(\d+);') -def load_version(build=0): - info = {'major' : -1, - 'minor' : -1, - 'revision' : -1, - 'build' : -1 - } - hook_file = os.path.join(forge_dir, 'common/net/minecraftforge/common/ForgeVersion.java'.replace('/', os.sep)) - with open(hook_file, 'r') as fh: - buf = fh.read() - - def proc(match): - try: - info[match.group(2)] = int(match.group(3)) - except: - pass - return match.group(0) - - buf = version_reg.sub(proc, buf) - info['build'] = build - return info - -def inject_version(src_file, build=0): - version = load_version(build) - - tmp_file = src_file + '.tmp' - with open(src_file, 'r') as fh: - buf = fh.read() - - def mapname(match): - try: - return '%s%s;' % (match.group(1), version[match.group(2)]) - except KeyError: - pass - return match.group(0) - - buf = version_reg.sub(mapname, buf).replace('\r\n', '\n') - - with open(tmp_file, 'wb') as fh: - fh.write(buf) - shutil.move(tmp_file, src_file) - -def zip_folder(path, key, zip): - import pprint - files = os.listdir(path) - for file in files: - file_path = os.path.join(path, file) - file_key = os.path.join(key, file) - if os.path.isdir(file_path): - zip_folder(file_path, file_key, zip) - else: - if not file_key.replace(os.sep, '/') in zip.NameToInfo: - print ' ' + file_key - zip.write(file_path, file_key) - -def zip_create(path, key, zip_name): - zip = zipfile.ZipFile(zip_name, 'w', zipfile.ZIP_DEFLATED) - if os.path.isdir(path): - zip_folder(path, key, zip) - else: - zip.write(path, key) - zip.close() - -def apply_forge_patches(fml_dir, mcp_dir, forge_dir, src_dir, copy_files=True): - sys.path.append(fml_dir) - sys.path.append(os.path.join(fml_dir, 'install')) - from fml import copytree, apply_patches - - #patch files - print 'Applying Minecraft Forge patches' - sys.stdout.flush() - - if os.path.isdir(os.path.join(forge_dir, 'patches', 'minecraft')): - apply_patches(mcp_dir, os.path.join(forge_dir, 'patches', 'minecraft'), src_dir) - - if copy_files and os.path.isdir(os.path.join(forge_dir, 'client')): - copytree(os.path.join(forge_dir, 'client'), os.path.join(src_dir, 'minecraft')) - if copy_files and os.path.isdir(os.path.join(forge_dir, 'common')): - copytree(os.path.join(forge_dir, 'common'), os.path.join(src_dir, 'minecraft')) - -def build_forge_dev(mcp_dir, forge_dir, fml_dir, build_num=0): - version = load_version(build_num) - print '=================================== Build %d.%d.%d.%d Start =================================' % (version['major'], version['minor'], version['revision'], version['build']) - - src_dir = os.path.join(mcp_dir, 'src') - if os.path.isdir(src_dir): - shutil.rmtree(src_dir) - - sys.path.append(fml_dir) - sys.path.append(os.path.join(fml_dir, 'install')) - from fml import copytree - - print 'src_work -> src' - copytree(os.path.join(mcp_dir, 'src_work'), src_dir) - print '\nCopying Client Code' - copytree(os.path.join(forge_dir, 'client'), os.path.join(src_dir, 'minecraft'), -1) - print '\nCopying Common Code' - copytree(os.path.join(forge_dir, 'common'), os.path.join(src_dir, 'minecraft'), -1) - print - inject_version(os.path.join(src_dir, 'minecraft/net/minecraftforge/common/ForgeVersion.java'.replace('/', os.sep)), build_num) - - error_level = 0 - try: - sys.path.append(mcp_dir) - from runtime.commands import Commands, CLIENT, SERVER, CalledProcessError - from runtime.mcp import recompile_side - - os.chdir(mcp_dir) - reset_logger() - - commands = Commands(None, verify=True) - try: - recompile_side(commands, CLIENT) - except CalledProcessError as e: - error_level = 1 - pass - reset_logger() - os.chdir(forge_dir) - except SystemExit, e: - if not e.code == 0: - print 'Recompile Exception: %d ' % e.code - error_level = e.code - - print '=================================== Build Finished %d =================================' % error_level - return error_level \ No newline at end of file diff --git a/install/install.cmd b/install/install.cmd deleted file mode 100644 index 61436b21f..000000000 --- a/install/install.cmd +++ /dev/null @@ -1,3 +0,0 @@ -@echo off -.\fml\python\python_fml install.py %* -pause \ No newline at end of file diff --git a/install/install.py b/install/install.py deleted file mode 100644 index aac857fdc..000000000 --- a/install/install.py +++ /dev/null @@ -1,78 +0,0 @@ -import os, os.path, sys -import urllib, zipfile -import shutil, glob, fnmatch -import subprocess, logging -from optparse import OptionParser - -def fml_main(fml_dir, mcp_dir, gen_conf=True, disable_patches=False, disable_at=False, disable_merge=False, enable_server=False, - disable_client=False, disable_rename=False, disable_assets=False, decompile=False): - sys.path.append(fml_dir) - from fml import download_mcp, setup_mcp, decompile_minecraft, apply_fml_patches, finish_setup_fml - print '================ Forge ModLoader Setup Start ===================' - download_mcp(fml_dir, mcp_dir) - setup_mcp(fml_dir, mcp_dir, gen_conf) - if decompile: - decompile_minecraft(fml_dir, mcp_dir, disable_at=disable_at, disable_merge=disable_merge, - enable_server=enable_server, disable_client=disable_client, - disable_assets=disable_assets) - if disable_patches: - print 'Patching disabled' - else: - apply_fml_patches(fml_dir, mcp_dir, os.path.join(mcp_dir, 'src')) - finish_setup_fml(fml_dir, mcp_dir, enable_server=enable_server, disable_client=disable_client, disable_rename=disable_rename) - else: - print 'Decompile free install is on the to-do!' - print '================ Forge ModLoader Setup End ===================' - -def forge_main(forge_dir, fml_dir, mcp_dir): - sys.path.append(mcp_dir) - sys.path.append(fml_dir) - from runtime.updatenames import updatenames - from runtime.updatemd5 import updatemd5 - from forge import apply_forge_patches - from fml import reset_logger - - print '=============================== Minecraft Forge Setup Start =====================================' - print 'Applying forge patches' - apply_forge_patches(fml_dir, mcp_dir, forge_dir, os.path.join(mcp_dir, 'src'), True) - os.chdir(mcp_dir) - updatenames(None, True, True, False) - reset_logger() - updatemd5(None, True, True, False) - reset_logger() - os.chdir(forge_dir) - print '=============================== Minecraft Forge Setup Finished =================================' - -if __name__ == '__main__': - parser = OptionParser() - parser.add_option('-m', '--mcp-dir', action='store', dest='mcp_dir', help='Path to download/extract MCP to', default=None ) - parser.add_option('-p', '--no-patch', action="store_true", dest='no_patch', help='Disable application of FML patches', default=False) - parser.add_option('-a', '--no-access', action="store_true", dest='no_access', help='Disable access transformers', default=False) - parser.add_option('-s', '--server', action="store_true", dest='enable_server', help='Enable decompilation of server', default=False) - parser.add_option('-c', '--no-client', action="store_true", dest='no_client', help='Disable decompilation of server', default=False) - parser.add_option('-e', '--no-merge', action="store_true", dest='no_merge', help='Disable merging server code into client', default=False) - parser.add_option('-n', '--no-rename', action="store_true", dest='no_rename', help='Disable running updatenames', default=False) - parser.add_option( '--no-assets', action="store_true", dest='no_assets', help='Disable downloading of assets folder', default=False) - parser.add_option('-d', '--decompile', action="store_true", dest='decompile', help='Decompile minecraft and apply patches', default=True) - options, _ = parser.parse_args() - - forge_dir = os.path.dirname(os.path.abspath(__file__)) - fml_dir = os.path.abspath('fml') - mcp_dir = os.path.abspath('mcp') - - if not options.mcp_dir is None: - mcp_dir = os.path.abspath(options.mcp_dir) - - if options.no_client: - options.no_patch = True - - if options.no_merge: - options.no_patch = True - - fml_main(fml_dir, mcp_dir, disable_patches=options.no_patch, - disable_at=options.no_access, disable_merge=options.no_merge, - enable_server=options.enable_server, disable_client=options.no_client, - disable_rename=options.no_rename, disable_assets=options.no_assets, - decompile=options.decompile, gen_conf=False) - - forge_main(forge_dir, fml_dir, mcp_dir) \ No newline at end of file diff --git a/install/install.sh b/install/install.sh deleted file mode 100644 index fba8952b0..000000000 --- a/install/install.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -python install.py "$@" \ No newline at end of file diff --git a/release.py b/release.py deleted file mode 100644 index 39607213b..000000000 --- a/release.py +++ /dev/null @@ -1,417 +0,0 @@ -import os, os.path, sys, glob -import shutil, fnmatch, time, json -import logging, zipfile, re, subprocess -from pprint import pformat, pprint -from optparse import OptionParser -from urllib2 import HTTPError -from contextlib import closing -from datetime import datetime -sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0) -forge_dir = os.path.dirname(os.path.abspath(__file__)) -from forge import reset_logger, load_version, zip_folder, zip_create, inject_version, build_forge_dev -from changelog import make_changelog - -zip = None -zip_name = None -zip_base = None -version_str = None -version_mc = None - -def main(): - global version_str - global version_mc - - parser = OptionParser() - parser.add_option('-m', '--mcp-dir', action='store', dest='mcp_dir', help='MCP Path', default=None) - parser.add_option('-b', '--build', action='store', dest='build', help='Build number', default=None) - parser.add_option('-s', '--skipchangelog', action='store_true', dest='skip_changelog', help='Skip Changelog', default=False) - parser.add_option('-j', '--sign-jar', action='store', dest='sign_jar', help='Path to jar signer command', default=None) - options, _ = parser.parse_args() - - build_num = 0 - if not options.build is None: - try: - build_num = int(options.build) - except: - pass - - mcp_dir = os.path.join(forge_dir, 'mcp') - if not options.mcp_dir is None: - mcp_dir = os.path.abspath(options.mcp_dir) - - ret = 0 - fml_dir = os.path.join(forge_dir, 'fml') - ret = build_forge_dev(mcp_dir, forge_dir, fml_dir, build_num) - if ret != 0: - sys.exit(ret) - - - temp_dir = os.path.join(forge_dir, 'temp') - src_dir = os.path.join(mcp_dir, 'src') - reobf_dir = os.path.join(mcp_dir, 'reobf') - client_dir = os.path.join(reobf_dir, 'minecraft') - fml_dir = os.path.join(temp_dir, 'fml') - - print '=================================== Release Start =================================' - - fml = glob.glob(os.path.join(forge_dir, 'fml', 'target', 'fml-src-*.%d-*.zip' % build_num)) - if not len(fml) == 1: - if len(fml) == 0: - print 'Missing FML source zip, should be named fml-src-*.zip inside ./fml/target/ created when running setup' - else: - print 'To many FML source zips found, we should only have one. Check the Forge Git for the latest FML version supported' - sys.exit(1) - - if os.path.isdir(fml_dir): - shutil.rmtree(fml_dir) - - print 'Extracting: %s' % os.path.basename(fml[0]) - zf = zipfile.ZipFile(fml[0]) - zf.extractall(temp_dir) - zf.close() - - if os.path.isfile('MANIFEST.MF'): - os.remove('MANIFEST.MF') - - fml_name = os.path.basename(fml[0]).replace('src', 'universal').replace('.zip', '.jar').replace('-master.', '.') - print('Extracting %s MANIFEST.MF' % fml_name) - with closing(zipfile.ZipFile(os.path.join(forge_dir, 'fml', 'target', fml_name), mode='r')) as zip_in: - with closing(open('MANIFEST.MF', 'wb')) as out: - out.write(zip_in.read('META-INF/MANIFEST.MF')) - - error_level = 0 - try: - sys.path.append(mcp_dir) - from runtime.reobfuscate import reobfuscate - os.chdir(mcp_dir) - reset_logger() - reobfuscate(None, False, True, True, True, False, False) - reset_logger() - os.chdir(forge_dir) - except SystemExit, e: - print 'Reobfusicate Exception: %d ' % e.code - error_level = e.code - - extract_fml_obfed(fml_dir, mcp_dir, reobf_dir, client_dir) - gen_bin_patches(mcp_dir, os.path.join(forge_dir, 'fml'), build_num, client_dir) - - version = load_version(build_num) - version_forge = '%d.%d.%d.%d' % (version['major'], version['minor'], version['revision'], version['build']) - version_mc = load_mc_version(fml_dir) - branch = get_branch_name() - - version_str = '%s-%s' % (version_mc, version_forge) - if not branch == "": - version_str = '%s-%s' % (version_str, branch) - - out_folder = os.path.join(forge_dir, 'target') - if not os.path.isdir(out_folder): - os.makedirs(out_folder) - - for f in ['minecraftforge-changelog-%s.txt', 'minecraftforge-universal-%s.jar', 'minecraftforge-installer-%s.jar']: - fn = os.path.join(out_folder, f % version_str) - if os.path.isfile(fn): - os.remove(fn) - - if not options.skip_changelog: - changelog_file = 'target/minecraftforge-changelog-%s.txt' % (version_str) - try: - make_changelog("http://ci.jenkins.minecraftforge.net/job/minecraftforge/", build_num, changelog_file, version_str) - except HTTPError, e: - print 'Changelog failed to generate: %s' % e - options.skip_changelog = True - - version_file = 'forgeversion.properties' - if os.path.exists(version_file): - os.remove(version_file) - - with open(version_file, 'wb') as fh: - fh.write('forge.major.number=%d\n' % version['major']) - fh.write('forge.minor.number=%d\n' % version['minor']) - fh.write('forge.revision.number=%d\n' % version['revision']) - fh.write('forge.build.number=%d\n' % version['build']) - - json_data = gather_json(forge_dir, version_mc, version_forge, version_str) - - if not options.sign_jar is None: - sign_jar(forge_dir, options.sign_jar, client_dir, 'minecraftforge-universal-%s.jar' % version_str) - else: - zip_start('minecraftforge-universal-%s.jar' % version_str) - zip_folder(client_dir, '', zip) - zip_add('MANIFEST.MF','META-INF/MANIFEST.MF') - zip_add('client/forge_logo.png') - zip_add('install/MinecraftForge-Credits.txt') - zip_add('install/MinecraftForge-License.txt') - zip_add('install/Paulscode IBXM Library License.txt') - zip_add('install/Paulscode SoundSystem CodecIBXM License.txt') - zip_add('common/forge_at.cfg') - zip_add('common/assets','assets') - zip_add(version_file) - if not options.skip_changelog: - zip_add(changelog_file, 'MinecraftForge-Changelog.txt') - print(' version.json') - zip.writestr('version.json', json.dumps(json_data['versionInfo'], indent=4, separators=(',', ': '))) - - #Add dependancy and licenses from FML - FML_FILES = [ - 'CREDITS-fml.txt', - 'LICENSE-fml.txt', - 'README-fml.txt', - 'common/fml_at.cfg', - 'common/fml_marker.cfg', - 'common/fmlversion.properties', - 'common/mcpmod.info', - 'client/mcplogo.png', - 'common/deobfuscation_data-%s.lzma' % version_mc - ] - for file in FML_FILES: - zip_add(os.path.join(fml_dir, file)) - - zip_end() - - build_installer(forge_dir, version_str, version_forge, version_mc, out_folder, json.dumps(json_data, indent=4, separators=(',', ': '))) - - inject_version(os.path.join(forge_dir, 'common/net/minecraftforge/common/ForgeVersion.java'.replace('/', os.sep)), build_num) - zip_start('minecraftforge-src-%s.zip' % version_str, 'forge') - zip_add('client', 'client') - zip_add('common', 'common') - zip_add('patches', 'patches') - zip_add(fml_dir, 'fml') - zip_add('install', '') - zip_add('forge.py') - zip_add(version_file) - if not options.skip_changelog: - zip_add(changelog_file, 'MinecraftForge-Changelog.txt') - zip_end() - inject_version(os.path.join(forge_dir, 'common/net/minecraftforge/common/ForgeVersion.java'.replace('/', os.sep)), 0) - - if os.path.exists(version_file): - os.remove(version_file) - shutil.rmtree(temp_dir) - if os.path.isfile('MANIFEST.MF'): - os.remove('MANIFEST.MF') - - print '=================================== Release Finished %d =================================' % error_level - sys.exit(error_level) - -def gather_json(forge_dir, version_mc, version_forge, version_str): - def getTZ(): - ret = '-' - t = time.timezone - if (t < 0): - ret = '+' - t *= -1 - - h = int(t/60/60) - t -= (h*60*60) - m = int(t/60) - return '%s%02d%02d' % (ret, h, m) - timestamp = datetime.now().replace(microsecond=0).isoformat() + getTZ() - json_data = {} - with closing(open(os.path.join(forge_dir, 'fml', 'jsons', '%s-rel.json' % version_mc), 'r')) as fh: - data = fh.read() - data = data.replace('@version@', version_forge) - data = data.replace('@timestamp@', timestamp) - data = data.replace('@minecraft_version@', version_mc) - data = data.replace('@universal_jar@', 'minecraftforge-universal-%s.jar' % version_str) - data = data.replace('FMLTweaker', 'F_M_L_Tweaker') - data = data.replace('FML', 'Forge') - data = data.replace('F_M_L_Tweaker', 'FMLTweaker') - data = data.replace('cpw.mods:fml:', 'net.minecraftforge:minecraftforge:') - json_data = json.loads(data) - pprint(json_data) - return json_data - -def build_installer(forge_dir, version_str, version_forge, version_minecraft, out_folder, json_data): - file_name = 'minecraftforge-installer-%s.jar' % version_str - universal_name = 'minecraftforge-universal-%s.jar' % version_str - print '================== %s Start ==================' % file_name - with closing(zipfile.ZipFile(os.path.join(forge_dir, 'fml', 'installer_base.jar'), mode='a')) as zip_in: - with closing(zipfile.ZipFile(os.path.join(out_folder, file_name), 'w', zipfile.ZIP_DEFLATED)) as zip_out: - # Copy everything over - for i in zip_in.filelist: - if not i.filename in ['install_profile.json', 'big_logo.png']: - #print(' %s' % i.filename) - zip_out.writestr(i.filename, zip_in.read(i.filename)) - print(' %s' % universal_name) - zip_out.write(os.path.join(out_folder, universal_name), universal_name) - print(' big_logo.png') - zip_out.write(os.path.join(forge_dir, 'client', 'forge_logo.png'), 'big_logo.png') - print(' install_profile.json') - zip_out.writestr('install_profile.json', json_data) - - print '================== %s Finished ==================' % file_name - -def zip_add(file, key=None): - if key == None: - key = os.path.basename(file) - else: - key = key.replace('/', os.sep) - if not zip_base is None: - key = os.path.join(zip_base, key) - file = os.path.join(forge_dir, file.replace('/', os.sep)) - if os.path.isdir(file): - zip_folder(file, key, zip) - else: - if os.path.isfile(file): - print ' ' + key - zip.write(file, key) - -def zip_start(name, base=None): - global zip, zip_name, zip_base - zip_name = name - - print '================== %s Start ==================' % zip_name - zip_file = os.path.join(forge_dir, 'target', name) - zip = zipfile.ZipFile(zip_file, 'w', zipfile.ZIP_DEFLATED) - zip_base = base - -def zip_end(): - global zip, zip_name, zip_base - zip.close() - print '================== %s Finished ==================' % zip_name - zip_name = None - zip_base = None - -def load_mc_version(fml_dir): - props = os.path.join(fml_dir, 'common', 'fmlversion.properties') - - if not os.path.isfile(props): - print 'Could not load fmlversion.properties, build failed' - sys.exit(1) - - with open(props, 'r') as fh: - for line in fh: - line = line.strip() - if line.startswith('fmlbuild.mcversion'): - return line.split('=')[1].strip() - - print 'Could not load fmlversion.properties, build failed' - sys.exit(1) - -def extract_fml_obfed(fml_dir, mcp_dir, reobf_dir, client_dir): - fml_file = os.path.join(fml_dir, 'difflist.txt') - if not os.path.isfile(fml_file): - print 'Could not find Forge ModLoader\'s DiffList, looking for it at: %s' % fml_file - sys.exit(1) - - with open(fml_file, 'r') as fh: - lines = fh.readlines() - - client = zipfile.ZipFile(os.path.join(mcp_dir, 'temp', 'client_reobf.jar')) - - print 'Extracting Reobfed Forge ModLoader classes' - - for line in lines: - line = line.replace('\n', '').replace('\r', '').replace('/', os.sep) - if not os.path.isfile(os.path.join(reobf_dir, line)): - print ' %s' % line - side = line.split(os.sep)[0] - if side == 'minecraft': - client.extract(line[10:].replace(os.sep, '/'), client_dir) - - client.close() - -def get_branch_name(): - from subprocess import Popen, PIPE, STDOUT - branch = '' - if os.getenv("GIT_BRANCH") is None: - try: - process = Popen(["git", "rev-parse", "--abbrev-ref", "HEAD"], stdout=PIPE, stderr=STDOUT, bufsize=-1) - branch, _ = process.communicate() - branch = branch.rstrip('\r\n') - except OSError: - print "Git not found" - else: - branch = os.getenv("GIT_BRANCH").rpartition('/')[2] - branch = branch.replace('master', '') - branch = branch.replace('HEAD', '') - print 'Detected Branch as \'%s\'' % branch - return branch - -def sign_jar(forge_dir, command, files, dest_zip): - from subprocess import Popen, PIPE, STDOUT - global zip - zip_file = os.path.join(forge_dir, 'tmp.jar') - - if os.path.isfile(zip_file): - os.remove(zip_file) - - print '============== Creating tmp zip to sign =====================' - zf = zipfile.ZipFile(zip_file, 'w', zipfile.ZIP_DEFLATED) - zf.write(os.path.join(forge_dir, 'MANIFEST.MF'), 'META-INF/MANIFEST.MF') - zip_folder_filter(files, '', zf, 'cpw/mods/'.replace('/', os.sep)) - zip_folder_filter(files, '', zf, 'net/minecraftforge/'.replace('/', os.sep)) - zf.close() - print '================ End tmp zip to sign ========================' - - try: - process = Popen([command, zip_file, "forge"], stdout=PIPE, stderr=STDOUT, bufsize=-1) - out, _ = process.communicate() - print out - except OSError as e: - print "Error creating signed tmp jar: %s" % e.strerror - sys.exit(1) - - tmp_dir = os.path.join(forge_dir, 'tmp') - if os.path.isdir(tmp_dir): - shutil.rmtree(tmp_dir) - - zf = zipfile.ZipFile(zip_file) - zf.extractall(tmp_dir) - zf.close() - os.remove(zip_file) - - zip_start(dest_zip) - zip_folder(tmp_dir, '', zip) - zip_folder(files, '', zip) - - if os.path.isdir(tmp_dir): - shutil.rmtree(tmp_dir) - -def zip_folder_filter(path, key, zip, filter): - files = os.listdir(path) - for file in files: - file_path = os.path.join(path, file) - file_key = os.path.join(key, file) - if os.path.isdir(file_path): - zip_folder_filter(file_path, file_key, zip, filter) - else: - if file_key.startswith(filter): - print file_key - zip.write(file_path, file_key) - -def gen_bin_patches(mcp_dir, fml_dir, build_num, client_dir): - print('Creating Binary patches') - os.environ['WORKSPACE'] = os.path.join(mcp_dir, '..') - os.environ['BUILD_NUMBER'] = str(build_num) - - BUILD = ['ant', 'makebinpatches'] - if sys.platform.startswith('win'): - BUILD = ['cmd', '/C'] + BUILD - - if not run_command(BUILD, cwd=fml_dir): - print('Could not crate binary patches') - sys.exit(1) - - fml_lzma = os.path.join(fml_dir, 'binpatches.pack.lzma') - obf_lzma = os.path.join(client_dir, 'binpatches.pack.lzma') - shutil.move(fml_lzma, obf_lzma) - -def run_command(command, cwd='.', verbose=True): - print('Running command: ') - print(pformat(command)) - - process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, bufsize=1, cwd=cwd) - while process.poll() is None: - line = process.stdout.readline() - if line: - line = line.rstrip() - print(line) - if process.returncode: - print "failed: {0}".format(process.returncode) - return False - return True - -if __name__ == '__main__': - main() diff --git a/setup.py b/setup.py deleted file mode 100644 index 89389e4a2..000000000 --- a/setup.py +++ /dev/null @@ -1,113 +0,0 @@ -import os, os.path, sys, zipfile -import shutil, glob, fnmatch, subprocess -from pprint import pformat -from optparse import OptionParser -sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0) -forge_dir = os.path.dirname(os.path.abspath(__file__)) - -from forge import apply_forge_patches - -def main(): - print '=================================== Setup Start =================================' - - parser = OptionParser() - parser.add_option('-m', '--mcp-dir', action='store', dest='mcp_dir', help='Path to download/extract MCP to', default=None) - parser.add_option('-b', '--build', action='store', dest='build', help='Build number', default=None) - options, _ = parser.parse_args() - - build_num = 0 - if not options.build is None: - try: - build_num = int(options.build) - except: - pass - - fml_dir = os.path.join(forge_dir, 'fml') - mcp_dir = os.path.join(forge_dir, 'mcp') - - if not options.mcp_dir is None: - mcp_dir = os.path.abspath(options.mcp_dir) - - src_dir = os.path.join(mcp_dir, 'src') - - setup_fml(mcp_dir, fml_dir, build_num) - - base_dir = os.path.join(mcp_dir, 'src_base') - work_dir = os.path.join(mcp_dir, 'src_work') - - if os.path.isdir(base_dir): - shutil.rmtree(base_dir) - if os.path.isdir(work_dir): - shutil.rmtree(work_dir) - - print 'Setting up source directories' - shutil.copytree(src_dir, base_dir) - shutil.copytree(src_dir, work_dir) - - print 'Applying forge patches' - apply_forge_patches(fml_dir, mcp_dir, forge_dir, work_dir, False) - - setup_eclipse(forge_dir) - - print '=================================== Setup Finished =================================' - -def setup_fml(mcp_dir, fml_dir, build_num=0): - print 'Setting up Forge ModLoader' - os.environ['WORKSPACE'] = os.path.abspath(os.path.join(mcp_dir, '..')) - os.environ['BUILD_NUMBER'] = str(build_num) - - BUILD = ['ant', 'jenkinsbuild'] - if sys.platform.startswith('win'): - BUILD = ['cmd', '/C'] + BUILD - - if not run_command(BUILD, cwd=fml_dir): - print('Could not setup FML') - sys.exit(1) - - sys.path.append(fml_dir) - sys.path.append(os.path.join(fml_dir, 'install')) - from fml import finish_setup_fml - finish_setup_fml(fml_dir, mcp_dir) - - print('Copy resources:') - copy_files(os.path.join(fml_dir, 'client'), os.path.join(mcp_dir, 'src', 'minecraft')) - copy_files(os.path.join(fml_dir, 'common'), os.path.join(mcp_dir, 'src', 'minecraft')) - - name = 'fmlversion.properties' - print(' ' + name) - shutil.copy(os.path.join(fml_dir, name), os.path.join(mcp_dir, 'src', 'minecraft', name)) - -def copy_files(src_dir, dest_dir): - for file in glob.glob(os.path.join(src_dir, '*')): - if not os.path.isfile(file) or file.lower().endswith('.java'): - continue - print(' ' + file) - shutil.copy(file, os.path.join(dest_dir, os.path.basename(file))) - -def run_command(command, cwd='.', verbose=True): - print('Running command: ') - print(pformat(command)) - - process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, bufsize=1, cwd=cwd) - while process.poll() is None: - line = process.stdout.readline() - if line: - line = line.rstrip() - print(line) - if process.returncode: - print "failed: {0}".format(process.returncode) - return False - return True - -def setup_eclipse(forge_dir): - eclipse_dir = os.path.join(forge_dir, 'eclipse') - eclipse_zip = os.path.join(forge_dir, 'eclipse-workspace-dev.zip') - - if not os.path.isdir(eclipse_dir) and os.path.isfile(eclipse_zip): - print 'Extracting Dev Workspace' - zf = zipfile.ZipFile(eclipse_zip) - zf.extractall(forge_dir) - zf.close() - -if __name__ == '__main__': - main() diff --git a/submodule_changlog.py b/submodule_changlog.py deleted file mode 100644 index 73063a6f0..000000000 --- a/submodule_changlog.py +++ /dev/null @@ -1,51 +0,0 @@ -import subprocess, sys, os -from pprint import pformat -from optparse import OptionParser - -def run_command(command, cwd='.'): - #print('Running command: ') - process = subprocess.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT, bufsize=1, cwd=cwd) - out, err = process.communicate() - out = out.strip('\n') - #print(pformat(out.split('\n'))) - if process.returncode: - print('failed: %d' % process.returncode) - return None - return out.split('\n') - -def main(options, args): - output = run_command(['git', 'diff', '--no-color', '--', 'fml']) - if output is None: - print('Failed to grab submodule commits') - sys.exit(1) - - start = None - end = None - for line in output: - if not 'Subproject commit' in line: - continue - if line[0:18] == '-Subproject commit': - start = line[19:] - elif line[0:18] == '+Subproject commit': - end = line[19:] - if end.endswith('-dirty'): - end = end[0:len(end)-6] - - if start == None or end == None: - print('Could not extract start and end range') - sys.exit(1) - - #print('Start: %s' % start) - #print('End: %s' % end) - - output = run_command(['git', 'log', '--reverse', '--pretty=oneline', '%s...%s' % (start, end)], './fml') - print('Updated FML:') - for line in output: - print('MinecraftForge/FML@%s' % line) - - -if __name__ == '__main__': - parser = OptionParser() - options, args = parser.parse_args() - - main(options, args) \ No newline at end of file diff --git a/update_patches.py b/update_patches.py deleted file mode 100644 index 50b378a0f..000000000 --- a/update_patches.py +++ /dev/null @@ -1,83 +0,0 @@ -import os -import sys -import fnmatch -import shlex -import difflib -import time -from optparse import OptionParser - -def cmdsplit(args): - if os.sep == '\\': - args = args.replace('\\', '\\\\') - return shlex.split(args) - -def cleanDirs(path): - if not os.path.isdir(path): - return - - files = os.listdir(path) - if len(files): - for f in files: - fullpath = os.path.join(path, f) - if os.path.isdir(fullpath): - cleanDirs(fullpath) - - files = os.listdir(path) - if len(files) == 0: - os.rmdir(path) - -def main(): - print("Creating patches") - - parser = OptionParser() - parser.add_option('-m', '--mcp-dir', action='store', dest='mcp_dir', help='Path to MCP', default=None) - parser.add_option('-p', '--patch-dir', action='store', dest='patch_dir', help='Folder to place patches in', default=None) - options, _ = parser.parse_args() - - forge_dir = os.path.dirname(os.path.abspath(__file__)) - - mcp = os.path.join(forge_dir, 'mcp') - if not options.mcp_dir is None: - mcp = os.path.abspath(options.mcp_dir) - elif os.path.isfile(os.path.join('..', 'runtime', 'commands.py')): - mcp = os.path.abspath('..') - - patchd = os.path.normpath(os.path.join(forge_dir, 'patches')) - if not options.patch_dir is None: - patchd = os.path.normpath(options.patch_dir) - print "Patch folder set to '%s'" % patchd - base = os.path.normpath(os.path.join(mcp, 'src_base')) - work = os.path.normpath(os.path.join(mcp, 'src_work')) - - for path, _, filelist in os.walk(work, followlinks=True): - for cur_file in fnmatch.filter(filelist, '*.java'): - file_base = os.path.normpath(os.path.join(base, path[len(work)+1:], cur_file)).replace(os.path.sep, '/') - file_work = os.path.normpath(os.path.join(work, path[len(work)+1:], cur_file)).replace(os.path.sep, '/') - if not os.path.isfile(file_base): - print("Missing base file %s"%(file_base)) - continue - fromlines = open(file_base, 'U').readlines() - tolines = open(file_work, 'U').readlines() - - patch = ''.join(difflib.unified_diff(fromlines, tolines, '../' + file_base[len(mcp)+1:], '../' + file_work[len(mcp)+1:], '', '', n=3)) - patch_dir = os.path.join(patchd, path[len(work)+1:]) - patch_file = os.path.join(patch_dir, cur_file + '.patch') - - if len(patch) > 0: - print patch_file[len(patchd)+1:] - patch = patch.replace('\r\n', '\n') - - if not os.path.exists(patch_dir): - os.makedirs(patch_dir) - with open(patch_file, 'wb') as fh: - fh.write(patch) - else: - if os.path.isfile(patch_file): - print("Deleting empty patch: %s"%(patch_file)) - os.remove(patch_file) - - - cleanDirs(patchd) - -if __name__ == '__main__': - main() From 933267394436ac863f962153a6b54c99811590e7 Mon Sep 17 00:00:00 2001 From: AbrarSyed Date: Sat, 9 Nov 2013 15:53:05 -0600 Subject: [PATCH 02/11] update FML for gradle changes --- fml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fml b/fml index 3d25b4e79..24ec338a5 160000 --- a/fml +++ b/fml @@ -1 +1 @@ -Subproject commit 3d25b4e793c59a9131a441d6c7a2d80cac9cd701 +Subproject commit 24ec338a51d98ee353e20fc8881a300d44ed3b45 From 797399ff7f477388bac094fb0ab74a2ef0217a83 Mon Sep 17 00:00:00 2001 From: AbrarSyed Date: Sat, 9 Nov 2013 15:57:08 -0600 Subject: [PATCH 03/11] Step 2: The Reformation --- .gitattributes | 11 +++++++-- .gitignore | 23 ++++++++++++------ {client => src/main/java}/ibxm/Channel.java | 0 {client => src/main/java}/ibxm/Envelope.java | 0 .../main/java}/ibxm/FastTracker2.java | 0 {client => src/main/java}/ibxm/IBXM.java | 0 .../main/java}/ibxm/Instrument.java | 0 {client => src/main/java}/ibxm/LogTable.java | 0 {client => src/main/java}/ibxm/Module.java | 0 {client => src/main/java}/ibxm/Pattern.java | 0 {client => src/main/java}/ibxm/Player.java | 0 .../main/java}/ibxm/ProTracker.java | 0 {client => src/main/java}/ibxm/Sample.java | 0 .../main/java}/ibxm/ScreamTracker3.java | 0 .../classloading/FMLForgePlugin.java | 0 .../client/ClientCommandHandler.java | 0 .../client/EnumHelperClient.java | 0 .../client/ForgeHooksClient.java | 0 .../client/GuiControlsScrollPanel.java | 0 .../minecraftforge/client/GuiIngameForge.java | 0 .../minecraftforge/client/IItemRenderer.java | 0 .../client/IRenderContextHandler.java | 0 .../minecraftforge/client/IRenderHandler.java | 0 .../client/MinecraftForgeClient.java | 0 .../client/event/ClientChatReceivedEvent.java | 0 .../client/event/DrawBlockHighlightEvent.java | 0 .../client/event/FOVUpdateEvent.java | 0 .../client/event/GuiOpenEvent.java | 0 .../client/event/MouseEvent.java | 0 .../client/event/RenderGameOverlayEvent.java | 0 .../client/event/RenderLivingEvent.java | 0 .../client/event/RenderPlayerEvent.java | 0 .../client/event/RenderWorldLastEvent.java | 0 .../client/event/TextureStitchEvent.java | 0 .../event/sound/PlayBackgroundMusicEvent.java | 0 .../event/sound/PlaySoundEffectEvent.java | 0 .../sound/PlaySoundEffectSourceEvent.java | 0 .../client/event/sound/PlaySoundEvent.java | 0 .../event/sound/PlaySoundSourceEvent.java | 0 .../event/sound/PlayStreamingEvent.java | 0 .../event/sound/PlayStreamingSourceEvent.java | 0 .../client/event/sound/SoundEvent.java | 0 .../client/event/sound/SoundLoadEvent.java | 0 .../client/event/sound/SoundResultEvent.java | 0 .../client/event/sound/SoundSetupEvent.java | 0 .../client/model/AdvancedModelLoader.java | 0 .../client/model/IModelCustom.java | 0 .../client/model/IModelCustomLoader.java | 0 .../client/model/ModelFormatException.java | 0 .../minecraftforge/client/model/obj/Face.java | 0 .../client/model/obj/GroupObject.java | 0 .../client/model/obj/ObjModelLoader.java | 0 .../client/model/obj/TextureCoordinate.java | 0 .../client/model/obj/Vertex.java | 0 .../client/model/obj/WavefrontObject.java | 0 .../client/model/techne/TechneModel.java | 0 .../model/techne/TechneModelLoader.java | 0 .../common/AchievementPage.java | 0 .../common/BiomeDictionary.java | 0 .../minecraftforge/common/BiomeManager.java | 0 .../minecraftforge/common/ChestGenHooks.java | 0 .../minecraftforge/common/ConfigCategory.java | 0 .../minecraftforge/common/Configuration.java | 0 .../common/DimensionManager.java | 0 .../minecraftforge/common/DungeonHooks.java | 0 .../net/minecraftforge/common/EnumHelper.java | 0 .../minecraftforge/common/EnumPlantType.java | 0 .../net/minecraftforge/common/FakePlayer.java | 0 .../common/FakePlayerFactory.java | 0 .../common/ForgeChunkManager.java | 0 .../minecraftforge/common/ForgeDirection.java | 0 .../common/ForgeDummyContainer.java | 0 .../net/minecraftforge/common/ForgeHooks.java | 0 .../common/ForgeInternalHandler.java | 0 .../minecraftforge/common/ForgeVersion.java | 0 .../common/IExtendedEntityProperties.java | 0 .../common/IMinecartCollisionHandler.java | 0 .../net/minecraftforge/common/IPlantable.java | 0 .../net/minecraftforge/common/IShearable.java | 0 .../minecraftforge/common/ISpecialArmor.java | 0 .../minecraftforge/common/MinecraftForge.java | 0 .../net/minecraftforge/common/Property.java | 0 .../minecraftforge/common/RotationHelper.java | 0 .../common/WorldSpecificSaveHandler.java | 0 .../network/ForgeConnectionHandler.java | 0 .../common/network/ForgeNetworkHandler.java | 0 .../common/network/ForgePacket.java | 0 .../common/network/ForgePacketHandler.java | 0 .../network/ForgeTinyPacketHandler.java | 0 .../packet/DimensionRegisterPacket.java | 0 .../minecraftforge/event/ASMEventHandler.java | 0 .../net/minecraftforge/event/Cancelable.java | 0 .../minecraftforge/event/CommandEvent.java | 0 .../java}/net/minecraftforge/event/Event.java | 0 .../net/minecraftforge/event/EventBus.java | 0 .../minecraftforge/event/EventPriority.java | 0 .../event/ForgeEventFactory.java | 0 .../minecraftforge/event/ForgeSubscribe.java | 0 .../minecraftforge/event/IEventListener.java | 0 .../minecraftforge/event/ListenerList.java | 0 .../minecraftforge/event/ServerChatEvent.java | 0 .../event/brewing/PotionBrewedEvent.java | 0 .../event/entity/EntityEvent.java | 0 .../event/entity/EntityJoinWorldEvent.java | 0 .../entity/EntityStruckByLightningEvent.java | 0 .../event/entity/PlaySoundAtEntityEvent.java | 0 .../event/entity/item/ItemEvent.java | 0 .../event/entity/item/ItemExpireEvent.java | 0 .../event/entity/item/ItemTossEvent.java | 0 .../entity/living/EnderTeleportEvent.java | 0 .../entity/living/LivingAttackEvent.java | 0 .../event/entity/living/LivingDeathEvent.java | 0 .../event/entity/living/LivingDropsEvent.java | 0 .../event/entity/living/LivingEvent.java | 0 .../event/entity/living/LivingFallEvent.java | 0 .../event/entity/living/LivingHurtEvent.java | 0 .../entity/living/LivingPackSizeEvent.java | 0 .../living/LivingSetAttackTargetEvent.java | 0 .../event/entity/living/LivingSpawnEvent.java | 0 .../event/entity/living/ZombieEvent.java | 0 .../minecart/MinecartCollisionEvent.java | 0 .../event/entity/minecart/MinecartEvent.java | 0 .../minecart/MinecartInteractEvent.java | 0 .../entity/minecart/MinecartUpdateEvent.java | 0 .../event/entity/player/ArrowLooseEvent.java | 0 .../event/entity/player/ArrowNockEvent.java | 0 .../entity/player/AttackEntityEvent.java | 0 .../event/entity/player/BonemealEvent.java | 0 .../entity/player/EntityInteractEvent.java | 0 .../entity/player/EntityItemPickupEvent.java | 0 .../event/entity/player/FillBucketEvent.java | 0 .../event/entity/player/ItemTooltipEvent.java | 0 .../entity/player/PlayerDestroyItemEvent.java | 0 .../event/entity/player/PlayerDropsEvent.java | 0 .../event/entity/player/PlayerEvent.java | 0 .../entity/player/PlayerFlyableFallEvent.java | 0 .../entity/player/PlayerInteractEvent.java | 0 .../player/PlayerOpenContainerEvent.java | 0 .../entity/player/PlayerSleepInBedEvent.java | 0 .../event/entity/player/UseHoeEvent.java | 0 .../event/terraingen/BiomeEvent.java | 0 .../event/terraingen/ChunkProviderEvent.java | 0 .../event/terraingen/DecorateBiomeEvent.java | 0 .../terraingen/DeferredBiomeDecorator.java | 0 .../event/terraingen/InitMapGenEvent.java | 0 .../event/terraingen/InitNoiseGensEvent.java | 0 .../event/terraingen/OreGenEvent.java | 0 .../event/terraingen/PopulateChunkEvent.java | 0 .../terraingen/SaplingGrowTreeEvent.java | 0 .../event/terraingen/TerrainGen.java | 0 .../event/terraingen/WorldTypeEvent.java | 0 .../event/world/BlockEvent.java | 0 .../event/world/ChunkDataEvent.java | 0 .../event/world/ChunkEvent.java | 0 .../event/world/ChunkWatchEvent.java | 0 .../event/world/WorldEvent.java | 0 .../minecraftforge/fluids/BlockFluidBase.java | 0 .../fluids/BlockFluidClassic.java | 0 .../fluids/BlockFluidFinite.java | 0 .../net/minecraftforge/fluids/Fluid.java | 0 .../fluids/FluidContainerRegistry.java | 0 .../net/minecraftforge/fluids/FluidEvent.java | 0 .../fluids/FluidIdMapPacket.java | 0 .../minecraftforge/fluids/FluidRegistry.java | 0 .../net/minecraftforge/fluids/FluidStack.java | 0 .../net/minecraftforge/fluids/FluidTank.java | 0 .../minecraftforge/fluids/FluidTankInfo.java | 0 .../minecraftforge/fluids/IFluidBlock.java | 0 .../fluids/IFluidContainerItem.java | 0 .../minecraftforge/fluids/IFluidHandler.java | 0 .../net/minecraftforge/fluids/IFluidTank.java | 0 .../fluids/ItemFluidContainer.java | 0 .../fluids/RenderBlockFluid.java | 0 .../fluids/TileFluidHandler.java | 0 .../minecraftforge/liquids/IBlockLiquid.java | 0 .../net/minecraftforge/liquids/ILiquid.java | 0 .../minecraftforge/liquids/ILiquidTank.java | 0 .../liquids/ITankContainer.java | 0 .../liquids/LiquidContainerData.java | 0 .../liquids/LiquidContainerRegistry.java | 0 .../liquids/LiquidDictionary.java | 0 .../minecraftforge/liquids/LiquidEvent.java | 0 .../minecraftforge/liquids/LiquidStack.java | 0 .../minecraftforge/liquids/LiquidTank.java | 0 .../minecraftforge/oredict/OreDictionary.java | 0 .../minecraftforge/oredict/RecipeSorter.java | 0 .../oredict/ShapedOreRecipe.java | 0 .../oredict/ShapelessOreRecipe.java | 0 .../server/ForgeTimeTracker.java | 0 .../server/command/ForgeCommand.java | 0 .../transformers/EventTransformer.java | 0 .../transformers/ForgeAccessTransformer.java | 0 .../paulscode/sound/codecs/CodecIBXM.java | 0 .../resources}/assets/forge/lang/en_US.lang | 0 .../resources}/assets/forge/lang/es_ES.lang | 0 .../resources}/assets/forge/lang/fr_FR.lang | 0 {common => src/main/resources}/forge_at.cfg | 0 {client => src/main/resources}/forge_logo.png | Bin 198 files changed, 24 insertions(+), 10 deletions(-) rename {client => src/main/java}/ibxm/Channel.java (100%) rename {client => src/main/java}/ibxm/Envelope.java (100%) rename {client => src/main/java}/ibxm/FastTracker2.java (100%) rename {client => src/main/java}/ibxm/IBXM.java (100%) rename {client => src/main/java}/ibxm/Instrument.java (100%) rename {client => src/main/java}/ibxm/LogTable.java (100%) rename {client => src/main/java}/ibxm/Module.java (100%) rename {client => src/main/java}/ibxm/Pattern.java (100%) rename {client => src/main/java}/ibxm/Player.java (100%) rename {client => src/main/java}/ibxm/ProTracker.java (100%) rename {client => src/main/java}/ibxm/Sample.java (100%) rename {client => src/main/java}/ibxm/ScreamTracker3.java (100%) rename {common => src/main/java}/net/minecraftforge/classloading/FMLForgePlugin.java (100%) rename {client => src/main/java}/net/minecraftforge/client/ClientCommandHandler.java (100%) rename {client => src/main/java}/net/minecraftforge/client/EnumHelperClient.java (100%) rename {client => src/main/java}/net/minecraftforge/client/ForgeHooksClient.java (100%) rename {client => src/main/java}/net/minecraftforge/client/GuiControlsScrollPanel.java (100%) rename {client => src/main/java}/net/minecraftforge/client/GuiIngameForge.java (100%) rename {client => src/main/java}/net/minecraftforge/client/IItemRenderer.java (100%) rename {client => src/main/java}/net/minecraftforge/client/IRenderContextHandler.java (100%) rename {client => src/main/java}/net/minecraftforge/client/IRenderHandler.java (100%) rename {client => src/main/java}/net/minecraftforge/client/MinecraftForgeClient.java (100%) rename {client => src/main/java}/net/minecraftforge/client/event/ClientChatReceivedEvent.java (100%) rename {client => src/main/java}/net/minecraftforge/client/event/DrawBlockHighlightEvent.java (100%) rename {client => src/main/java}/net/minecraftforge/client/event/FOVUpdateEvent.java (100%) rename {client => src/main/java}/net/minecraftforge/client/event/GuiOpenEvent.java (100%) rename {client => src/main/java}/net/minecraftforge/client/event/MouseEvent.java (100%) rename {client => src/main/java}/net/minecraftforge/client/event/RenderGameOverlayEvent.java (100%) rename {client => src/main/java}/net/minecraftforge/client/event/RenderLivingEvent.java (100%) rename {client => src/main/java}/net/minecraftforge/client/event/RenderPlayerEvent.java (100%) rename {client => src/main/java}/net/minecraftforge/client/event/RenderWorldLastEvent.java (100%) rename {client => src/main/java}/net/minecraftforge/client/event/TextureStitchEvent.java (100%) rename {client => src/main/java}/net/minecraftforge/client/event/sound/PlayBackgroundMusicEvent.java (100%) rename {client => src/main/java}/net/minecraftforge/client/event/sound/PlaySoundEffectEvent.java (100%) rename {client => src/main/java}/net/minecraftforge/client/event/sound/PlaySoundEffectSourceEvent.java (100%) rename {client => src/main/java}/net/minecraftforge/client/event/sound/PlaySoundEvent.java (100%) rename {client => src/main/java}/net/minecraftforge/client/event/sound/PlaySoundSourceEvent.java (100%) rename {client => src/main/java}/net/minecraftforge/client/event/sound/PlayStreamingEvent.java (100%) rename {client => src/main/java}/net/minecraftforge/client/event/sound/PlayStreamingSourceEvent.java (100%) rename {client => src/main/java}/net/minecraftforge/client/event/sound/SoundEvent.java (100%) rename {client => src/main/java}/net/minecraftforge/client/event/sound/SoundLoadEvent.java (100%) rename {client => src/main/java}/net/minecraftforge/client/event/sound/SoundResultEvent.java (100%) rename {client => src/main/java}/net/minecraftforge/client/event/sound/SoundSetupEvent.java (100%) rename {client => src/main/java}/net/minecraftforge/client/model/AdvancedModelLoader.java (100%) rename {client => src/main/java}/net/minecraftforge/client/model/IModelCustom.java (100%) rename {client => src/main/java}/net/minecraftforge/client/model/IModelCustomLoader.java (100%) rename {client => src/main/java}/net/minecraftforge/client/model/ModelFormatException.java (100%) rename {client => src/main/java}/net/minecraftforge/client/model/obj/Face.java (100%) rename {client => src/main/java}/net/minecraftforge/client/model/obj/GroupObject.java (100%) rename {client => src/main/java}/net/minecraftforge/client/model/obj/ObjModelLoader.java (100%) rename {client => src/main/java}/net/minecraftforge/client/model/obj/TextureCoordinate.java (100%) rename {client => src/main/java}/net/minecraftforge/client/model/obj/Vertex.java (100%) rename {client => src/main/java}/net/minecraftforge/client/model/obj/WavefrontObject.java (100%) rename {client => src/main/java}/net/minecraftforge/client/model/techne/TechneModel.java (100%) rename {client => src/main/java}/net/minecraftforge/client/model/techne/TechneModelLoader.java (100%) rename {common => src/main/java}/net/minecraftforge/common/AchievementPage.java (100%) rename {common => src/main/java}/net/minecraftforge/common/BiomeDictionary.java (100%) rename {common => src/main/java}/net/minecraftforge/common/BiomeManager.java (100%) rename {common => src/main/java}/net/minecraftforge/common/ChestGenHooks.java (100%) rename {common => src/main/java}/net/minecraftforge/common/ConfigCategory.java (100%) rename {common => src/main/java}/net/minecraftforge/common/Configuration.java (100%) rename {common => src/main/java}/net/minecraftforge/common/DimensionManager.java (100%) rename {common => src/main/java}/net/minecraftforge/common/DungeonHooks.java (100%) rename {common => src/main/java}/net/minecraftforge/common/EnumHelper.java (100%) rename {common => src/main/java}/net/minecraftforge/common/EnumPlantType.java (100%) rename {common => src/main/java}/net/minecraftforge/common/FakePlayer.java (100%) rename {common => src/main/java}/net/minecraftforge/common/FakePlayerFactory.java (100%) rename {common => src/main/java}/net/minecraftforge/common/ForgeChunkManager.java (100%) rename {common => src/main/java}/net/minecraftforge/common/ForgeDirection.java (100%) rename {common => src/main/java}/net/minecraftforge/common/ForgeDummyContainer.java (100%) rename {common => src/main/java}/net/minecraftforge/common/ForgeHooks.java (100%) rename {common => src/main/java}/net/minecraftforge/common/ForgeInternalHandler.java (100%) rename {common => src/main/java}/net/minecraftforge/common/ForgeVersion.java (100%) rename {common => src/main/java}/net/minecraftforge/common/IExtendedEntityProperties.java (100%) rename {common => src/main/java}/net/minecraftforge/common/IMinecartCollisionHandler.java (100%) rename {common => src/main/java}/net/minecraftforge/common/IPlantable.java (100%) rename {common => src/main/java}/net/minecraftforge/common/IShearable.java (100%) rename {common => src/main/java}/net/minecraftforge/common/ISpecialArmor.java (100%) rename {common => src/main/java}/net/minecraftforge/common/MinecraftForge.java (100%) rename {common => src/main/java}/net/minecraftforge/common/Property.java (100%) rename {common => src/main/java}/net/minecraftforge/common/RotationHelper.java (100%) rename {common => src/main/java}/net/minecraftforge/common/WorldSpecificSaveHandler.java (100%) rename {common => src/main/java}/net/minecraftforge/common/network/ForgeConnectionHandler.java (100%) rename {common => src/main/java}/net/minecraftforge/common/network/ForgeNetworkHandler.java (100%) rename {common => src/main/java}/net/minecraftforge/common/network/ForgePacket.java (100%) rename {common => src/main/java}/net/minecraftforge/common/network/ForgePacketHandler.java (100%) rename {common => src/main/java}/net/minecraftforge/common/network/ForgeTinyPacketHandler.java (100%) rename {common => src/main/java}/net/minecraftforge/common/network/packet/DimensionRegisterPacket.java (100%) rename {common => src/main/java}/net/minecraftforge/event/ASMEventHandler.java (100%) rename {common => src/main/java}/net/minecraftforge/event/Cancelable.java (100%) rename {common => src/main/java}/net/minecraftforge/event/CommandEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/Event.java (100%) rename {common => src/main/java}/net/minecraftforge/event/EventBus.java (100%) rename {common => src/main/java}/net/minecraftforge/event/EventPriority.java (100%) rename {common => src/main/java}/net/minecraftforge/event/ForgeEventFactory.java (100%) rename {common => src/main/java}/net/minecraftforge/event/ForgeSubscribe.java (100%) rename {common => src/main/java}/net/minecraftforge/event/IEventListener.java (100%) rename {common => src/main/java}/net/minecraftforge/event/ListenerList.java (100%) rename {common => src/main/java}/net/minecraftforge/event/ServerChatEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/brewing/PotionBrewedEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/EntityEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/EntityJoinWorldEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/EntityStruckByLightningEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/PlaySoundAtEntityEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/item/ItemEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/item/ItemExpireEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/item/ItemTossEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/living/EnderTeleportEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/living/LivingAttackEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/living/LivingDeathEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/living/LivingDropsEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/living/LivingEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/living/LivingFallEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/living/LivingHurtEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/living/LivingPackSizeEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/living/LivingSetAttackTargetEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/living/LivingSpawnEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/living/ZombieEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/minecart/MinecartCollisionEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/minecart/MinecartEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/minecart/MinecartInteractEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/minecart/MinecartUpdateEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/player/ArrowLooseEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/player/ArrowNockEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/player/AttackEntityEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/player/BonemealEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/player/EntityInteractEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/player/EntityItemPickupEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/player/FillBucketEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/player/ItemTooltipEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/player/PlayerDestroyItemEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/player/PlayerDropsEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/player/PlayerEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/player/PlayerFlyableFallEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/player/PlayerInteractEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/player/PlayerOpenContainerEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/player/PlayerSleepInBedEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/entity/player/UseHoeEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/terraingen/BiomeEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/terraingen/ChunkProviderEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/terraingen/DecorateBiomeEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/terraingen/DeferredBiomeDecorator.java (100%) rename {common => src/main/java}/net/minecraftforge/event/terraingen/InitMapGenEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/terraingen/InitNoiseGensEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/terraingen/OreGenEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/terraingen/PopulateChunkEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/terraingen/SaplingGrowTreeEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/terraingen/TerrainGen.java (100%) rename {common => src/main/java}/net/minecraftforge/event/terraingen/WorldTypeEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/world/BlockEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/world/ChunkDataEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/world/ChunkEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/world/ChunkWatchEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/event/world/WorldEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/fluids/BlockFluidBase.java (100%) rename {common => src/main/java}/net/minecraftforge/fluids/BlockFluidClassic.java (100%) rename {common => src/main/java}/net/minecraftforge/fluids/BlockFluidFinite.java (100%) rename {common => src/main/java}/net/minecraftforge/fluids/Fluid.java (100%) rename {common => src/main/java}/net/minecraftforge/fluids/FluidContainerRegistry.java (100%) rename {common => src/main/java}/net/minecraftforge/fluids/FluidEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/fluids/FluidIdMapPacket.java (100%) rename {common => src/main/java}/net/minecraftforge/fluids/FluidRegistry.java (100%) rename {common => src/main/java}/net/minecraftforge/fluids/FluidStack.java (100%) rename {common => src/main/java}/net/minecraftforge/fluids/FluidTank.java (100%) rename {common => src/main/java}/net/minecraftforge/fluids/FluidTankInfo.java (100%) rename {common => src/main/java}/net/minecraftforge/fluids/IFluidBlock.java (100%) rename {common => src/main/java}/net/minecraftforge/fluids/IFluidContainerItem.java (100%) rename {common => src/main/java}/net/minecraftforge/fluids/IFluidHandler.java (100%) rename {common => src/main/java}/net/minecraftforge/fluids/IFluidTank.java (100%) rename {common => src/main/java}/net/minecraftforge/fluids/ItemFluidContainer.java (100%) rename {common => src/main/java}/net/minecraftforge/fluids/RenderBlockFluid.java (100%) rename {common => src/main/java}/net/minecraftforge/fluids/TileFluidHandler.java (100%) rename {common => src/main/java}/net/minecraftforge/liquids/IBlockLiquid.java (100%) rename {common => src/main/java}/net/minecraftforge/liquids/ILiquid.java (100%) rename {common => src/main/java}/net/minecraftforge/liquids/ILiquidTank.java (100%) rename {common => src/main/java}/net/minecraftforge/liquids/ITankContainer.java (100%) rename {common => src/main/java}/net/minecraftforge/liquids/LiquidContainerData.java (100%) rename {common => src/main/java}/net/minecraftforge/liquids/LiquidContainerRegistry.java (100%) rename {common => src/main/java}/net/minecraftforge/liquids/LiquidDictionary.java (100%) rename {common => src/main/java}/net/minecraftforge/liquids/LiquidEvent.java (100%) rename {common => src/main/java}/net/minecraftforge/liquids/LiquidStack.java (100%) rename {common => src/main/java}/net/minecraftforge/liquids/LiquidTank.java (100%) rename {common => src/main/java}/net/minecraftforge/oredict/OreDictionary.java (100%) rename {common => src/main/java}/net/minecraftforge/oredict/RecipeSorter.java (100%) rename {common => src/main/java}/net/minecraftforge/oredict/ShapedOreRecipe.java (100%) rename {common => src/main/java}/net/minecraftforge/oredict/ShapelessOreRecipe.java (100%) rename {common => src/main/java}/net/minecraftforge/server/ForgeTimeTracker.java (100%) rename {common => src/main/java}/net/minecraftforge/server/command/ForgeCommand.java (100%) rename {common => src/main/java}/net/minecraftforge/transformers/EventTransformer.java (100%) rename {common => src/main/java}/net/minecraftforge/transformers/ForgeAccessTransformer.java (100%) rename {client => src/main/java}/paulscode/sound/codecs/CodecIBXM.java (100%) rename {common => src/main/resources}/assets/forge/lang/en_US.lang (100%) rename {common => src/main/resources}/assets/forge/lang/es_ES.lang (100%) rename {common => src/main/resources}/assets/forge/lang/fr_FR.lang (100%) rename {common => src/main/resources}/forge_at.cfg (100%) rename {client => src/main/resources}/forge_logo.png (100%) diff --git a/.gitattributes b/.gitattributes index 38d313246..758843d9b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,7 +1,14 @@ * text eol=lf *.bat text eol=crlf -*.patch text +*.patch text eol=lf +*.java text eol=lf +*.gradle text eol=crlf *.png binary *.exe binary *.dll binary -*.zip binary \ No newline at end of file +*.jar binary +*.lzma binary +*.zip binary +*.pyd binary +*.cfg text eol=lf +*.py text eol=lf \ No newline at end of file diff --git a/.gitignore b/.gitignore index b2054a98e..788849df8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,16 @@ -*.DS_Store -/logs/ -/*.pyc -/forge-*/ -/patches-old/ -/mcp/ +#eclipse +/bin +/.settings +/.classpath + +#idea +/.idea +*.iml + +#gradle +/build +/.gradle + +#occupational hazards /eclipse/ -/target/ -/temp/ +/repo/ diff --git a/client/ibxm/Channel.java b/src/main/java/ibxm/Channel.java similarity index 100% rename from client/ibxm/Channel.java rename to src/main/java/ibxm/Channel.java diff --git a/client/ibxm/Envelope.java b/src/main/java/ibxm/Envelope.java similarity index 100% rename from client/ibxm/Envelope.java rename to src/main/java/ibxm/Envelope.java diff --git a/client/ibxm/FastTracker2.java b/src/main/java/ibxm/FastTracker2.java similarity index 100% rename from client/ibxm/FastTracker2.java rename to src/main/java/ibxm/FastTracker2.java diff --git a/client/ibxm/IBXM.java b/src/main/java/ibxm/IBXM.java similarity index 100% rename from client/ibxm/IBXM.java rename to src/main/java/ibxm/IBXM.java diff --git a/client/ibxm/Instrument.java b/src/main/java/ibxm/Instrument.java similarity index 100% rename from client/ibxm/Instrument.java rename to src/main/java/ibxm/Instrument.java diff --git a/client/ibxm/LogTable.java b/src/main/java/ibxm/LogTable.java similarity index 100% rename from client/ibxm/LogTable.java rename to src/main/java/ibxm/LogTable.java diff --git a/client/ibxm/Module.java b/src/main/java/ibxm/Module.java similarity index 100% rename from client/ibxm/Module.java rename to src/main/java/ibxm/Module.java diff --git a/client/ibxm/Pattern.java b/src/main/java/ibxm/Pattern.java similarity index 100% rename from client/ibxm/Pattern.java rename to src/main/java/ibxm/Pattern.java diff --git a/client/ibxm/Player.java b/src/main/java/ibxm/Player.java similarity index 100% rename from client/ibxm/Player.java rename to src/main/java/ibxm/Player.java diff --git a/client/ibxm/ProTracker.java b/src/main/java/ibxm/ProTracker.java similarity index 100% rename from client/ibxm/ProTracker.java rename to src/main/java/ibxm/ProTracker.java diff --git a/client/ibxm/Sample.java b/src/main/java/ibxm/Sample.java similarity index 100% rename from client/ibxm/Sample.java rename to src/main/java/ibxm/Sample.java diff --git a/client/ibxm/ScreamTracker3.java b/src/main/java/ibxm/ScreamTracker3.java similarity index 100% rename from client/ibxm/ScreamTracker3.java rename to src/main/java/ibxm/ScreamTracker3.java diff --git a/common/net/minecraftforge/classloading/FMLForgePlugin.java b/src/main/java/net/minecraftforge/classloading/FMLForgePlugin.java similarity index 100% rename from common/net/minecraftforge/classloading/FMLForgePlugin.java rename to src/main/java/net/minecraftforge/classloading/FMLForgePlugin.java diff --git a/client/net/minecraftforge/client/ClientCommandHandler.java b/src/main/java/net/minecraftforge/client/ClientCommandHandler.java similarity index 100% rename from client/net/minecraftforge/client/ClientCommandHandler.java rename to src/main/java/net/minecraftforge/client/ClientCommandHandler.java diff --git a/client/net/minecraftforge/client/EnumHelperClient.java b/src/main/java/net/minecraftforge/client/EnumHelperClient.java similarity index 100% rename from client/net/minecraftforge/client/EnumHelperClient.java rename to src/main/java/net/minecraftforge/client/EnumHelperClient.java diff --git a/client/net/minecraftforge/client/ForgeHooksClient.java b/src/main/java/net/minecraftforge/client/ForgeHooksClient.java similarity index 100% rename from client/net/minecraftforge/client/ForgeHooksClient.java rename to src/main/java/net/minecraftforge/client/ForgeHooksClient.java diff --git a/client/net/minecraftforge/client/GuiControlsScrollPanel.java b/src/main/java/net/minecraftforge/client/GuiControlsScrollPanel.java similarity index 100% rename from client/net/minecraftforge/client/GuiControlsScrollPanel.java rename to src/main/java/net/minecraftforge/client/GuiControlsScrollPanel.java diff --git a/client/net/minecraftforge/client/GuiIngameForge.java b/src/main/java/net/minecraftforge/client/GuiIngameForge.java similarity index 100% rename from client/net/minecraftforge/client/GuiIngameForge.java rename to src/main/java/net/minecraftforge/client/GuiIngameForge.java diff --git a/client/net/minecraftforge/client/IItemRenderer.java b/src/main/java/net/minecraftforge/client/IItemRenderer.java similarity index 100% rename from client/net/minecraftforge/client/IItemRenderer.java rename to src/main/java/net/minecraftforge/client/IItemRenderer.java diff --git a/client/net/minecraftforge/client/IRenderContextHandler.java b/src/main/java/net/minecraftforge/client/IRenderContextHandler.java similarity index 100% rename from client/net/minecraftforge/client/IRenderContextHandler.java rename to src/main/java/net/minecraftforge/client/IRenderContextHandler.java diff --git a/client/net/minecraftforge/client/IRenderHandler.java b/src/main/java/net/minecraftforge/client/IRenderHandler.java similarity index 100% rename from client/net/minecraftforge/client/IRenderHandler.java rename to src/main/java/net/minecraftforge/client/IRenderHandler.java diff --git a/client/net/minecraftforge/client/MinecraftForgeClient.java b/src/main/java/net/minecraftforge/client/MinecraftForgeClient.java similarity index 100% rename from client/net/minecraftforge/client/MinecraftForgeClient.java rename to src/main/java/net/minecraftforge/client/MinecraftForgeClient.java diff --git a/client/net/minecraftforge/client/event/ClientChatReceivedEvent.java b/src/main/java/net/minecraftforge/client/event/ClientChatReceivedEvent.java similarity index 100% rename from client/net/minecraftforge/client/event/ClientChatReceivedEvent.java rename to src/main/java/net/minecraftforge/client/event/ClientChatReceivedEvent.java diff --git a/client/net/minecraftforge/client/event/DrawBlockHighlightEvent.java b/src/main/java/net/minecraftforge/client/event/DrawBlockHighlightEvent.java similarity index 100% rename from client/net/minecraftforge/client/event/DrawBlockHighlightEvent.java rename to src/main/java/net/minecraftforge/client/event/DrawBlockHighlightEvent.java diff --git a/client/net/minecraftforge/client/event/FOVUpdateEvent.java b/src/main/java/net/minecraftforge/client/event/FOVUpdateEvent.java similarity index 100% rename from client/net/minecraftforge/client/event/FOVUpdateEvent.java rename to src/main/java/net/minecraftforge/client/event/FOVUpdateEvent.java diff --git a/client/net/minecraftforge/client/event/GuiOpenEvent.java b/src/main/java/net/minecraftforge/client/event/GuiOpenEvent.java similarity index 100% rename from client/net/minecraftforge/client/event/GuiOpenEvent.java rename to src/main/java/net/minecraftforge/client/event/GuiOpenEvent.java diff --git a/client/net/minecraftforge/client/event/MouseEvent.java b/src/main/java/net/minecraftforge/client/event/MouseEvent.java similarity index 100% rename from client/net/minecraftforge/client/event/MouseEvent.java rename to src/main/java/net/minecraftforge/client/event/MouseEvent.java diff --git a/client/net/minecraftforge/client/event/RenderGameOverlayEvent.java b/src/main/java/net/minecraftforge/client/event/RenderGameOverlayEvent.java similarity index 100% rename from client/net/minecraftforge/client/event/RenderGameOverlayEvent.java rename to src/main/java/net/minecraftforge/client/event/RenderGameOverlayEvent.java diff --git a/client/net/minecraftforge/client/event/RenderLivingEvent.java b/src/main/java/net/minecraftforge/client/event/RenderLivingEvent.java similarity index 100% rename from client/net/minecraftforge/client/event/RenderLivingEvent.java rename to src/main/java/net/minecraftforge/client/event/RenderLivingEvent.java diff --git a/client/net/minecraftforge/client/event/RenderPlayerEvent.java b/src/main/java/net/minecraftforge/client/event/RenderPlayerEvent.java similarity index 100% rename from client/net/minecraftforge/client/event/RenderPlayerEvent.java rename to src/main/java/net/minecraftforge/client/event/RenderPlayerEvent.java diff --git a/client/net/minecraftforge/client/event/RenderWorldLastEvent.java b/src/main/java/net/minecraftforge/client/event/RenderWorldLastEvent.java similarity index 100% rename from client/net/minecraftforge/client/event/RenderWorldLastEvent.java rename to src/main/java/net/minecraftforge/client/event/RenderWorldLastEvent.java diff --git a/client/net/minecraftforge/client/event/TextureStitchEvent.java b/src/main/java/net/minecraftforge/client/event/TextureStitchEvent.java similarity index 100% rename from client/net/minecraftforge/client/event/TextureStitchEvent.java rename to src/main/java/net/minecraftforge/client/event/TextureStitchEvent.java diff --git a/client/net/minecraftforge/client/event/sound/PlayBackgroundMusicEvent.java b/src/main/java/net/minecraftforge/client/event/sound/PlayBackgroundMusicEvent.java similarity index 100% rename from client/net/minecraftforge/client/event/sound/PlayBackgroundMusicEvent.java rename to src/main/java/net/minecraftforge/client/event/sound/PlayBackgroundMusicEvent.java diff --git a/client/net/minecraftforge/client/event/sound/PlaySoundEffectEvent.java b/src/main/java/net/minecraftforge/client/event/sound/PlaySoundEffectEvent.java similarity index 100% rename from client/net/minecraftforge/client/event/sound/PlaySoundEffectEvent.java rename to src/main/java/net/minecraftforge/client/event/sound/PlaySoundEffectEvent.java diff --git a/client/net/minecraftforge/client/event/sound/PlaySoundEffectSourceEvent.java b/src/main/java/net/minecraftforge/client/event/sound/PlaySoundEffectSourceEvent.java similarity index 100% rename from client/net/minecraftforge/client/event/sound/PlaySoundEffectSourceEvent.java rename to src/main/java/net/minecraftforge/client/event/sound/PlaySoundEffectSourceEvent.java diff --git a/client/net/minecraftforge/client/event/sound/PlaySoundEvent.java b/src/main/java/net/minecraftforge/client/event/sound/PlaySoundEvent.java similarity index 100% rename from client/net/minecraftforge/client/event/sound/PlaySoundEvent.java rename to src/main/java/net/minecraftforge/client/event/sound/PlaySoundEvent.java diff --git a/client/net/minecraftforge/client/event/sound/PlaySoundSourceEvent.java b/src/main/java/net/minecraftforge/client/event/sound/PlaySoundSourceEvent.java similarity index 100% rename from client/net/minecraftforge/client/event/sound/PlaySoundSourceEvent.java rename to src/main/java/net/minecraftforge/client/event/sound/PlaySoundSourceEvent.java diff --git a/client/net/minecraftforge/client/event/sound/PlayStreamingEvent.java b/src/main/java/net/minecraftforge/client/event/sound/PlayStreamingEvent.java similarity index 100% rename from client/net/minecraftforge/client/event/sound/PlayStreamingEvent.java rename to src/main/java/net/minecraftforge/client/event/sound/PlayStreamingEvent.java diff --git a/client/net/minecraftforge/client/event/sound/PlayStreamingSourceEvent.java b/src/main/java/net/minecraftforge/client/event/sound/PlayStreamingSourceEvent.java similarity index 100% rename from client/net/minecraftforge/client/event/sound/PlayStreamingSourceEvent.java rename to src/main/java/net/minecraftforge/client/event/sound/PlayStreamingSourceEvent.java diff --git a/client/net/minecraftforge/client/event/sound/SoundEvent.java b/src/main/java/net/minecraftforge/client/event/sound/SoundEvent.java similarity index 100% rename from client/net/minecraftforge/client/event/sound/SoundEvent.java rename to src/main/java/net/minecraftforge/client/event/sound/SoundEvent.java diff --git a/client/net/minecraftforge/client/event/sound/SoundLoadEvent.java b/src/main/java/net/minecraftforge/client/event/sound/SoundLoadEvent.java similarity index 100% rename from client/net/minecraftforge/client/event/sound/SoundLoadEvent.java rename to src/main/java/net/minecraftforge/client/event/sound/SoundLoadEvent.java diff --git a/client/net/minecraftforge/client/event/sound/SoundResultEvent.java b/src/main/java/net/minecraftforge/client/event/sound/SoundResultEvent.java similarity index 100% rename from client/net/minecraftforge/client/event/sound/SoundResultEvent.java rename to src/main/java/net/minecraftforge/client/event/sound/SoundResultEvent.java diff --git a/client/net/minecraftforge/client/event/sound/SoundSetupEvent.java b/src/main/java/net/minecraftforge/client/event/sound/SoundSetupEvent.java similarity index 100% rename from client/net/minecraftforge/client/event/sound/SoundSetupEvent.java rename to src/main/java/net/minecraftforge/client/event/sound/SoundSetupEvent.java diff --git a/client/net/minecraftforge/client/model/AdvancedModelLoader.java b/src/main/java/net/minecraftforge/client/model/AdvancedModelLoader.java similarity index 100% rename from client/net/minecraftforge/client/model/AdvancedModelLoader.java rename to src/main/java/net/minecraftforge/client/model/AdvancedModelLoader.java diff --git a/client/net/minecraftforge/client/model/IModelCustom.java b/src/main/java/net/minecraftforge/client/model/IModelCustom.java similarity index 100% rename from client/net/minecraftforge/client/model/IModelCustom.java rename to src/main/java/net/minecraftforge/client/model/IModelCustom.java diff --git a/client/net/minecraftforge/client/model/IModelCustomLoader.java b/src/main/java/net/minecraftforge/client/model/IModelCustomLoader.java similarity index 100% rename from client/net/minecraftforge/client/model/IModelCustomLoader.java rename to src/main/java/net/minecraftforge/client/model/IModelCustomLoader.java diff --git a/client/net/minecraftforge/client/model/ModelFormatException.java b/src/main/java/net/minecraftforge/client/model/ModelFormatException.java similarity index 100% rename from client/net/minecraftforge/client/model/ModelFormatException.java rename to src/main/java/net/minecraftforge/client/model/ModelFormatException.java diff --git a/client/net/minecraftforge/client/model/obj/Face.java b/src/main/java/net/minecraftforge/client/model/obj/Face.java similarity index 100% rename from client/net/minecraftforge/client/model/obj/Face.java rename to src/main/java/net/minecraftforge/client/model/obj/Face.java diff --git a/client/net/minecraftforge/client/model/obj/GroupObject.java b/src/main/java/net/minecraftforge/client/model/obj/GroupObject.java similarity index 100% rename from client/net/minecraftforge/client/model/obj/GroupObject.java rename to src/main/java/net/minecraftforge/client/model/obj/GroupObject.java diff --git a/client/net/minecraftforge/client/model/obj/ObjModelLoader.java b/src/main/java/net/minecraftforge/client/model/obj/ObjModelLoader.java similarity index 100% rename from client/net/minecraftforge/client/model/obj/ObjModelLoader.java rename to src/main/java/net/minecraftforge/client/model/obj/ObjModelLoader.java diff --git a/client/net/minecraftforge/client/model/obj/TextureCoordinate.java b/src/main/java/net/minecraftforge/client/model/obj/TextureCoordinate.java similarity index 100% rename from client/net/minecraftforge/client/model/obj/TextureCoordinate.java rename to src/main/java/net/minecraftforge/client/model/obj/TextureCoordinate.java diff --git a/client/net/minecraftforge/client/model/obj/Vertex.java b/src/main/java/net/minecraftforge/client/model/obj/Vertex.java similarity index 100% rename from client/net/minecraftforge/client/model/obj/Vertex.java rename to src/main/java/net/minecraftforge/client/model/obj/Vertex.java diff --git a/client/net/minecraftforge/client/model/obj/WavefrontObject.java b/src/main/java/net/minecraftforge/client/model/obj/WavefrontObject.java similarity index 100% rename from client/net/minecraftforge/client/model/obj/WavefrontObject.java rename to src/main/java/net/minecraftforge/client/model/obj/WavefrontObject.java diff --git a/client/net/minecraftforge/client/model/techne/TechneModel.java b/src/main/java/net/minecraftforge/client/model/techne/TechneModel.java similarity index 100% rename from client/net/minecraftforge/client/model/techne/TechneModel.java rename to src/main/java/net/minecraftforge/client/model/techne/TechneModel.java diff --git a/client/net/minecraftforge/client/model/techne/TechneModelLoader.java b/src/main/java/net/minecraftforge/client/model/techne/TechneModelLoader.java similarity index 100% rename from client/net/minecraftforge/client/model/techne/TechneModelLoader.java rename to src/main/java/net/minecraftforge/client/model/techne/TechneModelLoader.java diff --git a/common/net/minecraftforge/common/AchievementPage.java b/src/main/java/net/minecraftforge/common/AchievementPage.java similarity index 100% rename from common/net/minecraftforge/common/AchievementPage.java rename to src/main/java/net/minecraftforge/common/AchievementPage.java diff --git a/common/net/minecraftforge/common/BiomeDictionary.java b/src/main/java/net/minecraftforge/common/BiomeDictionary.java similarity index 100% rename from common/net/minecraftforge/common/BiomeDictionary.java rename to src/main/java/net/minecraftforge/common/BiomeDictionary.java diff --git a/common/net/minecraftforge/common/BiomeManager.java b/src/main/java/net/minecraftforge/common/BiomeManager.java similarity index 100% rename from common/net/minecraftforge/common/BiomeManager.java rename to src/main/java/net/minecraftforge/common/BiomeManager.java diff --git a/common/net/minecraftforge/common/ChestGenHooks.java b/src/main/java/net/minecraftforge/common/ChestGenHooks.java similarity index 100% rename from common/net/minecraftforge/common/ChestGenHooks.java rename to src/main/java/net/minecraftforge/common/ChestGenHooks.java diff --git a/common/net/minecraftforge/common/ConfigCategory.java b/src/main/java/net/minecraftforge/common/ConfigCategory.java similarity index 100% rename from common/net/minecraftforge/common/ConfigCategory.java rename to src/main/java/net/minecraftforge/common/ConfigCategory.java diff --git a/common/net/minecraftforge/common/Configuration.java b/src/main/java/net/minecraftforge/common/Configuration.java similarity index 100% rename from common/net/minecraftforge/common/Configuration.java rename to src/main/java/net/minecraftforge/common/Configuration.java diff --git a/common/net/minecraftforge/common/DimensionManager.java b/src/main/java/net/minecraftforge/common/DimensionManager.java similarity index 100% rename from common/net/minecraftforge/common/DimensionManager.java rename to src/main/java/net/minecraftforge/common/DimensionManager.java diff --git a/common/net/minecraftforge/common/DungeonHooks.java b/src/main/java/net/minecraftforge/common/DungeonHooks.java similarity index 100% rename from common/net/minecraftforge/common/DungeonHooks.java rename to src/main/java/net/minecraftforge/common/DungeonHooks.java diff --git a/common/net/minecraftforge/common/EnumHelper.java b/src/main/java/net/minecraftforge/common/EnumHelper.java similarity index 100% rename from common/net/minecraftforge/common/EnumHelper.java rename to src/main/java/net/minecraftforge/common/EnumHelper.java diff --git a/common/net/minecraftforge/common/EnumPlantType.java b/src/main/java/net/minecraftforge/common/EnumPlantType.java similarity index 100% rename from common/net/minecraftforge/common/EnumPlantType.java rename to src/main/java/net/minecraftforge/common/EnumPlantType.java diff --git a/common/net/minecraftforge/common/FakePlayer.java b/src/main/java/net/minecraftforge/common/FakePlayer.java similarity index 100% rename from common/net/minecraftforge/common/FakePlayer.java rename to src/main/java/net/minecraftforge/common/FakePlayer.java diff --git a/common/net/minecraftforge/common/FakePlayerFactory.java b/src/main/java/net/minecraftforge/common/FakePlayerFactory.java similarity index 100% rename from common/net/minecraftforge/common/FakePlayerFactory.java rename to src/main/java/net/minecraftforge/common/FakePlayerFactory.java diff --git a/common/net/minecraftforge/common/ForgeChunkManager.java b/src/main/java/net/minecraftforge/common/ForgeChunkManager.java similarity index 100% rename from common/net/minecraftforge/common/ForgeChunkManager.java rename to src/main/java/net/minecraftforge/common/ForgeChunkManager.java diff --git a/common/net/minecraftforge/common/ForgeDirection.java b/src/main/java/net/minecraftforge/common/ForgeDirection.java similarity index 100% rename from common/net/minecraftforge/common/ForgeDirection.java rename to src/main/java/net/minecraftforge/common/ForgeDirection.java diff --git a/common/net/minecraftforge/common/ForgeDummyContainer.java b/src/main/java/net/minecraftforge/common/ForgeDummyContainer.java similarity index 100% rename from common/net/minecraftforge/common/ForgeDummyContainer.java rename to src/main/java/net/minecraftforge/common/ForgeDummyContainer.java diff --git a/common/net/minecraftforge/common/ForgeHooks.java b/src/main/java/net/minecraftforge/common/ForgeHooks.java similarity index 100% rename from common/net/minecraftforge/common/ForgeHooks.java rename to src/main/java/net/minecraftforge/common/ForgeHooks.java diff --git a/common/net/minecraftforge/common/ForgeInternalHandler.java b/src/main/java/net/minecraftforge/common/ForgeInternalHandler.java similarity index 100% rename from common/net/minecraftforge/common/ForgeInternalHandler.java rename to src/main/java/net/minecraftforge/common/ForgeInternalHandler.java diff --git a/common/net/minecraftforge/common/ForgeVersion.java b/src/main/java/net/minecraftforge/common/ForgeVersion.java similarity index 100% rename from common/net/minecraftforge/common/ForgeVersion.java rename to src/main/java/net/minecraftforge/common/ForgeVersion.java diff --git a/common/net/minecraftforge/common/IExtendedEntityProperties.java b/src/main/java/net/minecraftforge/common/IExtendedEntityProperties.java similarity index 100% rename from common/net/minecraftforge/common/IExtendedEntityProperties.java rename to src/main/java/net/minecraftforge/common/IExtendedEntityProperties.java diff --git a/common/net/minecraftforge/common/IMinecartCollisionHandler.java b/src/main/java/net/minecraftforge/common/IMinecartCollisionHandler.java similarity index 100% rename from common/net/minecraftforge/common/IMinecartCollisionHandler.java rename to src/main/java/net/minecraftforge/common/IMinecartCollisionHandler.java diff --git a/common/net/minecraftforge/common/IPlantable.java b/src/main/java/net/minecraftforge/common/IPlantable.java similarity index 100% rename from common/net/minecraftforge/common/IPlantable.java rename to src/main/java/net/minecraftforge/common/IPlantable.java diff --git a/common/net/minecraftforge/common/IShearable.java b/src/main/java/net/minecraftforge/common/IShearable.java similarity index 100% rename from common/net/minecraftforge/common/IShearable.java rename to src/main/java/net/minecraftforge/common/IShearable.java diff --git a/common/net/minecraftforge/common/ISpecialArmor.java b/src/main/java/net/minecraftforge/common/ISpecialArmor.java similarity index 100% rename from common/net/minecraftforge/common/ISpecialArmor.java rename to src/main/java/net/minecraftforge/common/ISpecialArmor.java diff --git a/common/net/minecraftforge/common/MinecraftForge.java b/src/main/java/net/minecraftforge/common/MinecraftForge.java similarity index 100% rename from common/net/minecraftforge/common/MinecraftForge.java rename to src/main/java/net/minecraftforge/common/MinecraftForge.java diff --git a/common/net/minecraftforge/common/Property.java b/src/main/java/net/minecraftforge/common/Property.java similarity index 100% rename from common/net/minecraftforge/common/Property.java rename to src/main/java/net/minecraftforge/common/Property.java diff --git a/common/net/minecraftforge/common/RotationHelper.java b/src/main/java/net/minecraftforge/common/RotationHelper.java similarity index 100% rename from common/net/minecraftforge/common/RotationHelper.java rename to src/main/java/net/minecraftforge/common/RotationHelper.java diff --git a/common/net/minecraftforge/common/WorldSpecificSaveHandler.java b/src/main/java/net/minecraftforge/common/WorldSpecificSaveHandler.java similarity index 100% rename from common/net/minecraftforge/common/WorldSpecificSaveHandler.java rename to src/main/java/net/minecraftforge/common/WorldSpecificSaveHandler.java diff --git a/common/net/minecraftforge/common/network/ForgeConnectionHandler.java b/src/main/java/net/minecraftforge/common/network/ForgeConnectionHandler.java similarity index 100% rename from common/net/minecraftforge/common/network/ForgeConnectionHandler.java rename to src/main/java/net/minecraftforge/common/network/ForgeConnectionHandler.java diff --git a/common/net/minecraftforge/common/network/ForgeNetworkHandler.java b/src/main/java/net/minecraftforge/common/network/ForgeNetworkHandler.java similarity index 100% rename from common/net/minecraftforge/common/network/ForgeNetworkHandler.java rename to src/main/java/net/minecraftforge/common/network/ForgeNetworkHandler.java diff --git a/common/net/minecraftforge/common/network/ForgePacket.java b/src/main/java/net/minecraftforge/common/network/ForgePacket.java similarity index 100% rename from common/net/minecraftforge/common/network/ForgePacket.java rename to src/main/java/net/minecraftforge/common/network/ForgePacket.java diff --git a/common/net/minecraftforge/common/network/ForgePacketHandler.java b/src/main/java/net/minecraftforge/common/network/ForgePacketHandler.java similarity index 100% rename from common/net/minecraftforge/common/network/ForgePacketHandler.java rename to src/main/java/net/minecraftforge/common/network/ForgePacketHandler.java diff --git a/common/net/minecraftforge/common/network/ForgeTinyPacketHandler.java b/src/main/java/net/minecraftforge/common/network/ForgeTinyPacketHandler.java similarity index 100% rename from common/net/minecraftforge/common/network/ForgeTinyPacketHandler.java rename to src/main/java/net/minecraftforge/common/network/ForgeTinyPacketHandler.java diff --git a/common/net/minecraftforge/common/network/packet/DimensionRegisterPacket.java b/src/main/java/net/minecraftforge/common/network/packet/DimensionRegisterPacket.java similarity index 100% rename from common/net/minecraftforge/common/network/packet/DimensionRegisterPacket.java rename to src/main/java/net/minecraftforge/common/network/packet/DimensionRegisterPacket.java diff --git a/common/net/minecraftforge/event/ASMEventHandler.java b/src/main/java/net/minecraftforge/event/ASMEventHandler.java similarity index 100% rename from common/net/minecraftforge/event/ASMEventHandler.java rename to src/main/java/net/minecraftforge/event/ASMEventHandler.java diff --git a/common/net/minecraftforge/event/Cancelable.java b/src/main/java/net/minecraftforge/event/Cancelable.java similarity index 100% rename from common/net/minecraftforge/event/Cancelable.java rename to src/main/java/net/minecraftforge/event/Cancelable.java diff --git a/common/net/minecraftforge/event/CommandEvent.java b/src/main/java/net/minecraftforge/event/CommandEvent.java similarity index 100% rename from common/net/minecraftforge/event/CommandEvent.java rename to src/main/java/net/minecraftforge/event/CommandEvent.java diff --git a/common/net/minecraftforge/event/Event.java b/src/main/java/net/minecraftforge/event/Event.java similarity index 100% rename from common/net/minecraftforge/event/Event.java rename to src/main/java/net/minecraftforge/event/Event.java diff --git a/common/net/minecraftforge/event/EventBus.java b/src/main/java/net/minecraftforge/event/EventBus.java similarity index 100% rename from common/net/minecraftforge/event/EventBus.java rename to src/main/java/net/minecraftforge/event/EventBus.java diff --git a/common/net/minecraftforge/event/EventPriority.java b/src/main/java/net/minecraftforge/event/EventPriority.java similarity index 100% rename from common/net/minecraftforge/event/EventPriority.java rename to src/main/java/net/minecraftforge/event/EventPriority.java diff --git a/common/net/minecraftforge/event/ForgeEventFactory.java b/src/main/java/net/minecraftforge/event/ForgeEventFactory.java similarity index 100% rename from common/net/minecraftforge/event/ForgeEventFactory.java rename to src/main/java/net/minecraftforge/event/ForgeEventFactory.java diff --git a/common/net/minecraftforge/event/ForgeSubscribe.java b/src/main/java/net/minecraftforge/event/ForgeSubscribe.java similarity index 100% rename from common/net/minecraftforge/event/ForgeSubscribe.java rename to src/main/java/net/minecraftforge/event/ForgeSubscribe.java diff --git a/common/net/minecraftforge/event/IEventListener.java b/src/main/java/net/minecraftforge/event/IEventListener.java similarity index 100% rename from common/net/minecraftforge/event/IEventListener.java rename to src/main/java/net/minecraftforge/event/IEventListener.java diff --git a/common/net/minecraftforge/event/ListenerList.java b/src/main/java/net/minecraftforge/event/ListenerList.java similarity index 100% rename from common/net/minecraftforge/event/ListenerList.java rename to src/main/java/net/minecraftforge/event/ListenerList.java diff --git a/common/net/minecraftforge/event/ServerChatEvent.java b/src/main/java/net/minecraftforge/event/ServerChatEvent.java similarity index 100% rename from common/net/minecraftforge/event/ServerChatEvent.java rename to src/main/java/net/minecraftforge/event/ServerChatEvent.java diff --git a/common/net/minecraftforge/event/brewing/PotionBrewedEvent.java b/src/main/java/net/minecraftforge/event/brewing/PotionBrewedEvent.java similarity index 100% rename from common/net/minecraftforge/event/brewing/PotionBrewedEvent.java rename to src/main/java/net/minecraftforge/event/brewing/PotionBrewedEvent.java diff --git a/common/net/minecraftforge/event/entity/EntityEvent.java b/src/main/java/net/minecraftforge/event/entity/EntityEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/EntityEvent.java rename to src/main/java/net/minecraftforge/event/entity/EntityEvent.java diff --git a/common/net/minecraftforge/event/entity/EntityJoinWorldEvent.java b/src/main/java/net/minecraftforge/event/entity/EntityJoinWorldEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/EntityJoinWorldEvent.java rename to src/main/java/net/minecraftforge/event/entity/EntityJoinWorldEvent.java diff --git a/common/net/minecraftforge/event/entity/EntityStruckByLightningEvent.java b/src/main/java/net/minecraftforge/event/entity/EntityStruckByLightningEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/EntityStruckByLightningEvent.java rename to src/main/java/net/minecraftforge/event/entity/EntityStruckByLightningEvent.java diff --git a/common/net/minecraftforge/event/entity/PlaySoundAtEntityEvent.java b/src/main/java/net/minecraftforge/event/entity/PlaySoundAtEntityEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/PlaySoundAtEntityEvent.java rename to src/main/java/net/minecraftforge/event/entity/PlaySoundAtEntityEvent.java diff --git a/common/net/minecraftforge/event/entity/item/ItemEvent.java b/src/main/java/net/minecraftforge/event/entity/item/ItemEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/item/ItemEvent.java rename to src/main/java/net/minecraftforge/event/entity/item/ItemEvent.java diff --git a/common/net/minecraftforge/event/entity/item/ItemExpireEvent.java b/src/main/java/net/minecraftforge/event/entity/item/ItemExpireEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/item/ItemExpireEvent.java rename to src/main/java/net/minecraftforge/event/entity/item/ItemExpireEvent.java diff --git a/common/net/minecraftforge/event/entity/item/ItemTossEvent.java b/src/main/java/net/minecraftforge/event/entity/item/ItemTossEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/item/ItemTossEvent.java rename to src/main/java/net/minecraftforge/event/entity/item/ItemTossEvent.java diff --git a/common/net/minecraftforge/event/entity/living/EnderTeleportEvent.java b/src/main/java/net/minecraftforge/event/entity/living/EnderTeleportEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/living/EnderTeleportEvent.java rename to src/main/java/net/minecraftforge/event/entity/living/EnderTeleportEvent.java diff --git a/common/net/minecraftforge/event/entity/living/LivingAttackEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingAttackEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/living/LivingAttackEvent.java rename to src/main/java/net/minecraftforge/event/entity/living/LivingAttackEvent.java diff --git a/common/net/minecraftforge/event/entity/living/LivingDeathEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingDeathEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/living/LivingDeathEvent.java rename to src/main/java/net/minecraftforge/event/entity/living/LivingDeathEvent.java diff --git a/common/net/minecraftforge/event/entity/living/LivingDropsEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingDropsEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/living/LivingDropsEvent.java rename to src/main/java/net/minecraftforge/event/entity/living/LivingDropsEvent.java diff --git a/common/net/minecraftforge/event/entity/living/LivingEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/living/LivingEvent.java rename to src/main/java/net/minecraftforge/event/entity/living/LivingEvent.java diff --git a/common/net/minecraftforge/event/entity/living/LivingFallEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingFallEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/living/LivingFallEvent.java rename to src/main/java/net/minecraftforge/event/entity/living/LivingFallEvent.java diff --git a/common/net/minecraftforge/event/entity/living/LivingHurtEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingHurtEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/living/LivingHurtEvent.java rename to src/main/java/net/minecraftforge/event/entity/living/LivingHurtEvent.java diff --git a/common/net/minecraftforge/event/entity/living/LivingPackSizeEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingPackSizeEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/living/LivingPackSizeEvent.java rename to src/main/java/net/minecraftforge/event/entity/living/LivingPackSizeEvent.java diff --git a/common/net/minecraftforge/event/entity/living/LivingSetAttackTargetEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingSetAttackTargetEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/living/LivingSetAttackTargetEvent.java rename to src/main/java/net/minecraftforge/event/entity/living/LivingSetAttackTargetEvent.java diff --git a/common/net/minecraftforge/event/entity/living/LivingSpawnEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingSpawnEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/living/LivingSpawnEvent.java rename to src/main/java/net/minecraftforge/event/entity/living/LivingSpawnEvent.java diff --git a/common/net/minecraftforge/event/entity/living/ZombieEvent.java b/src/main/java/net/minecraftforge/event/entity/living/ZombieEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/living/ZombieEvent.java rename to src/main/java/net/minecraftforge/event/entity/living/ZombieEvent.java diff --git a/common/net/minecraftforge/event/entity/minecart/MinecartCollisionEvent.java b/src/main/java/net/minecraftforge/event/entity/minecart/MinecartCollisionEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/minecart/MinecartCollisionEvent.java rename to src/main/java/net/minecraftforge/event/entity/minecart/MinecartCollisionEvent.java diff --git a/common/net/minecraftforge/event/entity/minecart/MinecartEvent.java b/src/main/java/net/minecraftforge/event/entity/minecart/MinecartEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/minecart/MinecartEvent.java rename to src/main/java/net/minecraftforge/event/entity/minecart/MinecartEvent.java diff --git a/common/net/minecraftforge/event/entity/minecart/MinecartInteractEvent.java b/src/main/java/net/minecraftforge/event/entity/minecart/MinecartInteractEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/minecart/MinecartInteractEvent.java rename to src/main/java/net/minecraftforge/event/entity/minecart/MinecartInteractEvent.java diff --git a/common/net/minecraftforge/event/entity/minecart/MinecartUpdateEvent.java b/src/main/java/net/minecraftforge/event/entity/minecart/MinecartUpdateEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/minecart/MinecartUpdateEvent.java rename to src/main/java/net/minecraftforge/event/entity/minecart/MinecartUpdateEvent.java diff --git a/common/net/minecraftforge/event/entity/player/ArrowLooseEvent.java b/src/main/java/net/minecraftforge/event/entity/player/ArrowLooseEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/player/ArrowLooseEvent.java rename to src/main/java/net/minecraftforge/event/entity/player/ArrowLooseEvent.java diff --git a/common/net/minecraftforge/event/entity/player/ArrowNockEvent.java b/src/main/java/net/minecraftforge/event/entity/player/ArrowNockEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/player/ArrowNockEvent.java rename to src/main/java/net/minecraftforge/event/entity/player/ArrowNockEvent.java diff --git a/common/net/minecraftforge/event/entity/player/AttackEntityEvent.java b/src/main/java/net/minecraftforge/event/entity/player/AttackEntityEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/player/AttackEntityEvent.java rename to src/main/java/net/minecraftforge/event/entity/player/AttackEntityEvent.java diff --git a/common/net/minecraftforge/event/entity/player/BonemealEvent.java b/src/main/java/net/minecraftforge/event/entity/player/BonemealEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/player/BonemealEvent.java rename to src/main/java/net/minecraftforge/event/entity/player/BonemealEvent.java diff --git a/common/net/minecraftforge/event/entity/player/EntityInteractEvent.java b/src/main/java/net/minecraftforge/event/entity/player/EntityInteractEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/player/EntityInteractEvent.java rename to src/main/java/net/minecraftforge/event/entity/player/EntityInteractEvent.java diff --git a/common/net/minecraftforge/event/entity/player/EntityItemPickupEvent.java b/src/main/java/net/minecraftforge/event/entity/player/EntityItemPickupEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/player/EntityItemPickupEvent.java rename to src/main/java/net/minecraftforge/event/entity/player/EntityItemPickupEvent.java diff --git a/common/net/minecraftforge/event/entity/player/FillBucketEvent.java b/src/main/java/net/minecraftforge/event/entity/player/FillBucketEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/player/FillBucketEvent.java rename to src/main/java/net/minecraftforge/event/entity/player/FillBucketEvent.java diff --git a/common/net/minecraftforge/event/entity/player/ItemTooltipEvent.java b/src/main/java/net/minecraftforge/event/entity/player/ItemTooltipEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/player/ItemTooltipEvent.java rename to src/main/java/net/minecraftforge/event/entity/player/ItemTooltipEvent.java diff --git a/common/net/minecraftforge/event/entity/player/PlayerDestroyItemEvent.java b/src/main/java/net/minecraftforge/event/entity/player/PlayerDestroyItemEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/player/PlayerDestroyItemEvent.java rename to src/main/java/net/minecraftforge/event/entity/player/PlayerDestroyItemEvent.java diff --git a/common/net/minecraftforge/event/entity/player/PlayerDropsEvent.java b/src/main/java/net/minecraftforge/event/entity/player/PlayerDropsEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/player/PlayerDropsEvent.java rename to src/main/java/net/minecraftforge/event/entity/player/PlayerDropsEvent.java diff --git a/common/net/minecraftforge/event/entity/player/PlayerEvent.java b/src/main/java/net/minecraftforge/event/entity/player/PlayerEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/player/PlayerEvent.java rename to src/main/java/net/minecraftforge/event/entity/player/PlayerEvent.java diff --git a/common/net/minecraftforge/event/entity/player/PlayerFlyableFallEvent.java b/src/main/java/net/minecraftforge/event/entity/player/PlayerFlyableFallEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/player/PlayerFlyableFallEvent.java rename to src/main/java/net/minecraftforge/event/entity/player/PlayerFlyableFallEvent.java diff --git a/common/net/minecraftforge/event/entity/player/PlayerInteractEvent.java b/src/main/java/net/minecraftforge/event/entity/player/PlayerInteractEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/player/PlayerInteractEvent.java rename to src/main/java/net/minecraftforge/event/entity/player/PlayerInteractEvent.java diff --git a/common/net/minecraftforge/event/entity/player/PlayerOpenContainerEvent.java b/src/main/java/net/minecraftforge/event/entity/player/PlayerOpenContainerEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/player/PlayerOpenContainerEvent.java rename to src/main/java/net/minecraftforge/event/entity/player/PlayerOpenContainerEvent.java diff --git a/common/net/minecraftforge/event/entity/player/PlayerSleepInBedEvent.java b/src/main/java/net/minecraftforge/event/entity/player/PlayerSleepInBedEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/player/PlayerSleepInBedEvent.java rename to src/main/java/net/minecraftforge/event/entity/player/PlayerSleepInBedEvent.java diff --git a/common/net/minecraftforge/event/entity/player/UseHoeEvent.java b/src/main/java/net/minecraftforge/event/entity/player/UseHoeEvent.java similarity index 100% rename from common/net/minecraftforge/event/entity/player/UseHoeEvent.java rename to src/main/java/net/minecraftforge/event/entity/player/UseHoeEvent.java diff --git a/common/net/minecraftforge/event/terraingen/BiomeEvent.java b/src/main/java/net/minecraftforge/event/terraingen/BiomeEvent.java similarity index 100% rename from common/net/minecraftforge/event/terraingen/BiomeEvent.java rename to src/main/java/net/minecraftforge/event/terraingen/BiomeEvent.java diff --git a/common/net/minecraftforge/event/terraingen/ChunkProviderEvent.java b/src/main/java/net/minecraftforge/event/terraingen/ChunkProviderEvent.java similarity index 100% rename from common/net/minecraftforge/event/terraingen/ChunkProviderEvent.java rename to src/main/java/net/minecraftforge/event/terraingen/ChunkProviderEvent.java diff --git a/common/net/minecraftforge/event/terraingen/DecorateBiomeEvent.java b/src/main/java/net/minecraftforge/event/terraingen/DecorateBiomeEvent.java similarity index 100% rename from common/net/minecraftforge/event/terraingen/DecorateBiomeEvent.java rename to src/main/java/net/minecraftforge/event/terraingen/DecorateBiomeEvent.java diff --git a/common/net/minecraftforge/event/terraingen/DeferredBiomeDecorator.java b/src/main/java/net/minecraftforge/event/terraingen/DeferredBiomeDecorator.java similarity index 100% rename from common/net/minecraftforge/event/terraingen/DeferredBiomeDecorator.java rename to src/main/java/net/minecraftforge/event/terraingen/DeferredBiomeDecorator.java diff --git a/common/net/minecraftforge/event/terraingen/InitMapGenEvent.java b/src/main/java/net/minecraftforge/event/terraingen/InitMapGenEvent.java similarity index 100% rename from common/net/minecraftforge/event/terraingen/InitMapGenEvent.java rename to src/main/java/net/minecraftforge/event/terraingen/InitMapGenEvent.java diff --git a/common/net/minecraftforge/event/terraingen/InitNoiseGensEvent.java b/src/main/java/net/minecraftforge/event/terraingen/InitNoiseGensEvent.java similarity index 100% rename from common/net/minecraftforge/event/terraingen/InitNoiseGensEvent.java rename to src/main/java/net/minecraftforge/event/terraingen/InitNoiseGensEvent.java diff --git a/common/net/minecraftforge/event/terraingen/OreGenEvent.java b/src/main/java/net/minecraftforge/event/terraingen/OreGenEvent.java similarity index 100% rename from common/net/minecraftforge/event/terraingen/OreGenEvent.java rename to src/main/java/net/minecraftforge/event/terraingen/OreGenEvent.java diff --git a/common/net/minecraftforge/event/terraingen/PopulateChunkEvent.java b/src/main/java/net/minecraftforge/event/terraingen/PopulateChunkEvent.java similarity index 100% rename from common/net/minecraftforge/event/terraingen/PopulateChunkEvent.java rename to src/main/java/net/minecraftforge/event/terraingen/PopulateChunkEvent.java diff --git a/common/net/minecraftforge/event/terraingen/SaplingGrowTreeEvent.java b/src/main/java/net/minecraftforge/event/terraingen/SaplingGrowTreeEvent.java similarity index 100% rename from common/net/minecraftforge/event/terraingen/SaplingGrowTreeEvent.java rename to src/main/java/net/minecraftforge/event/terraingen/SaplingGrowTreeEvent.java diff --git a/common/net/minecraftforge/event/terraingen/TerrainGen.java b/src/main/java/net/minecraftforge/event/terraingen/TerrainGen.java similarity index 100% rename from common/net/minecraftforge/event/terraingen/TerrainGen.java rename to src/main/java/net/minecraftforge/event/terraingen/TerrainGen.java diff --git a/common/net/minecraftforge/event/terraingen/WorldTypeEvent.java b/src/main/java/net/minecraftforge/event/terraingen/WorldTypeEvent.java similarity index 100% rename from common/net/minecraftforge/event/terraingen/WorldTypeEvent.java rename to src/main/java/net/minecraftforge/event/terraingen/WorldTypeEvent.java diff --git a/common/net/minecraftforge/event/world/BlockEvent.java b/src/main/java/net/minecraftforge/event/world/BlockEvent.java similarity index 100% rename from common/net/minecraftforge/event/world/BlockEvent.java rename to src/main/java/net/minecraftforge/event/world/BlockEvent.java diff --git a/common/net/minecraftforge/event/world/ChunkDataEvent.java b/src/main/java/net/minecraftforge/event/world/ChunkDataEvent.java similarity index 100% rename from common/net/minecraftforge/event/world/ChunkDataEvent.java rename to src/main/java/net/minecraftforge/event/world/ChunkDataEvent.java diff --git a/common/net/minecraftforge/event/world/ChunkEvent.java b/src/main/java/net/minecraftforge/event/world/ChunkEvent.java similarity index 100% rename from common/net/minecraftforge/event/world/ChunkEvent.java rename to src/main/java/net/minecraftforge/event/world/ChunkEvent.java diff --git a/common/net/minecraftforge/event/world/ChunkWatchEvent.java b/src/main/java/net/minecraftforge/event/world/ChunkWatchEvent.java similarity index 100% rename from common/net/minecraftforge/event/world/ChunkWatchEvent.java rename to src/main/java/net/minecraftforge/event/world/ChunkWatchEvent.java diff --git a/common/net/minecraftforge/event/world/WorldEvent.java b/src/main/java/net/minecraftforge/event/world/WorldEvent.java similarity index 100% rename from common/net/minecraftforge/event/world/WorldEvent.java rename to src/main/java/net/minecraftforge/event/world/WorldEvent.java diff --git a/common/net/minecraftforge/fluids/BlockFluidBase.java b/src/main/java/net/minecraftforge/fluids/BlockFluidBase.java similarity index 100% rename from common/net/minecraftforge/fluids/BlockFluidBase.java rename to src/main/java/net/minecraftforge/fluids/BlockFluidBase.java diff --git a/common/net/minecraftforge/fluids/BlockFluidClassic.java b/src/main/java/net/minecraftforge/fluids/BlockFluidClassic.java similarity index 100% rename from common/net/minecraftforge/fluids/BlockFluidClassic.java rename to src/main/java/net/minecraftforge/fluids/BlockFluidClassic.java diff --git a/common/net/minecraftforge/fluids/BlockFluidFinite.java b/src/main/java/net/minecraftforge/fluids/BlockFluidFinite.java similarity index 100% rename from common/net/minecraftforge/fluids/BlockFluidFinite.java rename to src/main/java/net/minecraftforge/fluids/BlockFluidFinite.java diff --git a/common/net/minecraftforge/fluids/Fluid.java b/src/main/java/net/minecraftforge/fluids/Fluid.java similarity index 100% rename from common/net/minecraftforge/fluids/Fluid.java rename to src/main/java/net/minecraftforge/fluids/Fluid.java diff --git a/common/net/minecraftforge/fluids/FluidContainerRegistry.java b/src/main/java/net/minecraftforge/fluids/FluidContainerRegistry.java similarity index 100% rename from common/net/minecraftforge/fluids/FluidContainerRegistry.java rename to src/main/java/net/minecraftforge/fluids/FluidContainerRegistry.java diff --git a/common/net/minecraftforge/fluids/FluidEvent.java b/src/main/java/net/minecraftforge/fluids/FluidEvent.java similarity index 100% rename from common/net/minecraftforge/fluids/FluidEvent.java rename to src/main/java/net/minecraftforge/fluids/FluidEvent.java diff --git a/common/net/minecraftforge/fluids/FluidIdMapPacket.java b/src/main/java/net/minecraftforge/fluids/FluidIdMapPacket.java similarity index 100% rename from common/net/minecraftforge/fluids/FluidIdMapPacket.java rename to src/main/java/net/minecraftforge/fluids/FluidIdMapPacket.java diff --git a/common/net/minecraftforge/fluids/FluidRegistry.java b/src/main/java/net/minecraftforge/fluids/FluidRegistry.java similarity index 100% rename from common/net/minecraftforge/fluids/FluidRegistry.java rename to src/main/java/net/minecraftforge/fluids/FluidRegistry.java diff --git a/common/net/minecraftforge/fluids/FluidStack.java b/src/main/java/net/minecraftforge/fluids/FluidStack.java similarity index 100% rename from common/net/minecraftforge/fluids/FluidStack.java rename to src/main/java/net/minecraftforge/fluids/FluidStack.java diff --git a/common/net/minecraftforge/fluids/FluidTank.java b/src/main/java/net/minecraftforge/fluids/FluidTank.java similarity index 100% rename from common/net/minecraftforge/fluids/FluidTank.java rename to src/main/java/net/minecraftforge/fluids/FluidTank.java diff --git a/common/net/minecraftforge/fluids/FluidTankInfo.java b/src/main/java/net/minecraftforge/fluids/FluidTankInfo.java similarity index 100% rename from common/net/minecraftforge/fluids/FluidTankInfo.java rename to src/main/java/net/minecraftforge/fluids/FluidTankInfo.java diff --git a/common/net/minecraftforge/fluids/IFluidBlock.java b/src/main/java/net/minecraftforge/fluids/IFluidBlock.java similarity index 100% rename from common/net/minecraftforge/fluids/IFluidBlock.java rename to src/main/java/net/minecraftforge/fluids/IFluidBlock.java diff --git a/common/net/minecraftforge/fluids/IFluidContainerItem.java b/src/main/java/net/minecraftforge/fluids/IFluidContainerItem.java similarity index 100% rename from common/net/minecraftforge/fluids/IFluidContainerItem.java rename to src/main/java/net/minecraftforge/fluids/IFluidContainerItem.java diff --git a/common/net/minecraftforge/fluids/IFluidHandler.java b/src/main/java/net/minecraftforge/fluids/IFluidHandler.java similarity index 100% rename from common/net/minecraftforge/fluids/IFluidHandler.java rename to src/main/java/net/minecraftforge/fluids/IFluidHandler.java diff --git a/common/net/minecraftforge/fluids/IFluidTank.java b/src/main/java/net/minecraftforge/fluids/IFluidTank.java similarity index 100% rename from common/net/minecraftforge/fluids/IFluidTank.java rename to src/main/java/net/minecraftforge/fluids/IFluidTank.java diff --git a/common/net/minecraftforge/fluids/ItemFluidContainer.java b/src/main/java/net/minecraftforge/fluids/ItemFluidContainer.java similarity index 100% rename from common/net/minecraftforge/fluids/ItemFluidContainer.java rename to src/main/java/net/minecraftforge/fluids/ItemFluidContainer.java diff --git a/common/net/minecraftforge/fluids/RenderBlockFluid.java b/src/main/java/net/minecraftforge/fluids/RenderBlockFluid.java similarity index 100% rename from common/net/minecraftforge/fluids/RenderBlockFluid.java rename to src/main/java/net/minecraftforge/fluids/RenderBlockFluid.java diff --git a/common/net/minecraftforge/fluids/TileFluidHandler.java b/src/main/java/net/minecraftforge/fluids/TileFluidHandler.java similarity index 100% rename from common/net/minecraftforge/fluids/TileFluidHandler.java rename to src/main/java/net/minecraftforge/fluids/TileFluidHandler.java diff --git a/common/net/minecraftforge/liquids/IBlockLiquid.java b/src/main/java/net/minecraftforge/liquids/IBlockLiquid.java similarity index 100% rename from common/net/minecraftforge/liquids/IBlockLiquid.java rename to src/main/java/net/minecraftforge/liquids/IBlockLiquid.java diff --git a/common/net/minecraftforge/liquids/ILiquid.java b/src/main/java/net/minecraftforge/liquids/ILiquid.java similarity index 100% rename from common/net/minecraftforge/liquids/ILiquid.java rename to src/main/java/net/minecraftforge/liquids/ILiquid.java diff --git a/common/net/minecraftforge/liquids/ILiquidTank.java b/src/main/java/net/minecraftforge/liquids/ILiquidTank.java similarity index 100% rename from common/net/minecraftforge/liquids/ILiquidTank.java rename to src/main/java/net/minecraftforge/liquids/ILiquidTank.java diff --git a/common/net/minecraftforge/liquids/ITankContainer.java b/src/main/java/net/minecraftforge/liquids/ITankContainer.java similarity index 100% rename from common/net/minecraftforge/liquids/ITankContainer.java rename to src/main/java/net/minecraftforge/liquids/ITankContainer.java diff --git a/common/net/minecraftforge/liquids/LiquidContainerData.java b/src/main/java/net/minecraftforge/liquids/LiquidContainerData.java similarity index 100% rename from common/net/minecraftforge/liquids/LiquidContainerData.java rename to src/main/java/net/minecraftforge/liquids/LiquidContainerData.java diff --git a/common/net/minecraftforge/liquids/LiquidContainerRegistry.java b/src/main/java/net/minecraftforge/liquids/LiquidContainerRegistry.java similarity index 100% rename from common/net/minecraftforge/liquids/LiquidContainerRegistry.java rename to src/main/java/net/minecraftforge/liquids/LiquidContainerRegistry.java diff --git a/common/net/minecraftforge/liquids/LiquidDictionary.java b/src/main/java/net/minecraftforge/liquids/LiquidDictionary.java similarity index 100% rename from common/net/minecraftforge/liquids/LiquidDictionary.java rename to src/main/java/net/minecraftforge/liquids/LiquidDictionary.java diff --git a/common/net/minecraftforge/liquids/LiquidEvent.java b/src/main/java/net/minecraftforge/liquids/LiquidEvent.java similarity index 100% rename from common/net/minecraftforge/liquids/LiquidEvent.java rename to src/main/java/net/minecraftforge/liquids/LiquidEvent.java diff --git a/common/net/minecraftforge/liquids/LiquidStack.java b/src/main/java/net/minecraftforge/liquids/LiquidStack.java similarity index 100% rename from common/net/minecraftforge/liquids/LiquidStack.java rename to src/main/java/net/minecraftforge/liquids/LiquidStack.java diff --git a/common/net/minecraftforge/liquids/LiquidTank.java b/src/main/java/net/minecraftforge/liquids/LiquidTank.java similarity index 100% rename from common/net/minecraftforge/liquids/LiquidTank.java rename to src/main/java/net/minecraftforge/liquids/LiquidTank.java diff --git a/common/net/minecraftforge/oredict/OreDictionary.java b/src/main/java/net/minecraftforge/oredict/OreDictionary.java similarity index 100% rename from common/net/minecraftforge/oredict/OreDictionary.java rename to src/main/java/net/minecraftforge/oredict/OreDictionary.java diff --git a/common/net/minecraftforge/oredict/RecipeSorter.java b/src/main/java/net/minecraftforge/oredict/RecipeSorter.java similarity index 100% rename from common/net/minecraftforge/oredict/RecipeSorter.java rename to src/main/java/net/minecraftforge/oredict/RecipeSorter.java diff --git a/common/net/minecraftforge/oredict/ShapedOreRecipe.java b/src/main/java/net/minecraftforge/oredict/ShapedOreRecipe.java similarity index 100% rename from common/net/minecraftforge/oredict/ShapedOreRecipe.java rename to src/main/java/net/minecraftforge/oredict/ShapedOreRecipe.java diff --git a/common/net/minecraftforge/oredict/ShapelessOreRecipe.java b/src/main/java/net/minecraftforge/oredict/ShapelessOreRecipe.java similarity index 100% rename from common/net/minecraftforge/oredict/ShapelessOreRecipe.java rename to src/main/java/net/minecraftforge/oredict/ShapelessOreRecipe.java diff --git a/common/net/minecraftforge/server/ForgeTimeTracker.java b/src/main/java/net/minecraftforge/server/ForgeTimeTracker.java similarity index 100% rename from common/net/minecraftforge/server/ForgeTimeTracker.java rename to src/main/java/net/minecraftforge/server/ForgeTimeTracker.java diff --git a/common/net/minecraftforge/server/command/ForgeCommand.java b/src/main/java/net/minecraftforge/server/command/ForgeCommand.java similarity index 100% rename from common/net/minecraftforge/server/command/ForgeCommand.java rename to src/main/java/net/minecraftforge/server/command/ForgeCommand.java diff --git a/common/net/minecraftforge/transformers/EventTransformer.java b/src/main/java/net/minecraftforge/transformers/EventTransformer.java similarity index 100% rename from common/net/minecraftforge/transformers/EventTransformer.java rename to src/main/java/net/minecraftforge/transformers/EventTransformer.java diff --git a/common/net/minecraftforge/transformers/ForgeAccessTransformer.java b/src/main/java/net/minecraftforge/transformers/ForgeAccessTransformer.java similarity index 100% rename from common/net/minecraftforge/transformers/ForgeAccessTransformer.java rename to src/main/java/net/minecraftforge/transformers/ForgeAccessTransformer.java diff --git a/client/paulscode/sound/codecs/CodecIBXM.java b/src/main/java/paulscode/sound/codecs/CodecIBXM.java similarity index 100% rename from client/paulscode/sound/codecs/CodecIBXM.java rename to src/main/java/paulscode/sound/codecs/CodecIBXM.java diff --git a/common/assets/forge/lang/en_US.lang b/src/main/resources/assets/forge/lang/en_US.lang similarity index 100% rename from common/assets/forge/lang/en_US.lang rename to src/main/resources/assets/forge/lang/en_US.lang diff --git a/common/assets/forge/lang/es_ES.lang b/src/main/resources/assets/forge/lang/es_ES.lang similarity index 100% rename from common/assets/forge/lang/es_ES.lang rename to src/main/resources/assets/forge/lang/es_ES.lang diff --git a/common/assets/forge/lang/fr_FR.lang b/src/main/resources/assets/forge/lang/fr_FR.lang similarity index 100% rename from common/assets/forge/lang/fr_FR.lang rename to src/main/resources/assets/forge/lang/fr_FR.lang diff --git a/common/forge_at.cfg b/src/main/resources/forge_at.cfg similarity index 100% rename from common/forge_at.cfg rename to src/main/resources/forge_at.cfg diff --git a/client/forge_logo.png b/src/main/resources/forge_logo.png similarity index 100% rename from client/forge_logo.png rename to src/main/resources/forge_logo.png From 743d10d50ec361480d437566a3d48eae873d68b9 Mon Sep 17 00:00:00 2001 From: AbrarSyed Date: Sat, 9 Nov 2013 21:48:53 -0600 Subject: [PATCH 04/11] Step 3: The Rebirth --- ...-Credits.txt => MinecraftForge-Credits.txt | 0 ...-License.txt => MinecraftForge-License.txt | 0 ....txt => Paulscode IBXM Library License.txt | 0 ...aulscode SoundSystem CodecIBXM License.txt | 0 .../README-MinecraftForge.txt => README.txt | 0 build.gradle | 111 ++++++++++++ eclipse-workspace-dev.zip | Bin 24494 -> 21756 bytes fml | 2 +- gradlew | 164 ++++++++++++++++++ gradlew.bat | 90 ++++++++++ settings.gradle | 2 + 11 files changed, 368 insertions(+), 1 deletion(-) rename install/MinecraftForge-Credits.txt => MinecraftForge-Credits.txt (100%) rename install/MinecraftForge-License.txt => MinecraftForge-License.txt (100%) rename install/Paulscode IBXM Library License.txt => Paulscode IBXM Library License.txt (100%) rename install/Paulscode SoundSystem CodecIBXM License.txt => Paulscode SoundSystem CodecIBXM License.txt (100%) rename install/README-MinecraftForge.txt => README.txt (100%) create mode 100644 build.gradle create mode 100644 gradlew create mode 100644 gradlew.bat create mode 100644 settings.gradle diff --git a/install/MinecraftForge-Credits.txt b/MinecraftForge-Credits.txt similarity index 100% rename from install/MinecraftForge-Credits.txt rename to MinecraftForge-Credits.txt diff --git a/install/MinecraftForge-License.txt b/MinecraftForge-License.txt similarity index 100% rename from install/MinecraftForge-License.txt rename to MinecraftForge-License.txt diff --git a/install/Paulscode IBXM Library License.txt b/Paulscode IBXM Library License.txt similarity index 100% rename from install/Paulscode IBXM Library License.txt rename to Paulscode IBXM Library License.txt diff --git a/install/Paulscode SoundSystem CodecIBXM License.txt b/Paulscode SoundSystem CodecIBXM License.txt similarity index 100% rename from install/Paulscode SoundSystem CodecIBXM License.txt rename to Paulscode SoundSystem CodecIBXM License.txt diff --git a/install/README-MinecraftForge.txt b/README.txt similarity index 100% rename from install/README-MinecraftForge.txt rename to README.txt diff --git a/build.gradle b/build.gradle new file mode 100644 index 000000000..08597f6a0 --- /dev/null +++ b/build.gradle @@ -0,0 +1,111 @@ +buildscript { + repositories { + mavenCentral() + mavenLocal() + maven { + name = "forge" + url = "http://files.minecraftforge.net/maven" + } + } + dependencies { + classpath 'net.minecraftforge.gradle:ForgeGradle:1.0-SNAPSHOT' + } +} + +import static net.minecraftforge.gradle.dev.FmlDevPlugin.* + +apply plugin: 'maven' +apply plugin: 'forgedev' + +repositories { + flatDir { + name "fileRepo" + dirs "repo" + } +} + +minecraft { + version = '1.6.4' + mcpVersion = '8.11' + fmlDir = projectDir.getAbsolutePath() + "/fml"; + mainClass = 'cpw.mods.fml.relauncher.ServerLaunchWrapper' + installerVersion = "1.4" +} + +group = 'net.minecraftforge' +version = "1.0.0.1" + +jenkins { + job = 'minecraftforge' +} + +uploadArchives { + repositories { + if (project.hasProperty("filesmaven")) { + logger.info('Publishing to files server') + + mavenDeployer { + configuration = configurations.deployerJars + + repository(url: project.filesmaven.url) { + authentication(userName: project.filesmaven.username, privateKey: project.filesmaven.key) + } + + pom { + groupId = project.group + version = project.version + artifactId = project.archivesBaseName + project { + name project.archivesBaseName + packaging 'jar' + description 'Minecraft Forge API' + url 'https://github.com/MinecraftForge/MinecraftForge' + + scm { + url 'https://github.com/MinecraftForge/MinecraftForge' + connection 'scm:git:git://github.com/MinecraftForge/MinecraftForge.git' + developerConnection 'scm:git:git@github.com:MinecraftForge/MinecraftForge.git' + } + + issueManagement { + system 'github' + url 'https://github.com/MinecraftForge/MinecraftForge/issues' + } + + licenses { + license { + name 'Forge Public License' + url 'https://raw.github.com/MinecraftForge/MinecraftForge/master/MinecraftForge-License.txt' + distribution 'repo' + } + } + + developers { + developer { + id 'cpw' + name 'cpw' + roles { role 'developer' } + } + developer { + id 'LexManos' + name 'Lex Manos' + roles { role 'developer' } + } + developer { + id 'AbrarSyed' + name 'Abrar Syed' + roles { role 'contributor' } + } + } + } + } + } + } else { + logger.info('Publishing to repo folder') + + mavenDeployer { + repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath()) + } + } + } +} diff --git a/eclipse-workspace-dev.zip b/eclipse-workspace-dev.zip index a8b149e4d4eea5f415ec664a1c1535aece7624e5..d5cbc97741eecfec7d7d54063e886f3f2e433cc0 100644 GIT binary patch delta 5505 zcma)=2|QHY8^TaBod{RwPMh2iS(j3 z71djoilSa`uNI|0ssFiiU316u@BQD;=gx2LJ?DJybIxYZ9Uf|vua3TsiYy~?L z#Njx>Fl0d9r{!+f0MFOug&-HKoZ%(FG$)$yAQg;LHC4kv!DesO_uHH&Zh!~R<%6JAXnR9gP(zC0-nX$wmsGFx zH#tS-I@2RVPk58pp~3ZU|7tP5_c%aymDd_d^((uWhq_<>@yzcIn%H`zpG-bnU)UV4 zt*xZVW8^4*;T1ITMwC~rRP&0K;Fbda#9>JphY-t@tO%%hZ;rXy?kkdKkBpgl#I$wL zq(|xr*US4-9#YnNynm)!qsh=(?zr4kl|&iHi?DThvbXDtbVSpYs-)UH9l4Iiymu2C z{C-qQk-Y&)&~A>{Cu$yjc!SJqyUeNlIGH0g+XanQQk?|F`Bmmz{LRSc{XVrkgJcTx z%0QMY{n$LEnn=UaP3NjI?oE_@5lq|G3dbZ0|t|c+^@K7|hZ9Vz)Fd63GIVP4+(5GK5&aWqM ze|wsyr%X*nil3|JqQsQgwHF3XM3}damF~T8Mz+Xw@$Vzl)r4>r$Dy4Y;CxvYCO4`q_nmlse zNH;F4-Mnk;NrHZR>R@+b;ko#e-8r^}`d_{s^#37+?N~&}4mjEOjp7!2;N*TV@i8Ye z=#I+np)uP+W3(fJSZ$gUN1kZt*aZLNl3``yD=JTdY5u$r|pw& z?}IrNvQ}ah)W?^-ay~uVdwK6WJxXe#e~_Bt3vcto&AX4K42Ea%1<#v&+x4}PxbKnQ zW_segotb+Gb3Jtda8})E6wiqmC9{63{@o?`{ zXB1<3TC>5np5g98JJJShM>8lUZA~Q)EX_ma%a5*IH(&loYpeQNm6)Wp`74`sZ4J!n zaB?{FTiTW`jYP#mip=lI(cK!k>sV zp!rWVjQ2M#FB8_R9UzoYO{c~`-8pbJeQmsTrB_jeXxw*`E!UrUhr2JlceZ4S4P$(t zwN7?`gxwz{rsw759@Ua6ruh8yg8g6ROLeqHUmChzZ{L(dKXBYgf#RCi8n*1fFq2=l zHBm0~$M8v7MgG$yvF!BWMwN?AA66L7bEu+r6QimI#J#Pe*S~3hIlr#*ble|e;t!(D zrN4@P|YVn7SlypcRNzPI>e0ng6-_=DLZtf!O-Oq}%3f4Q6h%M2xyvFc&SRd3h7etK?#2}X zfrfmQsyj9)bg6={0_hX}4ZZId?WQtn@S|V(HeE{9&IZ%Yu8a z-Cx!mmYp0V)Z=c?!z^oYlxOP~%tLfRT|Fm&&FW`{ED$e%Qh3?o?-_5xvMDYP7S| zmvQX%fqo_Oj<)drOOGuDt25H$tEw{68`cd5vQ|!3>r~0f*TKh%Z5~{kOxpq*?|Lg% z_|Zw{bGPwH#ays*LXUa53tSB>c6M*G-e8{dpn)+n;M{L}4RpXMaN81bX%J0NYFEZc z17~RQLl6xsoA6!0G}b2nk8mPdXQ}kA1D2o5ONZzp5JU$)T!yra*3n{)>V$}_NtqSi z34l`Th|u6D9c&_S+lADjZH@^GovA~FZu^;8H%F1b^Me&1DGouBpbj(FN|_)XJ#1By zUDQMcGe{Ri5}*uXcCT{e<$9STO<+@7`S~CUIKSdm?lW+`5wt>H^2p=h1wtz>aA#rVJCYIAUX0e3o7o=Y=XWzNE3dhYeVn`z8} zE5>lsAvHYdAgcbK5;GPS(>hV~dX|;2ql-M>BquM?@dlF_7o*F;Ms$)AhQst{cGcq>Hqhm1a^vW;F~vHEHvWHXkpnYr#ug;h zU+<)(gyArqZHv=tdA=leLwTBG1nM(PG2gKp{wy)TrY$liU2L307QX-tJCn>X8m4R- z_u|x=8DV4*Yy&|q=#>^M>mo`k(6L~79@E1_^!isgBMw|6iZg;s0Zt{{l7+(*!?JNi zmj5}E6ntMvU?T(8p(%^ItDITmF4Q7SXQMdt89b^VLxJoDHYXBc0WXr-{j(?z)7d!A z><5pF6`Z!L&`r+QJA7A_M+oV z>F_8^aKV}Y-#rz~uz7?j+am5+uE{YipCA~J2EqruMAfMos5P?{j{`{}jI3QH3acR% zmhl#)z5U9U(*j-#m|_5SLn6eTK;pX-jp7X9^WF-yp$dH%!L1Xyt&Ql)I@B&ajyqMs z<1*D*)*15B9pMolIoddrUVxCSZnm(9nBs}t(KnvBViAkzPWwkHtOh}O_Mt{$ibrwB ze|VI|VipRC24!iCsICSC7s_YF+7d8jHXK$AAem8A zP&B4&TZzyct{@VRlm?&j;DmsMzd&$1T9Tu;TP*>$SYmn`cGeE^# ka~hy#g{$*nNjE_?42h|W13wZ;13Oe974Y@6nH4Gh7fSBOMgRZ+ delta 8388 zcma)B2|QG77awCAyKGsqWXqBzWG%a~%Q9J0*%GqEWRhh7T7 z;s4(-p!D)MY^~cc}MT~71uc$E?Gl9W+C>RA3riC=$|}f8my=!CM`}Zv>4nqy?L z@qo(tut{WkgXID-w=;_np{+4vgYLeXySbyym3FY%TS>{yNIWs$!iMj>RL^u?Y}1u9 ztP_>jPk-b-F7zZWE1}K$i>!kaW?`U@!KrKW#p+_6fag8eKF-oI)_ZKZUaa=x`{+PL z6(;%Ika8{?W*_?{>Tldm`9hBtuVQbsI08D6x)CI;(YikF) zR&T<9Z3UJQ`~bC5L@Pi1|Cb`GE$i|A5Pc<`)1f@{eFlXf_}e&5dw! z2c=b&zt@dH1>)oN)I>#7%)u(pp+=$fVX9T%&}XR-U@9;Ta0wDX3I{#VM1x#{Hd1i| z%ra?z@uG2#_MqAx@Y#!07X%v6tUwH{H)-Y52^Wq@fnF-2Q7FgtbbnjXRTUSmzMe-aDT$RG{n2lt;qNF+95B%^5_&Bdo0u(JofE%K*B)u;G%i87O z=S<+T)`Ee0(f}YwY|T+v2O0yr*B3kXXf^F&b{ zWJPiblTJ$v>U;DD{f8sTH*!HI2fzxkMB=goQC954Lg3x50Y&!5@3u@5D@yM@k{nR6 zG;t3JKcIFlDA2F6; z6%CEqgIe&?xa~0si(7xPMjydt;Cx$*t$mJupBawxFm-8JZgDO%e8K;DkuVgRbfc?C zKijn1k(gX=9`{xDo={qrO_-IMiZ8#k<2*yC`-A#c4Y6}&!~35R3^LLb1{k;btDEI- zHMe3)Yxid2*kZ&p(l~k#dnLO+nkA!btf}%N?!BMy)^qMY#Ty3QTLjBberWH?Xr4dh zVsP=4z@{q-%@#w-txURi2~E`P^M}VAoW3&>er8=H&Q)Hciwd+DaIq@NVT-{1xR>8R zQ2E5=idQ(zruek=kj0f-r(2JvO7=#)6`;G{d?1=Vl3H)5I=kG%w2Zd2|B7=aPnqwy zF|N;fr^&JNRkNb+GJ`{;y23cdjMB#nyvM8Gi`3~TREJ7)UFXHfPh6b-G}DI{?w8kW z{Wz7lc*)e_am)CLqqBTg_y=F{wTMyhIXFUuv-zQeKPd~RMQ45IWl=m_=R7N(jnAqY1fsAzY6j= zX;002MGRBxUeA7QQ}73KPig)ZtaY7~ zy(PWD+xGdn{0ZWNyg0KPaRmo(m%3S!K07nMjEX5cUm+jdaoTHG-EqcsU*S+&k)ee^ za+;LoaBud*nf@5&;T=ggb!M!@>^r_RoqGBxWGJ<7=w}vxLZKtSFHMc(;W*hmb!Gg> zH1)vCuKH2BxKA!RoIjbrquHkfgV<&~2K&AE8}AD?j2wt8B|g3MPOJCFIlyOv`f_^Y zRPlu1oTky(B-01#L|Y{RKC8DTLVEUgN+U@ci7KlFw<;&VR>|RF8t=% zLjr=H--*~|tD<4!MZErwzY_O^TI~y{d0pyn$=A6=yL4>t#GR{_VPOf{M7Gs@1}P2e z%jRiYSc1FsBX~ltlTU8I%$kK*n5MT2y^a0kl;m=pNrd}JYm6EB6wgdX5BToOvxtsnD3=>D`a0dvGefMfPCO&z z+H381-|58(8QvOse8;rYxQOF}AL(h$rCSy4=z??-hl_J0x(}*bIot5Wjn8~)JzbzY zu;0>XJTfKO8#Nxn(B4%iW)awGHgc}rA%^$W0@?t(e-X9!`ou%)vin0P3GuDT=2q=X zo&K6h`N{!)W6w)<+CCUgo#hKBKKYv4qep-9Y!ace@@!J0$M8OPvEXR;Z02wq*=G+_ zER(Oi_@eN@^3)S^!gTuWJMmXpf$`L^nM#`jKHI%ge(gT?>i1L(|3Vn=+s?w-seMoe zkoOWr*p8C_`yKeES zq5>6p5xVjohulI!g52;2Z#%dKzEeQrv)4Vm9g&WA6u zzO&m^7%}ipSmX0D^#9L>^fy;ze`5YgNN}F-zlKg zT`z=B`?zKUAFHH;&eWr&i97dG4(U8D^m4Y179*-Y^T?iganWKpwNUAb=3g@&ciVaE z@_v?|wr$<^@ z@5hPN zU^z0Jh@MBY7^>aorw_j|9-7LInYXLHeA2p5Jikt{qL%lt<$0-{Bd2Iwh0BMES+6ke zC?1OGxcuT$YOHz2Po?N1^!bwcwmtMuCWUZ6HtliVn&w!Xcz@aYG@&!*EmLIiXRY*z z)O08QHruNcpLR`%Tx(jQElJ+pPou7Wsr@Hs0;6ylap}O^K78kXHFuYSPCR|_v6_BM zH`D_!lcbZkx3eghjY`D}EqO?|{T|N=aBFqbvU`0<_lt(>nTMML+cJ+{SG(pW{i_9uDvks}M*xHn{YgYntYBU|}_# z^T}mVk2Z1p%bEe**+YB#c{U|~Xx6xGKjRZ{;c%27@sml`&6);>@_>c>?i>Y22Nd}%(&bvzGUBUrF(|Vma zt7B*4(dkN5xHO+idNJ>B%ZZvkTTZH~I&kjdQ_wAsW$_JjZ3q1NXKlj^mDelc^>&jZsvOg6b#XxKgAe(oUW!tq2` z?R!K(=HR2so6E$)plMd_ms{F?Z%~g&(*6A<7kyHwzhywJVv4PP$zSZuIpv!r&$Wts z>>TE2=yKlV5xXZY`(23j*YuD~ac#FOjC<45+jr(rySH(#e&EJJpJR4sKopm^T0&KnVo!Z_Y-ln{n)H}EtB@~`il?n zT{t7@X9Qe%PKHoo^%Bz}EmTg(#`viE0z>aLvc%?2FU-}v>K3}j9;o|`5 zc&7>g@-Py_jFdJrgKg}m<|EG>UkI{2wDII2F4~0C`ww3R7RPv>B$?VyPg>@>s=Z-u zRuuj{@_yE?zmiVX|H3Q5(1qsVhnMy>SRK-0sEiI(^_n(x)Wz^$xUARzNTfxw=jjdM z#-boW2LGR)g2i%lvgn%o{l`6ut~SO*rDJ?U6=Nf8Ze1ZpXzo5|vX`+zn8vS|Z*-^c zh$mBup7)?(WU&41Y-&xq5Z5rad7CBXG)t}m#z(bZCtOk|T?gYv9ZiQ{B!|Si+kM+J z@=`xc8Pg(P?L=o&pvRl{msa=J*`5)de~#d4tCROqzy=0;!+D<;u-7#Q2rkotvyT6o zURSlODMBp(ZtvoZEB95vs49YUBYb;TZPT_uBStZJ#(-2^0n$u&b?3(m>*c1ZQJ0+x z(VQ_TaWIdh7du(}J$N#rL{@%71vcf*Ph5HEh7Kx7W(6_D{C@QeJesJ`Iw|yqwtnY%vl>VZ!xPN7a1f6nb$2cAjd#}IUfnK z0eEH1Y!x9v-dm7Ff{-b5N=gsD+}}uOGQoGugdYpRL2`B3WLQe}4-VT6a`UiCCDVH# z7YOj1Zu(bPN}do78wj542-s@VZP-a=a`Yex_w*-%PJ~0cfMvV}a)n$3j+k*_mz>G4 zkc7i}A&5sftRr}^uYr{YxXu3zNooU>G$kBzANYm>l1y5%0CgZNYYf>_NWwiO!BVoC za9Di_1nka#fLq=1l;kHI&J*lb6kc{&X#4{lsrMldX(fvNgWdvz`#)hyvEvgh$XfuC z?IUa3E7Anzfntj^L3s@3gpf@@5@}*RLKYsBQltqIJ-f-OtoAzVF+vB`S_w}diR-0g z1>w*&(ue?w0?Afj-~A8JNP-Fu{ZJMGO`@y#tVHXjW~Tn=H8SRk6lsl;qkxv8NGTL& zNM6fan^Fu4$NOE0zNieSO^A^t1(7;OL>T!E5N)Z^EG^kdkqp6gF+HNa4&O^ zuq=SK0t*mq%SD9XAo(Y6St(*`s \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >&- +APP_HOME="`pwd -P`" +cd "$SAVED" >&- + +CLASSPATH=$APP_HOME/fml/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 000000000..da93d4c83 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\fml\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 000000000..1a54725c3 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,2 @@ +rootProject.name = 'forge' +include ':fml' \ No newline at end of file From cdbdd0d6fb278464fd1cf21f7bbd394fd708132d Mon Sep 17 00:00:00 2001 From: AbrarSyed Date: Sun, 10 Nov 2013 00:54:57 -0600 Subject: [PATCH 05/11] fixed versioning and stuff --- build.gradle | 4 ++-- settings.gradle | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 08597f6a0..ef029e4da 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,7 @@ buildscript { } } -import static net.minecraftforge.gradle.dev.FmlDevPlugin.* +import static net.minecraftforge.gradle.dev.ForgeDevPlugin.* apply plugin: 'maven' apply plugin: 'forgedev' @@ -33,7 +33,7 @@ minecraft { } group = 'net.minecraftforge' -version = "1.0.0.1" +version = getVersionFromJava(getProject(), 'src/main/java/net/minecraftforge/common/ForgeVersion.java') jenkins { job = 'minecraftforge' diff --git a/settings.gradle b/settings.gradle index 1a54725c3..74046b5b8 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,2 +1 @@ -rootProject.name = 'forge' -include ':fml' \ No newline at end of file +rootProject.name = 'forge' \ No newline at end of file From f5335d59cc80efc9b0585bc3fcbbbedb96d96ba3 Mon Sep 17 00:00:00 2001 From: AbrarSyed Date: Thu, 14 Nov 2013 20:22:31 -0600 Subject: [PATCH 06/11] added buildSrc to the gitIgnore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 788849df8..9fe63e96f 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ #occupational hazards /eclipse/ /repo/ +/buildSrc From e9af710cf4652d3935570b154450761597df84c4 Mon Sep 17 00:00:00 2001 From: Lex Manos Date: Sun, 17 Nov 2013 12:01:31 -0800 Subject: [PATCH 07/11] Fix for new FML, and publish to maven local --- build.gradle | 2 ++ .../net/minecraftforge/classloading/FMLForgePlugin.java | 6 ------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index ef029e4da..97d46cc11 100644 --- a/build.gradle +++ b/build.gradle @@ -18,6 +18,7 @@ apply plugin: 'maven' apply plugin: 'forgedev' repositories { + mavenLocal() flatDir { name "fileRepo" dirs "repo" @@ -103,6 +104,7 @@ uploadArchives { } else { logger.info('Publishing to repo folder') + add project.repositories.mavenLocal() mavenDeployer { repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath()) } diff --git a/src/main/java/net/minecraftforge/classloading/FMLForgePlugin.java b/src/main/java/net/minecraftforge/classloading/FMLForgePlugin.java index c6a4a84e7..ac5d36732 100644 --- a/src/main/java/net/minecraftforge/classloading/FMLForgePlugin.java +++ b/src/main/java/net/minecraftforge/classloading/FMLForgePlugin.java @@ -10,12 +10,6 @@ public class FMLForgePlugin implements IFMLLoadingPlugin public static boolean RUNTIME_DEOBF = false; public static File forgeLocation; - @Override - public String[] getLibraryRequestClass() - { - return null; - } - @Override public String[] getASMTransformerClass() { From 34f4b58f693e9f71d7d6dc2cf890fccb64664c29 Mon Sep 17 00:00:00 2001 From: Lex Manos Date: Mon, 18 Nov 2013 16:19:31 -0800 Subject: [PATCH 08/11] Update run configs. --- eclipse-workspace-dev.zip | Bin 21756 -> 20165 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/eclipse-workspace-dev.zip b/eclipse-workspace-dev.zip index d5cbc97741eecfec7d7d54063e886f3f2e433cc0..e0e11b970fa2d888028ca3b33476263b112ec4f8 100644 GIT binary patch delta 848 zcmeyflJV$V#tqe~%X7NyAr zx@?mhG?nXv@8;by5ZO0>OZkR1ndKX2XU@`EyQWLQU>DmWfoq`Tu<-4H=~)4^tu%OUoUu=)K;F_sZ&)jk8f`=M~|wJx|8R% z=AeV8qJ{LbGf8GgEc(c$msw#h!Nxb)#bddhRzt@i?tYwpU66PWKHqJBA0$R%<@ z&$B=a&ve~|&t)gG)_h^En0MD`(>v}Yo&{IMrfQjIL~?Ckv?=5h$IBx;i(i-6pZc=0 zY2Bf^S*)3}wnWV`nZxq^duXPDk4e_IgNl=H1x7Oo=|fn& zlkN0*Cl>|zF>afDFesey)?~?G^GWVPVgd{*z>om}0U-Wo#lYZ}Uz9%ijJw3-pb#e} g9qY+^9dsst^%0qTEkuG(i9v}WQHX)T&jzFe0DNm_jQ{`u delta 2421 zcmZuyc|6oxAO6jdcaSZz%f5}JFof)ih8f15P$XMf#uhagODId0ACuRRJ!2@Kkk*O z8cSku;mK}t67yTQACV{VIxw!n-IVguT72)6fAm={(ZnF3wBEIy0q@0y&7w@#?$o2_ z*<5ek5t~g~HX;Q9eB*MO2_4#%EO7EX0|}wC`}t$v?b6gsVa7G~#lD9__fBD3Cmg(O zB!)^!N~WLj@y5rqFK{3SNjl|1f@5T!>Rm=B6*rfKJg(=xf%S{6ZDyT!(YJFngr%)= zd%d)7(;5#6^j;VA*r(;2ROgMyuw|#xIwb2l*LBr-%^MJ}VEzsB><&hOo=g36e3Y7^ z&_Oo#(LjCfFNZgvoNFRjj*qyhaX&$Pmq^s2XJj?L|K1GW%Pj)vv%)Zw6}d)Q5&5Kj z=I$!%JVT1Lst_pmOj7lN)H;F~mSFgy#Zl}u-jK6dseGlV^mnLzfK?f5vVHcZWF@@j zg0${{+{1ybvMFJfkYgN;I{m6I8k#1t=~H8gHPf&jGp1PLJ8_-uUDcjRzSzp0V6p6L85n2HRW6r?H0{{RF@TNcLRRtmk z9tQL{=^1zXi|ieuKc^o%0C3U+Oag+uJdP{7`?>`OW8Ff$$qp`-lP7p0-<0kq!q+H7 zjGjy?jIc)2}yc4g%d6au8Uknl+%VQmIiV( zoS&%;_qo({UnWT?Q`Oc!FR|o@<7qQ(5qfNg)MZMxxbiF&(vVer`LfC-YQsw-E1Dk$ zTB(`wxfV61g1Y#!kb#l-SyUAEmYI$8jL;FI&q1)14n-avwZpO*J+X_b5jRomgR?;q z>mQ?DwYRkkrw`Jan^5L(>=T*mDZy>R&k)DX!zC+A^utQd^gdg>bq<(%#ZHkCr~AOgx|9)!m9WZweg=iENII)4m1A*2M;Eg6Y8R<#JsUKl(x>yIv!x7tac_BWrJka_sF%l4#bQfX@lrzYE# z`zkg&g;(D?3i~zStseM74?DOOcTEX~23Kym)p_1}uK3%SQZ!P_SsRv@u+Jr^LgtuQ zEt@CX1{f|YyeDWtTMe%x7XGq?q!sNEt|%1RE!C+~P?!F4e5*0Y^*-CLb52e#-}CMmI7%;r0n8O1QY;HFarQx zJ3oYj4GOs8;T|$bn4!ytv#+4Am$RPz_^#%?Vbk~`|nhbd1grzTROznqquxYHIq(G25= zwUts68$Wth!aKL3bFQ;In#$i5C2^lq%x{GsInN)?%S5WTtw-IRFbVa_v*DdCGsvvF`OD3A7H`!sV5mNQGR_}o95?ESKV`r#vNnW4o)Yty z|Chvv%ZVOvL+kXuncLw;fsXEy4gyuJGC3GR%sF;~RdSit61k;~R?svQQ8&htp7iJu z3|{mmJVkBec~;{mf<~l;i(rfpO|c|0P6>D(K-AU}W()LHSw@`zG0tNltcr3ZlY8w2 ztdwij)%)^)Mi|87dziQNpskazP0KBKdX>^C{0@||Yti`FKe@Q)n4{ghRlDVes_pA> zL!PhouaYgZ2Zprs-TO202kgprTwYN9&JY$GOMGextZ4#Mmo>FeutSdH{Snc`$47$qtUmf=m_fTi*w2WQglrmj000yRs5a<1D(t*A!?wCxdM1s z=@__aZUL=SKG?H7&ISgdETEfzuLQwelm#RQM4=rZkHAv&$^UCtKRCqb9JAU#HTcuK zSb&2a0Du7eKudWB8QL}kk(M<1*69!Y^^E_k>z@n=dKqrLpA>(~{8xep)V_KP+&>5o kt^!;|vqOUoz+JQ}w8#LwXmO5Riheng+yKyRc+lK`0B9>c!~g&Q From 0999017fdaf354240323af53d8dfc9324b692cd8 Mon Sep 17 00:00:00 2001 From: Lex Manos Date: Mon, 18 Nov 2013 17:17:22 -0800 Subject: [PATCH 09/11] Updated FML: MinecraftForge/FML@e9a7660cb8961660186c7c23e61ab35f9c2dfb81 updated samples MinecraftForge/FML@30894f7afadf5d3f3c3d5a54c3f904413d5f2309 Merge pull request #307 from AbrarSyed/master MinecraftForge/FML@c4b8a393f90b00ad7ee4992ea4341ffb6d676abb Make the working directory the root of the eclipse workspace. --- fml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fml b/fml index 4d46abf76..c4b8a393f 160000 --- a/fml +++ b/fml @@ -1 +1 @@ -Subproject commit 4d46abf761c681010f338a27978e87cd56c5e32e +Subproject commit c4b8a393f90b00ad7ee4992ea4341ffb6d676abb From 99faaae9f6b374599b91c2ada980d5d9b6d0739f Mon Sep 17 00:00:00 2001 From: Lex Manos Date: Mon, 18 Nov 2013 17:17:45 -0800 Subject: [PATCH 10/11] Regenerate all patches, No functional change as added this is a formatting change only. --- .../net/minecraft/block/Block.java.patch | 16 +- .../block/BlockBaseRailLogic.java.patch | 7 +- .../minecraft/block/BlockButton.java.patch | 4 +- .../minecraft/block/BlockCactus.java.patch | 4 +- .../net/minecraft/block/BlockChest.java.patch | 37 ++-- .../net/minecraft/block/BlockCocoa.java.patch | 7 +- .../block/BlockComparator.java.patch | 4 +- .../net/minecraft/block/BlockCrops.java.patch | 19 +- .../net/minecraft/block/BlockDoor.java.patch | 4 +- .../minecraft/block/BlockFarmland.java.patch | 12 +- .../net/minecraft/block/BlockFire.java.patch | 33 ++-- .../minecraft/block/BlockFlower.java.patch | 4 +- .../minecraft/block/BlockFlowing.java.patch | 4 +- .../net/minecraft/block/BlockFluid.java.patch | 18 +- .../net/minecraft/block/BlockGrass.java.patch | 4 +- .../minecraft/block/BlockLadder.java.patch | 11 +- .../minecraft/block/BlockLeaves.java.patch | 4 +- .../net/minecraft/block/BlockLever.java.patch | 102 ++++------ .../net/minecraft/block/BlockLog.java.patch | 4 +- .../block/BlockMobSpawner.java.patch | 11 +- .../minecraft/block/BlockMushroom.java.patch | 12 +- .../minecraft/block/BlockMycelium.java.patch | 4 +- .../block/BlockNetherStalk.java.patch | 4 +- .../net/minecraft/block/BlockOre.java.patch | 12 +- .../net/minecraft/block/BlockPane.java.patch | 4 +- .../block/BlockPistonBase.java.patch | 4 +- .../minecraft/block/BlockPortal.java.patch | 4 +- .../minecraft/block/BlockPumpkin.java.patch | 4 +- .../minecraft/block/BlockRailBase.java.patch | 4 +- .../block/BlockRedstoneOre.java.patch | 7 +- .../block/BlockRedstoneWire.java.patch | 4 +- .../net/minecraft/block/BlockReed.java.patch | 4 +- .../net/minecraft/block/BlockSand.java.patch | 4 +- .../minecraft/block/BlockSapling.java.patch | 4 +- .../net/minecraft/block/BlockSkull.java.patch | 32 ++-- .../net/minecraft/block/BlockSnow.java.patch | 4 +- .../net/minecraft/block/BlockStem.java.patch | 17 +- .../minecraft/block/BlockTallGrass.java.patch | 4 +- .../net/minecraft/block/BlockTorch.java.patch | 46 ++--- .../minecraft/block/BlockTrapDoor.java.patch | 4 +- .../block/BlockTripWireSource.java.patch | 4 +- .../net/minecraft/block/BlockVine.java.patch | 8 +- .../net/minecraft/client/Minecraft.java.patch | 35 ++-- .../client/audio/SoundManager.java.patch | 4 +- .../entity/EntityOtherPlayerMP.java.patch | 4 +- .../client/entity/EntityPlayerSP.java.patch | 15 +- .../minecraft/client/gui/GuiChat.java.patch | 4 +- .../client/gui/GuiControls.java.patch | 36 ++-- .../client/gui/GuiCreateWorld.java.patch | 4 +- .../minecraft/client/gui/GuiIngame.java.patch | 9 +- .../minecraft/client/gui/GuiSlot.java.patch | 4 +- .../achievement/GuiAchievements.java.patch | 33 ++-- .../gui/inventory/GuiContainer.java.patch | 12 +- .../inventory/GuiContainerCreative.java.patch | 44 ++--- .../client/model/ModelBase.java.patch | 4 +- .../client/model/ModelBox.java.patch | 4 +- .../client/model/ModelRenderer.java.patch | 4 +- .../model/PositionTextureVertex.java.patch | 4 +- .../client/model/TexturedQuad.java.patch | 4 +- .../ChunkProviderClient.java.patch | 4 +- .../multiplayer/NetClientHandler.java.patch | 4 +- .../multiplayer/PlayerControllerMP.java.patch | 9 +- .../client/multiplayer/WorldClient.java.patch | 10 +- .../client/particle/EffectRenderer.java.patch | 19 +- .../particle/EntityDiggingFX.java.patch | 4 +- .../EntityFireworkStarterFX.java.patch | 4 +- .../client/renderer/EntityRenderer.java.patch | 12 +- .../client/renderer/ItemRenderer.java.patch | 26 +-- .../client/renderer/OpenGlHelper.java.patch | 12 +- .../client/renderer/RenderBlocks.java.patch | 4 +- .../client/renderer/RenderGlobal.java.patch | 12 +- .../client/renderer/Tessellator.java.patch | 33 ++-- .../client/renderer/WorldRenderer.java.patch | 4 +- .../renderer/entity/RenderBiped.java.patch | 14 +- .../renderer/entity/RenderItem.java.patch | 48 +++-- .../renderer/entity/RenderManager.java.patch | 9 +- .../renderer/entity/RenderPlayer.java.patch | 14 +- .../renderer/entity/RenderSnowMan.java.patch | 4 +- .../entity/RendererLivingEntity.java.patch | 4 +- .../renderer/texture/Stitcher.java.patch | 4 +- .../texture/TextureAtlasSprite.java.patch | 4 +- .../renderer/texture/TextureMap.java.patch | 4 +- .../TileEntityChestRenderer.java.patch | 4 +- .../command/CommandHandler.java.patch | 4 +- .../CallableSuspiciousClasses.java.patch | 4 +- .../minecraft/crash/CrashReport.java.patch | 4 +- .../crash/CrashReportCategory.java.patch | 4 +- .../creativetab/CreativeTabs.java.patch | 16 +- .../enchantment/Enchantment.java.patch | 4 +- .../enchantment/EnchantmentHelper.java.patch | 4 +- .../net/minecraft/entity/Entity.java.patch | 18 +- .../minecraft/entity/EntityLiving.java.patch | 11 +- .../entity/EntityLivingBase.java.patch | 18 +- .../ai/EntityAIAttackOnCollide.java.patch | 12 +- .../entity/boss/EntityDragon.java.patch | 9 +- .../entity/boss/EntityWither.java.patch | 4 +- .../effect/EntityLightningBolt.java.patch | 4 +- .../entity/item/EntityEnderPearl.java.patch | 4 +- .../entity/item/EntityItem.java.patch | 19 +- .../entity/item/EntityMinecart.java.patch | 65 ++++--- .../item/EntityMinecartContainer.java.patch | 4 +- .../item/EntityMinecartEmpty.java.patch | 4 +- .../item/EntityMinecartFurnace.java.patch | 4 +- .../item/EntityMinecartHopper.java.patch | 4 +- .../entity/monster/EntityEnderman.java.patch | 4 +- .../entity/monster/EntityZombie.java.patch | 7 +- .../entity/passive/EntityMooshroom.java.patch | 11 +- .../entity/passive/EntityOcelot.java.patch | 9 +- .../entity/passive/EntitySheep.java.patch | 4 +- .../entity/passive/EntityVillager.java.patch | 4 +- .../entity/player/EntityPlayer.java.patch | 74 ++++---- .../entity/player/EntityPlayerMP.java.patch | 11 +- .../entity/player/InventoryPlayer.java.patch | 18 +- .../inventory/ContainerEnchantment.java.patch | 12 +- .../inventory/ContainerFurnace.java.patch | 4 +- .../inventory/ContainerRepair.java.patch | 10 +- .../net/minecraft/inventory/Slot.java.patch | 12 +- .../minecraft/inventory/SlotArmor.java.patch | 4 +- .../SlotBrewingStandIngredient.java.patch | 4 +- .../SlotBrewingStandPotion.java.patch | 4 +- .../inventory/SlotCrafting.java.patch | 19 +- .../inventory/SlotFurnace.java.patch | 4 +- .../item/BehaviorDispenseArmor.java.patch | 4 +- .../item/EnumArmorMaterial.java.patch | 12 +- .../net/minecraft/item/EnumRarity.java.patch | 4 +- .../item/EnumToolMaterial.java.patch | 12 +- .../net/minecraft/item/Item.java.patch | 4 +- .../net/minecraft/item/ItemArmor.java.patch | 4 +- .../net/minecraft/item/ItemBlock.java.patch | 9 +- .../net/minecraft/item/ItemBow.java.patch | 12 +- .../net/minecraft/item/ItemBucket.java.patch | 4 +- .../minecraft/item/ItemBucketMilk.java.patch | 4 +- .../net/minecraft/item/ItemDye.java.patch | 20 +- .../item/ItemFlintAndSteel.java.patch | 4 +- .../net/minecraft/item/ItemHoe.java.patch | 4 +- .../item/ItemInWorldManager.java.patch | 134 +++++++------ .../net/minecraft/item/ItemMap.java.patch | 4 +- .../minecraft/item/ItemSeedFood.java.patch | 4 +- .../net/minecraft/item/ItemSeeds.java.patch | 4 +- .../net/minecraft/item/ItemShears.java.patch | 8 +- .../net/minecraft/item/ItemStack.java.patch | 11 +- .../net/minecraft/item/ItemTool.java.patch | 4 +- .../item/crafting/CraftingManager.java.patch | 4 +- .../item/crafting/FurnaceRecipes.java.patch | 4 +- .../item/crafting/RecipeFireworks.java.patch | 10 +- .../net/minecraft/logging/LogAgent.java.patch | 4 +- .../nbt/CompressedStreamTools.java.patch | 4 +- .../net/minecraft/nbt/NBTTagList.java.patch | 4 +- .../network/NetServerHandler.java.patch | 32 ++-- .../packet/Packet51MapChunk.java.patch | 7 +- .../Packet52MultiBlockChange.java.patch | 4 +- .../packet/Packet56MapChunks.java.patch | 15 +- .../minecraft/potion/PotionEffect.java.patch | 22 +-- .../server/MinecraftServer.java.patch | 51 +++-- .../server/gui/StatsComponent.java.patch | 4 +- .../integrated/IntegratedServer.java.patch | 20 +- .../management/PlayerInstance.java.patch | 7 +- .../ServerConfigurationManager.java.patch | 20 +- .../net/minecraft/stats/StatList.java.patch | 9 +- .../tileentity/TileEntity.java.patch | 4 +- .../tileentity/TileEntityBeacon.java.patch | 4 +- .../TileEntityBrewingStand.java.patch | 4 +- .../tileentity/TileEntityFurnace.java.patch | 9 +- .../tileentity/TileEntityHopper.java.patch | 4 +- .../util/MovingObjectPosition.java.patch | 4 +- .../net/minecraft/util/Session.java.patch | 4 +- .../WeightedRandomChestContent.java.patch | 22 ++- .../village/VillageCollection.java.patch | 4 +- .../net/minecraft/world/ChunkCache.java.patch | 4 +- .../net/minecraft/world/Explosion.java.patch | 4 +- .../minecraft/world/IBlockAccess.java.patch | 4 +- .../minecraft/world/SpawnerAnimals.java.patch | 9 +- .../net/minecraft/world/World.java.patch | 178 ++++++++---------- .../minecraft/world/WorldProvider.java.patch | 4 +- .../minecraft/world/WorldServer.java.patch | 38 ++-- .../world/WorldServerMulti.java.patch | 4 +- .../net/minecraft/world/WorldType.java.patch | 4 +- .../world/biome/BiomeDecorator.java.patch | 12 +- .../world/biome/BiomeGenBase.java.patch | 24 +-- .../world/biome/WorldChunkManager.java.patch | 4 +- .../minecraft/world/chunk/Chunk.java.patch | 41 ++-- .../chunk/storage/AnvilChunkLoader.java.patch | 4 +- .../chunk/storage/AnvilSaveHandler.java.patch | 21 ++- .../world/gen/ChunkProviderEnd.java.patch | 11 +- .../gen/ChunkProviderGenerate.java.patch | 20 +- .../world/gen/ChunkProviderHell.java.patch | 12 +- .../world/gen/ChunkProviderServer.java.patch | 12 +- .../world/gen/MapGenCaves.java.patch | 4 +- .../world/gen/MapGenRavine.java.patch | 4 +- .../feature/WorldGenBigMushroom.java.patch | 4 +- .../gen/feature/WorldGenBigTree.java.patch | 14 +- .../gen/feature/WorldGenDeadBush.java.patch | 4 +- .../gen/feature/WorldGenDungeons.java.patch | 4 +- .../gen/feature/WorldGenForest.java.patch | 4 +- .../gen/feature/WorldGenHugeTrees.java.patch | 25 ++- .../gen/feature/WorldGenMinable.java.patch | 18 +- .../gen/feature/WorldGenShrub.java.patch | 4 +- .../gen/feature/WorldGenSwamp.java.patch | 4 +- .../gen/feature/WorldGenTaiga1.java.patch | 4 +- .../gen/feature/WorldGenTaiga2.java.patch | 4 +- .../gen/feature/WorldGenTallGrass.java.patch | 4 +- .../gen/feature/WorldGenTrees.java.patch | 19 +- .../world/gen/layer/GenLayer.java.patch | 12 +- .../ComponentMineshaftCorridor.java.patch | 12 +- ...ntScatteredFeatureDesertPyramid.java.patch | 12 +- ...ntScatteredFeatureJunglePyramid.java.patch | 12 +- ...omponentStrongholdChestCorridor.java.patch | 12 +- .../ComponentStrongholdLibrary.java.patch | 16 +- ...ComponentStrongholdRoomCrossing.java.patch | 12 +- .../gen/structure/ComponentVillage.java.patch | 4 +- .../ComponentVillageHouse2.java.patch | 12 +- .../ComponentVillageStartPiece.java.patch | 4 +- .../gen/structure/MapGenStronghold.java.patch | 4 +- .../gen/structure/MapGenStructure.java.patch | 4 +- .../structure/StructureComponent.java.patch | 4 +- .../gen/structure/StructureStart.java.patch | 4 +- .../world/storage/MapData.java.patch | 4 +- 217 files changed, 1261 insertions(+), 1371 deletions(-) diff --git a/patches/minecraft/net/minecraft/block/Block.java.patch b/patches/minecraft/net/minecraft/block/Block.java.patch index 4a691a02e..cf7783440 100644 --- a/patches/minecraft/net/minecraft/block/Block.java.patch +++ b/patches/minecraft/net/minecraft/block/Block.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/Block.java -+++ ../src_work/minecraft/net/minecraft/block/Block.java +--- ../src-base/minecraft/net/minecraft/block/Block.java ++++ ../src-work/minecraft/net/minecraft/block/Block.java @@ -1,15 +1,22 @@ package net.minecraft.block; @@ -158,9 +158,8 @@ par2EntityPlayer.addExhaustion(0.025F); - if (this.canSilkHarvest() && EnchantmentHelper.getSilkTouchModifier(par2EntityPlayer)) -- { + if (this.canSilkHarvest(par1World, par2EntityPlayer, par3, par4, par5, par6) && EnchantmentHelper.getSilkTouchModifier(par2EntityPlayer)) -+ { + { + ArrayList items = new ArrayList(); ItemStack itemstack = this.createStackedBlock(par6); @@ -180,13 +179,10 @@ + harvesters.set(par2EntityPlayer); int i1 = EnchantmentHelper.getFortuneModifier(par2EntityPlayer); this.dropBlockAsItem(par1World, par3, par4, par5, par6, i1); -- } -- } -- + harvesters.set(null); -+ } -+ } -+ + } + } + + private int silk_check_meta = -1; //Dirty hack to stop us from needing to special case the silk check hook. /** * Return true if a player with Silk Touch can harvest this block directly, and not its normal drops. diff --git a/patches/minecraft/net/minecraft/block/BlockBaseRailLogic.java.patch b/patches/minecraft/net/minecraft/block/BlockBaseRailLogic.java.patch index 47b610cc1..a91ce10cf 100644 --- a/patches/minecraft/net/minecraft/block/BlockBaseRailLogic.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockBaseRailLogic.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockBaseRailLogic.java -+++ ../src_work/minecraft/net/minecraft/block/BlockBaseRailLogic.java +--- ../src-base/minecraft/net/minecraft/block/BlockBaseRailLogic.java ++++ ../src-work/minecraft/net/minecraft/block/BlockBaseRailLogic.java @@ -16,6 +16,8 @@ /** The chunk position the rail is at. */ private List railChunkPosition; @@ -14,7 +14,7 @@ this.railZ = par5; int l = par2World.getBlockId(par3, par4, par5); - int i1 = par2World.getBlockMetadata(par3, par4, par5); -- + - if (((BlockRailBase)Block.blocksList[l]).isPowered) - { - this.isStraightRail = true; @@ -24,7 +24,6 @@ - { - this.isStraightRail = false; - } -+ + BlockRailBase target = (BlockRailBase)Block.blocksList[l]; + int i1 = target.getBasicRailMetadata(par2World, null, par3, par4, par5); + isStraightRail = !target.isFlexibleRail(par2World, par3, par4, par5); diff --git a/patches/minecraft/net/minecraft/block/BlockButton.java.patch b/patches/minecraft/net/minecraft/block/BlockButton.java.patch index f5ca96a7f..6ddf25f9b 100644 --- a/patches/minecraft/net/minecraft/block/BlockButton.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockButton.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockButton.java -+++ ../src_work/minecraft/net/minecraft/block/BlockButton.java +--- ../src-base/minecraft/net/minecraft/block/BlockButton.java ++++ ../src-work/minecraft/net/minecraft/block/BlockButton.java @@ -14,6 +14,9 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; diff --git a/patches/minecraft/net/minecraft/block/BlockCactus.java.patch b/patches/minecraft/net/minecraft/block/BlockCactus.java.patch index d9a8af5db..12800190c 100644 --- a/patches/minecraft/net/minecraft/block/BlockCactus.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockCactus.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockCactus.java -+++ ../src_work/minecraft/net/minecraft/block/BlockCactus.java +--- ../src-base/minecraft/net/minecraft/block/BlockCactus.java ++++ ../src-work/minecraft/net/minecraft/block/BlockCactus.java @@ -12,7 +12,11 @@ import net.minecraft.util.Icon; import net.minecraft.world.World; diff --git a/patches/minecraft/net/minecraft/block/BlockChest.java.patch b/patches/minecraft/net/minecraft/block/BlockChest.java.patch index d7f040fb6..f0b35a447 100644 --- a/patches/minecraft/net/minecraft/block/BlockChest.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockChest.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockChest.java -+++ ../src_work/minecraft/net/minecraft/block/BlockChest.java +--- ../src-base/minecraft/net/minecraft/block/BlockChest.java ++++ ../src-work/minecraft/net/minecraft/block/BlockChest.java @@ -23,6 +23,8 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -23,30 +23,21 @@ return null; } - else if (par1World.getBlockId(par2 - 1, par3, par4) == this.blockID && (par1World.isBlockNormalCube(par2 - 1, par3 + 1, par4) || isOcelotBlockingChest(par1World, par2 - 1, par3, par4))) -- { -- return null; -- } -- else if (par1World.getBlockId(par2 + 1, par3, par4) == this.blockID && (par1World.isBlockNormalCube(par2 + 1, par3 + 1, par4) || isOcelotBlockingChest(par1World, par2 + 1, par3, par4))) -- { -- return null; -- } -- else if (par1World.getBlockId(par2, par3, par4 - 1) == this.blockID && (par1World.isBlockNormalCube(par2, par3 + 1, par4 - 1) || isOcelotBlockingChest(par1World, par2, par3, par4 - 1))) -- { -- return null; -- } -- else if (par1World.getBlockId(par2, par3, par4 + 1) == this.blockID && (par1World.isBlockNormalCube(par2, par3 + 1, par4 + 1) || isOcelotBlockingChest(par1World, par2, par3, par4 + 1))) + else if (par1World.getBlockId(par2 - 1, par3, par4) == this.blockID && (par1World.isBlockSolidOnSide(par2 - 1, par3 + 1, par4, DOWN) || isOcelotBlockingChest(par1World, par2 - 1, par3, par4))) -+ { -+ return null; -+ } + { + return null; + } +- else if (par1World.getBlockId(par2 + 1, par3, par4) == this.blockID && (par1World.isBlockNormalCube(par2 + 1, par3 + 1, par4) || isOcelotBlockingChest(par1World, par2 + 1, par3, par4))) + else if (par1World.getBlockId(par2 + 1, par3, par4) == this.blockID && (par1World.isBlockSolidOnSide(par2 + 1, par3 + 1, par4, DOWN) || isOcelotBlockingChest(par1World, par2 + 1, par3, par4))) -+ { -+ return null; -+ } + { + return null; + } +- else if (par1World.getBlockId(par2, par3, par4 - 1) == this.blockID && (par1World.isBlockNormalCube(par2, par3 + 1, par4 - 1) || isOcelotBlockingChest(par1World, par2, par3, par4 - 1))) + else if (par1World.getBlockId(par2, par3, par4 - 1) == this.blockID && (par1World.isBlockSolidOnSide(par2, par3 + 1, par4 - 1, DOWN) || isOcelotBlockingChest(par1World, par2, par3, par4 - 1))) -+ { -+ return null; -+ } + { + return null; + } +- else if (par1World.getBlockId(par2, par3, par4 + 1) == this.blockID && (par1World.isBlockNormalCube(par2, par3 + 1, par4 + 1) || isOcelotBlockingChest(par1World, par2, par3, par4 + 1))) + else if (par1World.getBlockId(par2, par3, par4 + 1) == this.blockID && (par1World.isBlockSolidOnSide(par2, par3 + 1, par4 + 1, DOWN) || isOcelotBlockingChest(par1World, par2, par3, par4 + 1))) { return null; diff --git a/patches/minecraft/net/minecraft/block/BlockCocoa.java.patch b/patches/minecraft/net/minecraft/block/BlockCocoa.java.patch index 5fd3e3401..72f73f8a2 100644 --- a/patches/minecraft/net/minecraft/block/BlockCocoa.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockCocoa.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockCocoa.java -+++ ../src_work/minecraft/net/minecraft/block/BlockCocoa.java +--- ../src-base/minecraft/net/minecraft/block/BlockCocoa.java ++++ ../src-work/minecraft/net/minecraft/block/BlockCocoa.java @@ -2,6 +2,8 @@ import cpw.mods.fml.relauncher.Side; @@ -30,9 +30,8 @@ for (int k1 = 0; k1 < b0; ++k1) { - this.dropBlockAsItem_do(par1World, par2, par3, par4, new ItemStack(Item.dyePowder, 1, 3)); -- } + dropped.add(new ItemStack(Item.dyePowder, 1, 3)); -+ } + } + return dropped; } diff --git a/patches/minecraft/net/minecraft/block/BlockComparator.java.patch b/patches/minecraft/net/minecraft/block/BlockComparator.java.patch index 4a094ef48..2ef2cfe25 100644 --- a/patches/minecraft/net/minecraft/block/BlockComparator.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockComparator.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockComparator.java -+++ ../src_work/minecraft/net/minecraft/block/BlockComparator.java +--- ../src-base/minecraft/net/minecraft/block/BlockComparator.java ++++ ../src-work/minecraft/net/minecraft/block/BlockComparator.java @@ -268,4 +268,17 @@ { return new TileEntityComparator(); diff --git a/patches/minecraft/net/minecraft/block/BlockCrops.java.patch b/patches/minecraft/net/minecraft/block/BlockCrops.java.patch index 66a57d160..7c1b02adf 100644 --- a/patches/minecraft/net/minecraft/block/BlockCrops.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockCrops.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockCrops.java -+++ ../src_work/minecraft/net/minecraft/block/BlockCrops.java +--- ../src-base/minecraft/net/minecraft/block/BlockCrops.java ++++ ../src-work/minecraft/net/minecraft/block/BlockCrops.java @@ -2,6 +2,7 @@ import cpw.mods.fml.relauncher.Side; @@ -34,31 +34,28 @@ public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7) { super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, 0); -- -- if (!par1World.isRemote) -- { -- if (par5 >= 7) + } -+ + +- if (!par1World.isRemote) + @Override + public ArrayList getBlockDropped(World world, int x, int y, int z, int metadata, int fortune) + { + ArrayList ret = super.getBlockDropped(world, x, y, z, metadata, fortune); + + if (metadata >= 7) -+ { + { +- if (par5 >= 7) + for (int n = 0; n < 3 + fortune; n++) { - int j1 = 3 + par7; - - for (int k1 = 0; k1 < j1; ++k1) -- { ++ if (world.rand.nextInt(15) <= metadata) + { - if (par1World.rand.nextInt(15) <= par5) - { - this.dropBlockAsItem_do(par1World, par2, par3, par4, new ItemStack(this.getSeedItem(), 1, 0)); - } -+ if (world.rand.nextInt(15) <= metadata) -+ { + ret.add(new ItemStack(this.getSeedItem(), 1, 0)); } } diff --git a/patches/minecraft/net/minecraft/block/BlockDoor.java.patch b/patches/minecraft/net/minecraft/block/BlockDoor.java.patch index 8c2b8006e..ce2adce93 100644 --- a/patches/minecraft/net/minecraft/block/BlockDoor.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockDoor.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockDoor.java -+++ ../src_work/minecraft/net/minecraft/block/BlockDoor.java +--- ../src-base/minecraft/net/minecraft/block/BlockDoor.java ++++ ../src-work/minecraft/net/minecraft/block/BlockDoor.java @@ -290,7 +290,7 @@ { if (this.blockMaterial == Material.iron) diff --git a/patches/minecraft/net/minecraft/block/BlockFarmland.java.patch b/patches/minecraft/net/minecraft/block/BlockFarmland.java.patch index 55a9cb1cb..90859cbee 100644 --- a/patches/minecraft/net/minecraft/block/BlockFarmland.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockFarmland.java.patch @@ -1,15 +1,15 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockFarmland.java -+++ ../src_work/minecraft/net/minecraft/block/BlockFarmland.java -@@ -10,6 +10,9 @@ - import net.minecraft.util.AxisAlignedBB; +--- ../src-base/minecraft/net/minecraft/block/BlockFarmland.java ++++ ../src-work/minecraft/net/minecraft/block/BlockFarmland.java +@@ -11,6 +11,9 @@ import net.minecraft.util.Icon; import net.minecraft.world.World; -+ + +import net.minecraftforge.common.ForgeDirection; +import net.minecraftforge.common.IPlantable; - ++ public class BlockFarmland extends Block { + @SideOnly(Side.CLIENT) @@ -115,7 +118,8 @@ { int j1 = par1World.getBlockId(l, par3 + 1, i1); diff --git a/patches/minecraft/net/minecraft/block/BlockFire.java.patch b/patches/minecraft/net/minecraft/block/BlockFire.java.patch index dceb641c7..54dc6e33a 100644 --- a/patches/minecraft/net/minecraft/block/BlockFire.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockFire.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockFire.java -+++ ../src_work/minecraft/net/minecraft/block/BlockFire.java +--- ../src-base/minecraft/net/minecraft/block/BlockFire.java ++++ ../src-work/minecraft/net/minecraft/block/BlockFire.java @@ -11,6 +11,9 @@ import net.minecraft.world.World; import net.minecraft.world.WorldProviderEnd; @@ -29,21 +29,22 @@ } /** -@@ -123,12 +127,8 @@ +@@ -123,13 +127,9 @@ { if (par1World.getGameRules().getGameRuleBooleanValue("doFireTick")) { - boolean flag = par1World.getBlockId(par2, par3 - 1, par4) == Block.netherrack.blockID; -- ++ Block base = Block.blocksList[par1World.getBlockId(par2, par3 - 1, par4)]; ++ boolean flag = (base != null && base.isFireSource(par1World, par2, par3 - 1, par4, par1World.getBlockMetadata(par2, par3 - 1, par4), UP)); + - if (par1World.provider instanceof WorldProviderEnd && par1World.getBlockId(par2, par3 - 1, par4) == Block.bedrock.blockID) - { - flag = true; - } -+ Block base = Block.blocksList[par1World.getBlockId(par2, par3 - 1, par4)]; -+ boolean flag = (base != null && base.isFireSource(par1World, par2, par3 - 1, par4, par1World.getBlockMetadata(par2, par3 - 1, par4), UP)); - +- if (!this.canPlaceBlockAt(par1World, par2, par3, par4)) { + par1World.setBlockToAir(par2, par3, par4); @@ -157,7 +157,7 @@ par1World.setBlockToAir(par2, par3, par4); } @@ -72,7 +73,7 @@ for (int i1 = par2 - 1; i1 <= par2 + 1; ++i1) { -@@ -230,9 +230,20 @@ +@@ -230,10 +230,21 @@ return false; } @@ -82,7 +83,7 @@ - int j1 = this.abilityToCatchFire[par1World.getBlockId(par2, par3, par4)]; + tryToCatchBlockOnFire(par1World, par2, par3, par4, par5, par6Random, par7, UP); + } -+ + + private void tryToCatchBlockOnFire(World par1World, int par2, int par3, int par4, int par5, Random par6Random, int par7, ForgeDirection face) + { + int j1 = 0; @@ -91,9 +92,10 @@ + { + j1 = block.getFlammability(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), face); + } - ++ if (par6Random.nextInt(par5) < j1) { + boolean flag = par1World.getBlockId(par2, par3, par4) == Block.tnt.blockID; @@ -266,7 +277,12 @@ */ private boolean canNeighborBurn(World par1World, int par2, int par3, int par4) @@ -131,9 +133,8 @@ /** * Checks the specified block coordinate to see if it can catch fire. Args: blockAccess, x, y, z -- */ + * Deprecated for a side-sensitive version -+ */ + */ + @Deprecated public boolean canBlockCatchFire(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) { @@ -145,9 +146,8 @@ * Retrieves a specified block's chance to encourage their neighbors to burn and if the number is greater than the * current number passed in it will return its number instead of the passed in one. Args: world, x, y, z, * curChanceToEncourageFire -- */ + * Deprecated for a side-sensitive version -+ */ + */ + @Deprecated public int getChanceToEncourageFire(World par1World, int par2, int par3, int par4, int par5) { @@ -162,10 +162,9 @@ float f2; - if (!par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && !Block.fire.canBlockCatchFire(par1World, par2, par3 - 1, par4)) -- { -- if (Block.fire.canBlockCatchFire(par1World, par2 - 1, par3, par4)) + if (!par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && !Block.fire.canBlockCatchFire(par1World, par2, par3 - 1, par4, UP)) -+ { + { +- if (Block.fire.canBlockCatchFire(par1World, par2 - 1, par3, par4)) + if (Block.fire.canBlockCatchFire(par1World, par2 - 1, par3, par4, EAST)) { for (l = 0; l < 2; ++l) diff --git a/patches/minecraft/net/minecraft/block/BlockFlower.java.patch b/patches/minecraft/net/minecraft/block/BlockFlower.java.patch index f8d50aa08..25ccf6831 100644 --- a/patches/minecraft/net/minecraft/block/BlockFlower.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockFlower.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockFlower.java -+++ ../src_work/minecraft/net/minecraft/block/BlockFlower.java +--- ../src-base/minecraft/net/minecraft/block/BlockFlower.java ++++ ../src-work/minecraft/net/minecraft/block/BlockFlower.java @@ -6,7 +6,12 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; diff --git a/patches/minecraft/net/minecraft/block/BlockFlowing.java.patch b/patches/minecraft/net/minecraft/block/BlockFlowing.java.patch index a5d7403a9..e4bd1e372 100644 --- a/patches/minecraft/net/minecraft/block/BlockFlowing.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockFlowing.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockFlowing.java -+++ ../src_work/minecraft/net/minecraft/block/BlockFlowing.java +--- ../src-base/minecraft/net/minecraft/block/BlockFlowing.java ++++ ../src-work/minecraft/net/minecraft/block/BlockFlowing.java @@ -206,7 +206,7 @@ { this.triggerLavaMixEffects(par1World, par2, par3, par4); diff --git a/patches/minecraft/net/minecraft/block/BlockFluid.java.patch b/patches/minecraft/net/minecraft/block/BlockFluid.java.patch index 5aa1d6cdd..67010a533 100644 --- a/patches/minecraft/net/minecraft/block/BlockFluid.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockFluid.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockFluid.java -+++ ../src_work/minecraft/net/minecraft/block/BlockFluid.java +--- ../src-base/minecraft/net/minecraft/block/BlockFluid.java ++++ ../src-work/minecraft/net/minecraft/block/BlockFluid.java @@ -59,7 +59,7 @@ { for (int l1 = -1; l1 <= 1; ++l1) @@ -9,17 +9,17 @@ l += (i2 & 16711680) >> 16; i1 += (i2 & 65280) >> 8; j1 += i2 & 255; -@@ -81,6 +81,13 @@ - } - +@@ -83,6 +83,13 @@ return (float)(par0 + 1) / 9.0F; -+ } -+ + } + + + @Deprecated //Implemented here for compatibility, need to change this when we make vanilla fluids use our fluid methods. + public float getFilledPercentage(IBlockAccess world, int x, int y, int z) + { + return 1 - BlockFluid.getFluidHeightPercent(world.getBlockMetadata(x, y, z)); - } - ++ } ++ @SideOnly(Side.CLIENT) + + /** diff --git a/patches/minecraft/net/minecraft/block/BlockGrass.java.patch b/patches/minecraft/net/minecraft/block/BlockGrass.java.patch index a4333889a..4ce69db5b 100644 --- a/patches/minecraft/net/minecraft/block/BlockGrass.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockGrass.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockGrass.java -+++ ../src_work/minecraft/net/minecraft/block/BlockGrass.java +--- ../src-base/minecraft/net/minecraft/block/BlockGrass.java ++++ ../src-work/minecraft/net/minecraft/block/BlockGrass.java @@ -44,7 +44,7 @@ { if (!par1World.isRemote) diff --git a/patches/minecraft/net/minecraft/block/BlockLadder.java.patch b/patches/minecraft/net/minecraft/block/BlockLadder.java.patch index e5ee3915c..374ea1450 100644 --- a/patches/minecraft/net/minecraft/block/BlockLadder.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockLadder.java.patch @@ -1,6 +1,6 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockLadder.java -+++ ../src_work/minecraft/net/minecraft/block/BlockLadder.java -@@ -5,9 +5,13 @@ +--- ../src-base/minecraft/net/minecraft/block/BlockLadder.java ++++ ../src-work/minecraft/net/minecraft/block/BlockLadder.java +@@ -5,10 +5,14 @@ import java.util.Random; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; @@ -8,12 +8,13 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -+ + +import net.minecraftforge.common.ForgeDirection; +import static net.minecraftforge.common.ForgeDirection.*; - ++ public class BlockLadder extends Block { + protected BlockLadder(int par1) @@ -104,7 +108,10 @@ */ public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) diff --git a/patches/minecraft/net/minecraft/block/BlockLeaves.java.patch b/patches/minecraft/net/minecraft/block/BlockLeaves.java.patch index c8743d88e..ee66cbc55 100644 --- a/patches/minecraft/net/minecraft/block/BlockLeaves.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockLeaves.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockLeaves.java -+++ ../src_work/minecraft/net/minecraft/block/BlockLeaves.java +--- ../src-base/minecraft/net/minecraft/block/BlockLeaves.java ++++ ../src-work/minecraft/net/minecraft/block/BlockLeaves.java @@ -2,6 +2,8 @@ import cpw.mods.fml.relauncher.Side; diff --git a/patches/minecraft/net/minecraft/block/BlockLever.java.patch b/patches/minecraft/net/minecraft/block/BlockLever.java.patch index b3678dd23..bb54ee524 100644 --- a/patches/minecraft/net/minecraft/block/BlockLever.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockLever.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockLever.java -+++ ../src_work/minecraft/net/minecraft/block/BlockLever.java +--- ../src-base/minecraft/net/minecraft/block/BlockLever.java ++++ ../src-work/minecraft/net/minecraft/block/BlockLever.java @@ -10,6 +10,9 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -83,76 +83,48 @@ boolean flag = false; - if (!par1World.isBlockNormalCube(par2 - 1, par3, par4) && i1 == 1) -- { -- flag = true; -- } -- -- if (!par1World.isBlockNormalCube(par2 + 1, par3, par4) && i1 == 2) -- { -- flag = true; -- } -- -- if (!par1World.isBlockNormalCube(par2, par3, par4 - 1) && i1 == 3) -- { -- flag = true; -- } -- -- if (!par1World.isBlockNormalCube(par2, par3, par4 + 1) && i1 == 4) -- { -- flag = true; -- } -- -- if (!par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && i1 == 5) -- { -- flag = true; -- } -- -- if (!par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && i1 == 6) -- { -- flag = true; -- } -- -- if (!par1World.isBlockNormalCube(par2, par3 + 1, par4) && i1 == 0) -- { -- flag = true; -- } -- -- if (!par1World.isBlockNormalCube(par2, par3 + 1, par4) && i1 == 7) + if (!par1World.isBlockSolidOnSide(par2 - 1, par3, par4, EAST) && i1 == 1) -+ { -+ flag = true; -+ } -+ + { + flag = true; + } + +- if (!par1World.isBlockNormalCube(par2 + 1, par3, par4) && i1 == 2) + if (!par1World.isBlockSolidOnSide(par2 + 1, par3, par4, WEST) && i1 == 2) -+ { -+ flag = true; -+ } -+ + { + flag = true; + } + +- if (!par1World.isBlockNormalCube(par2, par3, par4 - 1) && i1 == 3) + if (!par1World.isBlockSolidOnSide(par2, par3, par4 - 1, SOUTH) && i1 == 3) -+ { -+ flag = true; -+ } -+ + { + flag = true; + } + +- if (!par1World.isBlockNormalCube(par2, par3, par4 + 1) && i1 == 4) + if (!par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH) && i1 == 4) -+ { -+ flag = true; -+ } -+ + { + flag = true; + } + +- if (!par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && i1 == 5) + if (!par1World.isBlockSolidOnSide(par2, par3 - 1, par4, UP) && i1 == 5) -+ { -+ flag = true; -+ } -+ + { + flag = true; + } + +- if (!par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && i1 == 6) + if (!par1World.isBlockSolidOnSide(par2, par3 - 1, par4, UP) && i1 == 6) -+ { -+ flag = true; -+ } -+ + { + flag = true; + } + +- if (!par1World.isBlockNormalCube(par2, par3 + 1, par4) && i1 == 0) + if (!par1World.isBlockSolidOnSide(par2, par3 + 1, par4, DOWN) && i1 == 0) -+ { -+ flag = true; -+ } -+ + { + flag = true; + } + +- if (!par1World.isBlockNormalCube(par2, par3 + 1, par4) && i1 == 7) + if (!par1World.isBlockSolidOnSide(par2, par3 + 1, par4, DOWN) && i1 == 7) { flag = true; diff --git a/patches/minecraft/net/minecraft/block/BlockLog.java.patch b/patches/minecraft/net/minecraft/block/BlockLog.java.patch index b597fc76a..c42f76120 100644 --- a/patches/minecraft/net/minecraft/block/BlockLog.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockLog.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockLog.java -+++ ../src_work/minecraft/net/minecraft/block/BlockLog.java +--- ../src-base/minecraft/net/minecraft/block/BlockLog.java ++++ ../src-work/minecraft/net/minecraft/block/BlockLog.java @@ -62,14 +62,9 @@ { int j2 = par1World.getBlockId(par2 + k1, par3 + l1, par4 + i2); diff --git a/patches/minecraft/net/minecraft/block/BlockMobSpawner.java.patch b/patches/minecraft/net/minecraft/block/BlockMobSpawner.java.patch index 605fe5464..284ad7b45 100644 --- a/patches/minecraft/net/minecraft/block/BlockMobSpawner.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockMobSpawner.java.patch @@ -1,17 +1,18 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockMobSpawner.java -+++ ../src_work/minecraft/net/minecraft/block/BlockMobSpawner.java -@@ -45,8 +45,12 @@ +--- ../src-base/minecraft/net/minecraft/block/BlockMobSpawner.java ++++ ../src-work/minecraft/net/minecraft/block/BlockMobSpawner.java +@@ -45,9 +45,13 @@ public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7) { super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, par7); - int j1 = 15 + par1World.rand.nextInt(15) + par1World.rand.nextInt(15); - this.dropXpOnBlockBreak(par1World, par2, par3, par4, j1); -+ } + } + + @Override + public int getExpDrop(World world, int data, int enchantmentLevel) + { + return 15 + world.rand.nextInt(15) + world.rand.nextInt(15); - } ++ } /** + * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two diff --git a/patches/minecraft/net/minecraft/block/BlockMushroom.java.patch b/patches/minecraft/net/minecraft/block/BlockMushroom.java.patch index a47d2ff80..00928c9b5 100644 --- a/patches/minecraft/net/minecraft/block/BlockMushroom.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockMushroom.java.patch @@ -1,14 +1,14 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockMushroom.java -+++ ../src_work/minecraft/net/minecraft/block/BlockMushroom.java -@@ -3,6 +3,8 @@ - import java.util.Random; +--- ../src-base/minecraft/net/minecraft/block/BlockMushroom.java ++++ ../src-work/minecraft/net/minecraft/block/BlockMushroom.java +@@ -4,6 +4,8 @@ import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenBigMushroom; -+ -+import net.minecraftforge.common.ForgeDirection; ++import net.minecraftforge.common.ForgeDirection; ++ public class BlockMushroom extends BlockFlower { + protected BlockMushroom(int par1) @@ -96,7 +98,9 @@ if (par3 >= 0 && par3 < 256) { diff --git a/patches/minecraft/net/minecraft/block/BlockMycelium.java.patch b/patches/minecraft/net/minecraft/block/BlockMycelium.java.patch index 97068f89c..253912a33 100644 --- a/patches/minecraft/net/minecraft/block/BlockMycelium.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockMycelium.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockMycelium.java -+++ ../src_work/minecraft/net/minecraft/block/BlockMycelium.java +--- ../src-base/minecraft/net/minecraft/block/BlockMycelium.java ++++ ../src-work/minecraft/net/minecraft/block/BlockMycelium.java @@ -41,7 +41,7 @@ { if (!par1World.isRemote) diff --git a/patches/minecraft/net/minecraft/block/BlockNetherStalk.java.patch b/patches/minecraft/net/minecraft/block/BlockNetherStalk.java.patch index a8d9e1043..c5cf5a164 100644 --- a/patches/minecraft/net/minecraft/block/BlockNetherStalk.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockNetherStalk.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockNetherStalk.java -+++ ../src_work/minecraft/net/minecraft/block/BlockNetherStalk.java +--- ../src-base/minecraft/net/minecraft/block/BlockNetherStalk.java ++++ ../src-work/minecraft/net/minecraft/block/BlockNetherStalk.java @@ -2,6 +2,8 @@ import cpw.mods.fml.relauncher.Side; diff --git a/patches/minecraft/net/minecraft/block/BlockOre.java.patch b/patches/minecraft/net/minecraft/block/BlockOre.java.patch index ad83441b3..88432eeb7 100644 --- a/patches/minecraft/net/minecraft/block/BlockOre.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockOre.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockOre.java -+++ ../src_work/minecraft/net/minecraft/block/BlockOre.java +--- ../src-base/minecraft/net/minecraft/block/BlockOre.java ++++ ../src-work/minecraft/net/minecraft/block/BlockOre.java @@ -60,6 +60,11 @@ { super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, par7); @@ -16,11 +16,11 @@ { j1 = MathHelper.getRandomIntegerInRange(par1World.rand, 2, 5); } -+ return j1; -+ } - +- - this.dropXpOnBlockBreak(par1World, par2, par3, par4, j1); -- } ++ return j1; + } ++ + return 0; } diff --git a/patches/minecraft/net/minecraft/block/BlockPane.java.patch b/patches/minecraft/net/minecraft/block/BlockPane.java.patch index 5753ac2be..4018305a9 100644 --- a/patches/minecraft/net/minecraft/block/BlockPane.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockPane.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockPane.java -+++ ../src_work/minecraft/net/minecraft/block/BlockPane.java +--- ../src-base/minecraft/net/minecraft/block/BlockPane.java ++++ ../src-work/minecraft/net/minecraft/block/BlockPane.java @@ -13,6 +13,7 @@ import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; diff --git a/patches/minecraft/net/minecraft/block/BlockPistonBase.java.patch b/patches/minecraft/net/minecraft/block/BlockPistonBase.java.patch index 03c3ebcf3..42f0bb457 100644 --- a/patches/minecraft/net/minecraft/block/BlockPistonBase.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockPistonBase.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockPistonBase.java -+++ ../src_work/minecraft/net/minecraft/block/BlockPistonBase.java +--- ../src-base/minecraft/net/minecraft/block/BlockPistonBase.java ++++ ../src-work/minecraft/net/minecraft/block/BlockPistonBase.java @@ -439,7 +439,7 @@ return false; } diff --git a/patches/minecraft/net/minecraft/block/BlockPortal.java.patch b/patches/minecraft/net/minecraft/block/BlockPortal.java.patch index 94bd8008c..810e69653 100644 --- a/patches/minecraft/net/minecraft/block/BlockPortal.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockPortal.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockPortal.java -+++ ../src_work/minecraft/net/minecraft/block/BlockPortal.java +--- ../src-base/minecraft/net/minecraft/block/BlockPortal.java ++++ ../src-work/minecraft/net/minecraft/block/BlockPortal.java @@ -118,7 +118,7 @@ } else diff --git a/patches/minecraft/net/minecraft/block/BlockPumpkin.java.patch b/patches/minecraft/net/minecraft/block/BlockPumpkin.java.patch index 1bdfc4f82..d45d46b90 100644 --- a/patches/minecraft/net/minecraft/block/BlockPumpkin.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockPumpkin.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockPumpkin.java -+++ ../src_work/minecraft/net/minecraft/block/BlockPumpkin.java +--- ../src-base/minecraft/net/minecraft/block/BlockPumpkin.java ++++ ../src-work/minecraft/net/minecraft/block/BlockPumpkin.java @@ -123,7 +123,8 @@ public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) { diff --git a/patches/minecraft/net/minecraft/block/BlockRailBase.java.patch b/patches/minecraft/net/minecraft/block/BlockRailBase.java.patch index 9042db6fa..0be618f58 100644 --- a/patches/minecraft/net/minecraft/block/BlockRailBase.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockRailBase.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockRailBase.java -+++ ../src_work/minecraft/net/minecraft/block/BlockRailBase.java +--- ../src-base/minecraft/net/minecraft/block/BlockRailBase.java ++++ ../src-work/minecraft/net/minecraft/block/BlockRailBase.java @@ -3,6 +3,7 @@ import java.util.Random; import net.minecraft.block.material.Material; diff --git a/patches/minecraft/net/minecraft/block/BlockRedstoneOre.java.patch b/patches/minecraft/net/minecraft/block/BlockRedstoneOre.java.patch index 5fac601b4..cc76bd5fe 100644 --- a/patches/minecraft/net/minecraft/block/BlockRedstoneOre.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockRedstoneOre.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockRedstoneOre.java -+++ ../src_work/minecraft/net/minecraft/block/BlockRedstoneOre.java +--- ../src-base/minecraft/net/minecraft/block/BlockRedstoneOre.java ++++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneOre.java @@ -116,11 +116,17 @@ { super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, par7); @@ -13,9 +13,8 @@ { int j1 = 1 + par1World.rand.nextInt(5); - this.dropXpOnBlockBreak(par1World, par2, par3, par4, j1); -- } + return j1; -+ } + } + return 0; } diff --git a/patches/minecraft/net/minecraft/block/BlockRedstoneWire.java.patch b/patches/minecraft/net/minecraft/block/BlockRedstoneWire.java.patch index 63039d8b5..2b66e7721 100644 --- a/patches/minecraft/net/minecraft/block/BlockRedstoneWire.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockRedstoneWire.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockRedstoneWire.java -+++ ../src_work/minecraft/net/minecraft/block/BlockRedstoneWire.java +--- ../src-base/minecraft/net/minecraft/block/BlockRedstoneWire.java ++++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneWire.java @@ -475,7 +475,7 @@ } else if (!Block.redstoneRepeaterIdle.func_94487_f(i1)) diff --git a/patches/minecraft/net/minecraft/block/BlockReed.java.patch b/patches/minecraft/net/minecraft/block/BlockReed.java.patch index 908cab4cd..ca73e896d 100644 --- a/patches/minecraft/net/minecraft/block/BlockReed.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockReed.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockReed.java -+++ ../src_work/minecraft/net/minecraft/block/BlockReed.java +--- ../src-base/minecraft/net/minecraft/block/BlockReed.java ++++ ../src-work/minecraft/net/minecraft/block/BlockReed.java @@ -8,7 +8,11 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; diff --git a/patches/minecraft/net/minecraft/block/BlockSand.java.patch b/patches/minecraft/net/minecraft/block/BlockSand.java.patch index 381cc4e61..dd3b3749d 100644 --- a/patches/minecraft/net/minecraft/block/BlockSand.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockSand.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockSand.java -+++ ../src_work/minecraft/net/minecraft/block/BlockSand.java +--- ../src-base/minecraft/net/minecraft/block/BlockSand.java ++++ ../src-work/minecraft/net/minecraft/block/BlockSand.java @@ -105,7 +105,7 @@ { int l = par0World.getBlockId(par1, par2, par3); diff --git a/patches/minecraft/net/minecraft/block/BlockSapling.java.patch b/patches/minecraft/net/minecraft/block/BlockSapling.java.patch index c0b596496..4997497db 100644 --- a/patches/minecraft/net/minecraft/block/BlockSapling.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockSapling.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockSapling.java -+++ ../src_work/minecraft/net/minecraft/block/BlockSapling.java +--- ../src-base/minecraft/net/minecraft/block/BlockSapling.java ++++ ../src-work/minecraft/net/minecraft/block/BlockSapling.java @@ -16,6 +16,8 @@ import net.minecraft.world.gen.feature.WorldGenTrees; import net.minecraft.world.gen.feature.WorldGenerator; diff --git a/patches/minecraft/net/minecraft/block/BlockSkull.java.patch b/patches/minecraft/net/minecraft/block/BlockSkull.java.patch index effb9ea80..f50966366 100644 --- a/patches/minecraft/net/minecraft/block/BlockSkull.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockSkull.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockSkull.java -+++ ../src_work/minecraft/net/minecraft/block/BlockSkull.java +--- ../src-base/minecraft/net/minecraft/block/BlockSkull.java ++++ ../src-work/minecraft/net/minecraft/block/BlockSkull.java @@ -2,6 +2,8 @@ import cpw.mods.fml.relauncher.Side; @@ -21,22 +21,20 @@ * Called when the block is attempted to be harvested */ public void onBlockHarvested(World par1World, int par2, int par3, int par4, int par5, EntityPlayer par6EntityPlayer) -@@ -149,6 +146,8 @@ - par5 |= 8; +@@ -150,6 +147,8 @@ par1World.setBlockMetadataWithNotify(par2, par3, par4, par5, 4); } -+ -+ dropBlockAsItem(par1World, par2, par3, par4, par5, 0); ++ dropBlockAsItem(par1World, par2, par3, par4, par5, 0); ++ super.onBlockHarvested(par1World, par2, par3, par4, par5, par6EntityPlayer); } + @@ -160,24 +159,30 @@ */ public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6) { - if (!par1World.isRemote) -- { -- if ((par6 & 8) == 0) + super.breakBlock(par1World, par2, par3, par4, par5, par6); + } + @@ -45,15 +43,14 @@ + { + ArrayList drops = new ArrayList(); + if ((metadata & 8) == 0) -+ { -+ ItemStack itemstack = new ItemStack(Item.skull.itemID, 1, this.getDamageValue(world, x, y, z)); -+ TileEntitySkull tileentityskull = (TileEntitySkull)world.getBlockTileEntity(x, y, z); -+ -+ if (tileentityskull == null) - { + { +- if ((par6 & 8) == 0) +- { - ItemStack itemstack = new ItemStack(Item.skull.itemID, 1, this.getDamageValue(par1World, par2, par3, par4)); - TileEntitySkull tileentityskull = (TileEntitySkull)par1World.getBlockTileEntity(par2, par3, par4); -- ++ ItemStack itemstack = new ItemStack(Item.skull.itemID, 1, this.getDamageValue(world, x, y, z)); ++ TileEntitySkull tileentityskull = (TileEntitySkull)world.getBlockTileEntity(x, y, z); + - if (tileentityskull.getSkullType() == 3 && tileentityskull.getExtraType() != null && tileentityskull.getExtraType().length() > 0) - { - itemstack.setTagCompound(new NBTTagCompound()); @@ -61,18 +58,19 @@ - } - - this.dropBlockAsItem_do(par1World, par2, par3, par4, itemstack); ++ if (tileentityskull == null) ++ { + return drops; } - - super.breakBlock(par1World, par2, par3, par4, par5, par6); -- } + if (tileentityskull.getSkullType() == 3 && tileentityskull.getExtraType() != null && tileentityskull.getExtraType().length() > 0) + { + itemstack.setTagCompound(new NBTTagCompound()); + itemstack.getTagCompound().setString("SkullOwner", tileentityskull.getExtraType()); + } + drops.add(itemstack); -+ } + } + return drops; } diff --git a/patches/minecraft/net/minecraft/block/BlockSnow.java.patch b/patches/minecraft/net/minecraft/block/BlockSnow.java.patch index c44d79bc4..25c8dc508 100644 --- a/patches/minecraft/net/minecraft/block/BlockSnow.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockSnow.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockSnow.java -+++ ../src_work/minecraft/net/minecraft/block/BlockSnow.java +--- ../src-base/minecraft/net/minecraft/block/BlockSnow.java ++++ ../src-work/minecraft/net/minecraft/block/BlockSnow.java @@ -96,8 +96,12 @@ */ public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) diff --git a/patches/minecraft/net/minecraft/block/BlockStem.java.patch b/patches/minecraft/net/minecraft/block/BlockStem.java.patch index 2cf1257dc..90c93767c 100644 --- a/patches/minecraft/net/minecraft/block/BlockStem.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockStem.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockStem.java -+++ ../src_work/minecraft/net/minecraft/block/BlockStem.java +--- ../src-base/minecraft/net/minecraft/block/BlockStem.java ++++ ../src-work/minecraft/net/minecraft/block/BlockStem.java @@ -2,6 +2,8 @@ import cpw.mods.fml.relauncher.Side; @@ -46,19 +46,17 @@ public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7) { super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, par7); -- ++ } + - if (!par1World.isRemote) - { - Item item = null; -- -- if (this.fruitType == Block.pumpkin) -+ } -+ + @Override + public ArrayList getBlockDropped(World world, int x, int y, int z, int metadata, int fortune) + { + ArrayList ret = new ArrayList(); -+ + +- if (this.fruitType == Block.pumpkin) + for (int i = 0; i < 3; i++) + { + if (world.rand.nextInt(15) <= metadata) @@ -79,8 +77,7 @@ - this.dropBlockAsItem_do(par1World, par2, par3, par4, new ItemStack(item)); - } - } -- } -+ } + } + + return ret; } diff --git a/patches/minecraft/net/minecraft/block/BlockTallGrass.java.patch b/patches/minecraft/net/minecraft/block/BlockTallGrass.java.patch index 344908516..2f91f9511 100644 --- a/patches/minecraft/net/minecraft/block/BlockTallGrass.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockTallGrass.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockTallGrass.java -+++ ../src_work/minecraft/net/minecraft/block/BlockTallGrass.java +--- ../src-base/minecraft/net/minecraft/block/BlockTallGrass.java ++++ ../src-work/minecraft/net/minecraft/block/BlockTallGrass.java @@ -2,6 +2,8 @@ import cpw.mods.fml.relauncher.Side; diff --git a/patches/minecraft/net/minecraft/block/BlockTorch.java.patch b/patches/minecraft/net/minecraft/block/BlockTorch.java.patch index 4e058172e..a674a9aaa 100644 --- a/patches/minecraft/net/minecraft/block/BlockTorch.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockTorch.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockTorch.java -+++ ../src_work/minecraft/net/minecraft/block/BlockTorch.java +--- ../src-base/minecraft/net/minecraft/block/BlockTorch.java ++++ ../src-work/minecraft/net/minecraft/block/BlockTorch.java @@ -10,6 +10,9 @@ import net.minecraft.util.Vec3; import net.minecraft.world.World; @@ -88,36 +88,24 @@ boolean flag = false; - if (!par1World.isBlockNormalCubeDefault(par2 - 1, par3, par4, true) && i1 == 1) -- { -- flag = true; -- } -- -- if (!par1World.isBlockNormalCubeDefault(par2 + 1, par3, par4, true) && i1 == 2) -- { -- flag = true; -- } -- -- if (!par1World.isBlockNormalCubeDefault(par2, par3, par4 - 1, true) && i1 == 3) -- { -- flag = true; -- } -- -- if (!par1World.isBlockNormalCubeDefault(par2, par3, par4 + 1, true) && i1 == 4) + if (!par1World.isBlockSolidOnSide(par2 - 1, par3, par4, EAST, true) && i1 == 1) -+ { -+ flag = true; -+ } -+ + { + flag = true; + } + +- if (!par1World.isBlockNormalCubeDefault(par2 + 1, par3, par4, true) && i1 == 2) + if (!par1World.isBlockSolidOnSide(par2 + 1, par3, par4, WEST, true) && i1 == 2) -+ { -+ flag = true; -+ } -+ + { + flag = true; + } + +- if (!par1World.isBlockNormalCubeDefault(par2, par3, par4 - 1, true) && i1 == 3) + if (!par1World.isBlockSolidOnSide(par2, par3, par4 - 1, SOUTH, true) && i1 == 3) -+ { -+ flag = true; -+ } -+ + { + flag = true; + } + +- if (!par1World.isBlockNormalCubeDefault(par2, par3, par4 + 1, true) && i1 == 4) + if (!par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH, true) && i1 == 4) { flag = true; diff --git a/patches/minecraft/net/minecraft/block/BlockTrapDoor.java.patch b/patches/minecraft/net/minecraft/block/BlockTrapDoor.java.patch index 56f164468..481eb4014 100644 --- a/patches/minecraft/net/minecraft/block/BlockTrapDoor.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockTrapDoor.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockTrapDoor.java -+++ ../src_work/minecraft/net/minecraft/block/BlockTrapDoor.java +--- ../src-base/minecraft/net/minecraft/block/BlockTrapDoor.java ++++ ../src-work/minecraft/net/minecraft/block/BlockTrapDoor.java @@ -11,8 +11,13 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; diff --git a/patches/minecraft/net/minecraft/block/BlockTripWireSource.java.patch b/patches/minecraft/net/minecraft/block/BlockTripWireSource.java.patch index 86e1f866b..e758d60fe 100644 --- a/patches/minecraft/net/minecraft/block/BlockTripWireSource.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockTripWireSource.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockTripWireSource.java -+++ ../src_work/minecraft/net/minecraft/block/BlockTripWireSource.java +--- ../src-base/minecraft/net/minecraft/block/BlockTripWireSource.java ++++ ../src-work/minecraft/net/minecraft/block/BlockTripWireSource.java @@ -8,6 +8,9 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; diff --git a/patches/minecraft/net/minecraft/block/BlockVine.java.patch b/patches/minecraft/net/minecraft/block/BlockVine.java.patch index 1042d045c..937df2a55 100644 --- a/patches/minecraft/net/minecraft/block/BlockVine.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockVine.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/block/BlockVine.java -+++ ../src_work/minecraft/net/minecraft/block/BlockVine.java +--- ../src-base/minecraft/net/minecraft/block/BlockVine.java ++++ ../src-work/minecraft/net/minecraft/block/BlockVine.java @@ -2,9 +2,12 @@ import cpw.mods.fml.relauncher.Side; @@ -38,7 +38,7 @@ - super.harvestBlock(par1World, par2EntityPlayer, par3, par4, par5, par6); - } + super.harvestBlock(par1World, par2EntityPlayer, par3, par4, par5, par6); -+ } + } + + @Override + public boolean isShearable(ItemStack item, World world, int x, int y, int z) @@ -58,5 +58,5 @@ + public boolean isLadder(World world, int x, int y, int z, EntityLivingBase entity) + { + return true; - } ++ } } diff --git a/patches/minecraft/net/minecraft/client/Minecraft.java.patch b/patches/minecraft/net/minecraft/client/Minecraft.java.patch index d642b0249..36a0f4001 100644 --- a/patches/minecraft/net/minecraft/client/Minecraft.java.patch +++ b/patches/minecraft/net/minecraft/client/Minecraft.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/Minecraft.java -+++ ../src_work/minecraft/net/minecraft/client/Minecraft.java +--- ../src-base/minecraft/net/minecraft/client/Minecraft.java ++++ ../src-work/minecraft/net/minecraft/client/Minecraft.java @@ -137,6 +137,16 @@ import com.google.common.collect.MapDifference; @@ -56,12 +56,10 @@ this.statFileWriter.syncStats(); if (par1GuiScreen == null && this.theWorld == null) -@@ -694,6 +699,20 @@ - else if (par1GuiScreen == null && this.thePlayer.getHealth() <= 0.0F) - { +@@ -696,6 +701,20 @@ par1GuiScreen = new GuiGameOver(); -+ } -+ + } + + GuiScreen old = this.currentScreen; + GuiOpenEvent event = new GuiOpenEvent(par1GuiScreen); + @@ -74,9 +72,11 @@ + if (old != null && par1GuiScreen != old) + { + old.onGuiClosed(); - } - ++ } ++ if (par1GuiScreen instanceof GuiMainMenu) + { + this.gameSettings.showDebugInfo = false; @@ -1301,7 +1320,7 @@ if (this.thePlayer.isCurrentToolAdventureModeExempt(j, k, l)) @@ -155,7 +155,7 @@ } /** -@@ -2237,107 +2277,12 @@ +@@ -2237,108 +2277,13 @@ if (this.objectMouseOver != null) { boolean flag = this.thePlayer.capabilities.isCreativeMode; @@ -165,7 +165,8 @@ int k; - if (this.objectMouseOver.typeOfHit == EnumMovingObjectType.TILE) -- { ++ if (!ForgeHooks.onPickBlock(this.objectMouseOver, this.thePlayer, this.theWorld)) + { - k = this.objectMouseOver.blockX; - int l = this.objectMouseOver.blockY; - int i1 = this.objectMouseOver.blockZ; @@ -186,14 +187,15 @@ - flag1 = Item.itemsList[j].getHasSubtypes(); - int j1 = j < 256 && !Block.blocksList[block.blockID].isFlowerPot() ? j : block.blockID; - i = Block.blocksList[j1].getDamageValue(this.theWorld, k, l, i1); -- } ++ return; + } - else - { - if (this.objectMouseOver.typeOfHit != EnumMovingObjectType.ENTITY || this.objectMouseOver.entityHit == null || !flag) - { - return; - } -- + - if (this.objectMouseOver.entityHit instanceof EntityPainting) - { - j = Item.painting.itemID; @@ -260,13 +262,10 @@ - } - - this.thePlayer.inventory.setCurrentItem(j, i, flag1, flag); -+ if (!ForgeHooks.onPickBlock(this.objectMouseOver, this.thePlayer, this.theWorld)) -+ { -+ return; -+ } - +- if (flag) { + k = this.thePlayer.inventoryContainer.inventorySlots.size() - 9 + this.thePlayer.inventory.currentItem; @@ -2420,11 +2365,18 @@ par1PlayerUsageSnooper.addData("gl_max_texture_size", Integer.valueOf(getGLMaximumTextureSize())); } diff --git a/patches/minecraft/net/minecraft/client/audio/SoundManager.java.patch b/patches/minecraft/net/minecraft/client/audio/SoundManager.java.patch index b9b624184..34e7355a3 100644 --- a/patches/minecraft/net/minecraft/client/audio/SoundManager.java.patch +++ b/patches/minecraft/net/minecraft/client/audio/SoundManager.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/audio/SoundManager.java -+++ ../src_work/minecraft/net/minecraft/client/audio/SoundManager.java +--- ../src-base/minecraft/net/minecraft/client/audio/SoundManager.java ++++ ../src-work/minecraft/net/minecraft/client/audio/SoundManager.java @@ -1,5 +1,9 @@ package net.minecraft.client.audio; diff --git a/patches/minecraft/net/minecraft/client/entity/EntityOtherPlayerMP.java.patch b/patches/minecraft/net/minecraft/client/entity/EntityOtherPlayerMP.java.patch index 4563e5cc2..ca165dc7a 100644 --- a/patches/minecraft/net/minecraft/client/entity/EntityOtherPlayerMP.java.patch +++ b/patches/minecraft/net/minecraft/client/entity/EntityOtherPlayerMP.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/entity/EntityOtherPlayerMP.java -+++ ../src_work/minecraft/net/minecraft/client/entity/EntityOtherPlayerMP.java +--- ../src-base/minecraft/net/minecraft/client/entity/EntityOtherPlayerMP.java ++++ ../src-work/minecraft/net/minecraft/client/entity/EntityOtherPlayerMP.java @@ -170,7 +170,8 @@ } } diff --git a/patches/minecraft/net/minecraft/client/entity/EntityPlayerSP.java.patch b/patches/minecraft/net/minecraft/client/entity/EntityPlayerSP.java.patch index 95daa4aaf..09410ab15 100644 --- a/patches/minecraft/net/minecraft/client/entity/EntityPlayerSP.java.patch +++ b/patches/minecraft/net/minecraft/client/entity/EntityPlayerSP.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/entity/EntityPlayerSP.java -+++ ../src_work/minecraft/net/minecraft/client/entity/EntityPlayerSP.java +--- ../src-base/minecraft/net/minecraft/client/entity/EntityPlayerSP.java ++++ ../src-work/minecraft/net/minecraft/client/entity/EntityPlayerSP.java @@ -49,6 +49,9 @@ import net.minecraft.util.MovementInput; import net.minecraft.util.Session; @@ -34,17 +34,16 @@ double d4 = par5 - (double)k; - if (this.isBlockTranslucent(i, j, k) || this.isBlockTranslucent(i, j + 1, k)) -- { -- boolean flag = !this.isBlockTranslucent(i - 1, j, k) && !this.isBlockTranslucent(i - 1, j + 1, k); -- boolean flag1 = !this.isBlockTranslucent(i + 1, j, k) && !this.isBlockTranslucent(i + 1, j + 1, k); -- boolean flag2 = !this.isBlockTranslucent(i, j, k - 1) && !this.isBlockTranslucent(i, j + 1, k - 1); -- boolean flag3 = !this.isBlockTranslucent(i, j, k + 1) && !this.isBlockTranslucent(i, j + 1, k + 1); + int entHeight = Math.max(Math.round(this.height), 1); + + boolean inTranslucentBlock = true; + + for (int i1 = 0; i1 < entHeight; i1++) -+ { + { +- boolean flag = !this.isBlockTranslucent(i - 1, j, k) && !this.isBlockTranslucent(i - 1, j + 1, k); +- boolean flag1 = !this.isBlockTranslucent(i + 1, j, k) && !this.isBlockTranslucent(i + 1, j + 1, k); +- boolean flag2 = !this.isBlockTranslucent(i, j, k - 1) && !this.isBlockTranslucent(i, j + 1, k - 1); +- boolean flag3 = !this.isBlockTranslucent(i, j, k + 1) && !this.isBlockTranslucent(i, j + 1, k + 1); + if (!this.isBlockTranslucent(i, j + i1, k)) + { + inTranslucentBlock = false; diff --git a/patches/minecraft/net/minecraft/client/gui/GuiChat.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiChat.java.patch index 755d5e311..cb3b93c56 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiChat.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiChat.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/gui/GuiChat.java -+++ ../src_work/minecraft/net/minecraft/client/gui/GuiChat.java +--- ../src-base/minecraft/net/minecraft/client/gui/GuiChat.java ++++ ../src-work/minecraft/net/minecraft/client/gui/GuiChat.java @@ -7,8 +7,11 @@ import java.util.Iterator; import java.util.List; diff --git a/patches/minecraft/net/minecraft/client/gui/GuiControls.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiControls.java.patch index 9a9d412bc..0eeaca8d5 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiControls.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiControls.java.patch @@ -1,23 +1,23 @@ ---- ../src_base/minecraft/net/minecraft/client/gui/GuiControls.java -+++ ../src_work/minecraft/net/minecraft/client/gui/GuiControls.java -@@ -6,6 +6,8 @@ - import net.minecraft.client.settings.GameSettings; +--- ../src-base/minecraft/net/minecraft/client/gui/GuiControls.java ++++ ../src-work/minecraft/net/minecraft/client/gui/GuiControls.java +@@ -7,6 +7,8 @@ import net.minecraft.client.settings.KeyBinding; import net.minecraft.util.EnumChatFormatting; -+ -+import net.minecraftforge.client.GuiControlsScrollPanel; ++import net.minecraftforge.client.GuiControlsScrollPanel; ++ @SideOnly(Side.CLIENT) public class GuiControls extends GuiScreen -@@ -23,6 +25,8 @@ - + { +@@ -24,6 +26,8 @@ /** The ID of the button that has been pressed. */ private int buttonId = -1; -+ -+ private GuiControlsScrollPanel scrollPane; ++ private GuiControlsScrollPanel scrollPane; ++ public GuiControls(GuiScreen par1GuiScreen, GameSettings par2GameSettings) { + this.parentScreen = par1GuiScreen; @@ -43,14 +47,9 @@ */ public void initGui() @@ -36,7 +36,7 @@ this.screenTitle = I18n.getString("controls.title"); } -@@ -59,19 +58,9 @@ +@@ -59,20 +58,10 @@ */ protected void actionPerformed(GuiButton par1GuiButton) { @@ -48,14 +48,15 @@ if (par1GuiButton.id == 200) { this.mc.displayGuiScreen(this.parentScreen); -- } + } - else - { - this.buttonId = par1GuiButton.id; - par1GuiButton.displayString = "> " + this.options.getOptionDisplayString(par1GuiButton.id) + " <"; - } +- } } + /** @@ -80,17 +69,7 @@ */ protected void mouseClicked(int par1, int par2, int par3) @@ -75,22 +76,23 @@ } /** -@@ -98,14 +77,7 @@ +@@ -98,15 +77,8 @@ */ protected void keyTyped(char par1, int par2) { - if (this.buttonId >= 0) -- { ++ if (scrollPane.keyTyped(par1, par2)) + { - this.options.setKeyBinding(this.buttonId, par2); - ((GuiButton)this.buttonList.get(this.buttonId)).displayString = this.options.getOptionDisplayString(this.buttonId); - this.buttonId = -1; - KeyBinding.resetKeyBindingArrayAndHash(); - } - else -+ if (scrollPane.keyTyped(par1, par2)) - { +- { super.keyTyped(par1, par2); } + } @@ -117,6 +89,7 @@ public void drawScreen(int par1, int par2, float par3) { diff --git a/patches/minecraft/net/minecraft/client/gui/GuiCreateWorld.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiCreateWorld.java.patch index 26f56825c..83b51860e 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiCreateWorld.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiCreateWorld.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/gui/GuiCreateWorld.java -+++ ../src_work/minecraft/net/minecraft/client/gui/GuiCreateWorld.java +--- ../src-base/minecraft/net/minecraft/client/gui/GuiCreateWorld.java ++++ ../src-work/minecraft/net/minecraft/client/gui/GuiCreateWorld.java @@ -376,7 +376,7 @@ } else if (par1GuiButton.id == 8) diff --git a/patches/minecraft/net/minecraft/client/gui/GuiIngame.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiIngame.java.patch index 37ed0182c..3e8f7609f 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiIngame.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiIngame.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/gui/GuiIngame.java -+++ ../src_work/minecraft/net/minecraft/client/gui/GuiIngame.java +--- ../src-base/minecraft/net/minecraft/client/gui/GuiIngame.java ++++ ../src-work/minecraft/net/minecraft/client/gui/GuiIngame.java @@ -40,6 +40,8 @@ import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; @@ -14,10 +14,9 @@ ItemStack itemstack = this.mc.thePlayer.inventory.armorItemInSlot(3); - if (this.mc.gameSettings.thirdPersonView == 0 && itemstack != null && itemstack.itemID == Block.pumpkin.blockID) -- { -- this.renderPumpkinBlur(k, l); + if (this.mc.gameSettings.thirdPersonView == 0 && itemstack != null && itemstack.getItem() != null) -+ { + { +- this.renderPumpkinBlur(k, l); + if (itemstack.itemID == Block.pumpkin.blockID) + { + this.renderPumpkinBlur(k, l); diff --git a/patches/minecraft/net/minecraft/client/gui/GuiSlot.java.patch b/patches/minecraft/net/minecraft/client/gui/GuiSlot.java.patch index f8b6dfb54..e7b2ad3d5 100644 --- a/patches/minecraft/net/minecraft/client/gui/GuiSlot.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/GuiSlot.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/gui/GuiSlot.java -+++ ../src_work/minecraft/net/minecraft/client/gui/GuiSlot.java +--- ../src-base/minecraft/net/minecraft/client/gui/GuiSlot.java ++++ ../src-work/minecraft/net/minecraft/client/gui/GuiSlot.java @@ -331,16 +331,7 @@ GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_FOG); diff --git a/patches/minecraft/net/minecraft/client/gui/achievement/GuiAchievements.java.patch b/patches/minecraft/net/minecraft/client/gui/achievement/GuiAchievements.java.patch index 8c36054ee..711d721bb 100644 --- a/patches/minecraft/net/minecraft/client/gui/achievement/GuiAchievements.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/achievement/GuiAchievements.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/gui/achievement/GuiAchievements.java -+++ ../src_work/minecraft/net/minecraft/client/gui/achievement/GuiAchievements.java +--- ../src-base/minecraft/net/minecraft/client/gui/achievement/GuiAchievements.java ++++ ../src-work/minecraft/net/minecraft/client/gui/achievement/GuiAchievements.java @@ -2,6 +2,9 @@ import cpw.mods.fml.relauncher.Side; @@ -53,12 +53,10 @@ } /** -@@ -87,6 +105,16 @@ - { - this.mc.displayGuiScreen((GuiScreen)null); +@@ -89,6 +107,16 @@ this.mc.setIngameFocus(); -+ } -+ + } + + if (par1GuiButton.id == 2) + { + currentPage++; @@ -67,23 +65,23 @@ + currentPage = -1; + } + button.displayString = AchievementPage.getTitle(currentPage); - } - ++ } ++ super.actionPerformed(par1GuiButton); + } + @@ -314,11 +342,12 @@ int i4; int j4; - for (i3 = 0; i3 < AchievementList.achievementList.size(); ++i3) -- { -- Achievement achievement = (Achievement)AchievementList.achievementList.get(i3); -- -- if (achievement.parentAchievement != null) + List achievementList = (currentPage == -1 ? minecraftAchievements : AchievementPage.getAchievementPage(currentPage).getAchievements()); + for (i3 = 0; i3 < achievementList.size(); ++i3) -+ { + { +- Achievement achievement = (Achievement)AchievementList.achievementList.get(i3); + Achievement achievement = achievementList.get(i3); -+ + +- if (achievement.parentAchievement != null) + if (achievement.parentAchievement != null && achievementList.contains(achievement.parentAchievement)) { k3 = achievement.displayColumn * 24 - k + 11 + k1; @@ -93,10 +91,9 @@ int i5; - for (k3 = 0; k3 < AchievementList.achievementList.size(); ++k3) -- { -- Achievement achievement2 = (Achievement)AchievementList.achievementList.get(k3); + for (k3 = 0; k3 < achievementList.size(); ++k3) -+ { + { +- Achievement achievement2 = (Achievement)AchievementList.achievementList.get(k3); + Achievement achievement2 = (Achievement)achievementList.get(k3); j4 = achievement2.displayColumn * 24 - k; l3 = achievement2.displayRow * 24 - l; diff --git a/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java.patch b/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java.patch index 7c9c01a74..8b05df6e1 100644 --- a/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java -+++ ../src_work/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java +--- ../src-base/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java ++++ ../src-work/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java @@ -8,6 +8,7 @@ import java.util.List; import java.util.Set; @@ -44,18 +44,18 @@ } /** -@@ -242,6 +251,11 @@ - } +@@ -243,6 +252,11 @@ protected void func_102021_a(List par1List, int par2, int par3) -+ { + { + drawHoveringText(par1List, par2, par3, fontRenderer); + } + + protected void drawHoveringText(List par1List, int par2, int par3, FontRenderer font) - { ++ { if (!par1List.isEmpty()) { + GL11.glDisable(GL12.GL_RESCALE_NORMAL); @@ -255,7 +269,7 @@ while (iterator.hasNext()) { diff --git a/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java.patch b/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java.patch index ff621b4fc..7f0043457 100644 --- a/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java -+++ ../src_work/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java +--- ../src-base/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java ++++ ../src-work/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java @@ -61,6 +61,8 @@ private Slot field_74235_v; private boolean field_74234_w; @@ -61,10 +61,9 @@ Item.enchantedBook.func_92113_a(enchantment, containercreative.itemList); } } -- + updateFilteredItems(containercreative); + } -+ + + //split from above for custom search tabs + private void updateFilteredItems(ContainerCreative containercreative) + { @@ -116,26 +115,24 @@ { this.searchField.setVisible(true); this.searchField.setCanLoseFocus(false); -@@ -653,21 +682,42 @@ +@@ -653,23 +682,44 @@ super.drawScreen(par1, par2, par3); CreativeTabs[] acreativetabs = CreativeTabs.creativeTabArray; - int i2 = acreativetabs.length; -- -- for (int j2 = 0; j2 < i2; ++j2) + int start = tabPage * 10; + int i2 = Math.min(acreativetabs.length, ((tabPage + 1) * 10) + 2); + if (tabPage != 0) start += 2; + boolean rendered = false; -+ + +- for (int j2 = 0; j2 < i2; ++j2) + for (int j2 = start; j2 < i2; ++j2) { CreativeTabs creativetabs = acreativetabs[j2]; - if (this.renderCreativeInventoryHoveringText(creativetabs, par1, par2)) -- { + if (creativetabs != null && this.renderCreativeInventoryHoveringText(creativetabs, par1, par2)) -+ { + { + rendered = true; break; } @@ -149,8 +146,8 @@ if (this.field_74235_v != null && selectedTabIndex == CreativeTabs.tabInventory.getTabIndex() && this.isPointInRegion(this.field_74235_v.xDisplayPosition, this.field_74235_v.yDisplayPosition, 16, 16, par1, par2)) { this.drawCreativeTabHoveringText(I18n.getString("inventory.binSlot"), par1, par2); -+ } -+ + } + + if (maxPages != 0) + { + String page = String.format("%d / %d", tabPage + 1, maxPages + 1); @@ -161,10 +158,12 @@ + fontRenderer.drawString(page, guiLeft + (xSize / 2) - (width / 2), guiTop - 44, -1); + this.zLevel = 0.0F; + itemRenderer.zLevel = 0.0F; - } - ++ } ++ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); -@@ -741,14 +791,32 @@ + GL11.glDisable(GL11.GL_LIGHTING); + } +@@ -741,17 +791,35 @@ int k = acreativetabs.length; int l; @@ -182,9 +181,9 @@ + if (creativetabs1 != null && creativetabs1.getTabIndex() != selectedTabIndex) { this.renderCreativeTab(creativetabs1); -+ } -+ } -+ + } + } + + if (tabPage != 0) + { + if (creativetabs != CreativeTabs.tabAllSearch) @@ -196,9 +195,12 @@ + { + this.mc.getTextureManager().bindTexture(field_110424_t); + renderCreativeTab(CreativeTabs.tabInventory); - } - } - ++ } ++ } ++ + this.mc.getTextureManager().bindTexture(new ResourceLocation("textures/gui/container/creative_inventory/tab_" + creativetabs.getBackgroundImageName())); + this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize); + this.searchField.drawTextBox(); @@ -766,6 +834,14 @@ this.drawTexturedModalRect(i1, k + (int)((float)(l - k - 17) * this.currentScroll), 232 + (this.needsScrollBars() ? 0 : 12), 0, 12, 15); } diff --git a/patches/minecraft/net/minecraft/client/model/ModelBase.java.patch b/patches/minecraft/net/minecraft/client/model/ModelBase.java.patch index d8c9903b7..0215b27c9 100644 --- a/patches/minecraft/net/minecraft/client/model/ModelBase.java.patch +++ b/patches/minecraft/net/minecraft/client/model/ModelBase.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/model/ModelBase.java -+++ ../src_work/minecraft/net/minecraft/client/model/ModelBase.java +--- ../src-base/minecraft/net/minecraft/client/model/ModelBase.java ++++ ../src-work/minecraft/net/minecraft/client/model/ModelBase.java @@ -10,7 +10,6 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; diff --git a/patches/minecraft/net/minecraft/client/model/ModelBox.java.patch b/patches/minecraft/net/minecraft/client/model/ModelBox.java.patch index a6a05697e..d55462a0d 100644 --- a/patches/minecraft/net/minecraft/client/model/ModelBox.java.patch +++ b/patches/minecraft/net/minecraft/client/model/ModelBox.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/model/ModelBox.java -+++ ../src_work/minecraft/net/minecraft/client/model/ModelBox.java +--- ../src-base/minecraft/net/minecraft/client/model/ModelBox.java ++++ ../src-work/minecraft/net/minecraft/client/model/ModelBox.java @@ -4,7 +4,6 @@ import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.Tessellator; diff --git a/patches/minecraft/net/minecraft/client/model/ModelRenderer.java.patch b/patches/minecraft/net/minecraft/client/model/ModelRenderer.java.patch index 85723365d..90fa5af76 100644 --- a/patches/minecraft/net/minecraft/client/model/ModelRenderer.java.patch +++ b/patches/minecraft/net/minecraft/client/model/ModelRenderer.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/model/ModelRenderer.java -+++ ../src_work/minecraft/net/minecraft/client/model/ModelRenderer.java +--- ../src-base/minecraft/net/minecraft/client/model/ModelRenderer.java ++++ ../src-work/minecraft/net/minecraft/client/model/ModelRenderer.java @@ -8,7 +8,6 @@ import net.minecraft.client.renderer.Tessellator; import org.lwjgl.opengl.GL11; diff --git a/patches/minecraft/net/minecraft/client/model/PositionTextureVertex.java.patch b/patches/minecraft/net/minecraft/client/model/PositionTextureVertex.java.patch index 31bdc80a8..415aa3c13 100644 --- a/patches/minecraft/net/minecraft/client/model/PositionTextureVertex.java.patch +++ b/patches/minecraft/net/minecraft/client/model/PositionTextureVertex.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/model/PositionTextureVertex.java -+++ ../src_work/minecraft/net/minecraft/client/model/PositionTextureVertex.java +--- ../src-base/minecraft/net/minecraft/client/model/PositionTextureVertex.java ++++ ../src-work/minecraft/net/minecraft/client/model/PositionTextureVertex.java @@ -4,7 +4,6 @@ import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.util.Vec3; diff --git a/patches/minecraft/net/minecraft/client/model/TexturedQuad.java.patch b/patches/minecraft/net/minecraft/client/model/TexturedQuad.java.patch index 5b698e854..f1d328bf4 100644 --- a/patches/minecraft/net/minecraft/client/model/TexturedQuad.java.patch +++ b/patches/minecraft/net/minecraft/client/model/TexturedQuad.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/model/TexturedQuad.java -+++ ../src_work/minecraft/net/minecraft/client/model/TexturedQuad.java +--- ../src-base/minecraft/net/minecraft/client/model/TexturedQuad.java ++++ ../src-work/minecraft/net/minecraft/client/model/TexturedQuad.java @@ -5,7 +5,6 @@ import net.minecraft.client.renderer.Tessellator; import net.minecraft.util.Vec3; diff --git a/patches/minecraft/net/minecraft/client/multiplayer/ChunkProviderClient.java.patch b/patches/minecraft/net/minecraft/client/multiplayer/ChunkProviderClient.java.patch index 64bbb6bcd..07ade0b89 100644 --- a/patches/minecraft/net/minecraft/client/multiplayer/ChunkProviderClient.java.patch +++ b/patches/minecraft/net/minecraft/client/multiplayer/ChunkProviderClient.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/multiplayer/ChunkProviderClient.java -+++ ../src_work/minecraft/net/minecraft/client/multiplayer/ChunkProviderClient.java +--- ../src-base/minecraft/net/minecraft/client/multiplayer/ChunkProviderClient.java ++++ ../src-work/minecraft/net/minecraft/client/multiplayer/ChunkProviderClient.java @@ -13,6 +13,8 @@ import net.minecraft.world.chunk.Chunk; import net.minecraft.world.chunk.EmptyChunk; diff --git a/patches/minecraft/net/minecraft/client/multiplayer/NetClientHandler.java.patch b/patches/minecraft/net/minecraft/client/multiplayer/NetClientHandler.java.patch index 63a962248..06bf44fdf 100644 --- a/patches/minecraft/net/minecraft/client/multiplayer/NetClientHandler.java.patch +++ b/patches/minecraft/net/minecraft/client/multiplayer/NetClientHandler.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/multiplayer/NetClientHandler.java -+++ ../src_work/minecraft/net/minecraft/client/multiplayer/NetClientHandler.java +--- ../src-base/minecraft/net/minecraft/client/multiplayer/NetClientHandler.java ++++ ../src-work/minecraft/net/minecraft/client/multiplayer/NetClientHandler.java @@ -191,6 +191,11 @@ import net.minecraft.world.storage.MapStorage; import org.lwjgl.input.Keyboard; diff --git a/patches/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java.patch b/patches/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java.patch index 18f79e8d5..04799859f 100644 --- a/patches/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java.patch +++ b/patches/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java -+++ ../src_work/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java +--- ../src-base/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java ++++ ../src-work/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java @@ -22,6 +22,10 @@ import net.minecraft.world.EnumGameType; import net.minecraft.world.World; @@ -37,15 +37,14 @@ float f2 = (float)par8Vec3.zCoord - (float)par6; boolean flag = false; int i1; -- -- if (!par1EntityPlayer.isSneaking() || par1EntityPlayer.getHeldItem() == null) + if (par3ItemStack != null && + par3ItemStack.getItem() != null && + par3ItemStack.getItem().onItemUseFirst(par3ItemStack, par1EntityPlayer, par2World, par4, par5, par6, par7, f, f1, f2)) + { + return true; + } -+ + +- if (!par1EntityPlayer.isSneaking() || par1EntityPlayer.getHeldItem() == null) + if (!par1EntityPlayer.isSneaking() || (par1EntityPlayer.getHeldItem() == null || par1EntityPlayer.getHeldItem().getItem().shouldPassSneakingClickToBlock(par2World, par4, par5, par6))) { i1 = par2World.getBlockId(par4, par5, par6); diff --git a/patches/minecraft/net/minecraft/client/multiplayer/WorldClient.java.patch b/patches/minecraft/net/minecraft/client/multiplayer/WorldClient.java.patch index e9f19b6c1..9eb922568 100644 --- a/patches/minecraft/net/minecraft/client/multiplayer/WorldClient.java.patch +++ b/patches/minecraft/net/minecraft/client/multiplayer/WorldClient.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/multiplayer/WorldClient.java -+++ ../src_work/minecraft/net/minecraft/client/multiplayer/WorldClient.java +--- ../src-base/minecraft/net/minecraft/client/multiplayer/WorldClient.java ++++ ../src-work/minecraft/net/minecraft/client/multiplayer/WorldClient.java @@ -29,6 +29,9 @@ import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.storage.SaveHandlerMP; @@ -14,11 +14,11 @@ super(new SaveHandlerMP(), "MpServer", WorldProvider.getProviderForDimension(par3), par2WorldSettings, par5Profiler, par6ILogAgent); this.sendQueue = par1NetClientHandler; this.difficultySetting = par4; -+ this.mapStorage = par1NetClientHandler.mapStorage; +- this.setSpawnLocation(8, 64, 8); + this.mapStorage = par1NetClientHandler.mapStorage; + this.isRemote = true; + finishSetup(); - this.setSpawnLocation(8, 64, 8); -- this.mapStorage = par1NetClientHandler.mapStorage; ++ this.setSpawnLocation(8, 64, 8); + MinecraftForge.EVENT_BUS.post(new WorldEvent.Load(this)); } diff --git a/patches/minecraft/net/minecraft/client/particle/EffectRenderer.java.patch b/patches/minecraft/net/minecraft/client/particle/EffectRenderer.java.patch index face476c9..79e5e732b 100644 --- a/patches/minecraft/net/minecraft/client/particle/EffectRenderer.java.patch +++ b/patches/minecraft/net/minecraft/client/particle/EffectRenderer.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/particle/EffectRenderer.java -+++ ../src_work/minecraft/net/minecraft/client/particle/EffectRenderer.java +--- ../src-base/minecraft/net/minecraft/client/particle/EffectRenderer.java ++++ ../src-work/minecraft/net/minecraft/client/particle/EffectRenderer.java @@ -12,6 +12,7 @@ import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.entity.Entity; @@ -8,23 +8,23 @@ import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import org.lwjgl.opengl.GL11; -@@ -63,9 +64,13 @@ +@@ -63,10 +64,14 @@ for (int j = 0; j < this.fxLayers[i].size(); ++j) { EntityFX entityfx = (EntityFX)this.fxLayers[i].get(j); - entityfx.onUpdate(); -- + - if (entityfx.isDead) -+ + if (entityfx != null) -+ { + { + entityfx.onUpdate(); + } + + if (entityfx == null || entityfx.isDead) - { ++ { this.fxLayers[i].remove(j--); } + } @@ -115,6 +120,7 @@ for (int j = 0; j < this.fxLayers[i].size(); ++j) { @@ -46,11 +46,10 @@ public void addBlockDestroyEffects(int par1, int par2, int par3, int par4, int par5) { - if (par4 != 0) -- { -- Block block = Block.blocksList[par4]; + Block block = Block.blocksList[par4]; + if (block != null && !block.addBlockDestroyEffects(worldObj, par1, par2, par3, par5, this)) -+ { + { +- Block block = Block.blocksList[par4]; byte b0 = 4; for (int j1 = 0; j1 < b0; ++j1) diff --git a/patches/minecraft/net/minecraft/client/particle/EntityDiggingFX.java.patch b/patches/minecraft/net/minecraft/client/particle/EntityDiggingFX.java.patch index fe344139e..796ab3069 100644 --- a/patches/minecraft/net/minecraft/client/particle/EntityDiggingFX.java.patch +++ b/patches/minecraft/net/minecraft/client/particle/EntityDiggingFX.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/particle/EntityDiggingFX.java -+++ ../src_work/minecraft/net/minecraft/client/particle/EntityDiggingFX.java +--- ../src-base/minecraft/net/minecraft/client/particle/EntityDiggingFX.java ++++ ../src-work/minecraft/net/minecraft/client/particle/EntityDiggingFX.java @@ -10,15 +10,22 @@ public class EntityDiggingFX extends EntityFX { diff --git a/patches/minecraft/net/minecraft/client/particle/EntityFireworkStarterFX.java.patch b/patches/minecraft/net/minecraft/client/particle/EntityFireworkStarterFX.java.patch index 74db91f85..05433d175 100644 --- a/patches/minecraft/net/minecraft/client/particle/EntityFireworkStarterFX.java.patch +++ b/patches/minecraft/net/minecraft/client/particle/EntityFireworkStarterFX.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/particle/EntityFireworkStarterFX.java -+++ ../src_work/minecraft/net/minecraft/client/particle/EntityFireworkStarterFX.java +--- ../src-base/minecraft/net/minecraft/client/particle/EntityFireworkStarterFX.java ++++ ../src-work/minecraft/net/minecraft/client/particle/EntityFireworkStarterFX.java @@ -30,11 +30,11 @@ { this.fireworkExplosions = par15NBTTagCompound.getTagList("Explosions"); diff --git a/patches/minecraft/net/minecraft/client/renderer/EntityRenderer.java.patch b/patches/minecraft/net/minecraft/client/renderer/EntityRenderer.java.patch index df979bdbd..abd997054 100644 --- a/patches/minecraft/net/minecraft/client/renderer/EntityRenderer.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/EntityRenderer.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/renderer/EntityRenderer.java -+++ ../src_work/minecraft/net/minecraft/client/renderer/EntityRenderer.java +--- ../src-base/minecraft/net/minecraft/client/renderer/EntityRenderer.java ++++ ../src-work/minecraft/net/minecraft/client/renderer/EntityRenderer.java @@ -40,6 +40,11 @@ import org.lwjgl.opengl.GLContext; import org.lwjgl.util.glu.Project; @@ -133,11 +133,10 @@ GL11.glDisable(GL11.GL_BLEND); this.mc.mcProfiler.endStartSection("weather"); this.renderRainSnow(par1); -@@ -1248,6 +1273,20 @@ - { +@@ -1249,6 +1274,20 @@ this.renderCloudsCheck(renderglobal, par1); } -+ + + //Forge: Moved section from above, now particles are the last thing to render. + this.enableLightmap((double)par1); + this.mc.mcProfiler.endStartSection("litParticles"); @@ -151,6 +150,7 @@ + + this.mc.mcProfiler.endStartSection("FRenderLast"); + ForgeHooksClient.dispatchRenderLast(renderglobal, par1); - ++ this.mc.mcProfiler.endStartSection("hand"); + if (this.cameraZoom == 1.0D) diff --git a/patches/minecraft/net/minecraft/client/renderer/ItemRenderer.java.patch b/patches/minecraft/net/minecraft/client/renderer/ItemRenderer.java.patch index 5553fdde3..3218d6eac 100644 --- a/patches/minecraft/net/minecraft/client/renderer/ItemRenderer.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/ItemRenderer.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/renderer/ItemRenderer.java -+++ ../src_work/minecraft/net/minecraft/client/renderer/ItemRenderer.java +--- ../src-base/minecraft/net/minecraft/client/renderer/ItemRenderer.java ++++ ../src-work/minecraft/net/minecraft/client/renderer/ItemRenderer.java @@ -16,6 +16,8 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.EnumAction; @@ -23,7 +23,7 @@ @SideOnly(Side.CLIENT) public class ItemRenderer { -@@ -54,15 +63,32 @@ +@@ -54,16 +63,33 @@ this.mapItemRenderer = new MapItemRenderer(par1Minecraft.gameSettings, par1Minecraft.getTextureManager()); } @@ -44,7 +44,7 @@ - if (par2ItemStack.getItemSpriteNumber() == 0 && par2ItemStack.itemID < Block.blocksList.length && Block.blocksList[par2ItemStack.itemID] != null && RenderBlocks.renderItemIn3d(Block.blocksList[par2ItemStack.itemID].getRenderType())) + Block block = null; + if (par2ItemStack.getItem() instanceof ItemBlock && par2ItemStack.itemID < Block.blocksList.length) -+ { + { + block = Block.blocksList[par2ItemStack.itemID]; + } + @@ -55,9 +55,10 @@ + ForgeHooksClient.renderEquippedItem(type, customRenderer, renderBlocksInstance, par1EntityLivingBase, par2ItemStack); + } + else if (block != null && par2ItemStack.getItemSpriteNumber() == 0 && RenderBlocks.renderItemIn3d(Block.blocksList[par2ItemStack.itemID].getRenderType())) - { ++ { texturemanager.bindTexture(texturemanager.getResourceLocation(0)); this.renderBlocksInstance.renderBlockAsItem(Block.blocksList[par2ItemStack.itemID], par2ItemStack.getItemDamage(), 1.0F); + } @@ -94,7 +120,7 @@ GL11.glTranslatef(-0.9375F, -0.0625F, 0.0F); renderItemIn2D(tessellator, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 0.0625F); @@ -76,32 +77,31 @@ { GL11.glPushMatrix(); f12 = 0.8F; -@@ -333,11 +359,20 @@ +@@ -333,12 +359,21 @@ tessellator.addVertexWithUV((double)(128 + b0), (double)(0 - b0), 0.0D, 1.0D, 0.0D); tessellator.addVertexWithUV((double)(0 - b0), (double)(0 - b0), 0.0D, 0.0D, 0.0D); tessellator.draw(); - MapData mapdata = Item.map.getMapData(itemstack, this.mc.theWorld); -- + - if (mapdata != null) -- { -- this.mapItemRenderer.renderMap(this.mc.thePlayer, this.mc.getTextureManager(), mapdata); -+ + IItemRenderer custom = MinecraftForgeClient.getItemRenderer(itemstack, FIRST_PERSON_MAP); + MapData mapdata = ((ItemMap)itemstack.getItem()).getMapData(itemstack, this.mc.theWorld); + + if (custom == null) -+ { + { +- this.mapItemRenderer.renderMap(this.mc.thePlayer, this.mc.getTextureManager(), mapdata); + if (mapdata != null) + { + this.mapItemRenderer.renderMap(this.mc.thePlayer, this.mc.getTextureManager(), mapdata); + } -+ } + } + else + { + custom.renderItem(FIRST_PERSON_MAP, itemstack, mc.thePlayer, mc.getTextureManager(), mapdata); - } ++ } GL11.glPopMatrix(); + } @@ -439,17 +474,20 @@ if (itemstack.getItem().requiresMultipleRenderPasses()) diff --git a/patches/minecraft/net/minecraft/client/renderer/OpenGlHelper.java.patch b/patches/minecraft/net/minecraft/client/renderer/OpenGlHelper.java.patch index f2af3b8a8..4fcd49a74 100644 --- a/patches/minecraft/net/minecraft/client/renderer/OpenGlHelper.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/OpenGlHelper.java.patch @@ -1,16 +1,16 @@ ---- ../src_base/minecraft/net/minecraft/client/renderer/OpenGlHelper.java -+++ ../src_work/minecraft/net/minecraft/client/renderer/OpenGlHelper.java -@@ -25,6 +25,10 @@ - * True if the renderer supports multitextures and the OpenGL version != 1.3 +--- ../src-base/minecraft/net/minecraft/client/renderer/OpenGlHelper.java ++++ ../src-work/minecraft/net/minecraft/client/renderer/OpenGlHelper.java +@@ -26,6 +26,10 @@ */ private static boolean useMultitextureARB; -+ + + /* Stores the last values sent into setLightmapTextureCoords */ + public static float lastBrightnessX = 0.0f; + public static float lastBrightnessY = 0.0f; - ++ /** * Initializes the texture constants to be used when rendering lightmap values + */ @@ -88,5 +92,11 @@ { GL13.glMultiTexCoord2f(par0, par1, par2); diff --git a/patches/minecraft/net/minecraft/client/renderer/RenderBlocks.java.patch b/patches/minecraft/net/minecraft/client/renderer/RenderBlocks.java.patch index 460445999..824986e4c 100644 --- a/patches/minecraft/net/minecraft/client/renderer/RenderBlocks.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/RenderBlocks.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/renderer/RenderBlocks.java -+++ ../src_work/minecraft/net/minecraft/client/renderer/RenderBlocks.java +--- ../src-base/minecraft/net/minecraft/client/renderer/RenderBlocks.java ++++ ../src-work/minecraft/net/minecraft/client/renderer/RenderBlocks.java @@ -45,6 +45,8 @@ import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; diff --git a/patches/minecraft/net/minecraft/client/renderer/RenderGlobal.java.patch b/patches/minecraft/net/minecraft/client/renderer/RenderGlobal.java.patch index 6e7d87f96..8de1168c9 100644 --- a/patches/minecraft/net/minecraft/client/renderer/RenderGlobal.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/RenderGlobal.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/renderer/RenderGlobal.java -+++ ../src_work/minecraft/net/minecraft/client/renderer/RenderGlobal.java +--- ../src-base/minecraft/net/minecraft/client/renderer/RenderGlobal.java ++++ ../src-work/minecraft/net/minecraft/client/renderer/RenderGlobal.java @@ -68,6 +68,9 @@ import org.lwjgl.opengl.ARBOcclusionQuery; import org.lwjgl.opengl.GL11; @@ -103,15 +103,15 @@ if (this.mc.theWorld.provider.isSurfaceWorld()) { if (this.mc.gameSettings.fancyGraphics) -@@ -1595,6 +1628,11 @@ - } +@@ -1596,6 +1629,11 @@ public void drawBlockDamageTexture(Tessellator par1Tessellator, EntityPlayer par2EntityPlayer, float par3) -+ { + { + drawBlockDamageTexture(par1Tessellator, (EntityLivingBase)par2EntityPlayer, par3); + } + + public void drawBlockDamageTexture(Tessellator par1Tessellator, EntityLivingBase par2EntityPlayer, float par3) - { ++ { double d0 = par2EntityPlayer.lastTickPosX + (par2EntityPlayer.posX - par2EntityPlayer.lastTickPosX) * (double)par3; double d1 = par2EntityPlayer.lastTickPosY + (par2EntityPlayer.posY - par2EntityPlayer.lastTickPosY) * (double)par3; + double d2 = par2EntityPlayer.lastTickPosZ + (par2EntityPlayer.posZ - par2EntityPlayer.lastTickPosZ) * (double)par3; diff --git a/patches/minecraft/net/minecraft/client/renderer/Tessellator.java.patch b/patches/minecraft/net/minecraft/client/renderer/Tessellator.java.patch index 82dbc93aa..1c2b1deec 100644 --- a/patches/minecraft/net/minecraft/client/renderer/Tessellator.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/Tessellator.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/renderer/Tessellator.java -+++ ../src_work/minecraft/net/minecraft/client/renderer/Tessellator.java +--- ../src-base/minecraft/net/minecraft/client/renderer/Tessellator.java ++++ ../src-work/minecraft/net/minecraft/client/renderer/Tessellator.java @@ -7,6 +7,8 @@ import java.nio.FloatBuffer; import java.nio.IntBuffer; @@ -75,11 +75,6 @@ - this.shortBuffer = this.byteBuffer.asShortBuffer(); - this.rawBuffer = new int[par1]; - this.useVBO = tryVBO && GLContext.getCapabilities().GL_ARB_vertex_buffer_object; -- -- if (this.useVBO) -- { -- this.vertexBuffers = GLAllocation.createDirectIntBuffer(this.vboCount); -- ARBVertexBufferObject.glGenBuffersARB(this.vertexBuffers); + } + + public Tessellator() @@ -90,9 +85,12 @@ + { + instance.defaultTexture = true; + useVBO = tryVBO && GLContext.getCapabilities().GL_ARB_vertex_buffer_object; -+ + +- if (this.useVBO) + if (useVBO) -+ { + { +- this.vertexBuffers = GLAllocation.createDirectIntBuffer(this.vboCount); +- ARBVertexBufferObject.glGenBuffersARB(this.vertexBuffers); + vertexBuffers = GLAllocation.createDirectIntBuffer(vboCount); + ARBVertexBufferObject.glGenBuffersARB(vertexBuffers); } @@ -103,10 +101,9 @@ this.isDrawing = false; - if (this.vertexCount > 0) -- { + int offs = 0; + while (offs < vertexCount) -+ { + { + int vtc = 0; + if (drawMode == 7 && convertQuadsToTriangles) + { @@ -140,19 +137,19 @@ } GL11.glDisableClientState(GL11.GL_VERTEX_ARRAY); -@@ -278,6 +300,12 @@ - { - GL11.glDisableClientState(GL11.GL_NORMAL_ARRAY); +@@ -280,6 +302,12 @@ } -+ } -+ + } + + if (rawBufferSize > 0x20000 && rawBufferIndex < (rawBufferSize << 3)) + { + rawBufferSize = 0; + rawBuffer = null; - } - ++ } ++ int i = this.rawBufferIndex * 4; + this.reset(); + return i; @@ -442,6 +470,19 @@ */ public void addVertex(double par1, double par3, double par5) diff --git a/patches/minecraft/net/minecraft/client/renderer/WorldRenderer.java.patch b/patches/minecraft/net/minecraft/client/renderer/WorldRenderer.java.patch index 49e9cd3ea..52b23684b 100644 --- a/patches/minecraft/net/minecraft/client/renderer/WorldRenderer.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/WorldRenderer.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/renderer/WorldRenderer.java -+++ ../src_work/minecraft/net/minecraft/client/renderer/WorldRenderer.java +--- ../src-base/minecraft/net/minecraft/client/renderer/WorldRenderer.java ++++ ../src-work/minecraft/net/minecraft/client/renderer/WorldRenderer.java @@ -23,7 +23,7 @@ /** Reference to the World object. */ public World worldObj; diff --git a/patches/minecraft/net/minecraft/client/renderer/entity/RenderBiped.java.patch b/patches/minecraft/net/minecraft/client/renderer/entity/RenderBiped.java.patch index 5880e6540..f3be8c979 100644 --- a/patches/minecraft/net/minecraft/client/renderer/entity/RenderBiped.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/entity/RenderBiped.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderBiped.java -+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderBiped.java +--- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderBiped.java ++++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderBiped.java @@ -14,9 +14,15 @@ import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.Item; @@ -85,12 +85,11 @@ float f1 = 1.0F; - if (itemarmor.getArmorMaterial() == EnumArmorMaterial.CLOTH) -- { -- int j = itemarmor.getColor(itemstack); + //Move out of if to allow for more then just CLOTH to have color + int j = itemarmor.getColor(itemstack); + if (j != -1) -+ { + { +- int j = itemarmor.getColor(itemstack); float f2 = (float)(j >> 16 & 255) / 255.0F; float f3 = (float)(j >> 8 & 255) / 255.0F; float f4 = (float)(j & 255) / 255.0F; @@ -108,13 +107,12 @@ this.modelBipedMain.bipedHead.postRender(0.0625F); - if (itemstack1.getItem().itemID < 256) -- { -- if (RenderBlocks.renderItemIn3d(Block.blocksList[itemstack1.itemID].getRenderType())) + IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack1, EQUIPPED); + boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack1, BLOCK_3D)); + + if (itemstack1.getItem() instanceof ItemBlock) -+ { + { +- if (RenderBlocks.renderItemIn3d(Block.blocksList[itemstack1.itemID].getRenderType())) + if (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[itemstack1.itemID].getRenderType())) { f2 = 0.625F; diff --git a/patches/minecraft/net/minecraft/client/renderer/entity/RenderItem.java.patch b/patches/minecraft/net/minecraft/client/renderer/entity/RenderItem.java.patch index 5de5df58c..f41993529 100644 --- a/patches/minecraft/net/minecraft/client/renderer/entity/RenderItem.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/entity/RenderItem.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderItem.java -+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderItem.java +--- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderItem.java ++++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderItem.java @@ -21,6 +21,8 @@ import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; @@ -9,7 +9,7 @@ @SideOnly(Side.CLIENT) public class RenderItem extends Render { -@@ -53,29 +55,9 @@ +@@ -53,30 +55,10 @@ if (itemstack.getItem() != null) { GL11.glPushMatrix(); @@ -17,7 +17,8 @@ + float f2 = shouldBob() ? MathHelper.sin(((float)par1EntityItem.age + par9) / 10.0F + par1EntityItem.hoverStart) * 0.1F + 0.1F : 0F; float f3 = (((float)par1EntityItem.age + par9) / 20.0F + par1EntityItem.hoverStart) * (180F / (float)Math.PI); - byte b0 = 1; -- ++ byte b0 = getMiniBlockCount(itemstack); + - if (par1EntityItem.getEntityItem().stackSize > 1) - { - b0 = 2; @@ -37,20 +38,19 @@ - { - b0 = 5; - } -+ byte b0 = getMiniBlockCount(itemstack); - +- GL11.glTranslatef((float)par2, (float)par4 + f2, (float)par6); GL11.glEnable(GL12.GL_RESCALE_NORMAL); + float f4; @@ -84,9 +66,18 @@ float f6; int i; - if (itemstack.getItemSpriteNumber() == 0 && itemstack.itemID < Block.blocksList.length && Block.blocksList[itemstack.itemID] != null && RenderBlocks.renderItemIn3d(Block.blocksList[itemstack.itemID].getRenderType())) -- { -- Block block = Block.blocksList[itemstack.itemID]; + Block block = null; + if (itemstack.itemID < Block.blocksList.length) -+ { + { +- Block block = Block.blocksList[itemstack.itemID]; + block = Block.blocksList[itemstack.itemID]; + } + @@ -99,23 +99,24 @@ } } } -@@ -204,6 +195,10 @@ - * Renders a dropped item +@@ -205,6 +196,10 @@ */ private void renderDroppedItem(EntityItem par1EntityItem, Icon par2Icon, int par3, float par4, float par5, float par6, float par7) -+ { + { + renderDroppedItem(par1EntityItem, par2Icon, par3, par4, par5, par6, par7, 0); + } + private void renderDroppedItem(EntityItem par1EntityItem, Icon par2Icon, int par3, float par4, float par5, float par6, float par7, int pass) - { ++ { Tessellator tessellator = Tessellator.instance; + if (par2Icon == null) @@ -240,32 +235,26 @@ f11 = 0.021875F; ItemStack itemstack = par1EntityItem.getEntityItem(); int j = itemstack.stackSize; - byte b0; -- ++ byte b0 = getMiniItemCount(itemstack); + - if (j < 2) - { - b0 = 1; @@ -132,15 +133,12 @@ - { - b0 = 4; - } -+ byte b0 = getMiniItemCount(itemstack); - +- GL11.glTranslatef(-f9, -f10, -((f12 + f11) * (float)b0 / 2.0F)); for (int k = 0; k < b0; ++k) { - GL11.glTranslatef(0.0F, 0.0F, f12 + f11); -- -- if (itemstack.getItemSpriteNumber() == 0 && Block.blocksList[itemstack.itemID] != null) + // Makes items offset when in 3D, like when in 2D, looks much better. Considered a vanilla bug... + if (k > 0 && shouldSpreadItems()) + { @@ -153,7 +151,8 @@ + { + GL11.glTranslatef(0f, 0f, f12 + f11); + } -+ + +- if (itemstack.getItemSpriteNumber() == 0 && Block.blocksList[itemstack.itemID] != null) + if (itemstack.getItemSpriteNumber() == 0) { this.bindTexture(TextureMap.locationBlocksTexture); @@ -196,13 +195,11 @@ { GL11.glDisable(GL11.GL_LIGHTING); - par2TextureManager.bindTexture(TextureMap.locationItemsTexture); -- + - for (int j1 = 0; j1 <= 1; ++j1) -- { -- Icon icon = Item.itemsList[k].getIconFromDamageForRenderPass(l, j1); -+ + for (int j1 = 0; j1 < Item.itemsList[k].getRenderPasses(l); ++j1) -+ { + { +- Icon icon = Item.itemsList[k].getIconFromDamageForRenderPass(l, j1); + par2TextureManager.bindTexture(par3ItemStack.getItemSpriteNumber() == 0 ? TextureMap.locationBlocksTexture : TextureMap.locationItemsTexture); + Icon icon = Item.itemsList[k].getIcon(par3ItemStack, j1); int k1 = Item.itemsList[k].getColorFromItemStack(par3ItemStack, j1); @@ -260,12 +257,11 @@ if (par3ItemStack != null) { - this.renderItemIntoGUI(par1FontRenderer, par2TextureManager, par3ItemStack, par4, par5); -- + if (!ForgeHooksClient.renderInventoryItem(renderBlocks, par2TextureManager, par3ItemStack, renderWithColor, zLevel, (float)par4, (float)par5)) + { + this.renderItemIntoGUI(par1FontRenderer, par2TextureManager, par3ItemStack, par4, par5, true); + } -+ + + /* Modders must handle this themselves if they use custom renderers! if (par3ItemStack.hasEffect()) { diff --git a/patches/minecraft/net/minecraft/client/renderer/entity/RenderManager.java.patch b/patches/minecraft/net/minecraft/client/renderer/entity/RenderManager.java.patch index d24e1117b..06ec9da9d 100644 --- a/patches/minecraft/net/minecraft/client/renderer/entity/RenderManager.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/entity/RenderManager.java.patch @@ -1,17 +1,16 @@ ---- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderManager.java -+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderManager.java +--- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderManager.java ++++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderManager.java @@ -223,12 +223,14 @@ if (par4EntityLivingBase.isPlayerSleeping()) { - int i = par1World.getBlockId(MathHelper.floor_double(par4EntityLivingBase.posX), MathHelper.floor_double(par4EntityLivingBase.posY), MathHelper.floor_double(par4EntityLivingBase.posZ)); -- -- if (i == Block.bed.blockID) + int x = MathHelper.floor_double(par4EntityLivingBase.posX); + int y = MathHelper.floor_double(par4EntityLivingBase.posY); + int z = MathHelper.floor_double(par4EntityLivingBase.posZ); + Block block = Block.blocksList[par1World.getBlockId(x, y, z)]; -+ + +- if (i == Block.bed.blockID) + if (block != null && block.isBed(par1World, x, y, z, par4EntityLivingBase)) { - int j = par1World.getBlockMetadata(MathHelper.floor_double(par4EntityLivingBase.posX), MathHelper.floor_double(par4EntityLivingBase.posY), MathHelper.floor_double(par4EntityLivingBase.posZ)); diff --git a/patches/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java.patch b/patches/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java.patch index 1c52bf670..65c769b1d 100644 --- a/patches/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java -+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java +--- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java ++++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java @@ -15,13 +15,22 @@ import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.Item; @@ -58,12 +58,11 @@ float f1 = 1.0F; - if (itemarmor.getArmorMaterial() == EnumArmorMaterial.CLOTH) -- { -- int j = itemarmor.getColor(itemstack); + //Move outside if to allow for more then just CLOTH + int j = itemarmor.getColor(itemstack); + if (j != -1) -+ { + { +- int j = itemarmor.getColor(itemstack); float f2 = (float)(j >> 16 & 255) / 255.0F; float f3 = (float)(j >> 8 & 255) / 255.0F; float f4 = (float)(j & 255) / 255.0F; @@ -116,10 +115,9 @@ float f2; - if (itemstack.getItem().itemID < 256) -- { -- if (RenderBlocks.renderItemIn3d(Block.blocksList[itemstack.itemID].getRenderType())) + if (itemstack != null && itemstack.getItem() instanceof ItemBlock) -+ { + { +- if (RenderBlocks.renderItemIn3d(Block.blocksList[itemstack.itemID].getRenderType())) + IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack, EQUIPPED); + boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack, BLOCK_3D)); + diff --git a/patches/minecraft/net/minecraft/client/renderer/entity/RenderSnowMan.java.patch b/patches/minecraft/net/minecraft/client/renderer/entity/RenderSnowMan.java.patch index 7b8e50683..dce268645 100644 --- a/patches/minecraft/net/minecraft/client/renderer/entity/RenderSnowMan.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/entity/RenderSnowMan.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderSnowMan.java -+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderSnowMan.java +--- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderSnowMan.java ++++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderSnowMan.java @@ -8,9 +8,14 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; diff --git a/patches/minecraft/net/minecraft/client/renderer/entity/RendererLivingEntity.java.patch b/patches/minecraft/net/minecraft/client/renderer/entity/RendererLivingEntity.java.patch index e336a3838..0dc6fd224 100644 --- a/patches/minecraft/net/minecraft/client/renderer/entity/RendererLivingEntity.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/entity/RendererLivingEntity.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/renderer/entity/RendererLivingEntity.java -+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RendererLivingEntity.java +--- ../src-base/minecraft/net/minecraft/client/renderer/entity/RendererLivingEntity.java ++++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RendererLivingEntity.java @@ -18,6 +18,9 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.MathHelper; diff --git a/patches/minecraft/net/minecraft/client/renderer/texture/Stitcher.java.patch b/patches/minecraft/net/minecraft/client/renderer/texture/Stitcher.java.patch index 8eae647b0..42a2d0444 100644 --- a/patches/minecraft/net/minecraft/client/renderer/texture/Stitcher.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/texture/Stitcher.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/renderer/texture/Stitcher.java -+++ ../src_work/minecraft/net/minecraft/client/renderer/texture/Stitcher.java +--- ../src-base/minecraft/net/minecraft/client/renderer/texture/Stitcher.java ++++ ../src-work/minecraft/net/minecraft/client/renderer/texture/Stitcher.java @@ -187,7 +187,7 @@ if (flag4 ^ flag5) diff --git a/patches/minecraft/net/minecraft/client/renderer/texture/TextureAtlasSprite.java.patch b/patches/minecraft/net/minecraft/client/renderer/texture/TextureAtlasSprite.java.patch index d12ee3c7f..8f4c9bd6f 100644 --- a/patches/minecraft/net/minecraft/client/renderer/texture/TextureAtlasSprite.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/texture/TextureAtlasSprite.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/renderer/texture/TextureAtlasSprite.java -+++ ../src_work/minecraft/net/minecraft/client/renderer/texture/TextureAtlasSprite.java +--- ../src-base/minecraft/net/minecraft/client/renderer/texture/TextureAtlasSprite.java ++++ ../src-work/minecraft/net/minecraft/client/renderer/texture/TextureAtlasSprite.java @@ -11,9 +11,11 @@ import java.util.List; import javax.imageio.ImageIO; diff --git a/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch b/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch index 21a3376b5..ba3336d40 100644 --- a/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/renderer/texture/TextureMap.java -+++ ../src_work/minecraft/net/minecraft/client/renderer/texture/TextureMap.java +--- ../src-base/minecraft/net/minecraft/client/renderer/texture/TextureMap.java ++++ ../src-work/minecraft/net/minecraft/client/renderer/texture/TextureMap.java @@ -21,6 +21,7 @@ import net.minecraft.util.Icon; import net.minecraft.util.ReportedException; diff --git a/patches/minecraft/net/minecraft/client/renderer/tileentity/TileEntityChestRenderer.java.patch b/patches/minecraft/net/minecraft/client/renderer/tileentity/TileEntityChestRenderer.java.patch index 62171239b..375062ad5 100644 --- a/patches/minecraft/net/minecraft/client/renderer/tileentity/TileEntityChestRenderer.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/tileentity/TileEntityChestRenderer.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/client/renderer/tileentity/TileEntityChestRenderer.java -+++ ../src_work/minecraft/net/minecraft/client/renderer/tileentity/TileEntityChestRenderer.java +--- ../src-base/minecraft/net/minecraft/client/renderer/tileentity/TileEntityChestRenderer.java ++++ ../src-work/minecraft/net/minecraft/client/renderer/tileentity/TileEntityChestRenderer.java @@ -1,5 +1,6 @@ package net.minecraft.client.renderer.tileentity; diff --git a/patches/minecraft/net/minecraft/command/CommandHandler.java.patch b/patches/minecraft/net/minecraft/command/CommandHandler.java.patch index 8529ac966..882b4851c 100644 --- a/patches/minecraft/net/minecraft/command/CommandHandler.java.patch +++ b/patches/minecraft/net/minecraft/command/CommandHandler.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/command/CommandHandler.java -+++ ../src_work/minecraft/net/minecraft/command/CommandHandler.java +--- ../src-base/minecraft/net/minecraft/command/CommandHandler.java ++++ ../src-work/minecraft/net/minecraft/command/CommandHandler.java @@ -12,6 +12,9 @@ import net.minecraft.util.ChatMessageComponent; import net.minecraft.util.EnumChatFormatting; diff --git a/patches/minecraft/net/minecraft/crash/CallableSuspiciousClasses.java.patch b/patches/minecraft/net/minecraft/crash/CallableSuspiciousClasses.java.patch index 44ee2ec9d..db365e231 100644 --- a/patches/minecraft/net/minecraft/crash/CallableSuspiciousClasses.java.patch +++ b/patches/minecraft/net/minecraft/crash/CallableSuspiciousClasses.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/crash/CallableSuspiciousClasses.java -+++ ../src_work/minecraft/net/minecraft/crash/CallableSuspiciousClasses.java +--- ../src-base/minecraft/net/minecraft/crash/CallableSuspiciousClasses.java ++++ ../src-work/minecraft/net/minecraft/crash/CallableSuspiciousClasses.java @@ -130,6 +130,6 @@ public Object call() diff --git a/patches/minecraft/net/minecraft/crash/CrashReport.java.patch b/patches/minecraft/net/minecraft/crash/CrashReport.java.patch index 78fd5a696..c6ccc419b 100644 --- a/patches/minecraft/net/minecraft/crash/CrashReport.java.patch +++ b/patches/minecraft/net/minecraft/crash/CrashReport.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/crash/CrashReport.java -+++ ../src_work/minecraft/net/minecraft/crash/CrashReport.java +--- ../src-base/minecraft/net/minecraft/crash/CrashReport.java ++++ ../src-work/minecraft/net/minecraft/crash/CrashReport.java @@ -245,7 +245,8 @@ StackTraceElement stacktraceelement = null; StackTraceElement stacktraceelement1 = null; diff --git a/patches/minecraft/net/minecraft/crash/CrashReportCategory.java.patch b/patches/minecraft/net/minecraft/crash/CrashReportCategory.java.patch index e877e5230..7799d347b 100644 --- a/patches/minecraft/net/minecraft/crash/CrashReportCategory.java.patch +++ b/patches/minecraft/net/minecraft/crash/CrashReportCategory.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/crash/CrashReportCategory.java -+++ ../src_work/minecraft/net/minecraft/crash/CrashReportCategory.java +--- ../src-base/minecraft/net/minecraft/crash/CrashReportCategory.java ++++ ../src-work/minecraft/net/minecraft/crash/CrashReportCategory.java @@ -130,8 +130,11 @@ public int func_85073_a(int par1) { diff --git a/patches/minecraft/net/minecraft/creativetab/CreativeTabs.java.patch b/patches/minecraft/net/minecraft/creativetab/CreativeTabs.java.patch index 5b1f85db5..694be619f 100644 --- a/patches/minecraft/net/minecraft/creativetab/CreativeTabs.java.patch +++ b/patches/minecraft/net/minecraft/creativetab/CreativeTabs.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/creativetab/CreativeTabs.java -+++ ../src_work/minecraft/net/minecraft/creativetab/CreativeTabs.java +--- ../src-base/minecraft/net/minecraft/creativetab/CreativeTabs.java ++++ ../src-work/minecraft/net/minecraft/creativetab/CreativeTabs.java @@ -7,6 +7,7 @@ import net.minecraft.enchantment.EnchantmentData; import net.minecraft.enchantment.EnumEnchantmentType; @@ -53,17 +53,16 @@ return this.tabIndex < 6; } -@@ -187,9 +210,17 @@ +@@ -187,10 +210,18 @@ { Item item = aitem[j]; - if (item != null && item.getCreativeTab() == this) -- { -- item.getSubItems(item.itemID, this, par1List); + if (item == null) -+ { + { +- item.getSubItems(item.itemID, this, par1List); + continue; -+ } + } + + for (CreativeTabs tab : item.getCreativeTabs()) + { @@ -71,9 +70,10 @@ + { + item.getSubItems(item.itemID, this, par1List); + } - } ++ } } + if (this.func_111225_m() != null) @@ -232,4 +263,36 @@ } } diff --git a/patches/minecraft/net/minecraft/enchantment/Enchantment.java.patch b/patches/minecraft/net/minecraft/enchantment/Enchantment.java.patch index 9a531e19a..03d457717 100644 --- a/patches/minecraft/net/minecraft/enchantment/Enchantment.java.patch +++ b/patches/minecraft/net/minecraft/enchantment/Enchantment.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/enchantment/Enchantment.java -+++ ../src_work/minecraft/net/minecraft/enchantment/Enchantment.java +--- ../src-base/minecraft/net/minecraft/enchantment/Enchantment.java ++++ ../src-work/minecraft/net/minecraft/enchantment/Enchantment.java @@ -1,6 +1,9 @@ package net.minecraft.enchantment; diff --git a/patches/minecraft/net/minecraft/enchantment/EnchantmentHelper.java.patch b/patches/minecraft/net/minecraft/enchantment/EnchantmentHelper.java.patch index 8fe6cc8cf..1f5fff16e 100644 --- a/patches/minecraft/net/minecraft/enchantment/EnchantmentHelper.java.patch +++ b/patches/minecraft/net/minecraft/enchantment/EnchantmentHelper.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/enchantment/EnchantmentHelper.java -+++ ../src_work/minecraft/net/minecraft/enchantment/EnchantmentHelper.java +--- ../src-base/minecraft/net/minecraft/enchantment/EnchantmentHelper.java ++++ ../src-work/minecraft/net/minecraft/enchantment/EnchantmentHelper.java @@ -463,7 +463,10 @@ { Enchantment enchantment = aenchantment[k]; diff --git a/patches/minecraft/net/minecraft/entity/Entity.java.patch b/patches/minecraft/net/minecraft/entity/Entity.java.patch index e5a282d75..43a6e6e9d 100644 --- a/patches/minecraft/net/minecraft/entity/Entity.java.patch +++ b/patches/minecraft/net/minecraft/entity/Entity.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/entity/Entity.java -+++ ../src_work/minecraft/net/minecraft/entity/Entity.java +--- ../src-base/minecraft/net/minecraft/entity/Entity.java ++++ ../src-work/minecraft/net/minecraft/entity/Entity.java @@ -1,10 +1,15 @@ package net.minecraft.entity; @@ -49,7 +49,7 @@ public abstract class Entity { -@@ -218,6 +234,13 @@ +@@ -218,7 +234,14 @@ private boolean invulnerable; private UUID entityUniqueID; public EnumEntitySize myEntitySize; @@ -58,11 +58,12 @@ + public boolean captureDrops = false; + public ArrayList capturedDrops = new ArrayList(); + private UUID persistentID; -+ -+ private HashMap extendedProperties; ++ private HashMap extendedProperties; ++ public Entity(World par1World) { + this.entityId = nextEntityID++; @@ -245,6 +268,15 @@ this.dataWatcher.addObject(0, Byte.valueOf((byte)0)); this.dataWatcher.addObject(1, Short.valueOf((short)300)); @@ -84,13 +85,12 @@ int l = this.worldObj.getBlockId(i, j, k); - if (l != 0 && Block.blocksList[l].blockMaterial == par1Material) -- { ++ Block block = Block.blocksList[l]; ++ if (block != null && block.blockMaterial == par1Material) + { - float f = BlockFluid.getFluidHeightPercent(this.worldObj.getBlockMetadata(i, j, k)) - 0.11111111F; - float f1 = (float)(j + 1) - f; - return d0 < (double)f1; -+ Block block = Block.blocksList[l]; -+ if (block != null && block.blockMaterial == par1Material) -+ { + double filled = block.getFilledPercentage(worldObj, i, j, k); + if (filled < 0) + { diff --git a/patches/minecraft/net/minecraft/entity/EntityLiving.java.patch b/patches/minecraft/net/minecraft/entity/EntityLiving.java.patch index 2127d37b7..69b1a087b 100644 --- a/patches/minecraft/net/minecraft/entity/EntityLiving.java.patch +++ b/patches/minecraft/net/minecraft/entity/EntityLiving.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/entity/EntityLiving.java -+++ ../src_work/minecraft/net/minecraft/entity/EntityLiving.java +--- ../src-base/minecraft/net/minecraft/entity/EntityLiving.java ++++ ../src-work/minecraft/net/minecraft/entity/EntityLiving.java @@ -31,6 +31,11 @@ import net.minecraft.util.MathHelper; import net.minecraft.world.World; @@ -20,7 +20,7 @@ } /** -@@ -547,9 +553,21 @@ +@@ -547,10 +553,22 @@ */ protected void despawnEntity() { @@ -28,7 +28,7 @@ if (this.persistenceRequired) { this.entityAge = 0; -+ } + } + else if ((this.entityAge & 0x1F) == 0x1F && (result = ForgeEventFactory.canEntityDespawn(this)) != Result.DEFAULT) + { + if (result == Result.DENY) @@ -39,9 +39,10 @@ + { + this.setDead(); + } - } ++ } else { + EntityPlayer entityplayer = this.worldObj.getClosestPlayerToEntity(this, -1.0D); @@ -726,8 +744,6 @@ return this.worldObj.checkNoEntityCollision(this.boundingBox) && this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).isEmpty() && !this.worldObj.isAnyLiquid(this.boundingBox); } diff --git a/patches/minecraft/net/minecraft/entity/EntityLivingBase.java.patch b/patches/minecraft/net/minecraft/entity/EntityLivingBase.java.patch index 04896364f..b4c5accdc 100644 --- a/patches/minecraft/net/minecraft/entity/EntityLivingBase.java.patch +++ b/patches/minecraft/net/minecraft/entity/EntityLivingBase.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/entity/EntityLivingBase.java -+++ ../src_work/minecraft/net/minecraft/entity/EntityLivingBase.java +--- ../src-base/minecraft/net/minecraft/entity/EntityLivingBase.java ++++ ../src-work/minecraft/net/minecraft/entity/EntityLivingBase.java @@ -20,9 +20,11 @@ import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.item.EntityXPOrb; @@ -73,7 +73,7 @@ if (!this.isChild() && this.worldObj.getGameRules().getGameRuleBooleanValue("doMobLoot")) { this.dropFewItems(this.recentlyHit > 0, i); -@@ -1013,12 +1021,22 @@ +@@ -1013,7 +1021,7 @@ if (this.recentlyHit > 0) { @@ -82,10 +82,10 @@ if (j < 5) { - this.dropRareDrop(j <= 0 ? 1 : 0); +@@ -1021,6 +1029,16 @@ } -+ } -+ } + } + } + + captureDrops = false; + @@ -94,9 +94,11 @@ + for (EntityItem item : capturedDrops) + { + worldObj.spawnEntityInWorld(item); - } - } ++ } ++ } } + + this.worldObj.setEntityState(this, (byte)3); @@ -1088,7 +1106,7 @@ int j = MathHelper.floor_double(this.boundingBox.minY); int k = MathHelper.floor_double(this.posZ); diff --git a/patches/minecraft/net/minecraft/entity/ai/EntityAIAttackOnCollide.java.patch b/patches/minecraft/net/minecraft/entity/ai/EntityAIAttackOnCollide.java.patch index 634136b7f..f1337800f 100644 --- a/patches/minecraft/net/minecraft/entity/ai/EntityAIAttackOnCollide.java.patch +++ b/patches/minecraft/net/minecraft/entity/ai/EntityAIAttackOnCollide.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/entity/ai/EntityAIAttackOnCollide.java -+++ ../src_work/minecraft/net/minecraft/entity/ai/EntityAIAttackOnCollide.java +--- ../src-base/minecraft/net/minecraft/entity/ai/EntityAIAttackOnCollide.java ++++ ../src-work/minecraft/net/minecraft/entity/ai/EntityAIAttackOnCollide.java @@ -3,6 +3,7 @@ import net.minecraft.entity.EntityCreature; import net.minecraft.entity.EntityLivingBase; @@ -8,15 +8,15 @@ import net.minecraft.util.MathHelper; import net.minecraft.world.World; -@@ -28,6 +29,8 @@ - PathEntity entityPathEntity; +@@ -29,6 +30,8 @@ Class classTarget; private int field_75445_i; -+ -+ private int failedPathFindingPenalty; ++ private int failedPathFindingPenalty; ++ public EntityAIAttackOnCollide(EntityCreature par1EntityCreature, Class par2Class, double par3, boolean par5) { + this(par1EntityCreature, par3, par5); @@ -65,8 +68,16 @@ } else diff --git a/patches/minecraft/net/minecraft/entity/boss/EntityDragon.java.patch b/patches/minecraft/net/minecraft/entity/boss/EntityDragon.java.patch index 1adbe8327..b8484ab2d 100644 --- a/patches/minecraft/net/minecraft/entity/boss/EntityDragon.java.patch +++ b/patches/minecraft/net/minecraft/entity/boss/EntityDragon.java.patch @@ -1,13 +1,12 @@ ---- ../src_base/minecraft/net/minecraft/entity/boss/EntityDragon.java -+++ ../src_work/minecraft/net/minecraft/entity/boss/EntityDragon.java +--- ../src-base/minecraft/net/minecraft/entity/boss/EntityDragon.java ++++ ../src-work/minecraft/net/minecraft/entity/boss/EntityDragon.java @@ -527,10 +527,11 @@ for (int i2 = k; i2 <= j1; ++i2) { int j2 = this.worldObj.getBlockId(k1, l1, i2); -- -- if (j2 != 0) + Block block = Block.blocksList[j2]; -+ + +- if (j2 != 0) + if (block != null) { - if (j2 != Block.obsidian.blockID && j2 != Block.whiteStone.blockID && j2 != Block.bedrock.blockID && this.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing")) diff --git a/patches/minecraft/net/minecraft/entity/boss/EntityWither.java.patch b/patches/minecraft/net/minecraft/entity/boss/EntityWither.java.patch index 1808b3220..88f0f4620 100644 --- a/patches/minecraft/net/minecraft/entity/boss/EntityWither.java.patch +++ b/patches/minecraft/net/minecraft/entity/boss/EntityWither.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/entity/boss/EntityWither.java -+++ ../src_work/minecraft/net/minecraft/entity/boss/EntityWither.java +--- ../src-base/minecraft/net/minecraft/entity/boss/EntityWither.java ++++ ../src-work/minecraft/net/minecraft/entity/boss/EntityWither.java @@ -355,7 +355,8 @@ int l2 = j1 + l1; int i3 = this.worldObj.getBlockId(j2, k2, l2); diff --git a/patches/minecraft/net/minecraft/entity/effect/EntityLightningBolt.java.patch b/patches/minecraft/net/minecraft/entity/effect/EntityLightningBolt.java.patch index a0843132e..033e61042 100644 --- a/patches/minecraft/net/minecraft/entity/effect/EntityLightningBolt.java.patch +++ b/patches/minecraft/net/minecraft/entity/effect/EntityLightningBolt.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/entity/effect/EntityLightningBolt.java -+++ ../src_work/minecraft/net/minecraft/entity/effect/EntityLightningBolt.java +--- ../src-base/minecraft/net/minecraft/entity/effect/EntityLightningBolt.java ++++ ../src-work/minecraft/net/minecraft/entity/effect/EntityLightningBolt.java @@ -10,6 +10,8 @@ import net.minecraft.util.MathHelper; import net.minecraft.util.Vec3; diff --git a/patches/minecraft/net/minecraft/entity/item/EntityEnderPearl.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityEnderPearl.java.patch index 5695a078f..5dc75e9f0 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityEnderPearl.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityEnderPearl.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/entity/item/EntityEnderPearl.java -+++ ../src_work/minecraft/net/minecraft/entity/item/EntityEnderPearl.java +--- ../src-base/minecraft/net/minecraft/entity/item/EntityEnderPearl.java ++++ ../src-work/minecraft/net/minecraft/entity/item/EntityEnderPearl.java @@ -9,6 +9,8 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; diff --git a/patches/minecraft/net/minecraft/entity/item/EntityItem.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityItem.java.patch index eedc3671c..82c46068d 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityItem.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityItem.java.patch @@ -1,17 +1,17 @@ ---- ../src_base/minecraft/net/minecraft/entity/item/EntityItem.java -+++ ../src_work/minecraft/net/minecraft/entity/item/EntityItem.java -@@ -1,6 +1,11 @@ - package net.minecraft.entity.item; +--- ../src-base/minecraft/net/minecraft/entity/item/EntityItem.java ++++ ../src-work/minecraft/net/minecraft/entity/item/EntityItem.java +@@ -2,6 +2,11 @@ import java.util.Iterator; -+ + +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.Event.Result; +import net.minecraftforge.event.entity.item.ItemExpireEvent; +import net.minecraftforge.event.entity.player.EntityItemPickupEvent; - ++ import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.block.Block; + import net.minecraft.block.material.Material; @@ -30,6 +35,11 @@ /** The EntityItem's random initial float height. */ public float hoverStart; @@ -48,7 +48,7 @@ super.onUpdate(); if (this.delayBeforeCanPickup > 0) -@@ -133,7 +153,29 @@ +@@ -133,8 +153,30 @@ ++this.age; @@ -56,7 +56,7 @@ + ItemStack item = getDataWatcher().getWatchableObjectItemStack(10); + + if (!this.worldObj.isRemote && this.age >= lifespan) -+ { + { + if (item != null) + { + ItemExpireEvent event = new ItemExpireEvent(this, (item.getItem() == null ? 6000 : item.getItem().getEntityLifespan(item, worldObj))); @@ -76,9 +76,10 @@ + } + + if (item != null && item.stackSize <= 0) - { ++ { this.setDead(); } + } @@ -268,6 +310,7 @@ { par1NBTTagCompound.setShort("Health", (short)((byte)this.health)); diff --git a/patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch index c1d216a14..65c46345f 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/entity/item/EntityMinecart.java -+++ ../src_work/minecraft/net/minecraft/entity/item/EntityMinecart.java +--- ../src-base/minecraft/net/minecraft/entity/item/EntityMinecart.java ++++ ../src-work/minecraft/net/minecraft/entity/item/EntityMinecart.java @@ -21,6 +21,10 @@ import net.minecraft.util.Vec3; import net.minecraft.world.World; @@ -68,12 +68,11 @@ int l = this.worldObj.getBlockId(j, i, k); - if (BlockRailBase.isRailBlock(l)) -- { ++ if (canUseRail() && BlockRailBase.isRailBlock(l)) + { - int i1 = this.worldObj.getBlockMetadata(j, i, k); - this.updateOnTrack(j, i, k, d4, d5, l, i1); - -+ if (canUseRail() && BlockRailBase.isRailBlock(l)) -+ { + BlockRailBase rail = (BlockRailBase)Block.blocksList[l]; + float railMaxSpeed = rail.getRailMaxSpeed(worldObj, this, j, i, k); + double maxSpeed = Math.min(railMaxSpeed, getCurrentCartSpeedCapOnRail()); @@ -92,12 +91,12 @@ } this.doBlockCollisions(); -@@ -391,7 +419,18 @@ +@@ -391,8 +419,19 @@ } this.setRotation(this.rotationYaw, this.rotationPitch); - List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.expand(0.20000000298023224D, 0.0D, 0.20000000298023224D)); -+ + + AxisAlignedBB box; + if (getCollisionHandler() != null) + { @@ -109,9 +108,10 @@ + } + + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, box); - ++ if (list != null && !list.isEmpty()) { + for (int j1 = 0; j1 < list.size(); ++j1) @@ -415,6 +454,8 @@ this.riddenByEntity = null; @@ -121,12 +121,10 @@ } } -@@ -443,6 +484,17 @@ - if (this.motionZ > par1) - { +@@ -445,6 +486,17 @@ this.motionZ = par1; -+ } -+ + } + + double moveY = motionY; + if(getMaxSpeedAirVertical() > 0 && motionY > getMaxSpeedAirVertical()) + { @@ -136,9 +134,11 @@ + moveY = 0.15f; + motionY = moveY; + } - } - ++ } ++ if (this.onGround) + { + this.motionX *= 0.5D; @@ -452,13 +504,13 @@ this.motionZ *= 0.5D; } @@ -175,19 +175,20 @@ { d7 = Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ); -@@ -599,36 +651,8 @@ +@@ -599,37 +651,9 @@ this.posX = d8 + d2 * d7; this.posZ = d9 + d3 * d7; this.setPosition(this.posX, this.posY + (double)this.yOffset, this.posZ); - d12 = this.motionX; - d13 = this.motionZ; -- + - if (this.riddenByEntity != null) - { - d12 *= 0.75D; - d13 *= 0.75D; - } -- ++ moveMinecartOnRail(par1, par2, par3, par4); + - if (d12 < -par4) - { - d12 = -par4; @@ -209,54 +210,56 @@ - } - - this.moveEntity(d12, 0.0D, d13); -+ -+ moveMinecartOnRail(par1, par2, par3, par4); - +- if (aint[0][1] != 0 && MathHelper.floor_double(this.posX) - par1 == aint[0][0] && MathHelper.floor_double(this.posZ) - par3 == aint[0][2]) { -@@ -666,7 +690,12 @@ + this.setPosition(this.posX, this.posY + (double)aint[0][1], this.posZ); +@@ -666,8 +690,13 @@ this.motionZ = d6 * (double)(k1 - par3); } - if (flag) + if(shouldDoRailFunctions()) -+ { + { + ((BlockRailBase)Block.blocksList[par8]).onMinecartPass(worldObj, this, par1, par2, par3); + } + + if (flag && shouldDoRailFunctions()) - { ++ { double d15 = Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ); -@@ -737,12 +766,7 @@ + if (d15 > 0.01D) +@@ -737,13 +766,8 @@ } else { - int i1 = this.worldObj.getBlockMetadata(i, j, k); -- ++ int i1 = ((BlockRailBase)Block.blocksList[l]).getBasicRailMetadata(worldObj, this, i, j, k); + - if (((BlockRailBase)Block.blocksList[l]).isPowered()) - { - i1 &= 7; - } -+ int i1 = ((BlockRailBase)Block.blocksList[l]).getBasicRailMetadata(worldObj, this, i, j, k); - +- par3 = (double)j; -@@ -788,13 +812,8 @@ + if (i1 >= 2 && i1 <= 5) +@@ -788,14 +812,9 @@ if (BlockRailBase.isRailBlock(l)) { - int i1 = this.worldObj.getBlockMetadata(i, j, k); + int i1 = ((BlockRailBase)Block.blocksList[l]).getBasicRailMetadata(worldObj, this, i, j, k); par3 = (double)j; -- + - if (((BlockRailBase)Block.blocksList[l]).isPowered()) - { - i1 &= 7; - } - +- if (i1 >= 2 && i1 <= 5) { + par3 = (double)(j + 1); @@ -900,11 +919,17 @@ */ public void applyEntityCollision(Entity par1Entity) diff --git a/patches/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java.patch index b7e320772..1e8e2fdb5 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java -+++ ../src_work/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java +--- ../src-base/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java ++++ ../src-work/minecraft/net/minecraft/entity/item/EntityMinecartContainer.java @@ -8,6 +8,8 @@ import net.minecraft.nbt.NBTTagList; import net.minecraft.util.DamageSource; diff --git a/patches/minecraft/net/minecraft/entity/item/EntityMinecartEmpty.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityMinecartEmpty.java.patch index 4da3529d0..fad2ad765 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityMinecartEmpty.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityMinecartEmpty.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/entity/item/EntityMinecartEmpty.java -+++ ../src_work/minecraft/net/minecraft/entity/item/EntityMinecartEmpty.java +--- ../src-base/minecraft/net/minecraft/entity/item/EntityMinecartEmpty.java ++++ ../src-work/minecraft/net/minecraft/entity/item/EntityMinecartEmpty.java @@ -2,6 +2,8 @@ import net.minecraft.entity.player.EntityPlayer; diff --git a/patches/minecraft/net/minecraft/entity/item/EntityMinecartFurnace.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityMinecartFurnace.java.patch index 3e17e342a..68fb0c9a0 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityMinecartFurnace.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityMinecartFurnace.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/entity/item/EntityMinecartFurnace.java -+++ ../src_work/minecraft/net/minecraft/entity/item/EntityMinecartFurnace.java +--- ../src-base/minecraft/net/minecraft/entity/item/EntityMinecartFurnace.java ++++ ../src-work/minecraft/net/minecraft/entity/item/EntityMinecartFurnace.java @@ -8,6 +8,8 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; diff --git a/patches/minecraft/net/minecraft/entity/item/EntityMinecartHopper.java.patch b/patches/minecraft/net/minecraft/entity/item/EntityMinecartHopper.java.patch index 0ca5ac4bb..6910037ba 100644 --- a/patches/minecraft/net/minecraft/entity/item/EntityMinecartHopper.java.patch +++ b/patches/minecraft/net/minecraft/entity/item/EntityMinecartHopper.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/entity/item/EntityMinecartHopper.java -+++ ../src_work/minecraft/net/minecraft/entity/item/EntityMinecartHopper.java +--- ../src-base/minecraft/net/minecraft/entity/item/EntityMinecartHopper.java ++++ ../src-work/minecraft/net/minecraft/entity/item/EntityMinecartHopper.java @@ -9,6 +9,8 @@ import net.minecraft.tileentity.TileEntityHopper; import net.minecraft.util.DamageSource; diff --git a/patches/minecraft/net/minecraft/entity/monster/EntityEnderman.java.patch b/patches/minecraft/net/minecraft/entity/monster/EntityEnderman.java.patch index e68dd7a3d..0c5985167 100644 --- a/patches/minecraft/net/minecraft/entity/monster/EntityEnderman.java.patch +++ b/patches/minecraft/net/minecraft/entity/monster/EntityEnderman.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/entity/monster/EntityEnderman.java -+++ ../src_work/minecraft/net/minecraft/entity/monster/EntityEnderman.java +--- ../src-base/minecraft/net/minecraft/entity/monster/EntityEnderman.java ++++ ../src-work/minecraft/net/minecraft/entity/monster/EntityEnderman.java @@ -16,6 +16,8 @@ import net.minecraft.util.MathHelper; import net.minecraft.util.Vec3; diff --git a/patches/minecraft/net/minecraft/entity/monster/EntityZombie.java.patch b/patches/minecraft/net/minecraft/entity/monster/EntityZombie.java.patch index 4c6237f2c..722281d52 100644 --- a/patches/minecraft/net/minecraft/entity/monster/EntityZombie.java.patch +++ b/patches/minecraft/net/minecraft/entity/monster/EntityZombie.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/entity/monster/EntityZombie.java -+++ ../src_work/minecraft/net/minecraft/entity/monster/EntityZombie.java +--- ../src-base/minecraft/net/minecraft/entity/monster/EntityZombie.java ++++ ../src-work/minecraft/net/minecraft/entity/monster/EntityZombie.java @@ -34,6 +34,10 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; @@ -30,11 +30,10 @@ - int j = MathHelper.floor_double(this.posY); - int k = MathHelper.floor_double(this.posZ); - EntityZombie entityzombie = new EntityZombie(this.worldObj); -- + int i = MathHelper.floor_double(this.posX); + int j = MathHelper.floor_double(this.posY); + int k = MathHelper.floor_double(this.posZ); -+ + + SummonAidEvent summonAid = ForgeEventFactory.fireZombieSummonAid(this, worldObj, i, j, k, entitylivingbase, this.getEntityAttribute(field_110186_bp).getAttributeValue()); + + if (summonAid.getResult() == Result.DENY) diff --git a/patches/minecraft/net/minecraft/entity/passive/EntityMooshroom.java.patch b/patches/minecraft/net/minecraft/entity/passive/EntityMooshroom.java.patch index aa7a381a7..927de6add 100644 --- a/patches/minecraft/net/minecraft/entity/passive/EntityMooshroom.java.patch +++ b/patches/minecraft/net/minecraft/entity/passive/EntityMooshroom.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/entity/passive/EntityMooshroom.java -+++ ../src_work/minecraft/net/minecraft/entity/passive/EntityMooshroom.java +--- ../src-base/minecraft/net/minecraft/entity/passive/EntityMooshroom.java ++++ ../src-work/minecraft/net/minecraft/entity/passive/EntityMooshroom.java @@ -8,7 +8,11 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; @@ -13,12 +13,12 @@ { public EntityMooshroom(World par1World) { -@@ -38,28 +42,6 @@ +@@ -38,29 +42,7 @@ } } - if (itemstack != null && itemstack.itemID == Item.shears.itemID && this.getGrowingAge() >= 0) -- { + { - this.setDead(); - this.worldObj.spawnParticle("largeexplode", this.posX, this.posY + (double)(this.height / 2.0F), this.posZ, 0.0D, 0.0D, 0.0D); - @@ -39,9 +39,10 @@ - return true; - } - else - { +- { return super.interact(par1EntityPlayer); } + } @@ -82,4 +64,29 @@ { return this.func_94900_c(par1EntityAgeable); diff --git a/patches/minecraft/net/minecraft/entity/passive/EntityOcelot.java.patch b/patches/minecraft/net/minecraft/entity/passive/EntityOcelot.java.patch index 2237df0f6..eb6a832b9 100644 --- a/patches/minecraft/net/minecraft/entity/passive/EntityOcelot.java.patch +++ b/patches/minecraft/net/minecraft/entity/passive/EntityOcelot.java.patch @@ -1,13 +1,12 @@ ---- ../src_base/minecraft/net/minecraft/entity/passive/EntityOcelot.java -+++ ../src_work/minecraft/net/minecraft/entity/passive/EntityOcelot.java +--- ../src-base/minecraft/net/minecraft/entity/passive/EntityOcelot.java ++++ ../src-work/minecraft/net/minecraft/entity/passive/EntityOcelot.java @@ -334,8 +334,9 @@ } int l = this.worldObj.getBlockId(i, j - 1, k); -- -- if (l == Block.grass.blockID || l == Block.leaves.blockID) + Block block = Block.blocksList[l]; -+ + +- if (l == Block.grass.blockID || l == Block.leaves.blockID) + if (l == Block.grass.blockID || (block != null && block.isLeaves(worldObj, i, j - 1, k))) { return true; diff --git a/patches/minecraft/net/minecraft/entity/passive/EntitySheep.java.patch b/patches/minecraft/net/minecraft/entity/passive/EntitySheep.java.patch index 980d333b0..9c5cf3768 100644 --- a/patches/minecraft/net/minecraft/entity/passive/EntitySheep.java.patch +++ b/patches/minecraft/net/minecraft/entity/passive/EntitySheep.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/entity/passive/EntitySheep.java -+++ ../src_work/minecraft/net/minecraft/entity/passive/EntitySheep.java +--- ../src-base/minecraft/net/minecraft/entity/passive/EntitySheep.java ++++ ../src-work/minecraft/net/minecraft/entity/passive/EntitySheep.java @@ -2,6 +2,8 @@ import cpw.mods.fml.relauncher.Side; diff --git a/patches/minecraft/net/minecraft/entity/passive/EntityVillager.java.patch b/patches/minecraft/net/minecraft/entity/passive/EntityVillager.java.patch index ab69a14ae..f796c92b0 100644 --- a/patches/minecraft/net/minecraft/entity/passive/EntityVillager.java.patch +++ b/patches/minecraft/net/minecraft/entity/passive/EntityVillager.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/entity/passive/EntityVillager.java -+++ ../src_work/minecraft/net/minecraft/entity/passive/EntityVillager.java +--- ../src-base/minecraft/net/minecraft/entity/passive/EntityVillager.java ++++ ../src-work/minecraft/net/minecraft/entity/passive/EntityVillager.java @@ -205,7 +205,7 @@ ItemStack itemstack = par1EntityPlayer.inventory.getCurrentItem(); boolean flag = itemstack != null && itemstack.itemID == Item.monsterPlacer.itemID; diff --git a/patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch b/patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch index f1b2fccd4..b46869007 100644 --- a/patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch +++ b/patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/entity/player/EntityPlayer.java -+++ ../src_work/minecraft/net/minecraft/entity/player/EntityPlayer.java +--- ../src-base/minecraft/net/minecraft/entity/player/EntityPlayer.java ++++ ../src-work/minecraft/net/minecraft/entity/player/EntityPlayer.java @@ -5,8 +5,11 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -112,12 +112,10 @@ if (this.username.equals("Notch")) { this.dropPlayerItemWithRandomChoice(new ItemStack(Item.appleRed, 1), true); -@@ -697,6 +721,20 @@ - if (!this.worldObj.getGameRules().getGameRuleBooleanValue("keepInventory")) - { +@@ -699,6 +723,20 @@ this.inventory.dropAllItems(); -+ } -+ + } + + captureDrops = false; + + if (!worldObj.isRemote) @@ -130,9 +128,11 @@ + joinEntityItemWithWorld(item); + } + } - } - ++ } ++ if (par1DamageSource != null) + { + this.motionX = (double)(-MathHelper.cos((this.attackedAtYaw + this.rotationYaw) * (float)Math.PI / 180.0F) * 0.1F); @@ -747,7 +785,20 @@ */ public EntityItem dropOneItem(boolean par1) @@ -164,7 +164,7 @@ } /** -@@ -812,15 +863,28 @@ +@@ -812,16 +863,29 @@ */ public void joinEntityItemWithWorld(EntityItem par1EntityItem) { @@ -178,23 +178,23 @@ /** * Returns how strong the player is against the specified block at this moment -- */ + * Deprecated in favor of the more sensitive version -+ */ + */ + @Deprecated public float getCurrentPlayerStrVsBlock(Block par1Block, boolean par2) { - float f = this.inventory.getStrVsBlock(par1Block); + return getCurrentPlayerStrVsBlock(par1Block, par2, 0); + } -+ + + public float getCurrentPlayerStrVsBlock(Block par1Block, boolean par2, int meta) + { + ItemStack stack = inventory.getCurrentItem(); + float f = (stack == null ? 1.0F : stack.getItem().getStrVsBlock(stack, par1Block, meta)); - ++ if (f > 1.0F) { + int i = EnchantmentHelper.getEfficiencyModifier(this); @@ -831,7 +895,9 @@ { float f1 = (float)(i * i + 1); @@ -360,13 +360,12 @@ ChunkCoordinates chunkcoordinates1 = this.playerLocation; - if (chunkcoordinates != null && this.worldObj.getBlockId(chunkcoordinates.posX, chunkcoordinates.posY, chunkcoordinates.posZ) == Block.bed.blockID) -- { -- BlockBed.setBedOccupied(this.worldObj, chunkcoordinates.posX, chunkcoordinates.posY, chunkcoordinates.posZ, false); -- chunkcoordinates1 = BlockBed.getNearestEmptyChunkCoordinates(this.worldObj, chunkcoordinates.posX, chunkcoordinates.posY, chunkcoordinates.posZ, 0); + Block block = (chunkcoordinates == null ? null : Block.blocksList[worldObj.getBlockId(chunkcoordinates.posX, chunkcoordinates.posY, chunkcoordinates.posZ)]); + + if (chunkcoordinates != null && block != null && block.isBed(worldObj, chunkcoordinates.posX, chunkcoordinates.posY, chunkcoordinates.posZ, this)) -+ { + { +- BlockBed.setBedOccupied(this.worldObj, chunkcoordinates.posX, chunkcoordinates.posY, chunkcoordinates.posZ, false); +- chunkcoordinates1 = BlockBed.getNearestEmptyChunkCoordinates(this.worldObj, chunkcoordinates.posX, chunkcoordinates.posY, chunkcoordinates.posZ, 0); + block.setBedOccupied(this.worldObj, chunkcoordinates.posX, chunkcoordinates.posY, chunkcoordinates.posZ, this, false); + chunkcoordinates1 = block.getBedSpawnPosition(worldObj, chunkcoordinates.posX, chunkcoordinates.posY, chunkcoordinates.posZ, this); @@ -388,13 +387,12 @@ ichunkprovider.loadChunk(par1ChunkCoordinates.posX + 3 >> 4, par1ChunkCoordinates.posZ + 3 >> 4); - if (par0World.getBlockId(par1ChunkCoordinates.posX, par1ChunkCoordinates.posY, par1ChunkCoordinates.posZ) == Block.bed.blockID) -- { -- ChunkCoordinates chunkcoordinates1 = BlockBed.getNearestEmptyChunkCoordinates(par0World, par1ChunkCoordinates.posX, par1ChunkCoordinates.posY, par1ChunkCoordinates.posZ, 0); + ChunkCoordinates c = par1ChunkCoordinates; + Block block = Block.blocksList[par0World.getBlockId(c.posX, c.posY, c.posZ)]; + + if (block != null && block.isBed(par0World, c.posX, c.posY, c.posZ, null)) -+ { + { +- ChunkCoordinates chunkcoordinates1 = BlockBed.getNearestEmptyChunkCoordinates(par0World, par1ChunkCoordinates.posX, par1ChunkCoordinates.posY, par1ChunkCoordinates.posZ, 0); + ChunkCoordinates chunkcoordinates1 = block.getBedSpawnPosition(par0World, c.posX, c.posY, c.posZ, null); return chunkcoordinates1; } @@ -405,19 +403,18 @@ { - int i = this.worldObj.getBlockMetadata(this.playerLocation.posX, this.playerLocation.posY, this.playerLocation.posZ); - int j = BlockBed.getDirection(i); -- -- switch (j) + int x = playerLocation.posX; + int y = playerLocation.posY; + int z = playerLocation.posZ; + Block block = Block.blocksList[worldObj.getBlockId(x, y, z)]; + int i = (block == null ? 0 : block.getBedDirection(worldObj, x, y, z)); -+ + +- switch (j) + switch (i) { case 0: return 90.0F; -@@ -1635,14 +1762,40 @@ +@@ -1635,21 +1762,52 @@ /** * Returns the location of the bed the player will respawn at, or null if the player has not slept in a bed. */ @@ -425,19 +422,17 @@ public ChunkCoordinates getBedLocation() { - return this.spawnChunk; -- } -- + return getBedLocation(this.dimension); -+ } -+ + } + + @Deprecated public boolean isSpawnForced() { - return this.spawnForced; + return isSpawnForced(this.dimension); -+ } -+ -+ /** + } + + /** + * A dimension aware version of getBedLocation. + * @param dimension The dimension to get the bed spawn for + * @return The player specific spawn location for the dimension. May be null. @@ -459,10 +454,10 @@ + Boolean forced = this.spawnForcedMap.get(dimension); + if (forced == null) return false; + return forced; - } - - /** -@@ -1650,6 +1803,11 @@ ++ } ++ ++ /** + * Defines a spawn coordinate to player spawn. Used by bed after the player sleep on it. */ public void setSpawnChunk(ChunkCoordinates par1ChunkCoordinates, boolean par2) { @@ -474,12 +469,12 @@ if (par1ChunkCoordinates != null) { this.spawnChunk = new ChunkCoordinates(par1ChunkCoordinates); -@@ -1661,7 +1819,39 @@ +@@ -1661,8 +1819,40 @@ this.spawnForced = false; } } - -+ /** + /** + * A dimension aware version of setSpawnChunk. + * This functions identically, but allows you to specify which dimension to affect, rather than affecting the player's current dimension. + * @param chunkCoordinates The spawn point to set as the player-specific spawn point for the dimension @@ -512,9 +507,10 @@ + this.spawnForcedMap.remove(dimension); + } + } - /** ++ /** * Will trigger the specified trigger. */ + public void triggerAchievement(StatBase par1StatBase) @@ -1843,6 +2033,10 @@ super.fall(par1); diff --git a/patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch b/patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch index a186e0fbd..e0a5845eb 100644 --- a/patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch +++ b/patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/entity/player/EntityPlayerMP.java -+++ ../src_work/minecraft/net/minecraft/entity/player/EntityPlayerMP.java +--- ../src-base/minecraft/net/minecraft/entity/player/EntityPlayerMP.java ++++ ../src-work/minecraft/net/minecraft/entity/player/EntityPlayerMP.java @@ -92,6 +92,12 @@ import net.minecraft.world.WorldServer; import net.minecraft.world.chunk.Chunk; @@ -13,7 +13,7 @@ public class EntityPlayerMP extends EntityPlayer implements ICrafting { private String translator = "en_US"; -@@ -164,19 +170,14 @@ +@@ -164,20 +170,15 @@ super(par2World, par3Str); par4ItemInWorldManager.thisPlayerMP = this; this.theItemInWorldManager = par4ItemInWorldManager; @@ -27,7 +27,7 @@ int i = chunkcoordinates.posX; int j = chunkcoordinates.posZ; int k = chunkcoordinates.posY; -- + - if (!par2World.provider.hasNoSky && par2World.getWorldInfo().getGameType() != EnumGameType.ADVENTURE) - { - int l = Math.max(5, par1MinecraftServer.getSpawnProtectionSize() - 6); @@ -35,9 +35,10 @@ - j += this.rand.nextInt(l * 2) - l; - k = par2World.getTopSolidOrLiquidBlock(i, j); - } - +- this.mcServer = par1MinecraftServer; this.stepHeight = 0.0F; + this.yOffset = 0.0F; @@ -240,11 +241,6 @@ this.yOffset = 0.0F; } diff --git a/patches/minecraft/net/minecraft/entity/player/InventoryPlayer.java.patch b/patches/minecraft/net/minecraft/entity/player/InventoryPlayer.java.patch index 0c5cc440b..f5976d07c 100644 --- a/patches/minecraft/net/minecraft/entity/player/InventoryPlayer.java.patch +++ b/patches/minecraft/net/minecraft/entity/player/InventoryPlayer.java.patch @@ -1,17 +1,17 @@ ---- ../src_base/minecraft/net/minecraft/entity/player/InventoryPlayer.java -+++ ../src_work/minecraft/net/minecraft/entity/player/InventoryPlayer.java -@@ -357,6 +357,14 @@ - if (this.mainInventory[i] != null) - { +--- ../src-base/minecraft/net/minecraft/entity/player/InventoryPlayer.java ++++ ../src-work/minecraft/net/minecraft/entity/player/InventoryPlayer.java +@@ -359,6 +359,14 @@ this.mainInventory[i].updateAnimation(this.player.worldObj, this.player, i, this.currentItem == i); -+ } -+ } + } + } + + for (int i = 0; i < this.armorInventory.length; i++) + { + if (this.armorInventory[i] != null) + { + this.armorInventory[i].getItem().onArmorTickUpdate(this.player.worldObj, this.player, this.armorInventory[i]); - } - } ++ } ++ } } + + /** diff --git a/patches/minecraft/net/minecraft/inventory/ContainerEnchantment.java.patch b/patches/minecraft/net/minecraft/inventory/ContainerEnchantment.java.patch index d216107ce..1ffa06a95 100644 --- a/patches/minecraft/net/minecraft/inventory/ContainerEnchantment.java.patch +++ b/patches/minecraft/net/minecraft/inventory/ContainerEnchantment.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/inventory/ContainerEnchantment.java -+++ ../src_work/minecraft/net/minecraft/inventory/ContainerEnchantment.java +--- ../src-base/minecraft/net/minecraft/inventory/ContainerEnchantment.java ++++ ../src-work/minecraft/net/minecraft/inventory/ContainerEnchantment.java @@ -12,6 +12,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -24,14 +24,14 @@ - { - ++i; - } -- ++ power += ForgeHooks.getEnchantPower(worldPointer, posX + k * 2, posY, posZ + j * 2); ++ power += ForgeHooks.getEnchantPower(worldPointer, posX + k * 2, posY + 1, posZ + j * 2); + - if (this.worldPointer.getBlockId(this.posX + k * 2, this.posY + 1, this.posZ + j * 2) == Block.bookShelf.blockID) - { - ++i; - } -+ power += ForgeHooks.getEnchantPower(worldPointer, posX + k * 2, posY, posZ + j * 2); -+ power += ForgeHooks.getEnchantPower(worldPointer, posX + k * 2, posY + 1, posZ + j * 2); - +- if (k != 0 && j != 0) { - if (this.worldPointer.getBlockId(this.posX + k * 2, this.posY, this.posZ + j) == Block.bookShelf.blockID) diff --git a/patches/minecraft/net/minecraft/inventory/ContainerFurnace.java.patch b/patches/minecraft/net/minecraft/inventory/ContainerFurnace.java.patch index ea525208f..5a130d68b 100644 --- a/patches/minecraft/net/minecraft/inventory/ContainerFurnace.java.patch +++ b/patches/minecraft/net/minecraft/inventory/ContainerFurnace.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/inventory/ContainerFurnace.java -+++ ../src_work/minecraft/net/minecraft/inventory/ContainerFurnace.java +--- ../src-base/minecraft/net/minecraft/inventory/ContainerFurnace.java ++++ ../src-work/minecraft/net/minecraft/inventory/ContainerFurnace.java @@ -125,7 +125,7 @@ } else if (par2 != 1 && par2 != 0) diff --git a/patches/minecraft/net/minecraft/inventory/ContainerRepair.java.patch b/patches/minecraft/net/minecraft/inventory/ContainerRepair.java.patch index 0006d1437..e6a3d5411 100644 --- a/patches/minecraft/net/minecraft/inventory/ContainerRepair.java.patch +++ b/patches/minecraft/net/minecraft/inventory/ContainerRepair.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/inventory/ContainerRepair.java -+++ ../src_work/minecraft/net/minecraft/inventory/ContainerRepair.java +--- ../src-base/minecraft/net/minecraft/inventory/ContainerRepair.java ++++ ../src-work/minecraft/net/minecraft/inventory/ContainerRepair.java @@ -315,6 +315,11 @@ k = Math.max(1, k / 2); } @@ -12,11 +12,11 @@ this.maximumCost = k + i; if (i <= 0) -@@ -331,6 +336,7 @@ - { +@@ -332,6 +337,7 @@ itemstack1 = null; } -+ ++ if (itemstack1 != null) { + i1 = itemstack1.getRepairCost(); diff --git a/patches/minecraft/net/minecraft/inventory/Slot.java.patch b/patches/minecraft/net/minecraft/inventory/Slot.java.patch index 01087b84c..2b621b672 100644 --- a/patches/minecraft/net/minecraft/inventory/Slot.java.patch +++ b/patches/minecraft/net/minecraft/inventory/Slot.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/inventory/Slot.java -+++ ../src_work/minecraft/net/minecraft/inventory/Slot.java +--- ../src-base/minecraft/net/minecraft/inventory/Slot.java ++++ ../src-work/minecraft/net/minecraft/inventory/Slot.java @@ -2,9 +2,11 @@ import cpw.mods.fml.relauncher.Side; @@ -12,20 +12,20 @@ public class Slot { -@@ -22,6 +24,13 @@ - +@@ -23,6 +25,13 @@ /** display position of the inventory slot on the screen y axis */ public int yDisplayPosition; -+ + + /** Position within background texture file, normally -1 which causes no background to be drawn. */ + protected Icon backgroundIcon = null; + + /** Background texture file assigned to this slot, if any. Vanilla "/gui/items.png" is used if this is null. */ + @SideOnly(Side.CLIENT) + protected ResourceLocation texture; - ++ public Slot(IInventory par1IInventory, int par2, int par3, int par4) { + this.inventory = par1IInventory; @@ -148,7 +157,7 @@ */ public Icon getBackgroundIconIndex() diff --git a/patches/minecraft/net/minecraft/inventory/SlotArmor.java.patch b/patches/minecraft/net/minecraft/inventory/SlotArmor.java.patch index ce7951b75..05bf3b8da 100644 --- a/patches/minecraft/net/minecraft/inventory/SlotArmor.java.patch +++ b/patches/minecraft/net/minecraft/inventory/SlotArmor.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/inventory/SlotArmor.java -+++ ../src_work/minecraft/net/minecraft/inventory/SlotArmor.java +--- ../src-base/minecraft/net/minecraft/inventory/SlotArmor.java ++++ ../src-work/minecraft/net/minecraft/inventory/SlotArmor.java @@ -41,7 +41,8 @@ */ public boolean isItemValid(ItemStack par1ItemStack) diff --git a/patches/minecraft/net/minecraft/inventory/SlotBrewingStandIngredient.java.patch b/patches/minecraft/net/minecraft/inventory/SlotBrewingStandIngredient.java.patch index 83a474dd9..a96cb9f41 100644 --- a/patches/minecraft/net/minecraft/inventory/SlotBrewingStandIngredient.java.patch +++ b/patches/minecraft/net/minecraft/inventory/SlotBrewingStandIngredient.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/inventory/SlotBrewingStandIngredient.java -+++ ../src_work/minecraft/net/minecraft/inventory/SlotBrewingStandIngredient.java +--- ../src-base/minecraft/net/minecraft/inventory/SlotBrewingStandIngredient.java ++++ ../src-work/minecraft/net/minecraft/inventory/SlotBrewingStandIngredient.java @@ -19,7 +19,7 @@ */ public boolean isItemValid(ItemStack par1ItemStack) diff --git a/patches/minecraft/net/minecraft/inventory/SlotBrewingStandPotion.java.patch b/patches/minecraft/net/minecraft/inventory/SlotBrewingStandPotion.java.patch index 369d9ffe8..2c609514c 100644 --- a/patches/minecraft/net/minecraft/inventory/SlotBrewingStandPotion.java.patch +++ b/patches/minecraft/net/minecraft/inventory/SlotBrewingStandPotion.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/inventory/SlotBrewingStandPotion.java -+++ ../src_work/minecraft/net/minecraft/inventory/SlotBrewingStandPotion.java +--- ../src-base/minecraft/net/minecraft/inventory/SlotBrewingStandPotion.java ++++ ../src-work/minecraft/net/minecraft/inventory/SlotBrewingStandPotion.java @@ -2,6 +2,7 @@ import net.minecraft.entity.player.EntityPlayer; diff --git a/patches/minecraft/net/minecraft/inventory/SlotCrafting.java.patch b/patches/minecraft/net/minecraft/inventory/SlotCrafting.java.patch index 188b5cb07..a84ac065c 100644 --- a/patches/minecraft/net/minecraft/inventory/SlotCrafting.java.patch +++ b/patches/minecraft/net/minecraft/inventory/SlotCrafting.java.patch @@ -1,17 +1,17 @@ ---- ../src_base/minecraft/net/minecraft/inventory/SlotCrafting.java -+++ ../src_work/minecraft/net/minecraft/inventory/SlotCrafting.java -@@ -6,6 +6,10 @@ - import net.minecraft.item.Item; +--- ../src-base/minecraft/net/minecraft/inventory/SlotCrafting.java ++++ ../src-work/minecraft/net/minecraft/inventory/SlotCrafting.java +@@ -7,6 +7,10 @@ import net.minecraft.item.ItemStack; import net.minecraft.stats.AchievementList; -+ + +import net.minecraftforge.common.ForgeHooks; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent; - ++ public class SlotCrafting extends Slot { -@@ -124,9 +128,15 @@ + /** The craft matrix inventory linked to this result slot. */ +@@ -124,10 +128,16 @@ if (itemstack1.getItem().hasContainerItem()) { @@ -20,12 +20,13 @@ - if (!itemstack1.getItem().doesContainerItemLeaveCraftingGrid(itemstack1) || !this.thePlayer.inventory.addItemStackToInventory(itemstack2)) + if (itemstack2.isItemStackDamageable() && itemstack2.getItemDamage() > itemstack2.getMaxDamage()) -+ { + { + MinecraftForge.EVENT_BUS.post(new PlayerDestroyItemEvent(thePlayer, itemstack2)); + itemstack2 = null; + } + + if (itemstack2 != null && (!itemstack1.getItem().doesContainerItemLeaveCraftingGrid(itemstack1) || !this.thePlayer.inventory.addItemStackToInventory(itemstack2))) - { ++ { if (this.craftMatrix.getStackInSlot(i) == null) { + this.craftMatrix.setInventorySlotContents(i, itemstack2); diff --git a/patches/minecraft/net/minecraft/inventory/SlotFurnace.java.patch b/patches/minecraft/net/minecraft/inventory/SlotFurnace.java.patch index a6d52e28f..f40ad988c 100644 --- a/patches/minecraft/net/minecraft/inventory/SlotFurnace.java.patch +++ b/patches/minecraft/net/minecraft/inventory/SlotFurnace.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/inventory/SlotFurnace.java -+++ ../src_work/minecraft/net/minecraft/inventory/SlotFurnace.java +--- ../src-base/minecraft/net/minecraft/inventory/SlotFurnace.java ++++ ../src-work/minecraft/net/minecraft/inventory/SlotFurnace.java @@ -69,7 +69,7 @@ if (!this.thePlayer.worldObj.isRemote) { diff --git a/patches/minecraft/net/minecraft/item/BehaviorDispenseArmor.java.patch b/patches/minecraft/net/minecraft/item/BehaviorDispenseArmor.java.patch index 26d558f06..b503af410 100644 --- a/patches/minecraft/net/minecraft/item/BehaviorDispenseArmor.java.patch +++ b/patches/minecraft/net/minecraft/item/BehaviorDispenseArmor.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/item/BehaviorDispenseArmor.java -+++ ../src_work/minecraft/net/minecraft/item/BehaviorDispenseArmor.java +--- ../src-base/minecraft/net/minecraft/item/BehaviorDispenseArmor.java ++++ ../src-work/minecraft/net/minecraft/item/BehaviorDispenseArmor.java @@ -32,7 +32,7 @@ int i1 = EntityLiving.getArmorPosition(par2ItemStack); ItemStack itemstack1 = par2ItemStack.copy(); diff --git a/patches/minecraft/net/minecraft/item/EnumArmorMaterial.java.patch b/patches/minecraft/net/minecraft/item/EnumArmorMaterial.java.patch index 2e4ba0048..fe1a4c27e 100644 --- a/patches/minecraft/net/minecraft/item/EnumArmorMaterial.java.patch +++ b/patches/minecraft/net/minecraft/item/EnumArmorMaterial.java.patch @@ -1,15 +1,15 @@ ---- ../src_base/minecraft/net/minecraft/item/EnumArmorMaterial.java -+++ ../src_work/minecraft/net/minecraft/item/EnumArmorMaterial.java -@@ -22,6 +22,9 @@ - +--- ../src-base/minecraft/net/minecraft/item/EnumArmorMaterial.java ++++ ../src-work/minecraft/net/minecraft/item/EnumArmorMaterial.java +@@ -23,6 +23,9 @@ /** Return the enchantability factor of the material */ private int enchantability; -+ + + //Added by forge for custom Armor materials. + public Item customCraftingMaterial = null; - ++ private EnumArmorMaterial(int par3, int[] par4ArrayOfInteger, int par5) { + this.maxDamageFactor = par3; @@ -61,6 +64,14 @@ */ public int getArmorCraftingMaterial() diff --git a/patches/minecraft/net/minecraft/item/EnumRarity.java.patch b/patches/minecraft/net/minecraft/item/EnumRarity.java.patch index d154ce11c..e02018873 100644 --- a/patches/minecraft/net/minecraft/item/EnumRarity.java.patch +++ b/patches/minecraft/net/minecraft/item/EnumRarity.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/item/EnumRarity.java -+++ ../src_work/minecraft/net/minecraft/item/EnumRarity.java +--- ../src-base/minecraft/net/minecraft/item/EnumRarity.java ++++ ../src-work/minecraft/net/minecraft/item/EnumRarity.java @@ -1,9 +1,5 @@ package net.minecraft.item; diff --git a/patches/minecraft/net/minecraft/item/EnumToolMaterial.java.patch b/patches/minecraft/net/minecraft/item/EnumToolMaterial.java.patch index 4fe0bbb27..8ccd20a4c 100644 --- a/patches/minecraft/net/minecraft/item/EnumToolMaterial.java.patch +++ b/patches/minecraft/net/minecraft/item/EnumToolMaterial.java.patch @@ -1,15 +1,15 @@ ---- ../src_base/minecraft/net/minecraft/item/EnumToolMaterial.java -+++ ../src_work/minecraft/net/minecraft/item/EnumToolMaterial.java -@@ -30,6 +30,9 @@ - +--- ../src-base/minecraft/net/minecraft/item/EnumToolMaterial.java ++++ ../src-work/minecraft/net/minecraft/item/EnumToolMaterial.java +@@ -31,6 +31,9 @@ /** Defines the natural enchantability factor of the material. */ private final int enchantability; -+ + + //Added by forge for custom Armor materials. + public Item customCraftingMaterial = null; - ++ private EnumToolMaterial(int par3, int par4, float par5, float par6, int par7) { + this.harvestLevel = par3; @@ -86,6 +89,14 @@ */ public int getToolCraftingMaterial() diff --git a/patches/minecraft/net/minecraft/item/Item.java.patch b/patches/minecraft/net/minecraft/item/Item.java.patch index 57afb05ec..556dc57dc 100644 --- a/patches/minecraft/net/minecraft/item/Item.java.patch +++ b/patches/minecraft/net/minecraft/item/Item.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/item/Item.java -+++ ../src_work/minecraft/net/minecraft/item/Item.java +--- ../src-base/minecraft/net/minecraft/item/Item.java ++++ ../src-work/minecraft/net/minecraft/item/Item.java @@ -11,13 +11,18 @@ import java.util.UUID; import net.minecraft.block.Block; diff --git a/patches/minecraft/net/minecraft/item/ItemArmor.java.patch b/patches/minecraft/net/minecraft/item/ItemArmor.java.patch index 928624e62..9430c052a 100644 --- a/patches/minecraft/net/minecraft/item/ItemArmor.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemArmor.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/item/ItemArmor.java -+++ ../src_work/minecraft/net/minecraft/item/ItemArmor.java +--- ../src-base/minecraft/net/minecraft/item/ItemArmor.java ++++ ../src-work/minecraft/net/minecraft/item/ItemArmor.java @@ -218,7 +218,7 @@ if (itemstack1 == null) diff --git a/patches/minecraft/net/minecraft/item/ItemBlock.java.patch b/patches/minecraft/net/minecraft/item/ItemBlock.java.patch index 1dabef838..ea8e6458d 100644 --- a/patches/minecraft/net/minecraft/item/ItemBlock.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemBlock.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/item/ItemBlock.java -+++ ../src_work/minecraft/net/minecraft/item/ItemBlock.java +--- ../src-base/minecraft/net/minecraft/item/ItemBlock.java ++++ ../src-work/minecraft/net/minecraft/item/ItemBlock.java @@ -64,7 +64,8 @@ { par7 = 1; @@ -15,15 +15,14 @@ int k1 = Block.blocksList[this.blockID].onBlockPlaced(par3World, par4, par5, par6, par7, par8, par9, par10, j1); - if (par3World.setBlock(par4, par5, par6, this.blockID, k1, 3)) -- { ++ if (placeBlockAt(par1ItemStack, par2EntityPlayer, par3World, par4, par5, par6, par7, par8, par9, par10, k1)) + { - if (par3World.getBlockId(par4, par5, par6) == this.blockID) - { - Block.blocksList[this.blockID].onBlockPlacedBy(par3World, par4, par5, par6, par2EntityPlayer, par1ItemStack); - Block.blocksList[this.blockID].onPostBlockPlaced(par3World, par4, par5, par6, k1); - } - -+ if (placeBlockAt(par1ItemStack, par2EntityPlayer, par3World, par4, par5, par6, par7, par8, par9, par10, k1)) -+ { par3World.playSoundEffect((double)((float)par4 + 0.5F), (double)((float)par5 + 0.5F), (double)((float)par6 + 0.5F), block.stepSound.getPlaceSound(), (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F); --par1ItemStack.stackSize; } diff --git a/patches/minecraft/net/minecraft/item/ItemBow.java.patch b/patches/minecraft/net/minecraft/item/ItemBow.java.patch index ebf7d5bcd..83aeafb8c 100644 --- a/patches/minecraft/net/minecraft/item/ItemBow.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemBow.java.patch @@ -1,16 +1,16 @@ ---- ../src_base/minecraft/net/minecraft/item/ItemBow.java -+++ ../src_work/minecraft/net/minecraft/item/ItemBow.java -@@ -10,6 +10,10 @@ - import net.minecraft.entity.projectile.EntityArrow; +--- ../src-base/minecraft/net/minecraft/item/ItemBow.java ++++ ../src-work/minecraft/net/minecraft/item/ItemBow.java +@@ -11,6 +11,10 @@ import net.minecraft.util.Icon; import net.minecraft.world.World; -+ + +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.player.ArrowLooseEvent; +import net.minecraftforge.event.entity.player.ArrowNockEvent; - ++ public class ItemBow extends Item { + public static final String[] bowPullIconNameArray = new String[] {"pulling_0", "pulling_1", "pulling_2"}; @@ -30,11 +34,20 @@ */ public void onPlayerStoppedUsing(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer, int par4) diff --git a/patches/minecraft/net/minecraft/item/ItemBucket.java.patch b/patches/minecraft/net/minecraft/item/ItemBucket.java.patch index c266b01f9..97226f108 100644 --- a/patches/minecraft/net/minecraft/item/ItemBucket.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemBucket.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/item/ItemBucket.java -+++ ../src_work/minecraft/net/minecraft/item/ItemBucket.java +--- ../src-base/minecraft/net/minecraft/item/ItemBucket.java ++++ ../src-work/minecraft/net/minecraft/item/ItemBucket.java @@ -8,6 +8,10 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; diff --git a/patches/minecraft/net/minecraft/item/ItemBucketMilk.java.patch b/patches/minecraft/net/minecraft/item/ItemBucketMilk.java.patch index a03156a47..a15935d93 100644 --- a/patches/minecraft/net/minecraft/item/ItemBucketMilk.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemBucketMilk.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/item/ItemBucketMilk.java -+++ ../src_work/minecraft/net/minecraft/item/ItemBucketMilk.java +--- ../src-base/minecraft/net/minecraft/item/ItemBucketMilk.java ++++ ../src-work/minecraft/net/minecraft/item/ItemBucketMilk.java @@ -22,7 +22,7 @@ if (!par2World.isRemote) diff --git a/patches/minecraft/net/minecraft/item/ItemDye.java.patch b/patches/minecraft/net/minecraft/item/ItemDye.java.patch index ba4fec69d..c6d7a0b35 100644 --- a/patches/minecraft/net/minecraft/item/ItemDye.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemDye.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/item/ItemDye.java -+++ ../src_work/minecraft/net/minecraft/item/ItemDye.java +--- ../src-base/minecraft/net/minecraft/item/ItemDye.java ++++ ../src-work/minecraft/net/minecraft/item/ItemDye.java @@ -21,6 +21,12 @@ import net.minecraft.util.MathHelper; import net.minecraft.world.World; @@ -22,7 +22,7 @@ { if (!par3World.isRemote) { -@@ -141,7 +147,27 @@ +@@ -141,8 +147,28 @@ public static boolean func_96604_a(ItemStack par0ItemStack, World par1World, int par2, int par3, int par4) { @@ -32,7 +32,7 @@ + public static boolean applyBonemeal(ItemStack par0ItemStack, World par1World, int par2, int par3, int par4, EntityPlayer player) + { int l = par1World.getBlockId(par2, par3, par4); -+ + + BonemealEvent event = new BonemealEvent(player, par1World, l, par2, par3, par4); + if (MinecraftForge.EVENT_BUS.post(event)) + { @@ -47,10 +47,11 @@ + } + return true; + } - ++ if (l == Block.sapling.blockID) { -@@ -244,16 +270,9 @@ + if (!par1World.isRemote) +@@ -244,17 +270,10 @@ par1World.setBlock(j1, k1, l1, Block.tallGrass.blockID, 1, 3); } } @@ -61,14 +62,15 @@ - { - par1World.setBlock(j1, k1, l1, Block.plantYellow.blockID); - } -- } ++ ForgeHooks.plantGrass(par1World, j1, k1, l1); + } - else if (Block.plantRed.canBlockStay(par1World, j1, k1, l1)) - { - par1World.setBlock(j1, k1, l1, Block.plantRed.blockID); -+ ForgeHooks.plantGrass(par1World, j1, k1, l1); - } +- } } } + } @@ -318,6 +337,16 @@ par0World.spawnParticle("happyVillager", (double)((float)par1 + itemRand.nextFloat()), (double)par2 + (double)itemRand.nextFloat() * block.getBlockBoundsMaxY(), (double)((float)par3 + itemRand.nextFloat()), d0, d1, d2); } diff --git a/patches/minecraft/net/minecraft/item/ItemFlintAndSteel.java.patch b/patches/minecraft/net/minecraft/item/ItemFlintAndSteel.java.patch index 39a372d29..c8ac11d4a 100644 --- a/patches/minecraft/net/minecraft/item/ItemFlintAndSteel.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemFlintAndSteel.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/item/ItemFlintAndSteel.java -+++ ../src_work/minecraft/net/minecraft/item/ItemFlintAndSteel.java +--- ../src-base/minecraft/net/minecraft/item/ItemFlintAndSteel.java ++++ ../src-work/minecraft/net/minecraft/item/ItemFlintAndSteel.java @@ -57,9 +57,7 @@ } else diff --git a/patches/minecraft/net/minecraft/item/ItemHoe.java.patch b/patches/minecraft/net/minecraft/item/ItemHoe.java.patch index b837ae6d7..b2cbb6961 100644 --- a/patches/minecraft/net/minecraft/item/ItemHoe.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemHoe.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/item/ItemHoe.java -+++ ../src_work/minecraft/net/minecraft/item/ItemHoe.java +--- ../src-base/minecraft/net/minecraft/item/ItemHoe.java ++++ ../src-work/minecraft/net/minecraft/item/ItemHoe.java @@ -6,6 +6,9 @@ import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; diff --git a/patches/minecraft/net/minecraft/item/ItemInWorldManager.java.patch b/patches/minecraft/net/minecraft/item/ItemInWorldManager.java.patch index 37bb8c940..3c1b9b61e 100644 --- a/patches/minecraft/net/minecraft/item/ItemInWorldManager.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemInWorldManager.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/item/ItemInWorldManager.java -+++ ../src_work/minecraft/net/minecraft/item/ItemInWorldManager.java +--- ../src-base/minecraft/net/minecraft/item/ItemInWorldManager.java ++++ ../src-work/minecraft/net/minecraft/item/ItemInWorldManager.java @@ -4,12 +4,25 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -40,7 +40,7 @@ if (this.isCreative()) { if (!this.theWorld.extinguishFire((EntityPlayer)null, par1, par2, par3, par4)) -@@ -154,15 +174,33 @@ +@@ -154,17 +174,35 @@ } else { @@ -50,13 +50,12 @@ int i1 = this.theWorld.getBlockId(par1, par2, par3); - if (i1 > 0) -- { -- Block.blocksList[i1].onBlockClicked(this.theWorld, par1, par2, par3, this.thisPlayerMP); -- f = Block.blocksList[i1].getPlayerRelativeBlockHardness(this.thisPlayerMP, this.thisPlayerMP.worldObj, par1, par2, par3); + Block block = Block.blocksList[i1]; + + if (block != null) -+ { + { +- Block.blocksList[i1].onBlockClicked(this.theWorld, par1, par2, par3, this.thisPlayerMP); +- f = Block.blocksList[i1].getPlayerRelativeBlockHardness(this.thisPlayerMP, this.thisPlayerMP.worldObj, par1, par2, par3); + if (event.useBlock != Event.Result.DENY) + { + block.onBlockClicked(theWorld, par1, par2, par3, thisPlayerMP); @@ -67,8 +66,8 @@ + thisPlayerMP.playerNetServerHandler.sendPacketToPlayer(new Packet53BlockChange(par1, par2, par3, theWorld)); + } + f = block.getPlayerRelativeBlockHardness(thisPlayerMP, thisPlayerMP.worldObj, par1, par2, par3); -+ } -+ + } + + if (event.useItem == Event.Result.DENY) + { + if (f >= 1.0f) @@ -76,9 +75,11 @@ + thisPlayerMP.playerNetServerHandler.sendPacketToPlayer(new Packet53BlockChange(par1, par2, par3, theWorld)); + } + return; - } - ++ } ++ if (i1 > 0 && f >= 1.0F) + { + this.tryHarvestBlock(par1, par2, par3); @@ -236,7 +274,7 @@ block.onBlockHarvested(this.theWorld, par1, par2, par3, l, this.thisPlayerMP); } @@ -133,7 +134,7 @@ if (itemstack != null) { -@@ -285,11 +331,18 @@ +@@ -285,12 +331,19 @@ } } @@ -143,15 +144,16 @@ Block.blocksList[l].harvestBlock(this.theWorld, this.thisPlayerMP, par1, par2, par3, i1); } } -+ + + // Drop experience + if (!this.isCreative() && flag && event != null) + { + Block.blocksList[l].dropXpOnBlockBreak(this.theWorld, par1, par2, par3, event.getExpToDrop()); + } - ++ return flag; } + } @@ -325,6 +378,7 @@ if (itemstack1.stackSize == 0) { @@ -165,27 +167,60 @@ public boolean activateBlockOrUseItem(EntityPlayer par1EntityPlayer, World par2World, ItemStack par3ItemStack, int par4, int par5, int par6, int par7, float par8, float par9, float par10) { - int i1; -- -- if (!par1EntityPlayer.isSneaking() || par1EntityPlayer.getHeldItem() == null) -- { -- i1 = par2World.getBlockId(par4, par5, par6); -- -- if (i1 > 0 && Block.blocksList[i1].onBlockActivated(par2World, par4, par5, par6, par1EntityPlayer, par7, par8, par9, par10)) -- { -- return true; -- } -- } -- -- if (par3ItemStack == null) -- { + PlayerInteractEvent event = ForgeEventFactory.onPlayerInteract(par1EntityPlayer, Action.RIGHT_CLICK_BLOCK, par4, par5, par6, par7); + if (event.isCanceled()) + { + thisPlayerMP.playerNetServerHandler.sendPacketToPlayer(new Packet53BlockChange(par4, par5, par6, theWorld)); - return false; ++ return false; ++ } + +- if (!par1EntityPlayer.isSneaking() || par1EntityPlayer.getHeldItem() == null) ++ Item item = (par3ItemStack != null ? par3ItemStack.getItem() : null); ++ if (item != null && item.onItemUseFirst(par3ItemStack, par1EntityPlayer, par2World, par4, par5, par6, par7, par8, par9, par10)) + { +- i1 = par2World.getBlockId(par4, par5, par6); ++ if (par3ItemStack.stackSize <= 0) ForgeEventFactory.onPlayerDestroyItem(thisPlayerMP, par3ItemStack); ++ return true; ++ } + +- if (i1 > 0 && Block.blocksList[i1].onBlockActivated(par2World, par4, par5, par6, par1EntityPlayer, par7, par8, par9, par10)) ++ int i1 = par2World.getBlockId(par4, par5, par6); ++ Block block = Block.blocksList[i1]; ++ boolean result = false; ++ ++ if (block != null && (!par1EntityPlayer.isSneaking() || ( par1EntityPlayer.getHeldItem() == null || par1EntityPlayer.getHeldItem().getItem().shouldPassSneakingClickToBlock(par2World, par4, par5, par6)))) ++ { ++ if (event.useBlock != Event.Result.DENY) + { +- return true; ++ result = block.onBlockActivated(par2World, par4, par5, par6, par1EntityPlayer, par7, par8, par9, par10); + } ++ else ++ { ++ thisPlayerMP.playerNetServerHandler.sendPacketToPlayer(new Packet53BlockChange(par4, par5, par6, theWorld)); ++ result = event.useItem != Event.Result.ALLOW; ++ } + } + +- if (par3ItemStack == null) ++ if (par3ItemStack != null && !result && event.useItem != Event.Result.DENY) + { +- return false; ++ int meta = par3ItemStack.getItemDamage(); ++ int size = par3ItemStack.stackSize; ++ result = par3ItemStack.tryPlaceItemIntoWorld(par1EntityPlayer, par2World, par4, par5, par6, par7, par8, par9, par10); ++ if (isCreative()) ++ { ++ par3ItemStack.setItemDamage(meta); ++ par3ItemStack.stackSize = size; ++ } ++ if (par3ItemStack.stackSize <= 0) ForgeEventFactory.onPlayerDestroyItem(thisPlayerMP, par3ItemStack); } - else if (this.isCreative()) -- { ++ ++ /* Re-enable if this causes bukkit incompatibility, or re-write client side to only send a single packet per right click. ++ if (par3ItemStack != null && ((!result && event.useItem != Event.Result.DENY) || event.useItem == Event.Result.ALLOW)) + { - i1 = par3ItemStack.getItemDamage(); - int j1 = par3ItemStack.stackSize; - boolean flag = par3ItemStack.tryPlaceItemIntoWorld(par1EntityPlayer, par2World, par4, par5, par6, par7, par8, par9, par10); @@ -197,47 +232,6 @@ - { - return par3ItemStack.tryPlaceItemIntoWorld(par1EntityPlayer, par2World, par4, par5, par6, par7, par8, par9, par10); - } -+ -+ Item item = (par3ItemStack != null ? par3ItemStack.getItem() : null); -+ if (item != null && item.onItemUseFirst(par3ItemStack, par1EntityPlayer, par2World, par4, par5, par6, par7, par8, par9, par10)) -+ { -+ if (par3ItemStack.stackSize <= 0) ForgeEventFactory.onPlayerDestroyItem(thisPlayerMP, par3ItemStack); -+ return true; -+ } -+ -+ int i1 = par2World.getBlockId(par4, par5, par6); -+ Block block = Block.blocksList[i1]; -+ boolean result = false; -+ -+ if (block != null && (!par1EntityPlayer.isSneaking() || ( par1EntityPlayer.getHeldItem() == null || par1EntityPlayer.getHeldItem().getItem().shouldPassSneakingClickToBlock(par2World, par4, par5, par6)))) -+ { -+ if (event.useBlock != Event.Result.DENY) -+ { -+ result = block.onBlockActivated(par2World, par4, par5, par6, par1EntityPlayer, par7, par8, par9, par10); -+ } -+ else -+ { -+ thisPlayerMP.playerNetServerHandler.sendPacketToPlayer(new Packet53BlockChange(par4, par5, par6, theWorld)); -+ result = event.useItem != Event.Result.ALLOW; -+ } -+ } -+ -+ if (par3ItemStack != null && !result && event.useItem != Event.Result.DENY) -+ { -+ int meta = par3ItemStack.getItemDamage(); -+ int size = par3ItemStack.stackSize; -+ result = par3ItemStack.tryPlaceItemIntoWorld(par1EntityPlayer, par2World, par4, par5, par6, par7, par8, par9, par10); -+ if (isCreative()) -+ { -+ par3ItemStack.setItemDamage(meta); -+ par3ItemStack.stackSize = size; -+ } -+ if (par3ItemStack.stackSize <= 0) ForgeEventFactory.onPlayerDestroyItem(thisPlayerMP, par3ItemStack); -+ } -+ -+ /* Re-enable if this causes bukkit incompatibility, or re-write client side to only send a single packet per right click. -+ if (par3ItemStack != null && ((!result && event.useItem != Event.Result.DENY) || event.useItem == Event.Result.ALLOW)) -+ { + this.tryUseItem(thisPlayerMP, par2World, par3ItemStack); + }*/ + return result; diff --git a/patches/minecraft/net/minecraft/item/ItemMap.java.patch b/patches/minecraft/net/minecraft/item/ItemMap.java.patch index 340992551..9e0093a31 100644 --- a/patches/minecraft/net/minecraft/item/ItemMap.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemMap.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/item/ItemMap.java -+++ ../src_work/minecraft/net/minecraft/item/ItemMap.java +--- ../src-base/minecraft/net/minecraft/item/ItemMap.java ++++ ../src-work/minecraft/net/minecraft/item/ItemMap.java @@ -98,7 +98,7 @@ boolean flag = k2 * k2 + l2 * l2 > (j1 - 2) * (j1 - 2); int i3 = (j / i + k1 - short1 / 2) * i; diff --git a/patches/minecraft/net/minecraft/item/ItemSeedFood.java.patch b/patches/minecraft/net/minecraft/item/ItemSeedFood.java.patch index 3674ecad5..ee004b998 100644 --- a/patches/minecraft/net/minecraft/item/ItemSeedFood.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemSeedFood.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/item/ItemSeedFood.java -+++ ../src_work/minecraft/net/minecraft/item/ItemSeedFood.java +--- ../src-base/minecraft/net/minecraft/item/ItemSeedFood.java ++++ ../src-work/minecraft/net/minecraft/item/ItemSeedFood.java @@ -1,9 +1,13 @@ package net.minecraft.item; diff --git a/patches/minecraft/net/minecraft/item/ItemSeeds.java.patch b/patches/minecraft/net/minecraft/item/ItemSeeds.java.patch index 45f86820a..785de820a 100644 --- a/patches/minecraft/net/minecraft/item/ItemSeeds.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemSeeds.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/item/ItemSeeds.java -+++ ../src_work/minecraft/net/minecraft/item/ItemSeeds.java +--- ../src-base/minecraft/net/minecraft/item/ItemSeeds.java ++++ ../src-work/minecraft/net/minecraft/item/ItemSeeds.java @@ -1,10 +1,15 @@ package net.minecraft.item; diff --git a/patches/minecraft/net/minecraft/item/ItemShears.java.patch b/patches/minecraft/net/minecraft/item/ItemShears.java.patch index 9fa69529d..e34f35745 100644 --- a/patches/minecraft/net/minecraft/item/ItemShears.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemShears.java.patch @@ -1,11 +1,11 @@ ---- ../src_base/minecraft/net/minecraft/item/ItemShears.java -+++ ../src_work/minecraft/net/minecraft/item/ItemShears.java +--- ../src-base/minecraft/net/minecraft/item/ItemShears.java ++++ ../src-work/minecraft/net/minecraft/item/ItemShears.java @@ -1,9 +1,19 @@ package net.minecraft.item; -+ + +import java.util.ArrayList; +import java.util.Random; - ++ import net.minecraft.block.Block; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.enchantment.Enchantment; diff --git a/patches/minecraft/net/minecraft/item/ItemStack.java.patch b/patches/minecraft/net/minecraft/item/ItemStack.java.patch index 7ccbc4139..c44d2392a 100644 --- a/patches/minecraft/net/minecraft/item/ItemStack.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemStack.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/item/ItemStack.java -+++ ../src_work/minecraft/net/minecraft/item/ItemStack.java +--- ../src-base/minecraft/net/minecraft/item/ItemStack.java ++++ ../src-work/minecraft/net/minecraft/item/ItemStack.java @@ -29,6 +29,7 @@ import net.minecraft.util.Icon; import net.minecraft.util.StatCollector; @@ -101,7 +101,7 @@ } public boolean func_111282_a(EntityPlayer par1EntityPlayer, EntityLivingBase par2EntityLivingBase) -@@ -733,14 +750,21 @@ +@@ -733,15 +750,22 @@ { arraylist.add("Durability: " + (this.getMaxDamage() - this.getItemDamageForDisplay()) + " / " + this.getMaxDamage()); } @@ -116,11 +116,12 @@ { - return this.getItem().hasEffect(this); + return hasEffect(0); -+ } + } + @SideOnly(Side.CLIENT) + public boolean hasEffect(int pass) + { + return this.getItem().hasEffect(this, pass); - } ++ } @SideOnly(Side.CLIENT) + public EnumRarity getRarity() diff --git a/patches/minecraft/net/minecraft/item/ItemTool.java.patch b/patches/minecraft/net/minecraft/item/ItemTool.java.patch index 304d514ac..7b273ad04 100644 --- a/patches/minecraft/net/minecraft/item/ItemTool.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemTool.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/item/ItemTool.java -+++ ../src_work/minecraft/net/minecraft/item/ItemTool.java +--- ../src-base/minecraft/net/minecraft/item/ItemTool.java ++++ ../src-work/minecraft/net/minecraft/item/ItemTool.java @@ -9,6 +9,7 @@ import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.attributes.AttributeModifier; diff --git a/patches/minecraft/net/minecraft/item/crafting/CraftingManager.java.patch b/patches/minecraft/net/minecraft/item/crafting/CraftingManager.java.patch index 14d3f9784..6ebe38e3f 100644 --- a/patches/minecraft/net/minecraft/item/crafting/CraftingManager.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/CraftingManager.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/item/crafting/CraftingManager.java -+++ ../src_work/minecraft/net/minecraft/item/crafting/CraftingManager.java +--- ../src-base/minecraft/net/minecraft/item/crafting/CraftingManager.java ++++ ../src-work/minecraft/net/minecraft/item/crafting/CraftingManager.java @@ -283,7 +283,7 @@ } } diff --git a/patches/minecraft/net/minecraft/item/crafting/FurnaceRecipes.java.patch b/patches/minecraft/net/minecraft/item/crafting/FurnaceRecipes.java.patch index fd593450e..507d7cab0 100644 --- a/patches/minecraft/net/minecraft/item/crafting/FurnaceRecipes.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/FurnaceRecipes.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/item/crafting/FurnaceRecipes.java -+++ ../src_work/minecraft/net/minecraft/item/crafting/FurnaceRecipes.java +--- ../src-base/minecraft/net/minecraft/item/crafting/FurnaceRecipes.java ++++ ../src-work/minecraft/net/minecraft/item/crafting/FurnaceRecipes.java @@ -1,6 +1,8 @@ package net.minecraft.item.crafting; diff --git a/patches/minecraft/net/minecraft/item/crafting/RecipeFireworks.java.patch b/patches/minecraft/net/minecraft/item/crafting/RecipeFireworks.java.patch index 488cc8fa3..809096b6b 100644 --- a/patches/minecraft/net/minecraft/item/crafting/RecipeFireworks.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/RecipeFireworks.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/item/crafting/RecipeFireworks.java -+++ ../src_work/minecraft/net/minecraft/item/crafting/RecipeFireworks.java +--- ../src-base/minecraft/net/minecraft/item/crafting/RecipeFireworks.java ++++ ../src-work/minecraft/net/minecraft/item/crafting/RecipeFireworks.java @@ -91,9 +91,9 @@ { this.field_92102_a = new ItemStack(Item.firework); @@ -16,10 +16,8 @@ nbttagcompound1.setByte("Flight", (byte)j); nbttagcompound.setTag("Fireworks", nbttagcompound1); - this.field_92102_a.setTagCompound(nbttagcompound); -- } -- -+ } -+ + } + + this.field_92102_a.setTagCompound(nbttagcompound); return true; } diff --git a/patches/minecraft/net/minecraft/logging/LogAgent.java.patch b/patches/minecraft/net/minecraft/logging/LogAgent.java.patch index 1623d5b7b..5e61ecbd2 100644 --- a/patches/minecraft/net/minecraft/logging/LogAgent.java.patch +++ b/patches/minecraft/net/minecraft/logging/LogAgent.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/logging/LogAgent.java -+++ ../src_work/minecraft/net/minecraft/logging/LogAgent.java +--- ../src-base/minecraft/net/minecraft/logging/LogAgent.java ++++ ../src-work/minecraft/net/minecraft/logging/LogAgent.java @@ -72,7 +72,7 @@ public void logWarningFormatted(String par1Str, Object ... par2ArrayOfObj) diff --git a/patches/minecraft/net/minecraft/nbt/CompressedStreamTools.java.patch b/patches/minecraft/net/minecraft/nbt/CompressedStreamTools.java.patch index e8c364ea5..e8bd316d1 100644 --- a/patches/minecraft/net/minecraft/nbt/CompressedStreamTools.java.patch +++ b/patches/minecraft/net/minecraft/nbt/CompressedStreamTools.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/nbt/CompressedStreamTools.java -+++ ../src_work/minecraft/net/minecraft/nbt/CompressedStreamTools.java +--- ../src-base/minecraft/net/minecraft/nbt/CompressedStreamTools.java ++++ ../src-work/minecraft/net/minecraft/nbt/CompressedStreamTools.java @@ -140,7 +140,6 @@ NBTBase.writeNamedTag(par0NBTTagCompound, par1DataOutput); } diff --git a/patches/minecraft/net/minecraft/nbt/NBTTagList.java.patch b/patches/minecraft/net/minecraft/nbt/NBTTagList.java.patch index 298a132db..f81f690e5 100644 --- a/patches/minecraft/net/minecraft/nbt/NBTTagList.java.patch +++ b/patches/minecraft/net/minecraft/nbt/NBTTagList.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/nbt/NBTTagList.java -+++ ../src_work/minecraft/net/minecraft/nbt/NBTTagList.java +--- ../src-base/minecraft/net/minecraft/nbt/NBTTagList.java ++++ ../src-work/minecraft/net/minecraft/nbt/NBTTagList.java @@ -1,7 +1,5 @@ package net.minecraft.nbt; diff --git a/patches/minecraft/net/minecraft/network/NetServerHandler.java.patch b/patches/minecraft/net/minecraft/network/NetServerHandler.java.patch index 7e6a1554f..bb8a86e57 100644 --- a/patches/minecraft/net/minecraft/network/NetServerHandler.java.patch +++ b/patches/minecraft/net/minecraft/network/NetServerHandler.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/network/NetServerHandler.java -+++ ../src_work/minecraft/net/minecraft/network/NetServerHandler.java +--- ../src-base/minecraft/net/minecraft/network/NetServerHandler.java ++++ ../src-work/minecraft/net/minecraft/network/NetServerHandler.java @@ -71,6 +71,14 @@ import net.minecraft.world.WorldServer; import org.apache.commons.lang3.StringUtils; @@ -15,18 +15,18 @@ public class NetServerHandler extends NetHandler { /** The underlying network manager for this server handler. */ -@@ -221,6 +229,11 @@ - if (this.playerEntity.ridingEntity != null) - { +@@ -223,6 +231,11 @@ this.playerEntity.ridingEntity.updateRiderPosition(); -+ } -+ + } + + if (!this.hasMoved) //Fixes teleportation kick while riding entities + { + return; - } - ++ } ++ this.mcServer.getConfigurationManager().serverUpdateMountedMovingPlayer(this.playerEntity); + + if (this.hasMoved) @@ -300,9 +313,10 @@ d4 = d1 - this.playerEntity.posX; double d5 = d2 - this.playerEntity.posY; @@ -41,18 +41,18 @@ double d10 = d7 * d7 + d8 * d8 + d9 * d9; if (d10 > 100.0D && (!this.mcServer.isSinglePlayer() || !this.mcServer.getServerOwner().equals(this.playerEntity.getCommandSenderName()))) -@@ -318,6 +332,11 @@ - if (this.playerEntity.onGround && !par1Packet10Flying.onGround && d5 > 0.0D) - { +@@ -320,6 +334,11 @@ this.playerEntity.addExhaustion(0.2F); -+ } -+ + } + + if (!this.hasMoved) //Fixes "Moved Too Fast" kick when being teleported while moving + { + return; - } - ++ } ++ this.playerEntity.moveEntity(d4, d5, d6); + this.playerEntity.onGround = par1Packet10Flying.onGround; + this.playerEntity.addMovementStat(d4, d5, d6); @@ -342,10 +361,15 @@ this.mcServer.getLogAgent().logWarning(this.playerEntity.getCommandSenderName() + " moved wrongly!"); } diff --git a/patches/minecraft/net/minecraft/network/packet/Packet51MapChunk.java.patch b/patches/minecraft/net/minecraft/network/packet/Packet51MapChunk.java.patch index 3c6c38fb5..a293891ee 100644 --- a/patches/minecraft/net/minecraft/network/packet/Packet51MapChunk.java.patch +++ b/patches/minecraft/net/minecraft/network/packet/Packet51MapChunk.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/network/packet/Packet51MapChunk.java -+++ ../src_work/minecraft/net/minecraft/network/packet/Packet51MapChunk.java +--- ../src-base/minecraft/net/minecraft/network/packet/Packet51MapChunk.java ++++ ../src-work/minecraft/net/minecraft/network/packet/Packet51MapChunk.java @@ -5,6 +5,7 @@ import java.io.DataInput; import java.io.DataOutput; @@ -24,11 +24,10 @@ - Deflater deflater = new Deflater(-1); this.yChMax = packet51mapchunkdata.chunkHasAddSectionFlag; this.yChMin = packet51mapchunkdata.chunkExistFlag; -- + this.compressedChunkData = packet51mapchunkdata.compressedData; + this.deflateGate = new Semaphore(1); + } -+ + + private void deflate() + { + Deflater deflater = new Deflater(-1); diff --git a/patches/minecraft/net/minecraft/network/packet/Packet52MultiBlockChange.java.patch b/patches/minecraft/net/minecraft/network/packet/Packet52MultiBlockChange.java.patch index 12dca7774..87003341e 100644 --- a/patches/minecraft/net/minecraft/network/packet/Packet52MultiBlockChange.java.patch +++ b/patches/minecraft/net/minecraft/network/packet/Packet52MultiBlockChange.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/network/packet/Packet52MultiBlockChange.java -+++ ../src_work/minecraft/net/minecraft/network/packet/Packet52MultiBlockChange.java +--- ../src-base/minecraft/net/minecraft/network/packet/Packet52MultiBlockChange.java ++++ ../src-work/minecraft/net/minecraft/network/packet/Packet52MultiBlockChange.java @@ -7,6 +7,8 @@ import java.io.IOException; import net.minecraft.world.World; diff --git a/patches/minecraft/net/minecraft/network/packet/Packet56MapChunks.java.patch b/patches/minecraft/net/minecraft/network/packet/Packet56MapChunks.java.patch index 1ef0a9d8b..b0ab38ea2 100644 --- a/patches/minecraft/net/minecraft/network/packet/Packet56MapChunks.java.patch +++ b/patches/minecraft/net/minecraft/network/packet/Packet56MapChunks.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/network/packet/Packet56MapChunks.java -+++ ../src_work/minecraft/net/minecraft/network/packet/Packet56MapChunks.java +--- ../src-base/minecraft/net/minecraft/network/packet/Packet56MapChunks.java ++++ ../src-work/minecraft/net/minecraft/network/packet/Packet56MapChunks.java @@ -6,6 +6,7 @@ import java.io.DataOutput; import java.io.IOException; @@ -8,16 +8,17 @@ import java.util.zip.DataFormatException; import java.util.zip.Deflater; import java.util.zip.Inflater; -@@ -31,6 +32,9 @@ +@@ -31,7 +32,10 @@ */ private boolean skyLightSent; private static byte[] chunkDataNotCompressed = new byte[0]; + private int maxLen = 0; -+ -+ private Semaphore deflateGate; ++ private Semaphore deflateGate; ++ public Packet56MapChunks() {} + public Packet56MapChunks(List par1List) @@ -49,15 +53,6 @@ { Chunk chunk = (Chunk)par1List.get(k); @@ -41,7 +42,7 @@ + deflateGate = new Semaphore(1); + maxLen = j; + } -+ + + private void deflate() + { + byte[] data = new byte[maxLen]; @@ -51,7 +52,7 @@ + System.arraycopy(field_73584_f[x], 0, data, offset, field_73584_f[x].length); + offset += field_73584_f[x].length; + } - ++ Deflater deflater = new Deflater(-1); try diff --git a/patches/minecraft/net/minecraft/potion/PotionEffect.java.patch b/patches/minecraft/net/minecraft/potion/PotionEffect.java.patch index 0a52e4c3f..bcebb171f 100644 --- a/patches/minecraft/net/minecraft/potion/PotionEffect.java.patch +++ b/patches/minecraft/net/minecraft/potion/PotionEffect.java.patch @@ -1,11 +1,11 @@ ---- ../src_base/minecraft/net/minecraft/potion/PotionEffect.java -+++ ../src_work/minecraft/net/minecraft/potion/PotionEffect.java +--- ../src-base/minecraft/net/minecraft/potion/PotionEffect.java ++++ ../src-work/minecraft/net/minecraft/potion/PotionEffect.java @@ -1,8 +1,13 @@ package net.minecraft.potion; -+ + +import java.util.ArrayList; +import java.util.List; - ++ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.EntityLivingBase; @@ -41,12 +41,10 @@ } /** -@@ -93,6 +104,63 @@ - public int getAmplifier() - { +@@ -95,6 +106,63 @@ return this.amplifier; -+ } -+ + } + + /*** + * Returns a list of curative items for the potion effect + * @return The list (ItemStack) of curative items for the potion effect @@ -102,6 +100,8 @@ + { + this.curativeItems.add(stack); + } - } - ++ } ++ /** + * Set whether this potion is a splash potion. + */ diff --git a/patches/minecraft/net/minecraft/server/MinecraftServer.java.patch b/patches/minecraft/net/minecraft/server/MinecraftServer.java.patch index 9dfab6b89..9927bae56 100644 --- a/patches/minecraft/net/minecraft/server/MinecraftServer.java.patch +++ b/patches/minecraft/net/minecraft/server/MinecraftServer.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/server/MinecraftServer.java -+++ ../src_work/minecraft/net/minecraft/server/MinecraftServer.java +--- ../src-base/minecraft/net/minecraft/server/MinecraftServer.java ++++ ../src-work/minecraft/net/minecraft/server/MinecraftServer.java @@ -11,6 +11,7 @@ import java.text.SimpleDateFormat; import java.util.ArrayList; @@ -52,9 +52,13 @@ } - for (int j = 0; j < this.worldServers.length; ++j) -- { ++ WorldServer overWorld = (isDemo() ? new DemoWorldServer(this, isavehandler, par2Str, 0, theProfiler, getLogAgent()) : new WorldServer(this, isavehandler, par2Str, 0, worldsettings, theProfiler, getLogAgent())); ++ for (int dim : DimensionManager.getStaticDimensionIDs()) + { - byte b0 = 0; -- ++ WorldServer world = (dim == 0 ? overWorld : new WorldServerMulti(this, isavehandler, par2Str, dim, worldsettings, overWorld, theProfiler, getLogAgent())); ++ world.addWorldAccess(new WorldManager(this, world)); + - if (j == 1) - { - b0 = -1; @@ -82,12 +86,7 @@ - } - - this.worldServers[j].addWorldAccess(new WorldManager(this, this.worldServers[j])); -+ WorldServer overWorld = (isDemo() ? new DemoWorldServer(this, isavehandler, par2Str, 0, theProfiler, getLogAgent()) : new WorldServer(this, isavehandler, par2Str, 0, worldsettings, theProfiler, getLogAgent())); -+ for (int dim : DimensionManager.getStaticDimensionIDs()) -+ { -+ WorldServer world = (dim == 0 ? overWorld : new WorldServerMulti(this, isavehandler, par2Str, dim, worldsettings, overWorld, theProfiler, getLogAgent())); -+ world.addWorldAccess(new WorldManager(this, world)); - +- if (!this.isSinglePlayer()) { - this.worldServers[j].getWorldInfo().setGameType(this.getGameType()); @@ -95,12 +94,10 @@ } this.serverConfigManager.setPlayerManager(this.worldServers); -- } -- + + MinecraftForge.EVENT_BUS.post(new WorldEvent.Load(world)); -+ } -+ + } + + this.serverConfigManager.setPlayerManager(new WorldServer[]{ overWorld }); this.setDifficultyForAllWorlds(this.getDifficulty()); this.initialWorldChunkLoad(); @@ -113,38 +110,38 @@ int i = aworldserver.length; for (int j = 0; j < i; ++j) -@@ -413,7 +395,14 @@ +@@ -413,9 +395,16 @@ for (int i = 0; i < this.worldServers.length; ++i) { WorldServer worldserver = this.worldServers[i]; + MinecraftForge.EVENT_BUS.post(new WorldEvent.Unload(worldserver)); worldserver.flush(); -+ } -+ + } + + WorldServer[] tmp = worldServers; + for (WorldServer world : tmp) + { + DimensionManager.setWorld(world.provider.dimensionId, null); - } - ++ } ++ if (this.usageSnooper != null && this.usageSnooper.isSnooperRunning()) + { + this.usageSnooper.stopSnooper(); @@ -638,13 +627,15 @@ this.theProfiler.startSection("levels"); int i; - for (i = 0; i < this.worldServers.length; ++i) -- { + Integer[] ids = DimensionManager.getIDs(this.tickCounter % 200 == 0); + for (int x = 0; x < ids.length; x++) -+ { + { + int id = ids[x]; long j = System.nanoTime(); - if (i == 0 || this.getAllowNether()) -- { -- WorldServer worldserver = this.worldServers[i]; + if (id == 0 || this.getAllowNether()) -+ { + { +- WorldServer worldserver = this.worldServers[i]; + WorldServer worldserver = DimensionManager.getWorld(id); this.theProfiler.startSection(worldserver.getWorldInfo().getWorldName()); this.theProfiler.startSection("pools"); @@ -154,11 +151,9 @@ } - this.timeOfLastDimensionTick[i][this.tickCounter % 100] = System.nanoTime() - j; -- } -- + worldTickTimes.get(id)[this.tickCounter % 100] = System.nanoTime() - j; -+ } -+ + } + + this.theProfiler.endStartSection("dim_unloading"); + DimensionManager.unloadWorlds(worldTickTimes); this.theProfiler.endStartSection("connection"); diff --git a/patches/minecraft/net/minecraft/server/gui/StatsComponent.java.patch b/patches/minecraft/net/minecraft/server/gui/StatsComponent.java.patch index 05baecfa2..1e56f7bf4 100644 --- a/patches/minecraft/net/minecraft/server/gui/StatsComponent.java.patch +++ b/patches/minecraft/net/minecraft/server/gui/StatsComponent.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/server/gui/StatsComponent.java -+++ ../src_work/minecraft/net/minecraft/server/gui/StatsComponent.java +--- ../src-base/minecraft/net/minecraft/server/gui/StatsComponent.java ++++ ../src-work/minecraft/net/minecraft/server/gui/StatsComponent.java @@ -10,6 +10,8 @@ import javax.swing.Timer; import net.minecraft.network.TcpConnection; diff --git a/patches/minecraft/net/minecraft/server/integrated/IntegratedServer.java.patch b/patches/minecraft/net/minecraft/server/integrated/IntegratedServer.java.patch index db0fe6d6c..4bf1d8cd7 100644 --- a/patches/minecraft/net/minecraft/server/integrated/IntegratedServer.java.patch +++ b/patches/minecraft/net/minecraft/server/integrated/IntegratedServer.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/server/integrated/IntegratedServer.java -+++ ../src_work/minecraft/net/minecraft/server/integrated/IntegratedServer.java +--- ../src-base/minecraft/net/minecraft/server/integrated/IntegratedServer.java ++++ ../src-work/minecraft/net/minecraft/server/integrated/IntegratedServer.java @@ -23,6 +23,10 @@ import net.minecraft.world.demo.DemoWorldServer; import net.minecraft.world.storage.ISaveHandler; @@ -20,16 +20,14 @@ ISaveHandler isavehandler = this.getActiveAnvilConverter().getSaveLoader(par1Str, true); - for (int j = 0; j < this.worldServers.length; ++j) -- { -- byte b0 = 0; -- -- if (j == 1) + WorldServer overWorld = (isDemo() ? new DemoWorldServer(this, isavehandler, par2Str, 0, theProfiler, getLogAgent()) : new WorldServer(this, isavehandler, par2Str, 0, theWorldSettings, theProfiler, getLogAgent())); + for (int dim : DimensionManager.getStaticDimensionIDs()) -+ { + { +- byte b0 = 0; + WorldServer world = (dim == 0 ? overWorld : new WorldServerMulti(this, isavehandler, par2Str, dim, theWorldSettings, overWorld, theProfiler, getLogAgent())); + world.addWorldAccess(new WorldManager(this, world)); -+ + +- if (j == 1) + if (!this.isSinglePlayer()) { - b0 = -1; @@ -59,11 +57,9 @@ - - this.worldServers[j].addWorldAccess(new WorldManager(this, this.worldServers[j])); - this.getConfigurationManager().setPlayerManager(this.worldServers); -- } -- + MinecraftForge.EVENT_BUS.post(new WorldEvent.Load(world)); -+ } -+ + } + + this.getConfigurationManager().setPlayerManager(new WorldServer[]{ overWorld }); this.setDifficultyForAllWorlds(this.getDifficulty()); this.initialWorldChunkLoad(); diff --git a/patches/minecraft/net/minecraft/server/management/PlayerInstance.java.patch b/patches/minecraft/net/minecraft/server/management/PlayerInstance.java.patch index 9f378ae5c..59bf8105d 100644 --- a/patches/minecraft/net/minecraft/server/management/PlayerInstance.java.patch +++ b/patches/minecraft/net/minecraft/server/management/PlayerInstance.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/server/management/PlayerInstance.java -+++ ../src_work/minecraft/net/minecraft/server/management/PlayerInstance.java +--- ../src-base/minecraft/net/minecraft/server/management/PlayerInstance.java ++++ ../src-work/minecraft/net/minecraft/server/management/PlayerInstance.java @@ -1,6 +1,7 @@ package net.minecraft.server.management; @@ -71,9 +71,8 @@ else { this.sendToAllPlayersWatchingChunk(new Packet52MultiBlockChange(this.chunkLocation.chunkXPos, this.chunkLocation.chunkZPos, this.locationOfBlockChange, this.numberOfTilesToUpdate, PlayerManager.getWorldServer(this.thePlayerManager))); -- + } -+ + + { //Forge: Send only the tile entities that are updated, Adding this brace lets us keep the indent and the patch small for (i = 0; i < this.numberOfTilesToUpdate; ++i) { diff --git a/patches/minecraft/net/minecraft/server/management/ServerConfigurationManager.java.patch b/patches/minecraft/net/minecraft/server/management/ServerConfigurationManager.java.patch index 337f3c861..c5c4042ee 100644 --- a/patches/minecraft/net/minecraft/server/management/ServerConfigurationManager.java.patch +++ b/patches/minecraft/net/minecraft/server/management/ServerConfigurationManager.java.patch @@ -1,6 +1,6 @@ ---- ../src_base/minecraft/net/minecraft/server/management/ServerConfigurationManager.java -+++ ../src_work/minecraft/net/minecraft/server/management/ServerConfigurationManager.java -@@ -52,10 +52,14 @@ +--- ../src-base/minecraft/net/minecraft/server/management/ServerConfigurationManager.java ++++ ../src-work/minecraft/net/minecraft/server/management/ServerConfigurationManager.java +@@ -52,11 +52,15 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.MathHelper; import net.minecraft.world.EnumGameType; @@ -10,11 +10,12 @@ import net.minecraft.world.WorldServer; import net.minecraft.world.demo.DemoWorldManager; import net.minecraft.world.storage.IPlayerFileData; -+ -+import net.minecraftforge.common.DimensionManager; ++import net.minecraftforge.common.DimensionManager; ++ public abstract class ServerConfigurationManager { + private static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd \'at\' HH:mm:ss z"); @@ -392,13 +396,23 @@ */ public EntityPlayerMP respawnPlayer(EntityPlayerMP par1EntityPlayerMP, int par2, boolean par3) @@ -70,7 +71,7 @@ this.func_72375_a(par1EntityPlayerMP, worldserver); par1EntityPlayerMP.playerNetServerHandler.setPlayerLocation(par1EntityPlayerMP.posX, par1EntityPlayerMP.posY, par1EntityPlayerMP.posZ, par1EntityPlayerMP.rotationYaw, par1EntityPlayerMP.rotationPitch); par1EntityPlayerMP.theItemInWorldManager.setWorld(worldserver1); -@@ -487,38 +507,23 @@ +@@ -487,39 +507,24 @@ */ public void transferEntityToWorld(Entity par1Entity, int par2, WorldServer par3WorldServer, WorldServer par4WorldServer) { @@ -94,7 +95,8 @@ par3WorldServer.theProfiler.startSection("moving"); - if (par1Entity.dimension == -1) -- { ++ if (par1Entity.dimension == 1) + { - d0 /= d2; - d1 /= d2; - par1Entity.setLocationAndAngles(d0, par1Entity.posY, d1, par1Entity.rotationYaw, par1Entity.rotationPitch); @@ -116,10 +118,10 @@ - } - } - else -+ if (par1Entity.dimension == 1) - { +- { ChunkCoordinates chunkcoordinates; + if (par2 == 1) @@ -555,7 +560,7 @@ par4WorldServer.spawnEntityInWorld(par1Entity); par1Entity.setLocationAndAngles(d0, par1Entity.posY, d1, par1Entity.rotationYaw, par1Entity.rotationPitch); diff --git a/patches/minecraft/net/minecraft/stats/StatList.java.patch b/patches/minecraft/net/minecraft/stats/StatList.java.patch index 6c2eb1e61..1e155a9cf 100644 --- a/patches/minecraft/net/minecraft/stats/StatList.java.patch +++ b/patches/minecraft/net/minecraft/stats/StatList.java.patch @@ -1,14 +1,13 @@ ---- ../src_base/minecraft/net/minecraft/stats/StatList.java -+++ ../src_work/minecraft/net/minecraft/stats/StatList.java +--- ../src-base/minecraft/net/minecraft/stats/StatList.java ++++ ../src-work/minecraft/net/minecraft/stats/StatList.java @@ -182,9 +182,9 @@ */ private static StatBase[] initMinableStats(String par0Str, int par1) { - StatBase[] astatbase = new StatBase[256]; -- -- for (int j = 0; j < 256; ++j) + StatBase[] astatbase = new StatBase[Block.blocksList.length]; -+ + +- for (int j = 0; j < 256; ++j) + for (int j = 0; j < Block.blocksList.length; ++j) { if (Block.blocksList[j] != null && Block.blocksList[j].getEnableStats()) diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntity.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntity.java.patch index 0d0680d8e..dfb93eb6e 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntity.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntity.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/tileentity/TileEntity.java -+++ ../src_work/minecraft/net/minecraft/tileentity/TileEntity.java +--- ../src-base/minecraft/net/minecraft/tileentity/TileEntity.java ++++ ../src-work/minecraft/net/minecraft/tileentity/TileEntity.java @@ -10,8 +10,11 @@ import net.minecraft.block.Block; import net.minecraft.crash.CrashReportCategory; diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntityBeacon.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntityBeacon.java.patch index 772b4845d..eb458c8cb 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntityBeacon.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntityBeacon.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/tileentity/TileEntityBeacon.java -+++ ../src_work/minecraft/net/minecraft/tileentity/TileEntityBeacon.java +--- ../src-base/minecraft/net/minecraft/tileentity/TileEntityBeacon.java ++++ ../src-work/minecraft/net/minecraft/tileentity/TileEntityBeacon.java @@ -121,7 +121,9 @@ { int i1 = this.worldObj.getBlockId(k, j, l); diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntityBrewingStand.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntityBrewingStand.java.patch index 1ad51bf08..3bf5c46fb 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntityBrewingStand.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntityBrewingStand.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/tileentity/TileEntityBrewingStand.java -+++ ../src_work/minecraft/net/minecraft/tileentity/TileEntityBrewingStand.java +--- ../src-base/minecraft/net/minecraft/tileentity/TileEntityBrewingStand.java ++++ ../src-work/minecraft/net/minecraft/tileentity/TileEntityBrewingStand.java @@ -11,6 +11,8 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntityFurnace.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntityFurnace.java.patch index 4487d07f9..20e6d6618 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntityFurnace.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntityFurnace.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/tileentity/TileEntityFurnace.java -+++ ../src_work/minecraft/net/minecraft/tileentity/TileEntityFurnace.java +--- ../src-base/minecraft/net/minecraft/tileentity/TileEntityFurnace.java ++++ ../src-work/minecraft/net/minecraft/tileentity/TileEntityFurnace.java @@ -9,6 +9,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.ISidedInventory; @@ -54,10 +54,9 @@ this.furnaceItemStacks[2] = itemstack.copy(); } - else if (this.furnaceItemStacks[2].itemID == itemstack.itemID) -- { -- ++this.furnaceItemStacks[2].stackSize; + else if (this.furnaceItemStacks[2].isItemEqual(itemstack)) -+ { + { +- ++this.furnaceItemStacks[2].stackSize; + furnaceItemStacks[2].stackSize += itemstack.stackSize; } diff --git a/patches/minecraft/net/minecraft/tileentity/TileEntityHopper.java.patch b/patches/minecraft/net/minecraft/tileentity/TileEntityHopper.java.patch index ef86ad058..d03f52c7b 100644 --- a/patches/minecraft/net/minecraft/tileentity/TileEntityHopper.java.patch +++ b/patches/minecraft/net/minecraft/tileentity/TileEntityHopper.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/tileentity/TileEntityHopper.java -+++ ../src_work/minecraft/net/minecraft/tileentity/TileEntityHopper.java +--- ../src-base/minecraft/net/minecraft/tileentity/TileEntityHopper.java ++++ ../src-work/minecraft/net/minecraft/tileentity/TileEntityHopper.java @@ -453,17 +453,28 @@ if (itemstack1 == null) diff --git a/patches/minecraft/net/minecraft/util/MovingObjectPosition.java.patch b/patches/minecraft/net/minecraft/util/MovingObjectPosition.java.patch index 194af9719..45e18118a 100644 --- a/patches/minecraft/net/minecraft/util/MovingObjectPosition.java.patch +++ b/patches/minecraft/net/minecraft/util/MovingObjectPosition.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/util/MovingObjectPosition.java -+++ ../src_work/minecraft/net/minecraft/util/MovingObjectPosition.java +--- ../src-base/minecraft/net/minecraft/util/MovingObjectPosition.java ++++ ../src-work/minecraft/net/minecraft/util/MovingObjectPosition.java @@ -27,7 +27,13 @@ /** The hit entity */ diff --git a/patches/minecraft/net/minecraft/util/Session.java.patch b/patches/minecraft/net/minecraft/util/Session.java.patch index 05cd8c0ef..0945bcc01 100644 --- a/patches/minecraft/net/minecraft/util/Session.java.patch +++ b/patches/minecraft/net/minecraft/util/Session.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/util/Session.java -+++ ../src_work/minecraft/net/minecraft/util/Session.java +--- ../src-base/minecraft/net/minecraft/util/Session.java ++++ ../src-work/minecraft/net/minecraft/util/Session.java @@ -11,6 +11,19 @@ public Session(String par1Str, String par2Str) diff --git a/patches/minecraft/net/minecraft/util/WeightedRandomChestContent.java.patch b/patches/minecraft/net/minecraft/util/WeightedRandomChestContent.java.patch index a05146aa8..23ec43a9d 100644 --- a/patches/minecraft/net/minecraft/util/WeightedRandomChestContent.java.patch +++ b/patches/minecraft/net/minecraft/util/WeightedRandomChestContent.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/util/WeightedRandomChestContent.java -+++ ../src_work/minecraft/net/minecraft/util/WeightedRandomChestContent.java +--- ../src-base/minecraft/net/minecraft/util/WeightedRandomChestContent.java ++++ ../src-work/minecraft/net/minecraft/util/WeightedRandomChestContent.java @@ -4,6 +4,9 @@ import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; @@ -10,7 +10,7 @@ public class WeightedRandomChestContent extends WeightedRandomItem { -@@ -40,22 +43,11 @@ +@@ -40,23 +43,12 @@ for (int j = 0; j < par3; ++j) { WeightedRandomChestContent weightedrandomchestcontent = (WeightedRandomChestContent)WeightedRandom.getRandomItem(par0Random, par1ArrayOfWeightedRandomChestContent); @@ -23,7 +23,8 @@ - ItemStack itemstack = weightedrandomchestcontent.theItemId.copy(); - itemstack.stackSize = k; - par2IInventory.setInventorySlotContents(par0Random.nextInt(par2IInventory.getSizeInventory()), itemstack); -- } ++ par2IInventory.setInventorySlotContents(par0Random.nextInt(par2IInventory.getSizeInventory()), item); + } - else - { - for (int l = 0; l < k; ++l) @@ -32,11 +33,11 @@ - itemstack1.stackSize = 1; - par2IInventory.setInventorySlotContents(par0Random.nextInt(par2IInventory.getSizeInventory()), itemstack1); - } -+ par2IInventory.setInventorySlotContents(par0Random.nextInt(par2IInventory.getSizeInventory()), item); - } +- } } } -@@ -68,22 +60,11 @@ + +@@ -68,23 +60,12 @@ for (int j = 0; j < par3; ++j) { WeightedRandomChestContent weightedrandomchestcontent = (WeightedRandomChestContent)WeightedRandom.getRandomItem(par0Random, par1ArrayOfWeightedRandomChestContent); @@ -49,7 +50,8 @@ - ItemStack itemstack = weightedrandomchestcontent.theItemId.copy(); - itemstack.stackSize = k; - par2TileEntityDispenser.setInventorySlotContents(par0Random.nextInt(par2TileEntityDispenser.getSizeInventory()), itemstack); -- } ++ par2TileEntityDispenser.setInventorySlotContents(par0Random.nextInt(par2TileEntityDispenser.getSizeInventory()), item); + } - else - { - for (int l = 0; l < k; ++l) @@ -58,10 +60,10 @@ - itemstack1.stackSize = 1; - par2TileEntityDispenser.setInventorySlotContents(par0Random.nextInt(par2TileEntityDispenser.getSizeInventory()), itemstack1); - } -+ par2TileEntityDispenser.setInventorySlotContents(par0Random.nextInt(par2TileEntityDispenser.getSizeInventory()), item); - } +- } } } + @@ -109,4 +90,18 @@ return aweightedrandomchestcontent1; diff --git a/patches/minecraft/net/minecraft/village/VillageCollection.java.patch b/patches/minecraft/net/minecraft/village/VillageCollection.java.patch index f4811e403..0ddb52f6a 100644 --- a/patches/minecraft/net/minecraft/village/VillageCollection.java.patch +++ b/patches/minecraft/net/minecraft/village/VillageCollection.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/village/VillageCollection.java -+++ ../src_work/minecraft/net/minecraft/village/VillageCollection.java +--- ../src-base/minecraft/net/minecraft/village/VillageCollection.java ++++ ../src-work/minecraft/net/minecraft/village/VillageCollection.java @@ -165,7 +165,7 @@ { Village village = (Village)iterator.next(); diff --git a/patches/minecraft/net/minecraft/world/ChunkCache.java.patch b/patches/minecraft/net/minecraft/world/ChunkCache.java.patch index e088306c9..64894396e 100644 --- a/patches/minecraft/net/minecraft/world/ChunkCache.java.patch +++ b/patches/minecraft/net/minecraft/world/ChunkCache.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/ChunkCache.java -+++ ../src_work/minecraft/net/minecraft/world/ChunkCache.java +--- ../src-base/minecraft/net/minecraft/world/ChunkCache.java ++++ ../src-work/minecraft/net/minecraft/world/ChunkCache.java @@ -8,6 +8,7 @@ import net.minecraft.util.Vec3Pool; import net.minecraft.world.biome.BiomeGenBase; diff --git a/patches/minecraft/net/minecraft/world/Explosion.java.patch b/patches/minecraft/net/minecraft/world/Explosion.java.patch index d79fa15ec..6f71cfff0 100644 --- a/patches/minecraft/net/minecraft/world/Explosion.java.patch +++ b/patches/minecraft/net/minecraft/world/Explosion.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/Explosion.java -+++ ../src_work/minecraft/net/minecraft/world/Explosion.java +--- ../src-base/minecraft/net/minecraft/world/Explosion.java ++++ ../src-work/minecraft/net/minecraft/world/Explosion.java @@ -92,7 +92,7 @@ if (k1 > 0) { diff --git a/patches/minecraft/net/minecraft/world/IBlockAccess.java.patch b/patches/minecraft/net/minecraft/world/IBlockAccess.java.patch index a38857bb6..36274d664 100644 --- a/patches/minecraft/net/minecraft/world/IBlockAccess.java.patch +++ b/patches/minecraft/net/minecraft/world/IBlockAccess.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/IBlockAccess.java -+++ ../src_work/minecraft/net/minecraft/world/IBlockAccess.java +--- ../src-base/minecraft/net/minecraft/world/IBlockAccess.java ++++ ../src-work/minecraft/net/minecraft/world/IBlockAccess.java @@ -6,6 +6,7 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Vec3Pool; diff --git a/patches/minecraft/net/minecraft/world/SpawnerAnimals.java.patch b/patches/minecraft/net/minecraft/world/SpawnerAnimals.java.patch index c87464019..2b328f2d9 100644 --- a/patches/minecraft/net/minecraft/world/SpawnerAnimals.java.patch +++ b/patches/minecraft/net/minecraft/world/SpawnerAnimals.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/SpawnerAnimals.java -+++ ../src_work/minecraft/net/minecraft/world/SpawnerAnimals.java +--- ../src-base/minecraft/net/minecraft/world/SpawnerAnimals.java ++++ ../src-work/minecraft/net/minecraft/world/SpawnerAnimals.java @@ -1,5 +1,7 @@ package net.minecraft.world; @@ -44,13 +44,12 @@ ++j2; par1WorldServer.spawnEntityInWorld(entityliving); - entitylivingdata = entityliving.onSpawnWithEgg(entitylivingdata); -- -- if (j2 >= entityliving.getMaxSpawnedInChunk()) + if (!ForgeEventFactory.doSpecialSpawn(entityliving, par1WorldServer, f, f1, f2)) + { + entitylivingdata = entityliving.onSpawnWithEgg(entitylivingdata); + } -+ + +- if (j2 >= entityliving.getMaxSpawnedInChunk()) + if (j2 >= ForgeEventFactory.getMaxSpawnPackSize(entityliving)) { continue label110; diff --git a/patches/minecraft/net/minecraft/world/World.java.patch b/patches/minecraft/net/minecraft/world/World.java.patch index 33ed9901f..dfa11c165 100644 --- a/patches/minecraft/net/minecraft/world/World.java.patch +++ b/patches/minecraft/net/minecraft/world/World.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/World.java -+++ ../src_work/minecraft/net/minecraft/world/World.java +--- ../src-base/minecraft/net/minecraft/world/World.java ++++ ../src-work/minecraft/net/minecraft/world/World.java @@ -1,5 +1,6 @@ package net.minecraft.world; @@ -7,7 +7,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; -@@ -53,8 +54,33 @@ +@@ -53,9 +54,34 @@ import net.minecraft.world.storage.MapStorage; import net.minecraft.world.storage.WorldInfo; @@ -29,7 +29,7 @@ + public abstract class World implements IBlockAccess { -+ /** + /** + * Used in the getEntitiesWithinAABB functions to expand the search area for entities. + * Modders should change this variable to a higher value if it is less then the radius + * of one of there entities. @@ -38,9 +38,10 @@ + + public final MapStorage perWorldStorage; + - /** ++ /** * boolean; if true updates scheduled by scheduleBlockUpdate happen immediately */ + public boolean scheduledUpdatesAreImmediate; @@ -167,6 +193,11 @@ */ public BiomeGenBase getBiomeGenForCoords(int par1, int par2) @@ -122,12 +123,10 @@ } else { -@@ -290,6 +338,20 @@ - - this.calculateInitialSkylight(); +@@ -292,6 +340,20 @@ this.calculateInitialWeather(); -+ } -+ + } + + private static MapStorage s_mapStorage; + private static ISaveHandler s_savehandler; + //Provides a solution for different worlds getting different copies of the same data, potentially rewriting the data or causing race conditions/stale data @@ -140,9 +139,11 @@ + s_savehandler = savehandler; + } + return s_mapStorage; - } - ++ } ++ /** + * Creates the chunk provider for this world. Called in the constructor. Retrieves provider from worldProvider? + */ @@ -373,7 +435,8 @@ */ public boolean isAirBlock(int par1, int par2, int par3) @@ -207,18 +208,18 @@ if (par1EntityPlayer != null && par2Str != null) { for (int i = 0; i < this.worldAccesses.size(); ++i) -@@ -1492,6 +1568,11 @@ - EntityPlayer entityplayer = (EntityPlayer)par1Entity; - this.playerEntities.add(entityplayer); +@@ -1494,6 +1570,11 @@ this.updateAllPlayersSleepingFlag(); -+ } -+ + } + + if (MinecraftForge.EVENT_BUS.post(new EntityJoinWorldEvent(par1Entity, this)) && !flag) + { + return false; - } - ++ } ++ this.getChunkFromChunkCoords(i, j).addEntity(par1Entity); + this.loadedEntityList.add(par1Entity); + this.onEntityAdded(par1Entity); @@ -1733,6 +1814,12 @@ */ public Vec3 getSkyColor(Entity par1Entity, float par2) @@ -286,19 +287,19 @@ { return k + 1; } -@@ -1926,6 +2021,12 @@ - * How bright are stars in the sky +@@ -1927,6 +2022,12 @@ */ public float getStarBrightness(float par1) -+ { + { + return provider.getStarBrightness(par1); + } + + @SideOnly(Side.CLIENT) + public float getStarBrightnessBody(float par1) - { ++ { float f1 = this.getCelestialAngle(par1); float f2 = 1.0F - (MathHelper.cos(f1 * (float)Math.PI * 2.0F) * 2.0F + 0.25F); + @@ -1990,7 +2091,15 @@ entity.addEntityCrashInfo(crashreportcategory); } @@ -395,48 +396,48 @@ } } -@@ -2162,13 +2293,13 @@ +@@ -2162,14 +2293,14 @@ public void addTileEntity(Collection par1Collection) { - if (this.scanningTileEntities) -- { -- this.addedTileEntityList.addAll(par1Collection); -- } -- else -- { -- this.loadedTileEntityList.addAll(par1Collection); + List dest = scanningTileEntities ? addedTileEntityList : loadedTileEntityList; + for(Object entity : par1Collection) -+ { + { +- this.addedTileEntityList.addAll(par1Collection); + if(((TileEntity)entity).canUpdate()) + { + dest.add(entity); + } } +- else +- { +- this.loadedTileEntityList.addAll(par1Collection); +- } } -@@ -2188,9 +2319,17 @@ + /** +@@ -2188,10 +2319,18 @@ { int i = MathHelper.floor_double(par1Entity.posX); int j = MathHelper.floor_double(par1Entity.posZ); - byte b0 = 32; -- + - if (!par2 || this.checkChunksExist(i - b0, 0, j - b0, i + b0, 0, j + b0)) -+ + boolean isForced = getPersistentChunks().containsKey(new ChunkCoordIntPair(i >> 4, j >> 4)); + byte b0 = isForced ? (byte)0 : 32; + boolean canUpdate = !par2 || this.checkChunksExist(i - b0, 0, j - b0, i + b0, 0, j + b0); + if (!canUpdate) -+ { + { + EntityEvent.CanUpdate event = new EntityEvent.CanUpdate(par1Entity); + MinecraftForge.EVENT_BUS.post(event); + canUpdate = event.canUpdate; + } + if (canUpdate) - { ++ { par1Entity.lastTickPosX = par1Entity.posX; par1Entity.lastTickPosY = par1Entity.posY; + par1Entity.lastTickPosZ = par1Entity.posZ; @@ -2424,6 +2563,14 @@ { return true; @@ -457,19 +458,17 @@ public void setBlockTileEntity(int par1, int par2, int par3, TileEntity par4TileEntity) { - if (par4TileEntity != null && !par4TileEntity.isInvalid()) -- { ++ if (par4TileEntity == null || par4TileEntity.isInvalid()) + { - if (this.scanningTileEntities) - { - par4TileEntity.xCoord = par1; - par4TileEntity.yCoord = par2; - par4TileEntity.zCoord = par3; - Iterator iterator = this.addedTileEntityList.iterator(); -- -+ if (par4TileEntity == null || par4TileEntity.isInvalid()) -+ { + return; + } -+ + + if (par4TileEntity.canUpdate()) + { + if (scanningTileEntities) @@ -495,11 +494,9 @@ - { - chunk.setChunkBlockTileEntity(par1 & 15, par2, par3 & 15, par4TileEntity); - } -- } -- } + loadedTileEntityList.add(par4TileEntity); -+ } -+ } + } + } + + Chunk chunk = this.getChunkFromChunkCoords(par1 >> 4, par3 >> 4); + if (chunk != null) @@ -518,10 +515,13 @@ - TileEntity tileentity = this.getBlockTileEntity(par1, par2, par3); - - if (tileentity != null && this.scanningTileEntities) -- { ++ Chunk chunk = getChunkFromChunkCoords(par1 >> 4, par3 >> 4); ++ if (chunk != null) + { - tileentity.invalidate(); - this.addedTileEntityList.remove(tileentity); -- } ++ chunk.removeChunkBlockTileEntity(par1 & 15, par2, par3 & 15); + } - else - { - if (tileentity != null) @@ -537,11 +537,6 @@ - chunk.removeChunkBlockTileEntity(par1 & 15, par2, par3 & 15); - } - } -+ Chunk chunk = getChunkFromChunkCoords(par1 >> 4, par3 >> 4); -+ if (chunk != null) -+ { -+ chunk.removeChunkBlockTileEntity(par1 & 15, par2, par3 & 15); -+ } + //notify tile changes + func_96440_m(par1, par2, par3, 0); } @@ -608,18 +603,18 @@ if (this.worldInfo.isRaining()) { this.rainingStrength = 1.0F; -@@ -2944,6 +3084,11 @@ - * Updates all weather states. +@@ -2945,6 +3085,11 @@ */ protected void updateWeather() -+ { + { + provider.updateWeather(); + } + + public void updateWeatherBody() - { ++ { if (!this.provider.hasNoSky) { + int i = this.worldInfo.getThunderTime(); @@ -3041,12 +3186,14 @@ public void toggleRain() @@ -666,13 +661,12 @@ int l = this.getBlockId(par1, par2, par3); - int i1 = par4EnumSkyBlock == EnumSkyBlock.Sky ? 0 : Block.lightValue[l]; - int j1 = Block.lightOpacity[l]; -- -- if (j1 >= 15 && Block.lightValue[l] > 0) + Block block = Block.blocksList[l]; + int blockLight = (block == null ? 0 : block.getLightValue(this, par1, par2, par3)); + int i1 = par4EnumSkyBlock == EnumSkyBlock.Sky ? 0 : blockLight; + int j1 = (block == null ? 0 : block.getLightOpacity(this, par1, par2, par3)); -+ + +- if (j1 >= 15 && Block.lightValue[l] > 0) + if (j1 >= 15 && blockLight > 0) { j1 = 1; @@ -736,18 +730,18 @@ } } -@@ -3620,6 +3784,11 @@ - else - { - if (block != null && (block == Block.waterMoving || block == Block.waterStill || block == Block.lavaMoving || block == Block.lavaStill || block == Block.fire || block.blockMaterial.isReplaceable())) +@@ -3624,6 +3788,11 @@ + block = null; + } + ++ if (block != null && block.isBlockReplaceable(this, par2, par3, par4)) + { + block = null; + } + -+ if (block != null && block.isBlockReplaceable(this, par2, par3, par4)) - { - block = null; - } + return block != null && block.blockMaterial == Material.circuits && block1 == Block.anvil ? true : par1 > 0 && block == null && block1.canPlaceBlockOnSide(this, par2, par3, par4, par6, par8ItemStack); + } + } @@ -3744,14 +3913,20 @@ */ public int getIndirectPowerLevelTo(int par1, int par2, int par3, int par4) @@ -756,12 +750,12 @@ + Block block = Block.blocksList[this.getBlockId(par1, par2, par3)]; + + if (block == null) -+ { + { + return 0; + } + + if (!block.shouldCheckWeakPower(this, par1, par2, par3, par4)) - { ++ { return this.getBlockPowerInput(par1, par2, par3); } else @@ -827,18 +821,18 @@ } } -@@ -3978,6 +4156,11 @@ - * Called when checking if a certain block can be mined or not. The 'spawn safe zone' check is located here. +@@ -3979,6 +4157,11 @@ */ public boolean canMineBlock(EntityPlayer par1EntityPlayer, int par2, int par3, int par4) -+ { + { + return provider.canMineBlock(par1EntityPlayer, par2, par3, par4); + } + + public boolean canMineBlockBody(EntityPlayer par1EntityPlayer, int par2, int par3, int par4) - { ++ { return true; } + @@ -4098,8 +4281,7 @@ */ public boolean isBlockHighHumidity(int par1, int par2, int par3) @@ -881,17 +875,26 @@ public void func_96440_m(int par1, int par2, int par3, int par4) { - for (int i1 = 0; i1 < 4; ++i1) -- { ++ for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) + { - int j1 = par1 + Direction.offsetX[i1]; - int k1 = par3 + Direction.offsetZ[i1]; - int l1 = this.getBlockId(j1, par2, k1); -- ++ int j1 = par1 + dir.offsetX; ++ int y = par2 + dir.offsetY; ++ int k1 = par3 + dir.offsetZ; ++ int l1 = getBlockId(j1, y, k1); ++ Block block = Block.blocksList[l1]; + - if (l1 != 0) -- { ++ if(block != null) + { - Block block = Block.blocksList[l1]; -- ++ block.onNeighborTileChange(this, j1, y, k1, par1, par2, par3); + - if (Block.redstoneComparatorIdle.func_94487_f(l1)) -- { ++ if(Block.isNormalCube(l1)) + { - block.onNeighborBlockChange(this, j1, par2, k1, par4); - } - else if (Block.isNormalCube(l1)) @@ -899,20 +902,6 @@ - j1 += Direction.offsetX[i1]; - k1 += Direction.offsetZ[i1]; - l1 = this.getBlockId(j1, par2, k1); -+ for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) -+ { -+ int j1 = par1 + dir.offsetX; -+ int y = par2 + dir.offsetY; -+ int k1 = par3 + dir.offsetZ; -+ int l1 = getBlockId(j1, y, k1); -+ Block block = Block.blocksList[l1]; -+ -+ if(block != null) -+ { -+ block.onNeighborTileChange(this, j1, y, k1, par1, par2, par3); -+ -+ if(Block.isNormalCube(l1)) -+ { + j1 += dir.offsetX; + y += dir.offsetY; + k1 += dir.offsetZ; @@ -920,10 +909,9 @@ block = Block.blocksList[l1]; - - if (Block.redstoneComparatorIdle.func_94487_f(l1)) -- { -- block.onNeighborBlockChange(this, j1, par2, k1, par4); + if(block != null && block.weakTileChanges()) -+ { + { +- block.onNeighborBlockChange(this, j1, par2, k1, par4); + block.onNeighborTileChange(this, j1, y, k1, par1, par2, par3); } } diff --git a/patches/minecraft/net/minecraft/world/WorldProvider.java.patch b/patches/minecraft/net/minecraft/world/WorldProvider.java.patch index d9035628e..9790d31f7 100644 --- a/patches/minecraft/net/minecraft/world/WorldProvider.java.patch +++ b/patches/minecraft/net/minecraft/world/WorldProvider.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/WorldProvider.java -+++ ../src_work/minecraft/net/minecraft/world/WorldProvider.java +--- ../src-base/minecraft/net/minecraft/world/WorldProvider.java ++++ ../src-work/minecraft/net/minecraft/world/WorldProvider.java @@ -3,16 +3,23 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/patches/minecraft/net/minecraft/world/WorldServer.java.patch b/patches/minecraft/net/minecraft/world/WorldServer.java.patch index 6f33e5962..6cd8bd29a 100644 --- a/patches/minecraft/net/minecraft/world/WorldServer.java.patch +++ b/patches/minecraft/net/minecraft/world/WorldServer.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/WorldServer.java -+++ ../src_work/minecraft/net/minecraft/world/WorldServer.java +--- ../src-base/minecraft/net/minecraft/world/WorldServer.java ++++ ../src-work/minecraft/net/minecraft/world/WorldServer.java @@ -2,6 +2,7 @@ import cpw.mods.fml.relauncher.Side; @@ -83,11 +83,10 @@ } public boolean areAllPlayersAsleep() -@@ -315,6 +333,14 @@ - int i = 0; +@@ -316,6 +334,14 @@ int j = 0; Iterator iterator = this.activeChunkSet.iterator(); -+ + + doneChunks.retainAll(activeChunkSet); + if (doneChunks.size() == activeChunkSet.size()) + { @@ -95,9 +94,10 @@ + } + + final long startTime = System.nanoTime(); - ++ while (iterator.hasNext()) { + ChunkCoordIntPair chunkcoordintpair = (ChunkCoordIntPair)iterator.next(); @@ -325,14 +351,18 @@ Chunk chunk = this.getChunkFromChunkCoords(chunkcoordintpair.chunkXPos, chunkcoordintpair.chunkZPos); this.moodSoundAndLightCheck(k, l, chunk); @@ -162,19 +162,14 @@ ArrayList arraylist = new ArrayList(); - for (int k1 = 0; k1 < this.loadedTileEntityList.size(); ++k1) -- { ++ for(int x = (par1 >> 4); x <= (par4 >> 4); x++) + { - TileEntity tileentity = (TileEntity)this.loadedTileEntityList.get(k1); - - if (tileentity.xCoord >= par1 && tileentity.yCoord >= par2 && tileentity.zCoord >= par3 && tileentity.xCoord < par4 && tileentity.yCoord < par5 && tileentity.zCoord < par6) -- { -- arraylist.add(tileentity); -- } -- } -- -+ for(int x = (par1 >> 4); x <= (par4 >> 4); x++) -+ { + for(int z = (par3 >> 4); z <= (par6 >> 4); z++) -+ { + { +- arraylist.add(tileentity); + Chunk chunk = getChunkFromChunkCoords(x, z); + if (chunk != null) + { @@ -191,23 +186,24 @@ + } + } + } -+ } -+ } + } + } +- return arraylist; } -@@ -717,6 +765,11 @@ - * Called when checking if a certain block can be mined or not. The 'spawn safe zone' check is located here. +@@ -718,6 +766,11 @@ */ public boolean canMineBlock(EntityPlayer par1EntityPlayer, int par2, int par3, int par4) -+ { + { + return super.canMineBlock(par1EntityPlayer, par2, par3, par4); + } + + public boolean canMineBlockBody(EntityPlayer par1EntityPlayer, int par2, int par3, int par4) - { ++ { return !this.mcServer.isBlockProtected(this, par2, par3, par4, par1EntityPlayer); } + @@ -801,7 +854,7 @@ */ protected void createBonusChest() diff --git a/patches/minecraft/net/minecraft/world/WorldServerMulti.java.patch b/patches/minecraft/net/minecraft/world/WorldServerMulti.java.patch index f127cbe07..155084e24 100644 --- a/patches/minecraft/net/minecraft/world/WorldServerMulti.java.patch +++ b/patches/minecraft/net/minecraft/world/WorldServerMulti.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/WorldServerMulti.java -+++ ../src_work/minecraft/net/minecraft/world/WorldServerMulti.java +--- ../src-base/minecraft/net/minecraft/world/WorldServerMulti.java ++++ ../src-work/minecraft/net/minecraft/world/WorldServerMulti.java @@ -19,5 +19,8 @@ /** * Saves the chunks to disk. diff --git a/patches/minecraft/net/minecraft/world/WorldType.java.patch b/patches/minecraft/net/minecraft/world/WorldType.java.patch index e9be8615f..6843ddac6 100644 --- a/patches/minecraft/net/minecraft/world/WorldType.java.patch +++ b/patches/minecraft/net/minecraft/world/WorldType.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/WorldType.java -+++ ../src_work/minecraft/net/minecraft/world/WorldType.java +--- ../src-base/minecraft/net/minecraft/world/WorldType.java ++++ ../src-work/minecraft/net/minecraft/world/WorldType.java @@ -10,6 +10,9 @@ import com.google.common.collect.ObjectArrays; import com.google.common.collect.Sets; diff --git a/patches/minecraft/net/minecraft/world/biome/BiomeDecorator.java.patch b/patches/minecraft/net/minecraft/world/biome/BiomeDecorator.java.patch index f7e827ab3..5036b6605 100644 --- a/patches/minecraft/net/minecraft/world/biome/BiomeDecorator.java.patch +++ b/patches/minecraft/net/minecraft/world/biome/BiomeDecorator.java.patch @@ -1,17 +1,17 @@ ---- ../src_base/minecraft/net/minecraft/world/biome/BiomeDecorator.java -+++ ../src_work/minecraft/net/minecraft/world/biome/BiomeDecorator.java -@@ -15,6 +15,11 @@ - import net.minecraft.world.gen.feature.WorldGenSand; +--- ../src-base/minecraft/net/minecraft/world/biome/BiomeDecorator.java ++++ ../src-work/minecraft/net/minecraft/world/biome/BiomeDecorator.java +@@ -16,6 +16,11 @@ import net.minecraft.world.gen.feature.WorldGenWaterlily; import net.minecraft.world.gen.feature.WorldGenerator; -+ + +import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.*; +import static net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.*; +import net.minecraftforge.common.*; +import net.minecraftforge.event.terraingen.*; - ++ public class BiomeDecorator { + /** The world the BiomeDecorator is currently decorating */ @@ -199,26 +204,31 @@ */ protected void decorate() diff --git a/patches/minecraft/net/minecraft/world/biome/BiomeGenBase.java.patch b/patches/minecraft/net/minecraft/world/biome/BiomeGenBase.java.patch index 7c7b2ae97..bb146c8b3 100644 --- a/patches/minecraft/net/minecraft/world/biome/BiomeGenBase.java.patch +++ b/patches/minecraft/net/minecraft/world/biome/BiomeGenBase.java.patch @@ -1,26 +1,26 @@ ---- ../src_base/minecraft/net/minecraft/world/biome/BiomeGenBase.java -+++ ../src_work/minecraft/net/minecraft/world/biome/BiomeGenBase.java -@@ -30,6 +30,9 @@ - import net.minecraft.world.gen.feature.WorldGenTallGrass; +--- ../src-base/minecraft/net/minecraft/world/biome/BiomeGenBase.java ++++ ../src-work/minecraft/net/minecraft/world/biome/BiomeGenBase.java +@@ -31,6 +31,9 @@ import net.minecraft.world.gen.feature.WorldGenTrees; import net.minecraft.world.gen.feature.WorldGenerator; -+ + +import net.minecraftforge.common.*; +import net.minecraftforge.event.terraingen.*; - ++ public abstract class BiomeGenBase { -@@ -140,6 +143,10 @@ - protected WorldGenSwamp worldGeneratorSwamp; + /** An array of all the biomes, indexed by biome id. */ +@@ -141,6 +144,10 @@ public BiomeGenBase(int par1) -+ { + { + this(par1, true); + } + public BiomeGenBase(int par1, boolean register) - { ++ { this.topBlock = (byte)Block.grass.blockID; this.fillerBlock = (byte)Block.dirt.blockID; + this.field_76754_C = 5169201; @@ -159,6 +166,7 @@ this.worldGeneratorForest = new WorldGenForest(false); this.worldGeneratorSwamp = new WorldGenSwamp(); @@ -55,7 +55,7 @@ double d1 = (double)MathHelper.clamp_float(this.getFloatRainfall(), 0.0F, 1.0F); - return ColorizerFoliage.getFoliageColor(d0, d1); + return getModdedBiomeFoliageColor(ColorizerFoliage.getFoliageColor(d0, d1)); -+ } + } + + public BiomeDecorator getModdedBiomeDecorator(BiomeDecorator original) + { @@ -81,5 +81,5 @@ + BiomeEvent.GetFoliageColor event = new BiomeEvent.GetFoliageColor(this, original); + MinecraftForge.EVENT_BUS.post(event); + return event.newColor; - } ++ } } diff --git a/patches/minecraft/net/minecraft/world/biome/WorldChunkManager.java.patch b/patches/minecraft/net/minecraft/world/biome/WorldChunkManager.java.patch index e3662ca5a..c79c96a2d 100644 --- a/patches/minecraft/net/minecraft/world/biome/WorldChunkManager.java.patch +++ b/patches/minecraft/net/minecraft/world/biome/WorldChunkManager.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/biome/WorldChunkManager.java -+++ ../src_work/minecraft/net/minecraft/world/biome/WorldChunkManager.java +--- ../src-base/minecraft/net/minecraft/world/biome/WorldChunkManager.java ++++ ../src-work/minecraft/net/minecraft/world/biome/WorldChunkManager.java @@ -3,6 +3,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/patches/minecraft/net/minecraft/world/chunk/Chunk.java.patch b/patches/minecraft/net/minecraft/world/chunk/Chunk.java.patch index 89f4e50a8..1e34021a0 100644 --- a/patches/minecraft/net/minecraft/world/chunk/Chunk.java.patch +++ b/patches/minecraft/net/minecraft/world/chunk/Chunk.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/chunk/Chunk.java -+++ ../src_work/minecraft/net/minecraft/world/chunk/Chunk.java +--- ../src-base/minecraft/net/minecraft/world/chunk/Chunk.java ++++ ../src-work/minecraft/net/minecraft/world/chunk/Chunk.java @@ -25,6 +25,10 @@ import net.minecraft.world.biome.WorldChunkManager; import net.minecraft.world.chunk.storage.ExtendedBlockStorage; @@ -141,10 +141,9 @@ Block.blocksList[l1].breakBlock(this.worldObj, j2, par2, k2, l1, i2); } - else if (Block.blocksList[l1] instanceof ITileEntityProvider && l1 != par4) -- { -- this.worldObj.removeBlockTileEntity(j2, par2, k2); + else if (Block.blocksList[l1] != null && Block.blocksList[l1].hasTileEntity(i2)) -+ { + { +- this.worldObj.removeBlockTileEntity(j2, par2, k2); + TileEntity te = worldObj.getBlockTileEntity(j2, par2, k2); + if (te != null && te.shouldRefresh(l1, par4, i2, par5, worldObj, j2, par2, k2)) + { @@ -162,7 +161,7 @@ { if (par2 >= k1) { -@@ -659,29 +758,21 @@ +@@ -659,32 +758,24 @@ Block.blocksList[par4].onBlockAdded(this.worldObj, j2, par2, k2); } @@ -183,18 +182,21 @@ tileentity.updateContainingBlockInfo(); + tileentity.blockMetadata = par5; } -- } -- } + } + } - else if (l1 > 0 && Block.blocksList[l1] instanceof ITileEntityProvider) - { - tileentity = this.getChunkBlockTileEntity(par1, par2, par3); -- + - if (tileentity != null) - { - tileentity.updateContainingBlockInfo(); - } - } - +- } +- } +- + this.isModified = true; + return true; + } @@ -716,7 +807,7 @@ extendedblockstorage.setExtBlockMetadata(par1, par2 & 15, par3, par4); int j1 = extendedblockstorage.getExtBlockID(par1, par2 & 15, par3); @@ -225,10 +227,9 @@ if (tileentity == null) { int l = this.getBlockID(par1, par2, par3); -- -- if (l <= 0 || !Block.blocksList[l].hasTileEntity()) + int meta = this.getBlockMetadata(par1, par2, par3); -+ + +- if (l <= 0 || !Block.blocksList[l].hasTileEntity()) + if (l <= 0 || !Block.blocksList[l].hasTileEntity(meta)) { return null; @@ -330,13 +331,12 @@ int k = 0; boolean flag1 = !this.worldObj.provider.hasNoSky; int l; -@@ -1354,12 +1457,26 @@ +@@ -1354,13 +1457,27 @@ } this.generateHeightMap(); - Iterator iterator = this.chunkTileEntityMap.values().iterator(); -- -+ + + List invalidList = new ArrayList(); + iterator = chunkTileEntityMap.values().iterator(); while (iterator.hasNext()) @@ -353,14 +353,15 @@ + invalidList.add(tileEntity); + } + tileEntity.updateContainingBlockInfo(); -+ } + } + + for (TileEntity tileEntity : invalidList) + { + tileEntity.invalidate(); - } ++ } } + /** @@ -1468,4 +1585,18 @@ } } diff --git a/patches/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java.patch b/patches/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java.patch index 0c8e3f71b..d0de2f74c 100644 --- a/patches/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java.patch +++ b/patches/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java -+++ ../src_work/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java +--- ../src-base/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java ++++ ../src-work/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java @@ -27,6 +27,8 @@ import net.minecraft.world.chunk.NibbleArray; import net.minecraft.world.storage.IThreadedFileIO; diff --git a/patches/minecraft/net/minecraft/world/chunk/storage/AnvilSaveHandler.java.patch b/patches/minecraft/net/minecraft/world/chunk/storage/AnvilSaveHandler.java.patch index ee653cbad..35b12c60e 100644 --- a/patches/minecraft/net/minecraft/world/chunk/storage/AnvilSaveHandler.java.patch +++ b/patches/minecraft/net/minecraft/world/chunk/storage/AnvilSaveHandler.java.patch @@ -1,6 +1,6 @@ ---- ../src_base/minecraft/net/minecraft/world/chunk/storage/AnvilSaveHandler.java -+++ ../src_work/minecraft/net/minecraft/world/chunk/storage/AnvilSaveHandler.java -@@ -24,15 +24,9 @@ +--- ../src-base/minecraft/net/minecraft/world/chunk/storage/AnvilSaveHandler.java ++++ ../src-work/minecraft/net/minecraft/world/chunk/storage/AnvilSaveHandler.java +@@ -24,18 +24,12 @@ File file1 = this.getWorldDirectory(); File file2; @@ -8,13 +8,16 @@ + if (par1WorldProvider.getSaveFolder() != null) { - file2 = new File(file1, "DIM-1"); -- file2.mkdirs(); -- return new AnvilChunkLoader(file2); -- } -- else if (par1WorldProvider instanceof WorldProviderEnd) -- { -- file2 = new File(file1, "DIM1"); + file2 = new File(file1, par1WorldProvider.getSaveFolder()); file2.mkdirs(); return new AnvilChunkLoader(file2); } +- else if (par1WorldProvider instanceof WorldProviderEnd) +- { +- file2 = new File(file1, "DIM1"); +- file2.mkdirs(); +- return new AnvilChunkLoader(file2); +- } + else + { + return new AnvilChunkLoader(file1); diff --git a/patches/minecraft/net/minecraft/world/gen/ChunkProviderEnd.java.patch b/patches/minecraft/net/minecraft/world/gen/ChunkProviderEnd.java.patch index 16ce34c38..0c37a1991 100644 --- a/patches/minecraft/net/minecraft/world/gen/ChunkProviderEnd.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/ChunkProviderEnd.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/ChunkProviderEnd.java -+++ ../src_work/minecraft/net/minecraft/world/gen/ChunkProviderEnd.java +--- ../src-base/minecraft/net/minecraft/world/gen/ChunkProviderEnd.java ++++ ../src-work/minecraft/net/minecraft/world/gen/ChunkProviderEnd.java @@ -13,6 +13,10 @@ import net.minecraft.world.chunk.Chunk; import net.minecraft.world.chunk.IChunkProvider; @@ -11,12 +11,12 @@ public class ChunkProviderEnd implements IChunkProvider { private Random endRNG; -@@ -42,7 +46,15 @@ +@@ -42,8 +46,16 @@ this.noiseGen3 = new NoiseGeneratorOctaves(this.endRNG, 8); this.noiseGen4 = new NoiseGeneratorOctaves(this.endRNG, 10); this.noiseGen5 = new NoiseGeneratorOctaves(this.endRNG, 16); - } -+ + + NoiseGeneratorOctaves[] noiseGens = {noiseGen1, noiseGen2, noiseGen3, noiseGen4, noiseGen5}; + noiseGens = TerrainGen.getModdedNoiseGenerators(par1World, this.endRNG, noiseGens); + this.noiseGen1 = noiseGens[0]; @@ -25,9 +25,10 @@ + this.noiseGen4 = noiseGens[3]; + this.noiseGen5 = noiseGens[4]; + } - ++ public void generateTerrain(int par1, int par2, byte[] par3ArrayOfByte, BiomeGenBase[] par4ArrayOfBiomeGenBase) { + byte b0 = 2; @@ -114,6 +126,10 @@ public void replaceBlocksForBiome(int par1, int par2, byte[] par3ArrayOfByte, BiomeGenBase[] par4ArrayOfBiomeGenBase) diff --git a/patches/minecraft/net/minecraft/world/gen/ChunkProviderGenerate.java.patch b/patches/minecraft/net/minecraft/world/gen/ChunkProviderGenerate.java.patch index 2d7987bff..90855020d 100644 --- a/patches/minecraft/net/minecraft/world/gen/ChunkProviderGenerate.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/ChunkProviderGenerate.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/ChunkProviderGenerate.java -+++ ../src_work/minecraft/net/minecraft/world/gen/ChunkProviderGenerate.java +--- ../src-base/minecraft/net/minecraft/world/gen/ChunkProviderGenerate.java ++++ ../src-work/minecraft/net/minecraft/world/gen/ChunkProviderGenerate.java @@ -20,6 +20,12 @@ import net.minecraft.world.gen.structure.MapGenStronghold; import net.minecraft.world.gen.structure.MapGenVillage; @@ -13,11 +13,10 @@ public class ChunkProviderGenerate implements IChunkProvider { /** RNG. */ -@@ -91,6 +97,15 @@ - */ +@@ -92,6 +98,15 @@ float[] parabolicField; int[][] field_73219_j = new int[32][32]; -+ + + { + caveGenerator = TerrainGen.getModdedMapGen(caveGenerator, CAVE); + strongholdGenerator = (MapGenStronghold) TerrainGen.getModdedMapGen(strongholdGenerator, STRONGHOLD); @@ -26,9 +25,10 @@ + scatteredFeatureGenerator = (MapGenScatteredFeature) TerrainGen.getModdedMapGen(scatteredFeatureGenerator, SCATTERED_FEATURE); + ravineGenerator = TerrainGen.getModdedMapGen(ravineGenerator, RAVINE); + } - ++ public ChunkProviderGenerate(World par1World, long par2, boolean par4) { + this.worldObj = par1World; @@ -104,6 +119,16 @@ this.noiseGen5 = new NoiseGeneratorOctaves(this.rand, 10); this.noiseGen6 = new NoiseGeneratorOctaves(this.rand, 16); @@ -117,12 +117,12 @@ { for (l1 = 0; l1 < 16; ++l1) { -@@ -554,6 +593,8 @@ - } +@@ -555,6 +594,8 @@ } } -+ -+ MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag)); ++ MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag)); ++ BlockSand.fallInstantly = false; } + diff --git a/patches/minecraft/net/minecraft/world/gen/ChunkProviderHell.java.patch b/patches/minecraft/net/minecraft/world/gen/ChunkProviderHell.java.patch index 26d1f0ddf..c446cf0f8 100644 --- a/patches/minecraft/net/minecraft/world/gen/ChunkProviderHell.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/ChunkProviderHell.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/ChunkProviderHell.java -+++ ../src_work/minecraft/net/minecraft/world/gen/ChunkProviderHell.java +--- ../src-base/minecraft/net/minecraft/world/gen/ChunkProviderHell.java ++++ ../src-work/minecraft/net/minecraft/world/gen/ChunkProviderHell.java @@ -19,6 +19,13 @@ import net.minecraft.world.gen.feature.WorldGenMinable; import net.minecraft.world.gen.structure.MapGenNetherBridge; @@ -14,18 +14,18 @@ public class ChunkProviderHell implements IChunkProvider { private Random hellRNG; -@@ -59,6 +66,11 @@ - double[] noiseData3; +@@ -60,6 +67,11 @@ double[] noiseData4; double[] noiseData5; -+ + + { + genNetherBridge = (MapGenNetherBridge) TerrainGen.getModdedMapGen(genNetherBridge, NETHER_BRIDGE); + netherCaveGenerator = TerrainGen.getModdedMapGen(netherCaveGenerator, NETHER_CAVE); + } - ++ public ChunkProviderHell(World par1World, long par2) { + this.worldObj = par1World; @@ -71,6 +83,16 @@ this.netherrackExculsivityNoiseGen = new NoiseGeneratorOctaves(this.hellRNG, 4); this.netherNoiseGen6 = new NoiseGeneratorOctaves(this.hellRNG, 10); diff --git a/patches/minecraft/net/minecraft/world/gen/ChunkProviderServer.java.patch b/patches/minecraft/net/minecraft/world/gen/ChunkProviderServer.java.patch index eade5546c..30a3efa5b 100644 --- a/patches/minecraft/net/minecraft/world/gen/ChunkProviderServer.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/ChunkProviderServer.java.patch @@ -1,15 +1,15 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/ChunkProviderServer.java -+++ ../src_work/minecraft/net/minecraft/world/gen/ChunkProviderServer.java -@@ -6,6 +6,9 @@ - import java.util.Iterator; +--- ../src-base/minecraft/net/minecraft/world/gen/ChunkProviderServer.java ++++ ../src-work/minecraft/net/minecraft/world/gen/ChunkProviderServer.java +@@ -7,6 +7,9 @@ import java.util.List; import java.util.Set; -+ + +import net.minecraftforge.common.DimensionManager; +import net.minecraftforge.common.ForgeChunkManager; - ++ import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.crash.CrashReport; + import net.minecraft.crash.CrashReportCategory; @@ -66,7 +69,7 @@ */ public void unloadChunksIfNotNearSpawn(int par1, int par2) diff --git a/patches/minecraft/net/minecraft/world/gen/MapGenCaves.java.patch b/patches/minecraft/net/minecraft/world/gen/MapGenCaves.java.patch index 9bd334702..29a5439d4 100644 --- a/patches/minecraft/net/minecraft/world/gen/MapGenCaves.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/MapGenCaves.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/MapGenCaves.java -+++ ../src_work/minecraft/net/minecraft/world/gen/MapGenCaves.java +--- ../src-base/minecraft/net/minecraft/world/gen/MapGenCaves.java ++++ ../src-work/minecraft/net/minecraft/world/gen/MapGenCaves.java @@ -4,6 +4,7 @@ import net.minecraft.block.Block; import net.minecraft.util.MathHelper; diff --git a/patches/minecraft/net/minecraft/world/gen/MapGenRavine.java.patch b/patches/minecraft/net/minecraft/world/gen/MapGenRavine.java.patch index 12155325d..c3e81a499 100644 --- a/patches/minecraft/net/minecraft/world/gen/MapGenRavine.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/MapGenRavine.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/MapGenRavine.java -+++ ../src_work/minecraft/net/minecraft/world/gen/MapGenRavine.java +--- ../src-base/minecraft/net/minecraft/world/gen/MapGenRavine.java ++++ ../src-work/minecraft/net/minecraft/world/gen/MapGenRavine.java @@ -4,6 +4,7 @@ import net.minecraft.block.Block; import net.minecraft.util.MathHelper; diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenBigMushroom.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenBigMushroom.java.patch index 0422952df..e597e4246 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenBigMushroom.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenBigMushroom.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/feature/WorldGenBigMushroom.java -+++ ../src_work/minecraft/net/minecraft/world/gen/feature/WorldGenBigMushroom.java +--- ../src-base/minecraft/net/minecraft/world/gen/feature/WorldGenBigMushroom.java ++++ ../src-work/minecraft/net/minecraft/world/gen/feature/WorldGenBigMushroom.java @@ -56,7 +56,9 @@ { i2 = par1World.getBlockId(k1, j1, l1); diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenBigTree.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenBigTree.java.patch index f232b5294..ba2fbd878 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenBigTree.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenBigTree.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/feature/WorldGenBigTree.java -+++ ../src_work/minecraft/net/minecraft/world/gen/feature/WorldGenBigTree.java +--- ../src-base/minecraft/net/minecraft/world/gen/feature/WorldGenBigTree.java ++++ ../src-work/minecraft/net/minecraft/world/gen/feature/WorldGenBigTree.java @@ -1,9 +1,12 @@ package net.minecraft.world.gen.feature; @@ -17,10 +17,9 @@ { aint1[b2] = aint[b2] + k1; int l1 = this.worldObj.getBlockId(aint1[0], aint1[1], aint1[2]); -- -- if (l1 != 0 && l1 != Block.leaves.blockID) + Block block = Block.blocksList[l1]; -+ + +- if (l1 != 0 && l1 != Block.leaves.blockID) + if (block != null && + !block.isAirBlock(worldObj, aint1[0], aint1[1], aint1[2]) && + !block.isLeaves(worldObj, aint1[0], aint1[1], aint1[2])) @@ -31,10 +30,9 @@ aint3[b2] = MathHelper.floor_double((double)par1ArrayOfInteger[b2] + (double)i * d0); aint3[b3] = MathHelper.floor_double((double)par1ArrayOfInteger[b3] + (double)i * d1); int k = this.worldObj.getBlockId(aint3[0], aint3[1], aint3[2]); -- -- if (k != 0 && k != Block.leaves.blockID) + Block block = Block.blocksList[k]; -+ + +- if (k != 0 && k != Block.leaves.blockID) + if (block != null && + !block.isAirBlock(worldObj, aint3[0], aint3[1], aint3[2]) && + !block.isLeaves(worldObj, aint3[0], aint3[1], aint3[2])) diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenDeadBush.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenDeadBush.java.patch index 592f11deb..a810fd978 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenDeadBush.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenDeadBush.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/feature/WorldGenDeadBush.java -+++ ../src_work/minecraft/net/minecraft/world/gen/feature/WorldGenDeadBush.java +--- ../src-base/minecraft/net/minecraft/world/gen/feature/WorldGenDeadBush.java ++++ ../src-work/minecraft/net/minecraft/world/gen/feature/WorldGenDeadBush.java @@ -18,10 +18,16 @@ { int l; diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenDungeons.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenDungeons.java.patch index d9fe44071..c4fb47beb 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenDungeons.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenDungeons.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/feature/WorldGenDungeons.java -+++ ../src_work/minecraft/net/minecraft/world/gen/feature/WorldGenDungeons.java +--- ../src-base/minecraft/net/minecraft/world/gen/feature/WorldGenDungeons.java ++++ ../src-work/minecraft/net/minecraft/world/gen/feature/WorldGenDungeons.java @@ -8,6 +8,8 @@ import net.minecraft.tileentity.TileEntityMobSpawner; import net.minecraft.util.WeightedRandomChestContent; diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenForest.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenForest.java.patch index 02fc7ec49..a7f5c365a 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenForest.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenForest.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/feature/WorldGenForest.java -+++ ../src_work/minecraft/net/minecraft/world/gen/feature/WorldGenForest.java +--- ../src-base/minecraft/net/minecraft/world/gen/feature/WorldGenForest.java ++++ ../src-work/minecraft/net/minecraft/world/gen/feature/WorldGenForest.java @@ -2,7 +2,9 @@ import java.util.Random; diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenHugeTrees.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenHugeTrees.java.patch index 2353e21eb..5483ad42b 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenHugeTrees.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenHugeTrees.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/feature/WorldGenHugeTrees.java -+++ ../src_work/minecraft/net/minecraft/world/gen/feature/WorldGenHugeTrees.java +--- ../src-base/minecraft/net/minecraft/world/gen/feature/WorldGenHugeTrees.java ++++ ../src-work/minecraft/net/minecraft/world/gen/feature/WorldGenHugeTrees.java @@ -2,8 +2,10 @@ import java.util.Random; @@ -15,10 +15,9 @@ if (i1 >= 0 && i1 < 256) { l1 = par1World.getBlockId(j1, i1, k1); -- -- if (l1 != 0 && l1 != Block.leaves.blockID && l1 != Block.grass.blockID && l1 != Block.dirt.blockID && l1 != Block.wood.blockID && l1 != Block.sapling.blockID) + Block block = Block.blocksList[l1]; -+ + +- if (l1 != 0 && l1 != Block.leaves.blockID && l1 != Block.grass.blockID && l1 != Block.dirt.blockID && l1 != Block.wood.blockID && l1 != Block.sapling.blockID) + if (block != null && + !block.isAirBlock(par1World, j1, i1, k1) && + !block.isLeaves(par1World, j1, i1, k1) && @@ -34,16 +33,15 @@ i1 = par1World.getBlockId(par3, par4 - 1, par5); - if ((i1 == Block.grass.blockID || i1 == Block.dirt.blockID) && par4 < 256 - l - 1) -- { -- par1World.setBlock(par3, par4 - 1, par5, Block.dirt.blockID, 0, 2); -- par1World.setBlock(par3 + 1, par4 - 1, par5, Block.dirt.blockID, 0, 2); -- par1World.setBlock(par3, par4 - 1, par5 + 1, Block.dirt.blockID, 0, 2); -- par1World.setBlock(par3 + 1, par4 - 1, par5 + 1, Block.dirt.blockID, 0, 2); + Block soil = Block.blocksList[i1]; + boolean isValidSoil = soil != null && soil.canSustainPlant(par1World, par3, par4 - 1, par5, ForgeDirection.UP, (BlockSapling)Block.sapling); + + if (isValidSoil && par4 < 256 - l - 1) -+ { + { +- par1World.setBlock(par3, par4 - 1, par5, Block.dirt.blockID, 0, 2); +- par1World.setBlock(par3 + 1, par4 - 1, par5, Block.dirt.blockID, 0, 2); +- par1World.setBlock(par3, par4 - 1, par5 + 1, Block.dirt.blockID, 0, 2); +- par1World.setBlock(par3 + 1, par4 - 1, par5 + 1, Block.dirt.blockID, 0, 2); + onPlantGrow(par1World, par3, par4 - 1, par5, par3, par4, par5); + onPlantGrow(par1World, par3 + 1, par4 - 1, par5, par3, par4, par5); + onPlantGrow(par1World, par3, par4 - 1, par5 + 1, par3, par4, par5); @@ -91,10 +89,9 @@ if ((i2 >= 0 || k2 >= 0 || i2 * i2 + k2 * k2 <= k1 * k1) && (i2 <= 0 && k2 <= 0 || i2 * i2 + k2 * k2 <= (k1 + 1) * (k1 + 1)) && (par6Random.nextInt(4) != 0 || i2 * i2 + k2 * k2 <= (k1 - 1) * (k1 - 1))) { int l2 = par1World.getBlockId(l1, i1, j2); -- -- if (l2 == 0 || l2 == Block.leaves.blockID) + Block block = Block.blocksList[l2]; -+ + +- if (l2 == 0 || l2 == Block.leaves.blockID) + if (block == null || block.canBeReplacedByLeaves(par1World, l1, i1, j2)) { this.setBlockAndMetadata(par1World, l1, i1, j2, Block.leaves.blockID, this.leavesMetadata); diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenMinable.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenMinable.java.patch index dc5e708ae..12f03e522 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenMinable.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenMinable.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/feature/WorldGenMinable.java -+++ ../src_work/minecraft/net/minecraft/world/gen/feature/WorldGenMinable.java +--- ../src-base/minecraft/net/minecraft/world/gen/feature/WorldGenMinable.java ++++ ../src-work/minecraft/net/minecraft/world/gen/feature/WorldGenMinable.java @@ -9,6 +9,7 @@ { /** The block ID of the ore to be placed using this generator. */ @@ -8,19 +8,19 @@ /** The number of blocks to generate. */ private int numberOfBlocks; -@@ -26,6 +27,12 @@ - this.minableBlockId = par1; - this.numberOfBlocks = par2; +@@ -28,6 +29,12 @@ this.blockToReplace = par3; -+ } -+ + } + + public WorldGenMinable(int id, int meta, int number, int target) + { + this(id, number, target); + this.minableBlockMeta = meta; - } - ++ } ++ public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) + { + float f = par2Random.nextFloat() * (float)Math.PI; @@ -69,9 +76,10 @@ { double d14 = ((double)i3 + 0.5D - d8) / (d10 / 2.0D); diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenShrub.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenShrub.java.patch index 3b8b23b7e..f17972e00 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenShrub.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenShrub.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/feature/WorldGenShrub.java -+++ ../src_work/minecraft/net/minecraft/world/gen/feature/WorldGenShrub.java +--- ../src-base/minecraft/net/minecraft/world/gen/feature/WorldGenShrub.java ++++ ../src-work/minecraft/net/minecraft/world/gen/feature/WorldGenShrub.java @@ -19,10 +19,16 @@ { int l; diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenSwamp.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenSwamp.java.patch index 584a3fa73..56e839be9 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenSwamp.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenSwamp.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/feature/WorldGenSwamp.java -+++ ../src_work/minecraft/net/minecraft/world/gen/feature/WorldGenSwamp.java +--- ../src-base/minecraft/net/minecraft/world/gen/feature/WorldGenSwamp.java ++++ ../src-work/minecraft/net/minecraft/world/gen/feature/WorldGenSwamp.java @@ -47,7 +47,7 @@ { l1 = par1World.getBlockId(j1, i1, k1); diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTaiga1.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTaiga1.java.patch index bb5ebf71e..f7089260e 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTaiga1.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTaiga1.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/feature/WorldGenTaiga1.java -+++ ../src_work/minecraft/net/minecraft/world/gen/feature/WorldGenTaiga1.java +--- ../src-base/minecraft/net/minecraft/world/gen/feature/WorldGenTaiga1.java ++++ ../src-work/minecraft/net/minecraft/world/gen/feature/WorldGenTaiga1.java @@ -43,7 +43,9 @@ { k2 = par1World.getBlockId(i2, l1, j2); diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTaiga2.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTaiga2.java.patch index bc5800d54..0f8fd5d63 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTaiga2.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTaiga2.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/feature/WorldGenTaiga2.java -+++ ../src_work/minecraft/net/minecraft/world/gen/feature/WorldGenTaiga2.java +--- ../src-base/minecraft/net/minecraft/world/gen/feature/WorldGenTaiga2.java ++++ ../src-work/minecraft/net/minecraft/world/gen/feature/WorldGenTaiga2.java @@ -2,7 +2,9 @@ import java.util.Random; diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTallGrass.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTallGrass.java.patch index 8e4ac0bea..3978eb2b2 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTallGrass.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTallGrass.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/feature/WorldGenTallGrass.java -+++ ../src_work/minecraft/net/minecraft/world/gen/feature/WorldGenTallGrass.java +--- ../src-base/minecraft/net/minecraft/world/gen/feature/WorldGenTallGrass.java ++++ ../src-work/minecraft/net/minecraft/world/gen/feature/WorldGenTallGrass.java @@ -20,10 +20,16 @@ { int l; diff --git a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTrees.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTrees.java.patch index 29587265b..450fa6163 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTrees.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/WorldGenTrees.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/feature/WorldGenTrees.java -+++ ../src_work/minecraft/net/minecraft/world/gen/feature/WorldGenTrees.java +--- ../src-base/minecraft/net/minecraft/world/gen/feature/WorldGenTrees.java ++++ ../src-work/minecraft/net/minecraft/world/gen/feature/WorldGenTrees.java @@ -2,8 +2,10 @@ import java.util.Random; @@ -30,15 +30,13 @@ else { i1 = par1World.getBlockId(par3, par4 - 1, par5); -- -- if ((i1 == Block.grass.blockID || i1 == Block.dirt.blockID) && par4 < 256 - l - 1) -- { -- this.setBlock(par1World, par3, par4 - 1, par5, Block.dirt.blockID); + Block soil = Block.blocksList[i1]; + boolean isSoil = (soil != null && soil.canSustainPlant(par1World, par3, par4 - 1, par5, ForgeDirection.UP, (BlockSapling)Block.sapling)); -+ + +- if ((i1 == Block.grass.blockID || i1 == Block.dirt.blockID) && par4 < 256 - l - 1) + if (isSoil && par4 < 256 - l - 1) -+ { + { +- this.setBlock(par1World, par3, par4 - 1, par5, Block.dirt.blockID); + soil.onPlantGrow(par1World, par3, par4 - 1, par5, par3, par4, par5); b0 = 3; byte b1 = 0; @@ -47,10 +45,9 @@ if (Math.abs(k2) != i2 || Math.abs(i3) != i2 || par2Random.nextInt(2) != 0 && k1 != 0) { int j3 = par1World.getBlockId(j2, j1, l2); -- -- if (j3 == 0 || j3 == Block.leaves.blockID) + Block block = Block.blocksList[j3]; -+ + +- if (j3 == 0 || j3 == Block.leaves.blockID) + if (block == null || block.canBeReplacedByLeaves(par1World, j2, j1, l2)) { this.setBlockAndMetadata(par1World, j2, j1, l2, Block.leaves.blockID, this.metaLeaves); diff --git a/patches/minecraft/net/minecraft/world/gen/layer/GenLayer.java.patch b/patches/minecraft/net/minecraft/world/gen/layer/GenLayer.java.patch index 24f4db9a9..91477d630 100644 --- a/patches/minecraft/net/minecraft/world/gen/layer/GenLayer.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/layer/GenLayer.java.patch @@ -1,15 +1,15 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/layer/GenLayer.java -+++ ../src_work/minecraft/net/minecraft/world/gen/layer/GenLayer.java -@@ -1,6 +1,9 @@ - package net.minecraft.world.gen.layer; +--- ../src-base/minecraft/net/minecraft/world/gen/layer/GenLayer.java ++++ ../src-work/minecraft/net/minecraft/world/gen/layer/GenLayer.java +@@ -2,6 +2,9 @@ import net.minecraft.world.WorldType; -+ + +import net.minecraftforge.common.*; +import net.minecraftforge.event.terraingen.*; - ++ public abstract class GenLayer { + /** seed from World#getWorldSeed that is used in the LCG prng */ @@ -42,6 +45,7 @@ { b0 = 6; diff --git a/patches/minecraft/net/minecraft/world/gen/structure/ComponentMineshaftCorridor.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/ComponentMineshaftCorridor.java.patch index 2175afdb7..b0573a6a2 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/ComponentMineshaftCorridor.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/ComponentMineshaftCorridor.java.patch @@ -1,15 +1,15 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/structure/ComponentMineshaftCorridor.java -+++ ../src_work/minecraft/net/minecraft/world/gen/structure/ComponentMineshaftCorridor.java -@@ -9,6 +9,9 @@ - import net.minecraft.tileentity.TileEntityMobSpawner; +--- ../src-base/minecraft/net/minecraft/world/gen/structure/ComponentMineshaftCorridor.java ++++ ../src-work/minecraft/net/minecraft/world/gen/structure/ComponentMineshaftCorridor.java +@@ -10,6 +10,9 @@ import net.minecraft.util.WeightedRandomChestContent; import net.minecraft.world.World; -+ + +import net.minecraftforge.common.ChestGenHooks; +import static net.minecraftforge.common.ChestGenHooks.*; - ++ public class ComponentMineshaftCorridor extends StructureComponent { + private boolean hasRails; @@ -283,14 +286,16 @@ this.randomlyPlaceBlock(par1World, par3StructureBoundingBox, par2Random, 0.05F, 1, 2, k - 1, Block.torchWood.blockID, 0); this.randomlyPlaceBlock(par1World, par3StructureBoundingBox, par2Random, 0.05F, 1, 2, k + 1, Block.torchWood.blockID, 0); diff --git a/patches/minecraft/net/minecraft/world/gen/structure/ComponentScatteredFeatureDesertPyramid.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/ComponentScatteredFeatureDesertPyramid.java.patch index ec40f1daa..6f1eeab6c 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/ComponentScatteredFeatureDesertPyramid.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/ComponentScatteredFeatureDesertPyramid.java.patch @@ -1,15 +1,15 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/structure/ComponentScatteredFeatureDesertPyramid.java -+++ ../src_work/minecraft/net/minecraft/world/gen/structure/ComponentScatteredFeatureDesertPyramid.java -@@ -7,6 +7,9 @@ - import net.minecraft.util.Direction; +--- ../src-base/minecraft/net/minecraft/world/gen/structure/ComponentScatteredFeatureDesertPyramid.java ++++ ../src-work/minecraft/net/minecraft/world/gen/structure/ComponentScatteredFeatureDesertPyramid.java +@@ -8,6 +8,9 @@ import net.minecraft.util.WeightedRandomChestContent; import net.minecraft.world.World; -+ + +import net.minecraftforge.common.ChestGenHooks; +import static net.minecraftforge.common.ChestGenHooks.*; - ++ public class ComponentScatteredFeatureDesertPyramid extends ComponentScatteredFeature { + private boolean[] field_74940_h = new boolean[4]; @@ -236,13 +239,14 @@ this.placeBlockAtCurrentPosition(par1World, Block.sandStone.blockID, 1, 10, -10, 13, par3StructureBoundingBox); this.placeBlockAtCurrentPosition(par1World, Block.sandStone.blockID, 2, 10, -11, 13, par3StructureBoundingBox); diff --git a/patches/minecraft/net/minecraft/world/gen/structure/ComponentScatteredFeatureJunglePyramid.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/ComponentScatteredFeatureJunglePyramid.java.patch index 079651029..ecd8be1e8 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/ComponentScatteredFeatureJunglePyramid.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/ComponentScatteredFeatureJunglePyramid.java.patch @@ -1,15 +1,15 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/structure/ComponentScatteredFeatureJunglePyramid.java -+++ ../src_work/minecraft/net/minecraft/world/gen/structure/ComponentScatteredFeatureJunglePyramid.java -@@ -7,6 +7,9 @@ - import net.minecraft.nbt.NBTTagCompound; +--- ../src-base/minecraft/net/minecraft/world/gen/structure/ComponentScatteredFeatureJunglePyramid.java ++++ ../src-work/minecraft/net/minecraft/world/gen/structure/ComponentScatteredFeatureJunglePyramid.java +@@ -8,6 +8,9 @@ import net.minecraft.util.WeightedRandomChestContent; import net.minecraft.world.World; -+ + +import net.minecraftforge.common.ChestGenHooks; +import static net.minecraftforge.common.ChestGenHooks.*; - ++ public class ComponentScatteredFeatureJunglePyramid extends ComponentScatteredFeature { + private boolean field_74947_h; @@ -185,9 +188,12 @@ this.placeBlockAtCurrentPosition(par1World, Block.redstoneWire.blockID, 0, 4, -3, 1, par3StructureBoundingBox); this.placeBlockAtCurrentPosition(par1World, Block.cobblestoneMossy.blockID, 0, 3, -3, 1, par3StructureBoundingBox); diff --git a/patches/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdChestCorridor.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdChestCorridor.java.patch index 8dac29b92..015ec0629 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdChestCorridor.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdChestCorridor.java.patch @@ -1,15 +1,15 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdChestCorridor.java -+++ ../src_work/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdChestCorridor.java -@@ -7,6 +7,9 @@ - import net.minecraft.nbt.NBTTagCompound; +--- ../src-base/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdChestCorridor.java ++++ ../src-work/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdChestCorridor.java +@@ -8,6 +8,9 @@ import net.minecraft.util.WeightedRandomChestContent; import net.minecraft.world.World; -+ + +import net.minecraftforge.common.ChestGenHooks; +import static net.minecraftforge.common.ChestGenHooks.*; - ++ public class ComponentStrongholdChestCorridor extends ComponentStronghold { + /** List of items that Stronghold chests can contain. */ @@ -86,7 +89,7 @@ if (par3StructureBoundingBox.isVecInside(j, i, k)) { diff --git a/patches/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdLibrary.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdLibrary.java.patch index 57e2af6cf..221962153 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdLibrary.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdLibrary.java.patch @@ -1,24 +1,24 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdLibrary.java -+++ ../src_work/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdLibrary.java -@@ -7,6 +7,9 @@ - import net.minecraft.nbt.NBTTagCompound; +--- ../src-base/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdLibrary.java ++++ ../src-work/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdLibrary.java +@@ -8,6 +8,9 @@ import net.minecraft.util.WeightedRandomChestContent; import net.minecraft.world.World; -+ + +import net.minecraftforge.common.ChestGenHooks; +import static net.minecraftforge.common.ChestGenHooks.*; - ++ public class ComponentStrongholdLibrary extends ComponentStronghold { + /** List of items that Stronghold Library chests can contain. */ @@ -161,12 +164,14 @@ this.placeBlockAtCurrentPosition(par1World, Block.torchWood.blockID, 0, b1, 8, b2 + 1, par3StructureBoundingBox); } - this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 3, 5, WeightedRandomChestContent.func_92080_a(strongholdLibraryChestContents, new WeightedRandomChestContent[] {Item.enchantedBook.func_92112_a(par2Random, 1, 5, 2)}), 1 + par2Random.nextInt(4)); + ChestGenHooks info = ChestGenHooks.getInfo(STRONGHOLD_LIBRARY); -+ -+ this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 3, 5, info.getItems(par2Random), info.getCount(par2Random)); ++ this.generateStructureChestContents(par1World, par3StructureBoundingBox, par2Random, 3, 3, 5, info.getItems(par2Random), info.getCount(par2Random)); ++ if (this.isLargeRoom) { this.placeBlockAtCurrentPosition(par1World, 0, 0, 12, 9, 1, par3StructureBoundingBox); diff --git a/patches/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdRoomCrossing.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdRoomCrossing.java.patch index 166867978..e39441c85 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdRoomCrossing.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdRoomCrossing.java.patch @@ -1,15 +1,15 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdRoomCrossing.java -+++ ../src_work/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdRoomCrossing.java -@@ -7,6 +7,9 @@ - import net.minecraft.nbt.NBTTagCompound; +--- ../src-base/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdRoomCrossing.java ++++ ../src-work/minecraft/net/minecraft/world/gen/structure/ComponentStrongholdRoomCrossing.java +@@ -8,6 +8,9 @@ import net.minecraft.util.WeightedRandomChestContent; import net.minecraft.world.World; -+ + +import net.minecraftforge.common.ChestGenHooks; +import static net.minecraftforge.common.ChestGenHooks.*; - ++ public class ComponentStrongholdRoomCrossing extends ComponentStronghold { + /** @@ -158,7 +161,7 @@ this.placeBlockAtCurrentPosition(par1World, Block.ladder.blockID, this.getMetadataWithOffset(Block.ladder.blockID, 4), 9, 1, 3, par3StructureBoundingBox); this.placeBlockAtCurrentPosition(par1World, Block.ladder.blockID, this.getMetadataWithOffset(Block.ladder.blockID, 4), 9, 2, 3, par3StructureBoundingBox); diff --git a/patches/minecraft/net/minecraft/world/gen/structure/ComponentVillage.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/ComponentVillage.java.patch index 2904b509c..1d530b2d5 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/ComponentVillage.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/ComponentVillage.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/structure/ComponentVillage.java -+++ ../src_work/minecraft/net/minecraft/world/gen/structure/ComponentVillage.java +--- ../src-base/minecraft/net/minecraft/world/gen/structure/ComponentVillage.java ++++ ../src-work/minecraft/net/minecraft/world/gen/structure/ComponentVillage.java @@ -7,6 +7,10 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; diff --git a/patches/minecraft/net/minecraft/world/gen/structure/ComponentVillageHouse2.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/ComponentVillageHouse2.java.patch index 4f229b421..7e814c8f9 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/ComponentVillageHouse2.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/ComponentVillageHouse2.java.patch @@ -1,15 +1,15 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/structure/ComponentVillageHouse2.java -+++ ../src_work/minecraft/net/minecraft/world/gen/structure/ComponentVillageHouse2.java -@@ -7,6 +7,9 @@ - import net.minecraft.nbt.NBTTagCompound; +--- ../src-base/minecraft/net/minecraft/world/gen/structure/ComponentVillageHouse2.java ++++ ../src-work/minecraft/net/minecraft/world/gen/structure/ComponentVillageHouse2.java +@@ -8,6 +8,9 @@ import net.minecraft.util.WeightedRandomChestContent; import net.minecraft.world.World; -+ + +import net.minecraftforge.common.ChestGenHooks; +import static net.minecraftforge.common.ChestGenHooks.*; - ++ public class ComponentVillageHouse2 extends ComponentVillage { + /** List of items that Village's Blacksmith chest can contain. */ @@ -106,7 +109,7 @@ if (par3StructureBoundingBox.isVecInside(j, i, k)) { diff --git a/patches/minecraft/net/minecraft/world/gen/structure/ComponentVillageStartPiece.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/ComponentVillageStartPiece.java.patch index 87e5f8493..24c5e1a0a 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/ComponentVillageStartPiece.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/ComponentVillageStartPiece.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/structure/ComponentVillageStartPiece.java -+++ ../src_work/minecraft/net/minecraft/world/gen/structure/ComponentVillageStartPiece.java +--- ../src-base/minecraft/net/minecraft/world/gen/structure/ComponentVillageStartPiece.java ++++ ../src-work/minecraft/net/minecraft/world/gen/structure/ComponentVillageStartPiece.java @@ -12,6 +12,7 @@ /** Boolean that determines if the village is in a desert or not. */ diff --git a/patches/minecraft/net/minecraft/world/gen/structure/MapGenStronghold.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/MapGenStronghold.java.patch index 55b156239..f502fd946 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/MapGenStronghold.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/MapGenStronghold.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/structure/MapGenStronghold.java -+++ ../src_work/minecraft/net/minecraft/world/gen/structure/MapGenStronghold.java +--- ../src-base/minecraft/net/minecraft/world/gen/structure/MapGenStronghold.java ++++ ../src-work/minecraft/net/minecraft/world/gen/structure/MapGenStronghold.java @@ -1,6 +1,7 @@ package net.minecraft.world.gen.structure; diff --git a/patches/minecraft/net/minecraft/world/gen/structure/MapGenStructure.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/MapGenStructure.java.patch index d690244d1..bc1f969ad 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/MapGenStructure.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/MapGenStructure.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/structure/MapGenStructure.java -+++ ../src_work/minecraft/net/minecraft/world/gen/structure/MapGenStructure.java +--- ../src-base/minecraft/net/minecraft/world/gen/structure/MapGenStructure.java ++++ ../src-work/minecraft/net/minecraft/world/gen/structure/MapGenStructure.java @@ -234,12 +234,12 @@ { if (this.field_143029_e == null) diff --git a/patches/minecraft/net/minecraft/world/gen/structure/StructureComponent.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/StructureComponent.java.patch index df5b89c36..81fa95c1b 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/StructureComponent.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/StructureComponent.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/structure/StructureComponent.java -+++ ../src_work/minecraft/net/minecraft/world/gen/structure/StructureComponent.java +--- ../src-base/minecraft/net/minecraft/world/gen/structure/StructureComponent.java ++++ ../src-work/minecraft/net/minecraft/world/gen/structure/StructureComponent.java @@ -35,6 +35,11 @@ public NBTTagCompound func_143010_b() diff --git a/patches/minecraft/net/minecraft/world/gen/structure/StructureStart.java.patch b/patches/minecraft/net/minecraft/world/gen/structure/StructureStart.java.patch index 5a00556cd..2d99017dc 100644 --- a/patches/minecraft/net/minecraft/world/gen/structure/StructureStart.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/structure/StructureStart.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/gen/structure/StructureStart.java -+++ ../src_work/minecraft/net/minecraft/world/gen/structure/StructureStart.java +--- ../src-base/minecraft/net/minecraft/world/gen/structure/StructureStart.java ++++ ../src-work/minecraft/net/minecraft/world/gen/structure/StructureStart.java @@ -68,6 +68,11 @@ public NBTTagCompound func_143021_a(int par1, int par2) diff --git a/patches/minecraft/net/minecraft/world/storage/MapData.java.patch b/patches/minecraft/net/minecraft/world/storage/MapData.java.patch index 2aa401fdd..9515e29c7 100644 --- a/patches/minecraft/net/minecraft/world/storage/MapData.java.patch +++ b/patches/minecraft/net/minecraft/world/storage/MapData.java.patch @@ -1,5 +1,5 @@ ---- ../src_base/minecraft/net/minecraft/world/storage/MapData.java -+++ ../src_work/minecraft/net/minecraft/world/storage/MapData.java +--- ../src-base/minecraft/net/minecraft/world/storage/MapData.java ++++ ../src-work/minecraft/net/minecraft/world/storage/MapData.java @@ -173,7 +173,7 @@ par8 += par8 < 0.0D ? -8.0D : 8.0D; b3 = (byte)((int)(par8 * 16.0D / 360.0D)); From b15289113b6c35865b5c524431906ab1d3bdb308 Mon Sep 17 00:00:00 2001 From: Lex Manos Date: Tue, 19 Nov 2013 12:17:46 -0800 Subject: [PATCH 11/11] update build.gradle --- build.gradle | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.gradle b/build.gradle index 97d46cc11..037a00ee2 100644 --- a/build.gradle +++ b/build.gradle @@ -40,6 +40,10 @@ jenkins { job = 'minecraftforge' } +launch4j { + jreMinVersion = '1.6.0' +} + uploadArchives { repositories { if (project.hasProperty("filesmaven")) {