diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..dfe077042 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..51e5c453a --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +# IntelliJ Idea +out +*.ipr +*.iws +*.iml +.idea + +# Gradle +build +.gradle + +# Minecraft +run diff --git a/README.md b/README.md index 434447d44..520a9089d 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,25 @@ +[![Curse Forge](https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/available/curseforge_vector.svg)](https://www.curseforge.com/minecraft/mc-mods/littletiles) +[![patreon-singular](https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/donate/patreon-singular_vector.svg)](https://www.patreon.com/creativemd) +[![discord-plural](https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/social/discord-plural_vector.svg)](https://discord.com/invite/W9QM3fS) + + # LittleTiles -***This mod allows you to build anything you want. It adds a way to add more detail to everything. You can hammer blocks into tiles which can be 4096 (or even more) times smaller than an ordinary minecraft block. You can combine your tiles together to create doors, chairs, ladders, no-clip, storage and any kind of furniture structure. There are endless possibilities as shown in the [trailer]. So [download this mod] and start to go crazy (and maybe post some pics of your work).*** +This mod allows you to build anything you want. It adds a way to add more detail to everything. + +You can hammer blocks into tiles which can be 4096 (or even more) times smaller than an ordinary minecraft block. + +You can combine your tiles together to create doors, chairs, ladders, no-clip, storage and any kind of furniture structure. +There are endless possibilities as shown in the [trailer](https://youtu.be/2Hrn4pdV_ac). + +So download this mod and start to go crazy (and maybe post some pics of your work). *Development for this mod started 2015, since then it has grown to a massive collection of features. Many things needed a lot of tweaking and time to fix all the bugs.* -## Addons - -- [Kiros Basic Blocks] (by [Kiro]) -- [ALET] (by [_Doc]) -- [LittleTiles 3d Importer] (by [Timardo]) -- [LittleOpener] (by [Alleluid]) -- [LittleFrames] - -[trailer]: https://youtu.be/2Hrn4pdV_ac -[download this mod]: https://www.curseforge.com/minecraft/mc-mods/littletiles -[Kiros Basic Blocks]: https://www.curseforge.com/minecraft/mc-mods/kiros-basic-blocks -[Kiro]: https://www.curseforge.com/members/kirokadura/projects -[ALET]: https://www.curseforge.com/minecraft/mc-mods/alet -[_Doc]: https://www.curseforge.com/members/ll_doc/projects -[LittleTiles 3d Importer]: https://www.curseforge.com/minecraft/mc-mods/littletiles-3d-importer -[Timardo]: https://www.curseforge.com/members/timardo/projects -[LittleOpener]: https://www.curseforge.com/minecraft/mc-mods/little-opener -[Alleluid]: https://www.curseforge.com/members/alleluid/projects -[LittleFrames]: https://www.curseforge.com/minecraft/mc-mods/littleframes +# Addons + +- [Kiro's Basic Blocks](https://www.curseforge.com/minecraft/mc-mods/kiros-basic-blocks) by [Kiro](https://www.curseforge.com/members/kirokadura/projects) +- [A Little Extra Tiles](https://www.curseforge.com/minecraft/mc-mods/alet) by [_Doc](https://www.curseforge.com/members/ll_doc/projects) +- [LittleTiles 3D Importer & Exporter](https://www.curseforge.com/minecraft/mc-mods/littletiles-3d-importer) by [Timardo](https://www.curseforge.com/members/timardo/projects) +- [LittleOpener](https://www.curseforge.com/minecraft/mc-mods/little-opener) by [Lunyaaaaaaaaa](https://legacy.curseforge.com/members/Lunyaaaaaaaaa/projects) +- [LittlePictureFrames](https://www.curseforge.com/minecraft/mc-mods/littleframes) diff --git a/build.gradle b/build.gradle new file mode 100644 index 000000000..6ce5dac59 --- /dev/null +++ b/build.gradle @@ -0,0 +1,130 @@ +import org.jetbrains.gradle.ext.Gradle + +plugins { + id 'java' + id 'java-library' + id 'org.jetbrains.gradle.plugin.idea-ext' version '1.1.7' + id 'com.gtnewhorizons.retrofuturagradle' version '1.+' + id 'com.matthewprenger.cursegradle' version '1.4.0' +} + +// Add version to the jar name +version project.version + +// Set the toolchain version to decouple the Java we run Gradle with from the Java used to compile and run the mod +java { + toolchain { + languageVersion.set(JavaLanguageVersion.of(8)) + vendor.set(JvmVendorSpec.AZUL) + } + // Generate sources jar when building and publishing + withSourcesJar() +} + +tasks.withType(JavaCompile).configureEach { + options.encoding = 'UTF-8' + options.fork = true + options.forkOptions.jvmArgs += '-Xmx4G' +} + +minecraft { + mcVersion = '1.12.2' + mcpMappingChannel = 'snapshot' + mcpMappingVersion = '20171003' + + extraRunJvmArguments.addAll('-Xmx4G', '-Dforge.logging.console.level=debug', '-Dfml.coreMods.load=com.creativemd.littletiles.LittlePatchingLoader') + + injectedTags.put('ID', project.id) + injectedTags.put('VERSION', project.version) +} + +// Generate a my.project.Tags class with the version number as a field +tasks.injectTags.configure { + outputClassName.set('com.creativemd.littletiles.Tags') +} + +repositories { + maven { + name 'Curse Maven' + url 'https://cursemaven.com' + content { + includeGroup 'curse.maven' + } + } +} + +dependencies { + implementation rfg.deobf('curse.maven:creativecore-257814:3626833') + + implementation rfg.deobf('curse.maven:ctm-267602:2915363') + implementation rfg.deobf('curse.maven:coloredlux-347912:4055506') + implementation rfg.deobf('curse.maven:chiselandbits-231095:2720655') + implementation rfg.deobf('curse.maven:flatcoloredblocks-238590:2715827') + implementation rfg.deobf('curse.maven:hammerlib-247401:3611193') + implementation rfg.deobf('curse.maven:warpdrive-233565:3762066') + implementation rfg.deobf('curse.maven:albedo-275300:2714505') + implementation rfg.deobf('curse.maven:theoneprobe-245211:2667280') + implementation rfg.deobf('curse.maven:hwyla-253449:2568751') +} + +// Replace version and id in `mcmod.info` +processResources { + inputs.property 'id', project.id + inputs.property 'version', project.version + filesMatching(['mcmod.info', 'pack.mcmeta']) { fcd -> + include 'mcmod.info' + fcd.expand ( + 'id': project.id, + 'version': project.version + ) + } +} + +jar { + manifest.attributes([ + 'ModSide': 'BOTH', + 'FMLCorePlugin': "com.creativemd.littletiles.LittlePatchingLoader", + 'FMLCorePluginContainsFMLMod': true, + 'ForceLoadAsMod': true + ]) +} + +idea { + module { inheritOutputDirs = true } + + module { excludeDirs = [file('.github'), file('.gradle'), file('.idea'), file('build'), file('gradle'), file('run')] } + + project { settings { + runConfigurations { + 'Client'(Gradle) { + taskNames = ['runClient'] + } + 'Server'(Gradle) { + taskNames = ['runServer'] + } + 'Obfuscated Client'(Gradle) { + taskNames = ['runObfClient'] + } + 'Obfuscated Server'(Gradle) { + taskNames = ['runObfServer'] + } + 'Vanilla Client'(Gradle) { + taskNames = ['runVanillaClient'] + } + 'Vanilla Server'(Gradle) { + taskNames = ['runVanillaServer'] + } + } + + compiler.javac { + afterEvaluate { + javacAdditionalOptions = '-encoding utf8' + moduleJavacAdditionalOptions = [ (project.id + '.main'): tasks.compileJava.options.compilerArgs.collect { ''' + it + ''' }.join(' ') ] + } + } + }} +} + +tasks.named('processIdeaSettings').configure { + dependsOn('injectTags') +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 000000000..c4cbf8261 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,12 @@ +# Sets default memory used for Gradle commands. Can be overridden by user or command line properties. +# This is required to provide enough memory for the Minecraft decompilation process. +org.gradle.jvmargs = -Xmx4G +# Allow Gradle to use multi threading. +org.gradle.parallel = true +# Allow Gradle to cache build to avoid recompiling classes that did not change. +org.gradle.caching = true + +# Mod Constants +# Versioning must follow Ragnarök versioning convention: https://shor.cz/ragnarok_versioning_convention +id = littletiles +version = 1.5.77 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 000000000..249e5832f Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..f87c8d15d --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Fri May 26 01:59:37 CEST 2023 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100644 index 000000000..1b6c78733 --- /dev/null +++ b/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/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" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 000000000..994829f3f --- /dev/null +++ b/settings.gradle @@ -0,0 +1,22 @@ +pluginManagement { + repositories { + maven { + // RetroFuturaGradle + name = 'GTNH Maven' + url = uri('http://jenkins.usrv.eu:8081/nexus/content/groups/public/') + allowInsecureProtocol = true + mavenContent { + includeGroup('com.gtnewhorizons') + includeGroup('com.gtnewhorizons.retrofuturagradle') + } + } + gradlePluginPortal() + mavenCentral() + mavenLocal() + } +} + +plugins { + // Automatic toolchain provisioning + id 'org.gradle.toolchains.foojay-resolver-convention' version '0.6.0' +} diff --git a/src/main/java/net/optifine/shaders/SVertexBuilder.java b/src/api/java/net/optifine/shaders/SVertexBuilder.java similarity index 100% rename from src/main/java/net/optifine/shaders/SVertexBuilder.java rename to src/api/java/net/optifine/shaders/SVertexBuilder.java diff --git a/src/main/java/net/optifine/shaders/ShadersRender.java b/src/api/java/net/optifine/shaders/ShadersRender.java similarity index 100% rename from src/main/java/net/optifine/shaders/ShadersRender.java rename to src/api/java/net/optifine/shaders/ShadersRender.java diff --git a/src/main/java/com/creativemd/littletiles/LittleTiles.java b/src/main/java/com/creativemd/littletiles/LittleTiles.java index abe32743c..8d7ba5c0c 100644 --- a/src/main/java/com/creativemd/littletiles/LittleTiles.java +++ b/src/main/java/com/creativemd/littletiles/LittleTiles.java @@ -1,8 +1,5 @@ package com.creativemd.littletiles; -import java.util.List; -import java.util.UUID; - import com.creativemd.creativecore.CreativeCore; import com.creativemd.creativecore.common.config.holder.CreativeConfigRegistry; import com.creativemd.creativecore.common.gui.container.SubContainer; @@ -10,109 +7,33 @@ import com.creativemd.creativecore.common.gui.opener.CustomGuiHandler; import com.creativemd.creativecore.common.gui.opener.GuiHandler; import com.creativemd.creativecore.common.packet.CreativeCorePacket; -import com.creativemd.littletiles.client.gui.SubGuiBlankOMatic; -import com.creativemd.littletiles.client.gui.SubGuiBuilder; -import com.creativemd.littletiles.client.gui.SubGuiDiagnose; -import com.creativemd.littletiles.client.gui.SubGuiExport; -import com.creativemd.littletiles.client.gui.SubGuiImport; -import com.creativemd.littletiles.client.gui.SubGuiParticle; -import com.creativemd.littletiles.client.gui.SubGuiRecipe; -import com.creativemd.littletiles.client.gui.SubGuiRecipeAdvancedSelection; -import com.creativemd.littletiles.client.gui.SubGuiStorage; -import com.creativemd.littletiles.client.gui.SubGuiStructureOverview; -import com.creativemd.littletiles.client.gui.SubGuiWorkbench; +import com.creativemd.littletiles.client.gui.*; import com.creativemd.littletiles.client.gui.handler.LittleStructureGuiHandler; import com.creativemd.littletiles.client.gui.handler.LittleTileGuiHandler; import com.creativemd.littletiles.common.action.LittleAction; import com.creativemd.littletiles.common.action.LittleActionCombined; -import com.creativemd.littletiles.common.action.block.LittleActionActivated; -import com.creativemd.littletiles.common.action.block.LittleActionColorBoxes; +import com.creativemd.littletiles.common.action.block.*; import com.creativemd.littletiles.common.action.block.LittleActionColorBoxes.LittleActionColorBoxesFiltered; -import com.creativemd.littletiles.common.action.block.LittleActionDestroy; -import com.creativemd.littletiles.common.action.block.LittleActionDestroyBoxes; import com.creativemd.littletiles.common.action.block.LittleActionDestroyBoxes.LittleActionDestroyBoxesFiltered; -import com.creativemd.littletiles.common.action.block.LittleActionPlaceAbsolute; import com.creativemd.littletiles.common.action.block.LittleActionPlaceAbsolute.LittleActionPlaceAbsolutePremade; -import com.creativemd.littletiles.common.action.block.LittleActionPlaceStack; -import com.creativemd.littletiles.common.action.block.LittleActionReplace; import com.creativemd.littletiles.common.action.tool.LittleActionSaw; import com.creativemd.littletiles.common.action.tool.LittleActionSaw.LittleActionSawRevert; import com.creativemd.littletiles.common.api.ILittlePlacer; import com.creativemd.littletiles.common.api.ILittleTool; -import com.creativemd.littletiles.common.block.BlockArrow; -import com.creativemd.littletiles.common.block.BlockCable; -import com.creativemd.littletiles.common.block.BlockLTFlowingLava; -import com.creativemd.littletiles.common.block.BlockLTFlowingWater; -import com.creativemd.littletiles.common.block.BlockLittleDyeable; -import com.creativemd.littletiles.common.block.BlockLittleDyeable2; -import com.creativemd.littletiles.common.block.BlockLittleDyeableTransparent; -import com.creativemd.littletiles.common.block.BlockSignalConverter; -import com.creativemd.littletiles.common.block.BlockStorageTile; -import com.creativemd.littletiles.common.block.BlockTile; -import com.creativemd.littletiles.common.block.ItemBlockColored; -import com.creativemd.littletiles.common.block.ItemBlockColored2; -import com.creativemd.littletiles.common.block.ItemBlockFlowingLava; -import com.creativemd.littletiles.common.block.ItemBlockFlowingWater; -import com.creativemd.littletiles.common.block.ItemBlockTransparentColored; -import com.creativemd.littletiles.common.command.ExportCommand; -import com.creativemd.littletiles.common.command.ImportCommand; -import com.creativemd.littletiles.common.command.OpenCommand; -import com.creativemd.littletiles.common.command.ToVanillaCommand; -import com.creativemd.littletiles.common.command.AllBlocksCommand; -import com.creativemd.littletiles.common.container.SubContainerBlankOMatic; -import com.creativemd.littletiles.common.container.SubContainerBuilder; -import com.creativemd.littletiles.common.container.SubContainerDiagnose; -import com.creativemd.littletiles.common.container.SubContainerExport; -import com.creativemd.littletiles.common.container.SubContainerImport; -import com.creativemd.littletiles.common.container.SubContainerParticle; -import com.creativemd.littletiles.common.container.SubContainerRecipeAdvanced; -import com.creativemd.littletiles.common.container.SubContainerStorage; -import com.creativemd.littletiles.common.container.SubContainerStructureOverview; -import com.creativemd.littletiles.common.container.SubContainerWorkbench; +import com.creativemd.littletiles.common.block.*; +import com.creativemd.littletiles.common.command.*; +import com.creativemd.littletiles.common.container.*; import com.creativemd.littletiles.common.entity.EntityAnimation; import com.creativemd.littletiles.common.entity.EntitySit; import com.creativemd.littletiles.common.entity.EntitySizedTNTPrimed; import com.creativemd.littletiles.common.event.LittleEventHandler; -import com.creativemd.littletiles.common.item.ItemBlockIngredient; -import com.creativemd.littletiles.common.item.ItemBlockTiles; -import com.creativemd.littletiles.common.item.ItemColorIngredient; +import com.creativemd.littletiles.common.item.*; import com.creativemd.littletiles.common.item.ItemColorIngredient.ColorIngredientType; -import com.creativemd.littletiles.common.item.ItemLittleBag; -import com.creativemd.littletiles.common.item.ItemLittleChisel; -import com.creativemd.littletiles.common.item.ItemLittleGrabber; -import com.creativemd.littletiles.common.item.ItemLittleHammer; -import com.creativemd.littletiles.common.item.ItemLittlePaintBrush; -import com.creativemd.littletiles.common.item.ItemLittleRecipe; -import com.creativemd.littletiles.common.item.ItemLittleRecipeAdvanced; -import com.creativemd.littletiles.common.item.ItemLittleRubberMallet; -import com.creativemd.littletiles.common.item.ItemLittleSaw; -import com.creativemd.littletiles.common.item.ItemLittleScrewdriver; -import com.creativemd.littletiles.common.item.ItemLittleUtilityKnife; -import com.creativemd.littletiles.common.item.ItemLittleWrench; -import com.creativemd.littletiles.common.item.ItemMultiTiles; -import com.creativemd.littletiles.common.item.ItemPremadeStructure; import com.creativemd.littletiles.common.mod.albedo.AlbedoExtension; import com.creativemd.littletiles.common.mod.lux.LuxExtension; import com.creativemd.littletiles.common.mod.theoneprobe.TheOneProbeManager; import com.creativemd.littletiles.common.mod.warpdrive.TileEntityLittleTilesTransformer; -import com.creativemd.littletiles.common.packet.LittleActionMessagePacket; -import com.creativemd.littletiles.common.packet.LittleActivateDoorPacket; -import com.creativemd.littletiles.common.packet.LittleAnimationControllerPacket; -import com.creativemd.littletiles.common.packet.LittleAnimationDataPacket; -import com.creativemd.littletiles.common.packet.LittleAnimationDestroyPacket; -import com.creativemd.littletiles.common.packet.LittleBedPacket; -import com.creativemd.littletiles.common.packet.LittleBlockPacket; -import com.creativemd.littletiles.common.packet.LittleBlockUpdatePacket; -import com.creativemd.littletiles.common.packet.LittleBlocksUpdatePacket; -import com.creativemd.littletiles.common.packet.LittleFlipPacket; -import com.creativemd.littletiles.common.packet.LittleInteractionPacket; -import com.creativemd.littletiles.common.packet.LittleNeighborUpdatePacket; -import com.creativemd.littletiles.common.packet.LittleRotatePacket; -import com.creativemd.littletiles.common.packet.LittleScrewdriverSelectionPacket; -import com.creativemd.littletiles.common.packet.LittleSelectionModePacket; -import com.creativemd.littletiles.common.packet.LittleUpdateOutputPacket; -import com.creativemd.littletiles.common.packet.LittleUpdateStructurePacket; -import com.creativemd.littletiles.common.packet.LittleVanillaBlockPacket; +import com.creativemd.littletiles.common.packet.*; import com.creativemd.littletiles.common.structure.LittleStructure; import com.creativemd.littletiles.common.structure.registry.LittleStructureRegistry; import com.creativemd.littletiles.common.structure.type.LittleStorage; @@ -123,18 +44,13 @@ import com.creativemd.littletiles.common.tile.parent.IParentTileList; import com.creativemd.littletiles.common.tile.parent.StructureTileList; import com.creativemd.littletiles.common.tile.registry.LittleTileRegistry; -import com.creativemd.littletiles.common.tileentity.TESignalConverter; -import com.creativemd.littletiles.common.tileentity.TileEntityLittleTiles; -import com.creativemd.littletiles.common.tileentity.TileEntityLittleTilesRendered; -import com.creativemd.littletiles.common.tileentity.TileEntityLittleTilesTicking; -import com.creativemd.littletiles.common.tileentity.TileEntityLittleTilesTickingRendered; +import com.creativemd.littletiles.common.tileentity.*; import com.creativemd.littletiles.common.util.converation.ChiselAndBitsConveration; import com.creativemd.littletiles.common.util.ingredient.rules.IngredientRules; import com.creativemd.littletiles.common.world.WorldAnimationHandler; import com.creativemd.littletiles.server.LittleTilesServer; import com.creativemd.littletiles.server.NeighborUpdateOrganizer; import com.creativemd.littletiles.server.interact.LittleInteractionHandlerServer; - import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; @@ -162,7 +78,10 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -@Mod(modid = LittleTiles.modid, version = LittleTiles.version, name = "LittleTiles", acceptedMinecraftVersions = "", +import java.util.List; +import java.util.UUID; + +@Mod(modid = LittleTiles.modid, version = LittleTiles.version, name = "LittleTiles", guiFactory = "com.creativemd.littletiles.client.LittleTilesSettings", dependencies = "required-after:creativecore") @Mod.EventBusSubscriber public class LittleTiles { @@ -170,13 +89,13 @@ public class LittleTiles { @SidedProxy(clientSide = "com.creativemd.littletiles.client.LittleTilesClient", serverSide = "com.creativemd.littletiles.server.LittleTilesServer") public static LittleTilesServer proxy; - public static final String modid = "littletiles"; - public static final String version = "1.5.0"; + public static final String modid = Tags.ID; + public static final String version = Tags.VERSION; public static LittleTilesConfig CONFIG; public static CreativeTabs littleTab = new CreativeTabs("littletiles") { - + @Override public ItemStack getTabIconItem() { return new ItemStack(hammer); diff --git a/src/main/java/com/zeitheron/hammercore/api/lighting/ColoredLight.java b/src/main/java/com/zeitheron/hammercore/api/lighting/ColoredLight.java deleted file mode 100644 index dcfe02504..000000000 --- a/src/main/java/com/zeitheron/hammercore/api/lighting/ColoredLight.java +++ /dev/null @@ -1,133 +0,0 @@ -package com.zeitheron.hammercore.api.lighting; - -import net.minecraft.entity.Entity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.Vec3d; - -//Modified to not cause compiler errors - -public class ColoredLight - -{ - public static final int FLOAT_SIZE = 3 + 4 + 1; - - public float x, y, z; - public float r, g, b, a; - public float radius; - - public ColoredLight(float x, float y, float z, float r, float g, float b, float a, float radius) { - this.x = x; - this.y = y; - this.z = z; - this.r = r; - this.g = g; - this.b = b; - this.a = a; - this.radius = radius; - } - - public ColoredLight reposition(Entity entity, float partialTicks) { - x = (float) (entity.prevPosX + (entity.posX - entity.prevPosX) * partialTicks); - y = (float) (entity.prevPosY + (entity.posY - entity.prevPosY) * partialTicks); - z = (float) (entity.prevPosZ + (entity.posZ - entity.prevPosZ) * partialTicks); - return this; - } - - public static Builder builder() { - return new Builder(); - } - - public static final class Builder { - private float x = Float.NaN; - private float y = Float.NaN; - private float z = Float.NaN; - - private float r = Float.NaN; - private float g = Float.NaN; - private float b = Float.NaN; - private float a = Float.NaN; - - private float radius = Float.NaN; - - public Builder pos(BlockPos pos) { - return pos(pos.getX() + 0.5f, pos.getY() + 0.5f, pos.getZ() + 0.5f); - } - - public Builder pos(Vec3d pos) { - return pos(pos.x, pos.y, pos.z); - } - - public Builder pos(Entity e) { - return pos(e.posX + e.width / 2, e.posY + e.height / 2, e.posZ + e.width / 2); - } - - public Builder pos(Entity entity, float partialTicks) { - float x = (float) (entity.prevPosX + (entity.posX - entity.prevPosX) * partialTicks), - y = (float) (entity.prevPosY + (entity.posY - entity.prevPosY) * partialTicks), - z = (float) (entity.prevPosZ + (entity.posZ - entity.prevPosZ) * partialTicks); - - return pos(x + entity.width / 2, y + entity.height / 2, z + entity.width / 2); - } - - public Builder pos(double x, double y, double z) { - return pos((float) x, (float) y, (float) z); - } - - public Builder pos(float x, float y, float z) { - this.x = x; - this.y = y; - this.z = z; - return this; - } - - public Builder color(Vec3d c, float alpha) { - return color((float) c.x, (float) c.y, (float) c.z, alpha); - } - - public Builder color(Vec3d c) { - return color((float) c.x, (float) c.y, (float) c.z, 1F); - } - - public Builder color(int c, boolean hasAlpha) { - return color(extract(c, 2), extract(c, 1), extract(c, 0), hasAlpha ? extract(c, 3) : 1); - } - - private float extract(int i, int idx) { - return ((i >> (idx * 8)) & 0xFF) / 255f; - } - - public Builder color(float r, float g, float b) { - return color(r, g, b, 1f); - } - - public Builder color(float r, float g, float b, float a) { - this.r = r; - this.g = g; - this.b = b; - this.a = a; - return this; - } - - public Builder alpha(int alpha) { - return alpha(alpha / 255F); - } - - public Builder alpha(float alpha) { - this.a = alpha; - return this; - } - - public Builder radius(float radius) { - this.radius = radius; - return this; - } - - public ColoredLight build() { - if (Float.isFinite(x) && Float.isFinite(y) && Float.isFinite(z) && Float.isFinite(r) && Float.isFinite(g) && Float.isFinite(b) && Float.isFinite(a) && Float.isFinite(radius)) { - return new ColoredLight(x, y, z, r, g, b, a, radius); - } else { - throw new IllegalArgumentException("Position, color, and radius must be set, and cannot be infinite"); - } - } - } -} diff --git a/src/main/java/cr0s/warpdrive/api/IBlockTransformer.java b/src/main/java/cr0s/warpdrive/api/IBlockTransformer.java deleted file mode 100644 index 5402ca31a..000000000 --- a/src/main/java/cr0s/warpdrive/api/IBlockTransformer.java +++ /dev/null @@ -1,97 +0,0 @@ -package cr0s.warpdrive.api; - -import net.minecraft.block.Block; -import net.minecraft.block.properties.IProperty; -import net.minecraft.block.properties.PropertyEnum; -import net.minecraft.block.state.IBlockState; -import net.minecraft.init.Blocks; -import net.minecraft.nbt.NBTBase; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -public interface IBlockTransformer { - // Return true if this transformer is applicable to that block. - boolean isApplicable(final Block block, final int metadata, final TileEntity tileEntity); - - // Called when preparing to save a ship structure. - // Use this to prevent jump during critical events/animations. - boolean isJumpReady(final Block block, final int metadata, final TileEntity tileEntity, final WarpDriveText reason); - - // Called when saving a ship structure. - // Use this to save external data in the ship schematic. - // You don't need to save Block and TileEntity data here, it's already covered. - // Warning: do NOT assume that the ship will be removed! - NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity); - - // Called when removing the original ship structure, if saveExternals() returned non-null for that block. - // Use this to prevents drops, clear energy networks, etc. - // Block and TileEntity will be removed right after this call. - // When moving, the new ship is placed first. - void removeExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity); - - // Called when restoring a ship in the world. - // Use this to apply metadata & NBT rotation, right before block & tile entity placement. - // Use priority placement to ensure dependent blocks are placed first. - // Warning: do NOT place the block or tile entity! - int rotate(final Block block, final int metadata, final NBTTagCompound nbtTileEntity, final ITransformation transformation); - - // Called when placing back a ship in the world, if saveExternals() returned non-null for that block. - // Use this to restore external data from the ship schematic, right after block & tile entity placement. - // Use priority placement to ensure dependent blocks are placed first. - void restoreExternals(final World world, final BlockPos blockPos, final IBlockState blockState, final TileEntity tileEntity, final ITransformation transformation, final NBTBase nbtBase); - - // Support method to disable compatibility module on error - static Block getBlockOrThrowException(final String blockId) { - final ResourceLocation resourceLocation = new ResourceLocation(blockId); - final Block block = Block.REGISTRY.getObject(resourceLocation); - if (block == Blocks.AIR) { - //throw new RuntimeException(String.format("Invalid %s version, please report to mod author, %s is missing", resourceLocation.getNamespace(), blockId)); - } - return block; - } - - // default rotation using EnumFacing properties used in many blocks - static int rotateFirstEnumFacingProperty(final Block block, final int metadata, final byte rotationSteps) { - // find first property using EnumFacing - final IBlockState blockState = block.getStateFromMeta(metadata); - PropertyEnum propertyFacing = null; - for (final IProperty propertyKey : blockState.getPropertyKeys()) { - if (propertyKey instanceof PropertyEnum && propertyKey.getValueClass() == EnumFacing.class) { - propertyFacing = (PropertyEnum) propertyKey; - break; - } - } - if (propertyFacing != null) { - final EnumFacing facingOld = blockState.getValue(propertyFacing); - // skip vertical facings - if (facingOld == EnumFacing.DOWN || facingOld == EnumFacing.UP) { - return metadata; - } - - // turn horizontal facings - final EnumFacing facingNew; - switch (rotationSteps) { - case 1: - facingNew = facingOld.rotateY(); - break; - case 2: - facingNew = facingOld.rotateY().rotateY(); - break; - case 3: - facingNew = facingOld.rotateY().rotateY().rotateY(); - break; - default: - facingNew = facingOld; - break; - } - final IBlockState blockStateNew = blockState.withProperty(propertyFacing, facingNew); - return block.getMetaFromState(blockStateNew); - } - - return metadata; - } -} \ No newline at end of file diff --git a/src/main/java/cr0s/warpdrive/api/ITransformation.java b/src/main/java/cr0s/warpdrive/api/ITransformation.java deleted file mode 100644 index 1b83dda19..000000000 --- a/src/main/java/cr0s/warpdrive/api/ITransformation.java +++ /dev/null @@ -1,27 +0,0 @@ -package cr0s.warpdrive.api; - -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.Vec3d; -import net.minecraft.world.World; - -public interface ITransformation { - - World getTargetWorld(); - - byte getRotationSteps(); - - float getRotationYaw(); - - boolean isInside(final double x, final double y, final double z); - - boolean isInside(final int x, final int y, final int z); - - Vec3d apply(final double sourceX, final double sourceY, final double sourceZ); - - BlockPos apply(final int sourceX, final int sourceY, final int sourceZ); - - BlockPos apply(final TileEntity tileEntity); - - BlockPos apply(final BlockPos blockPos); -} \ No newline at end of file diff --git a/src/main/java/cr0s/warpdrive/api/WarpDriveText.java b/src/main/java/cr0s/warpdrive/api/WarpDriveText.java deleted file mode 100644 index 240d969ba..000000000 --- a/src/main/java/cr0s/warpdrive/api/WarpDriveText.java +++ /dev/null @@ -1,106 +0,0 @@ -package cr0s.warpdrive.api; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.Style; -import net.minecraft.util.text.TextComponentBase; -import net.minecraft.util.text.TextComponentString; -import net.minecraft.util.text.TextComponentTranslation; - -public class WarpDriveText extends TextComponentBase { - - public WarpDriveText() { - super(); - } - - public WarpDriveText(@Nullable final Style style, final long value) { - super(); - - final ITextComponent textComponent = new TextComponentString(String.format("%d", value)); - if (style != null) { - textComponent.setStyle(style); - } - append(textComponent); - } - - public WarpDriveText(@Nullable final Style style, @Nonnull final String translationKey, final Object... args) { - super(); - - final ITextComponent textComponent = new TextComponentTranslation(translationKey, args); - if (style != null) { - textComponent.setStyle(style); - } - append(textComponent); - } - - @Nonnull - @Override - public String getUnformattedComponentText() { - return ""; - } - - @Nonnull - @Override - public ITextComponent createCopy() { - final WarpDriveText warpDriveText = new WarpDriveText(); - warpDriveText.setStyle(getStyle().createShallowCopy()); - - for (final ITextComponent textComponent : getSiblings()) { - warpDriveText.appendSibling(textComponent.createCopy()); - } - - return warpDriveText; - } - - public boolean isEmpty() { - return siblings.isEmpty(); - } - - public WarpDriveText appendLineBreak() { - if (siblings.isEmpty()) { - return this; - } - appendSibling(new TextComponentString("\n")); - return this; - } - - public WarpDriveText append(@Nonnull final ITextComponent textComponent) { - if (!textComponent.getUnformattedText().isEmpty()) { - appendLineBreak(); - } - appendSibling(textComponent); - return this; - } - - public WarpDriveText append(@Nullable final Style style, @Nonnull final String translationKey, final Object... args) { - final ITextComponent textComponent = new TextComponentTranslation(translationKey, args); - if (style != null) { - textComponent.setStyle(style); - } - return append(textComponent); - } - - public WarpDriveText appendInLine(@Nullable final Style style, @Nonnull final String translationKey, final Object... args) { - final ITextComponent textComponent = new TextComponentTranslation(translationKey, args); - if (style != null) { - textComponent.setStyle(style); - } - appendSibling(textComponent); - return this; - } - - public WarpDriveText appendInLine(@Nullable final Style style, final long value) { - final ITextComponent textComponent = new TextComponentString(String.format("%d", value)); - if (style != null) { - textComponent.setStyle(style); - } - appendSibling(textComponent); - return this; - } - - public WarpDriveText appendSibling(final WarpDriveText textComponent) { - return (WarpDriveText) super.appendSibling(textComponent); - } -} \ No newline at end of file diff --git a/src/main/java/elucent/albedo/event/GatherLightsEvent.java b/src/main/java/elucent/albedo/event/GatherLightsEvent.java deleted file mode 100644 index 861f2423d..000000000 --- a/src/main/java/elucent/albedo/event/GatherLightsEvent.java +++ /dev/null @@ -1,47 +0,0 @@ -package elucent.albedo.event; - -import java.util.ArrayList; - -import com.google.common.collect.ImmutableList; - -import elucent.albedo.lighting.Light; -import net.minecraft.client.renderer.culling.ICamera; -import net.minecraft.util.math.Vec3d; -import net.minecraftforge.fml.common.eventhandler.Event; - -public class GatherLightsEvent extends Event { - private final ArrayList lights; - private final float maxDistance; - private final Vec3d cameraPosition; - private final ICamera camera; - - public GatherLightsEvent(ArrayList lights, float maxDistance, Vec3d cameraPosition, ICamera camera) { - this.lights = lights; - this.maxDistance = maxDistance; - this.cameraPosition = cameraPosition; - this.camera = camera; - } - - public ImmutableList getLightList() { - return ImmutableList.copyOf(this.lights); - } - - public float getMaxDistance() { - return this.maxDistance; - } - - public Vec3d getCameraPosition() { - return this.cameraPosition; - } - - public ICamera getCamera() { - return this.camera; - } - - public void add(Light light) {} - - @Override - public boolean isCancelable() { - return false; - } -} diff --git a/src/main/java/elucent/albedo/lighting/ILightProvider.java b/src/main/java/elucent/albedo/lighting/ILightProvider.java deleted file mode 100644 index 8068feaed..000000000 --- a/src/main/java/elucent/albedo/lighting/ILightProvider.java +++ /dev/null @@ -1,12 +0,0 @@ -package elucent.albedo.lighting; - -import elucent.albedo.event.GatherLightsEvent; -import net.minecraft.entity.Entity; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -public interface ILightProvider { - - @SideOnly(Side.CLIENT) - public abstract void gatherLights(GatherLightsEvent paramGatherLightsEvent, Entity paramEntity); -} \ No newline at end of file diff --git a/src/main/java/elucent/albedo/lighting/Light.java b/src/main/java/elucent/albedo/lighting/Light.java deleted file mode 100644 index a2c270d2d..000000000 --- a/src/main/java/elucent/albedo/lighting/Light.java +++ /dev/null @@ -1,102 +0,0 @@ -package elucent.albedo.lighting; - -import net.minecraft.entity.Entity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.Vec3d; - -public class Light { - public float x; - public float y; - public float z; - public float r; - public float g; - public float b; - public float a; - public float radius; - - public Light(float x, float y, float z, float r, float g, float b, float a, float radius) { - this.x = x; - this.y = y; - this.z = z; - this.r = r; - this.g = g; - this.b = b; - this.a = a; - this.radius = radius; - } - - public static Builder builder() { - return new Builder(); - } - - public static final class Builder { - private float x = Float.NaN; - private float y = Float.NaN; - private float z = Float.NaN; - - private float r = Float.NaN; - private float g = Float.NaN; - private float b = Float.NaN; - private float a = Float.NaN; - - private float radius = Float.NaN; - - public Builder pos(BlockPos pos) { - return pos(pos.getX() + 0.5f, pos.getY() + 0.5f, pos.getZ() + 0.5f); - } - - public Builder pos(Vec3d pos) { - return pos(pos.x, pos.y, pos.z); - } - - public Builder pos(Entity e) { - return pos(e.posX, e.posY, e.posZ); - } - - public Builder pos(double x, double y, double z) { - return pos((float) x, (float) y, (float) z); - } - - public Builder pos(float x, float y, float z) { - this.x = x; - this.y = y; - this.z = z; - return this; - } - - public Builder color(int c, boolean hasAlpha) { - return color(extract(c, 2), extract(c, 1), extract(c, 0), hasAlpha ? extract(c, 3) : 1); - } - - private float extract(int i, int idx) { - return ((i >> (idx * 8)) & 0xFF) / 255f; - } - - public Builder color(float r, float g, float b) { - return color(r, g, b, 1f); - } - - public Builder color(float r, float g, float b, float a) { - this.r = r; - this.g = g; - this.b = b; - this.a = a; - return this; - } - - public Builder radius(float radius) { - this.radius = radius; - return this; - } - - public Light build() { - if (Float.isFinite(x) && Float.isFinite(y) && Float.isFinite(z) && Float.isFinite(r) && Float.isFinite(g) && Float.isFinite(b) && Float.isFinite(a) && Float - .isFinite(radius)) { - return new Light(x, y, z, r, g, b, a, radius); - } else { - throw new IllegalArgumentException("Position, color, and radius must be set, and cannot be infinite"); - } - } - - } -} \ No newline at end of file diff --git a/src/main/java/mcjty/theoneprobe/api/ElementAlignment.java b/src/main/java/mcjty/theoneprobe/api/ElementAlignment.java deleted file mode 100644 index 0491e045f..000000000 --- a/src/main/java/mcjty/theoneprobe/api/ElementAlignment.java +++ /dev/null @@ -1,7 +0,0 @@ -package mcjty.theoneprobe.api; - -public enum ElementAlignment { - ALIGN_TOPLEFT, - ALIGN_CENTER, - ALIGN_BOTTOMRIGHT -} diff --git a/src/main/java/mcjty/theoneprobe/api/IBlockDisplayOverride.java b/src/main/java/mcjty/theoneprobe/api/IBlockDisplayOverride.java deleted file mode 100644 index ad0b01136..000000000 --- a/src/main/java/mcjty/theoneprobe/api/IBlockDisplayOverride.java +++ /dev/null @@ -1,16 +0,0 @@ -package mcjty.theoneprobe.api; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; - -/** Implement this interface if you want a custom display for your own blocks instead of the standard - * display. This can be useful if you (for example) have a multiblock and want to show a picture of the - * entire multiblock instead of the itemstack that getPickBlock() would return. */ -public interface IBlockDisplayOverride { - - /** This function returns true if you handled the probe info yourselves and TOP doesn't have to add its - * own info. */ - boolean overrideStandardInfo(ProbeMode mode, IProbeInfo probeInfo, EntityPlayer player, World world, IBlockState blockState, IProbeHitData data); - -} diff --git a/src/main/java/mcjty/theoneprobe/api/IElement.java b/src/main/java/mcjty/theoneprobe/api/IElement.java deleted file mode 100644 index 2f8998d3e..000000000 --- a/src/main/java/mcjty/theoneprobe/api/IElement.java +++ /dev/null @@ -1,23 +0,0 @@ -package mcjty.theoneprobe.api; - -import io.netty.buffer.ByteBuf; - -/** An element in the probe gui. */ -public interface IElement { - - /** Render this element at the location given by the location */ - void render(int x, int y); - - /** Get the width of this element */ - int getWidth(); - - /** Get the height of this element */ - int getHeight(); - - /** Persist this element to the given network buffer. This should be symmetrical to - * what IElementFactory.createElement() expects. */ - void toBytes(ByteBuf buf); - - /** Get the identifier for this element (as returned by ITheOneProbe.registerElementFactory() */ - int getID(); -} diff --git a/src/main/java/mcjty/theoneprobe/api/IElementFactory.java b/src/main/java/mcjty/theoneprobe/api/IElementFactory.java deleted file mode 100644 index 4352ea141..000000000 --- a/src/main/java/mcjty/theoneprobe/api/IElementFactory.java +++ /dev/null @@ -1,11 +0,0 @@ -package mcjty.theoneprobe.api; - -import io.netty.buffer.ByteBuf; - -/** A factory for elements */ -public interface IElementFactory { - - /** Create an element from a network buffer. This should be - * symmetrical to what IElement.toBytes() creates. */ - IElement createElement(ByteBuf buf); -} diff --git a/src/main/java/mcjty/theoneprobe/api/IEntityDisplayOverride.java b/src/main/java/mcjty/theoneprobe/api/IEntityDisplayOverride.java deleted file mode 100644 index 504471ebb..000000000 --- a/src/main/java/mcjty/theoneprobe/api/IEntityDisplayOverride.java +++ /dev/null @@ -1,15 +0,0 @@ -package mcjty.theoneprobe.api; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; - -/** Implement this interface if you want a custom display for your own entities instead of the standard - * display. */ -public interface IEntityDisplayOverride { - - /** This function returns true if you handled the probe info yourselves and TOP doesn't have to add its - * own info. */ - boolean overrideStandardInfo(ProbeMode mode, IProbeInfo probeInfo, EntityPlayer player, World world, Entity entity, IProbeHitEntityData data); - -} diff --git a/src/main/java/mcjty/theoneprobe/api/IEntityStyle.java b/src/main/java/mcjty/theoneprobe/api/IEntityStyle.java deleted file mode 100644 index f09492c3e..000000000 --- a/src/main/java/mcjty/theoneprobe/api/IEntityStyle.java +++ /dev/null @@ -1,20 +0,0 @@ -package mcjty.theoneprobe.api; - -/** Style for the entity element. */ -public interface IEntityStyle { - /** Change the width of the element. Default is 25 */ - IEntityStyle width(int w); - - /** Change the height of the element. Default is 25 */ - IEntityStyle height(int h); - - /** Change the scale of the entity inside the element. Default is 1.0 which - * tries to fit as good as possible. */ - IEntityStyle scale(float scale); - - int getWidth(); - - int getHeight(); - - float getScale(); -} diff --git a/src/main/java/mcjty/theoneprobe/api/IIconStyle.java b/src/main/java/mcjty/theoneprobe/api/IIconStyle.java deleted file mode 100644 index d6635a521..000000000 --- a/src/main/java/mcjty/theoneprobe/api/IIconStyle.java +++ /dev/null @@ -1,24 +0,0 @@ -package mcjty.theoneprobe.api; - -/** Style for the icon element. */ -public interface IIconStyle { - /** Change the width of the icon. Default is 16 */ - IIconStyle width(int w); - - /** Change the height of the icon. Default is 16 */ - IIconStyle height(int h); - - int getWidth(); - - int getHeight(); - - /** Change the total width of the texture on which the icon sits. Default is 256 */ - IIconStyle textureWidth(int w); - - /** Change the total height of the texture on which the icon sits. Default is 256 */ - IIconStyle textureHeight(int h); - - int getTextureWidth(); - - int getTextureHeight(); -} diff --git a/src/main/java/mcjty/theoneprobe/api/IItemStyle.java b/src/main/java/mcjty/theoneprobe/api/IItemStyle.java deleted file mode 100644 index 1ef497b1c..000000000 --- a/src/main/java/mcjty/theoneprobe/api/IItemStyle.java +++ /dev/null @@ -1,12 +0,0 @@ -package mcjty.theoneprobe.api; - -/** Style for the item element. */ -public interface IItemStyle { - IItemStyle width(int w); - - IItemStyle height(int h); - - int getWidth(); - - int getHeight(); -} diff --git a/src/main/java/mcjty/theoneprobe/api/ILayoutStyle.java b/src/main/java/mcjty/theoneprobe/api/ILayoutStyle.java deleted file mode 100644 index 84453c2f7..000000000 --- a/src/main/java/mcjty/theoneprobe/api/ILayoutStyle.java +++ /dev/null @@ -1,20 +0,0 @@ -package mcjty.theoneprobe.api; - -/** Style for a horizonatl or vertical layout. */ -public interface ILayoutStyle { - /// The color that is used for the border of the progress bar - ILayoutStyle borderColor(Integer c); - - /** The spacing to use between elements in this panel. -1 means to use default depending - * on vertical vs horizontal. */ - ILayoutStyle spacing(int f); - - /** Set the alignment of the elements inside this element. Default is ALIGN_TOPLEFT */ - ILayoutStyle alignment(ElementAlignment alignment); - - Integer getBorderColor(); - - int getSpacing(); - - ElementAlignment getAlignment(); -} diff --git a/src/main/java/mcjty/theoneprobe/api/IOverlayRenderer.java b/src/main/java/mcjty/theoneprobe/api/IOverlayRenderer.java deleted file mode 100644 index 16d68d14a..000000000 --- a/src/main/java/mcjty/theoneprobe/api/IOverlayRenderer.java +++ /dev/null @@ -1,29 +0,0 @@ -package mcjty.theoneprobe.api; - -/** Using this interface (that you can get from ITheOneProbe) you can - * do custom overlay rendering from within your mod. */ -public interface IOverlayRenderer { - - /** Return the default overlay style as configured in the The One Probe config. - * You can make modifications to this and use it for your own overlays. The - * default style will not be modified. Note that if you call this client side - * then this will also contain the settings as the player modified it locally. - * If you call this server side then you will get the default settings from the - * global config. */ - IOverlayStyle createDefaultStyle(); - - /** Create an empty default IProbeInfo (which actually represents the - * default vertical element that is always used to start with). You can then - * modify this as you wish and give it to render(). */ - IProbeInfo createProbeInfo(); - - /** Render an overlay with the given style and probe info. - * This has to be called client side and you have to call it every - * frame for as long as you want this overlay to be visible. - * - * Typically you might want to call this in a RenderGameOverlayEvent. - * - * Note that calling this does not prevent the normal overlay from - * rendering. */ - void render(IOverlayStyle style, IProbeInfo probeInfo); -} diff --git a/src/main/java/mcjty/theoneprobe/api/IOverlayStyle.java b/src/main/java/mcjty/theoneprobe/api/IOverlayStyle.java deleted file mode 100644 index 9d8caac86..000000000 --- a/src/main/java/mcjty/theoneprobe/api/IOverlayStyle.java +++ /dev/null @@ -1,46 +0,0 @@ -package mcjty.theoneprobe.api; - -/** The style for the overlay. */ -public interface IOverlayStyle { - - /** The offset of the border around the box. Use 0 to disable. */ - IOverlayStyle borderOffset(int offset); - - int getBorderOffset(); - - /** The thickness of the border around the overlay. Use 0 to disable. */ - IOverlayStyle borderThickness(int thick); - - int getBorderThickness(); - - /** The color of the border (if used). This is a 32-bit color value. - * You can use alpha if you want transparency. For example - * 0xFFFFFFFF is pure white, 0x22FF0000 is a very faint transparent red. */ - IOverlayStyle borderColor(int color); - - int getBorderColor(); - - /** The color of the box. */ - IOverlayStyle boxColor(int color); - - int getBoxColor(); - - /** The location of the overlay box. - * You can use -1 to indicate some location is not to be used. If - * the two locations on the same axis are -1 then the box will be centered - * on that axis (i.e. if leftX and rightX are both -1 then the box will be - * centered horizontally). - * If rightX is -1 but leftX is not then leftX will be the X coordinate - * of the left side of the overlay box. If rightX is specified then it will - * be the X coordinate of the right side of the overlay box. */ - IOverlayStyle location(int leftX, int rightX, int topY, int bottomY); - - int getLeftX(); - - int getRightX(); - - int getTopY(); - - int getBottomY(); - -} diff --git a/src/main/java/mcjty/theoneprobe/api/IProbeConfig.java b/src/main/java/mcjty/theoneprobe/api/IProbeConfig.java deleted file mode 100644 index 90ac41ca4..000000000 --- a/src/main/java/mcjty/theoneprobe/api/IProbeConfig.java +++ /dev/null @@ -1,98 +0,0 @@ -package mcjty.theoneprobe.api; - -/** This inerface represents the default config for The One Probe. */ -public interface IProbeConfig { - - public static enum ConfigMode { - NOT, // Don't show - NORMAL, // Show - EXTENDED // Show only when sneaking - } - - /** Control how RF should be shown - * - * @param mode - * 0 = not, 1 = show as bar, 2 = show as text */ - IProbeConfig setRFMode(int mode); - - int getRFMode(); - - /** Control how Liquid should be shown - * - * @param mode - * 0 = not, 1 = show as bar, 2 = show as text */ - IProbeConfig setTankMode(int mode); - - int getTankMode(); - - /** Lever setting is also used for other technical information like the - * comparator mode and repeater delay */ - IProbeConfig showLeverSetting(ConfigMode mode); - - ConfigMode getShowLeverSetting(); - - IProbeConfig showHorseStatSetting(ConfigMode mode); - - ConfigMode getHorseStatSetting(); - - IProbeConfig showAnimalOwnerSetting(ConfigMode mode); - - ConfigMode getAnimalOwnerSetting(); - - IProbeConfig showBrewStandSetting(ConfigMode mode); - - ConfigMode getShowBrewStandSetting(); - - IProbeConfig showMobSpawnerSetting(ConfigMode mode); - - ConfigMode getShowMobSpawnerSetting(); - - IProbeConfig showTankSetting(ConfigMode mode); - - ConfigMode getShowTankSetting(); - - IProbeConfig showModName(ConfigMode mode); - - ConfigMode getShowModName(); - - IProbeConfig showHarvestLevel(ConfigMode mode); - - ConfigMode getShowHarvestLevel(); - - IProbeConfig showCanBeHarvested(ConfigMode mode); - - ConfigMode getShowCanBeHarvested(); - - IProbeConfig showCropPercentage(ConfigMode mode); - - ConfigMode getShowCropPercentage(); - - IProbeConfig showChestContents(ConfigMode mode); - - ConfigMode getShowChestContents(); - - // This controls when detailed chest info is shown in case the amount of items is below showItemDetailThresshold - IProbeConfig showChestContentsDetailed(ConfigMode mode); - - ConfigMode getShowChestContentsDetailed(); - - IProbeConfig showRedstone(ConfigMode mode); - - ConfigMode getShowRedstone(); - - IProbeConfig showMobHealth(ConfigMode mode); - - ConfigMode getShowMobHealth(); - - IProbeConfig showMobGrowth(ConfigMode mode); - - ConfigMode getShowMobGrowth(); - - IProbeConfig showMobPotionEffects(ConfigMode mode); - - ConfigMode getShowMobPotionEffects(); - - IProbeConfig showSilverfish(ConfigMode mode); - - ConfigMode getShowSilverfish(); -} diff --git a/src/main/java/mcjty/theoneprobe/api/IProbeConfigProvider.java b/src/main/java/mcjty/theoneprobe/api/IProbeConfigProvider.java deleted file mode 100644 index 6c2d381e8..000000000 --- a/src/main/java/mcjty/theoneprobe/api/IProbeConfigProvider.java +++ /dev/null @@ -1,20 +0,0 @@ -package mcjty.theoneprobe.api; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; - -/** Implement this interface if you want to override the default - * probe config for some of your blocks or entities. */ -public interface IProbeConfigProvider { - - /** Possibly override the config for this entity. You can make modifications to the given 'config' which starts - * from default. */ - void getProbeConfig(IProbeConfig config, EntityPlayer player, World world, Entity entity, IProbeHitEntityData data); - - /** Possibly override the config for this block. You can make modifications to the given 'config' which starts - * from default. */ - void getProbeConfig(IProbeConfig config, EntityPlayer player, World world, IBlockState blockState, IProbeHitData data); - -} diff --git a/src/main/java/mcjty/theoneprobe/api/IProbeHitData.java b/src/main/java/mcjty/theoneprobe/api/IProbeHitData.java deleted file mode 100644 index 68ea9ca4e..000000000 --- a/src/main/java/mcjty/theoneprobe/api/IProbeHitData.java +++ /dev/null @@ -1,26 +0,0 @@ -package mcjty.theoneprobe.api; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.Vec3d; - -import javax.annotation.Nullable; - -/** Access information about where the probe hit the block */ -public interface IProbeHitData { - - BlockPos getPos(); - - Vec3d getHitVec(); - - EnumFacing getSideHit(); - - /** Access the client-side result of getPickBlock() for the given block. That way - * you don't have to call this server side because that can sometimes be - * problematic - * - * @return the picked block or null */ - @Nullable - ItemStack getPickBlock(); -} diff --git a/src/main/java/mcjty/theoneprobe/api/IProbeHitEntityData.java b/src/main/java/mcjty/theoneprobe/api/IProbeHitEntityData.java deleted file mode 100644 index bb2bfec50..000000000 --- a/src/main/java/mcjty/theoneprobe/api/IProbeHitEntityData.java +++ /dev/null @@ -1,9 +0,0 @@ -package mcjty.theoneprobe.api; - -import net.minecraft.util.math.Vec3d; - -/** Access information about where the probe hit the entity */ -public interface IProbeHitEntityData { - - Vec3d getHitVec(); -} diff --git a/src/main/java/mcjty/theoneprobe/api/IProbeInfo.java b/src/main/java/mcjty/theoneprobe/api/IProbeInfo.java deleted file mode 100644 index e32e457c3..000000000 --- a/src/main/java/mcjty/theoneprobe/api/IProbeInfo.java +++ /dev/null @@ -1,95 +0,0 @@ -package mcjty.theoneprobe.api; - -import net.minecraft.entity.Entity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; - -/** Information to return to the probe. Most methods here return the same probe info - * object so that you can chain: - * probeInfo.item(diamond).text("My diamond").text("Next line"); - * - * horizontal() and vertical() are exceptions. They return a new probe info object - * representing the new horizontal or vertical layout that was created. Keep that in mind! - * - * Note that you can safeul use TextFormatting color codes in the text. */ -public interface IProbeInfo { - - /// Use STARTLOC/ENDLOC in your strings for localization on the client - public static final String STARTLOC = "{*"; - public static final String ENDLOC = "*}"; - - /** Create a default layout style for the horizontal or vertical elements */ - ILayoutStyle defaultLayoutStyle(); - - /** Create a default style for the progress bar */ - IProgressStyle defaultProgressStyle(); - - /** Create a default style for the text element */ - ITextStyle defaultTextStyle(); - - /** Create a default style for the item element */ - IItemStyle defaultItemStyle(); - - /** Create a default style for the entity element */ - IEntityStyle defaultEntityStyle(); - - /** Create a default style for the icon element */ - IIconStyle defaultIconStyle(); - - /** Create an icon. If u and v are -1 then the default texture atlas is used - * and TheOneProbe will try to find the resource location on that atlas */ - IProbeInfo icon(ResourceLocation icon, int u, int v, int w, int h, IIconStyle style); - - IProbeInfo icon(ResourceLocation icon, int u, int v, int w, int h); - - /** entityName can be an old-style entity name (like 'Zombie') or the string - * representation of a resourcelocation (like 'minecraft:zombie') */ - IProbeInfo entity(String entityName, IEntityStyle style); - - IProbeInfo entity(String entityName); - - IProbeInfo entity(Entity entity, IEntityStyle style); - - IProbeInfo entity(Entity entity); - - /** Note that you can include TextStyleClass info in the given text which - * will be translated to the right style client-side. You can also - * include STARTLOC/ENDLOC tags to force translation to localized - * data on the client */ - IProbeInfo text(String text, ITextStyle style); - - IProbeInfo text(String text); - - IProbeInfo item(ItemStack stack, IItemStyle style); - - IProbeInfo item(ItemStack stack); - - /** A localized name of the stack */ - IProbeInfo itemLabel(ItemStack stack, ITextStyle style); - - IProbeInfo itemLabel(ItemStack stack); - - /** This creates a progress bar of 100 width */ - IProbeInfo progress(int current, int max, IProgressStyle style); - - IProbeInfo progress(int current, int max); - - IProbeInfo progress(long current, long max, IProgressStyle style); - - IProbeInfo progress(long current, long max); - - /** Create a new horizontal probe info as a child of this one. Note that the returned - * probe info is the new horizontal layout and not this one! */ - IProbeInfo horizontal(ILayoutStyle style); - - IProbeInfo horizontal(); - - /** Create a new vertical probe info as a child of this one. Note that the returned - * probe info is the new horizontal layout and not this one! */ - IProbeInfo vertical(ILayoutStyle style); - - IProbeInfo vertical(); - - /** Add a custom element. Make sure the factory for this element is properly registered. */ - IProbeInfo element(IElement element); -} diff --git a/src/main/java/mcjty/theoneprobe/api/IProbeInfoAccessor.java b/src/main/java/mcjty/theoneprobe/api/IProbeInfoAccessor.java deleted file mode 100644 index 003e4269e..000000000 --- a/src/main/java/mcjty/theoneprobe/api/IProbeInfoAccessor.java +++ /dev/null @@ -1,17 +0,0 @@ -package mcjty.theoneprobe.api; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; - -/** You can implement this in your block implementation if you want to support - * the probe. An alternative to this is to make an IProveInfoProvider. - * Note that if you implement this then it will be called last (after all the providers) */ -public interface IProbeInfoAccessor { - - /** Add information for the probe info for the given block. This is always - * called server side. - * The given probeInfo object represents a vertical layout. So adding elements to that - * will cause them to be grouped vertically. */ - void addProbeInfo(ProbeMode mode, IProbeInfo probeInfo, EntityPlayer player, World world, IBlockState blockState, IProbeHitData data); -} diff --git a/src/main/java/mcjty/theoneprobe/api/IProbeInfoEntityAccessor.java b/src/main/java/mcjty/theoneprobe/api/IProbeInfoEntityAccessor.java deleted file mode 100644 index d662f1b95..000000000 --- a/src/main/java/mcjty/theoneprobe/api/IProbeInfoEntityAccessor.java +++ /dev/null @@ -1,17 +0,0 @@ -package mcjty.theoneprobe.api; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; - -/** You can implement this in your entity implementation if you want to support - * the probe. An alternative to this is to make an IProveInfoProvider. - * Note that if you implement this then it will be called last (after all the providers) */ -public interface IProbeInfoEntityAccessor { - - /** Add information for the probe info for the given entity. This is always - * called server side. - * The given probeInfo object represents a vertical layout. So adding elements to that - * will cause them to be grouped vertically. */ - void addProbeInfo(ProbeMode mode, IProbeInfo probeInfo, EntityPlayer player, World world, Entity entity, IProbeHitEntityData data); -} diff --git a/src/main/java/mcjty/theoneprobe/api/IProbeInfoEntityProvider.java b/src/main/java/mcjty/theoneprobe/api/IProbeInfoEntityProvider.java deleted file mode 100644 index 26a772c00..000000000 --- a/src/main/java/mcjty/theoneprobe/api/IProbeInfoEntityProvider.java +++ /dev/null @@ -1,22 +0,0 @@ -package mcjty.theoneprobe.api; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; - -/** You can implement IProbeInfoEntityAccessor in your entities or else you can use - * this and register that to the ITheOneProbe. Note that TheOneProbe already - * adds default providers which gives basic entity information. */ -public interface IProbeInfoEntityProvider { - - /** Return a unique ID (usually combined with the modid) to identify this provider. - * - * @return */ - String getID(); - - /** Add information for the probe info for the given entity. This is always called - * server side. - * The given probeInfo object represents a vertical layout. So adding elements to that - * will cause them to be grouped vertically. */ - void addProbeEntityInfo(ProbeMode mode, IProbeInfo probeInfo, EntityPlayer player, World world, Entity entity, IProbeHitEntityData data); -} diff --git a/src/main/java/mcjty/theoneprobe/api/IProbeInfoProvider.java b/src/main/java/mcjty/theoneprobe/api/IProbeInfoProvider.java deleted file mode 100644 index de647df32..000000000 --- a/src/main/java/mcjty/theoneprobe/api/IProbeInfoProvider.java +++ /dev/null @@ -1,22 +0,0 @@ -package mcjty.theoneprobe.api; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; - -/** You can implement IProbeInfoAccessor in your blocks or else you can use - * this and register that to the ITheOneProbe. Note that TheOneProbe already - * adds default providers which gives basic block information. */ -public interface IProbeInfoProvider { - - /** Return a unique ID (usually combined with the modid) to identify this provider. - * - * @return */ - String getID(); - - /** Add information for the probe info for the given block. This is always called - * server side. - * The given probeInfo object represents a vertical layout. So adding elements to that - * will cause them to be grouped vertically. */ - void addProbeInfo(ProbeMode mode, IProbeInfo probeInfo, EntityPlayer player, World world, IBlockState blockState, IProbeHitData data); -} diff --git a/src/main/java/mcjty/theoneprobe/api/IProgressStyle.java b/src/main/java/mcjty/theoneprobe/api/IProgressStyle.java deleted file mode 100644 index 089774d28..000000000 --- a/src/main/java/mcjty/theoneprobe/api/IProgressStyle.java +++ /dev/null @@ -1,59 +0,0 @@ -package mcjty.theoneprobe.api; - -/** Style for the progress bar. */ -public interface IProgressStyle { - /// The color that is used for the border of the progress bar - IProgressStyle borderColor(int c); - - /// The color that is used for the background of the progress bar - IProgressStyle backgroundColor(int c); - - /// The color that is used for the filled part of the progress bar - IProgressStyle filledColor(int c); - - /// If this is different from the filledColor then the fill color will alternate - IProgressStyle alternateFilledColor(int c); - - /// If true then text is shown inside the progress bar - IProgressStyle showText(boolean b); - - /// The number format to use for the text inside the progress bar - IProgressStyle numberFormat(NumberFormat f); - - IProgressStyle prefix(String prefix); - - IProgressStyle suffix(String suffix); - - /// If the progressbar is a lifebar then this is the maximum width - IProgressStyle width(int w); - - IProgressStyle height(int h); - - IProgressStyle lifeBar(boolean b); - - IProgressStyle armorBar(boolean b); - - int getBorderColor(); - - int getBackgroundColor(); - - int getFilledColor(); - - int getAlternatefilledColor(); - - boolean isShowText(); - - NumberFormat getNumberFormat(); - - String getPrefix(); - - String getSuffix(); - - int getWidth(); - - int getHeight(); - - boolean isLifeBar(); - - boolean isArmorBar(); -} diff --git a/src/main/java/mcjty/theoneprobe/api/ITextStyle.java b/src/main/java/mcjty/theoneprobe/api/ITextStyle.java deleted file mode 100644 index 047a1bbdb..000000000 --- a/src/main/java/mcjty/theoneprobe/api/ITextStyle.java +++ /dev/null @@ -1,4 +0,0 @@ -package mcjty.theoneprobe.api; - -/** Style for the text element. */ -public interface ITextStyle {} diff --git a/src/main/java/mcjty/theoneprobe/api/ITheOneProbe.java b/src/main/java/mcjty/theoneprobe/api/ITheOneProbe.java deleted file mode 100644 index c74640640..000000000 --- a/src/main/java/mcjty/theoneprobe/api/ITheOneProbe.java +++ /dev/null @@ -1,69 +0,0 @@ -package mcjty.theoneprobe.api; - -/** Main interface for this mod. Use this to build probe information - * Get a reference to an implementation of this interface by calling: - * FMLInterModComms.sendFunctionMessage("theoneprobe", "getTheOneProbe", ".YourClass$GetTheOneProbe"); */ -public interface ITheOneProbe { - - /** Optionally register a provider for your probe information. You don't have to do this. You - * can also implement IProbeInfoAccessor in your block instead. If you register a provider - * with the same string ID as one that already exists it will replace that provider. This - * is one way to replace the standard providers. TheOneProbe has the following standard - * providers (registered in the given order): - * - * - "theoneprobe:default": this is the default provider that takes care of showing - * the block icon, name and modid as well as the harvest level of the block and other - * basic information - * - "theoneprobe:debug": this provider shows debug information if the creative probe - * is being used. - * - "theoneprobe:block": this provider will check if the block has an IProbeInfoAccessor - * and then use that. i.e. this is the provider that takes care of making sure - * that IProbeInfoAccessor works. - * - * @param provider - */ - void registerProvider(IProbeInfoProvider provider); - - /** Optionally register a provider for your probe information. You don't have to do this. You - * can also implement IProbeInfoAccessor in your block instead. If you register a provider - * with the same string ID as one that already exists it will replace that provider. This - * is one way to replace the standard providers. TheOneProbe has the following standard - * providers (registered in the given order): - * - * - "theoneprobe:entity.default": this is the default provider that takes care of showing - * the entity name and modid as well as the current health of the entity. - * - "theoneprobe:entity.debug": this provider shows debug information if the creative probe - * is being used. - * - "theoneprobe:entity.entity": this provider will check if the entity has an IProbeInfoEntityAccessor - * and then use that. i.e. this is the provider that takes care of making sure - * that IProbeInfoEntityAccessor works. - * - * @param provider - */ - void registerEntityProvider(IProbeInfoEntityProvider provider); - - /** Register an element factory. - * - * @return an id to use when defining elements using this factory */ - int registerElementFactory(IElementFactory factory); - - /** Get the element factory for a given ID. */ - IElementFactory getElementFactory(int id); - - /** Get the overlay renderer. You can use this to do your own custom overlay rendering - * (besides what The One Probe already does). */ - IOverlayRenderer getOverlayRenderer(); - - /** Register a probe config provider so that you can override the default - * config for your own blocks or entities. Note that you have to register - * this server side. */ - void registerProbeConfigProvider(IProbeConfigProvider provider); - - /** Register a block display override implementation so that you can change how the standard - * block information is shown for your blocks. */ - void registerBlockDisplayOverride(IBlockDisplayOverride override); - - /** Register an entity display override implementation so that you can change how the standard - * entity information is shown for your entities. */ - void registerEntityDisplayOverride(IEntityDisplayOverride override); -} diff --git a/src/main/java/mcjty/theoneprobe/api/NumberFormat.java b/src/main/java/mcjty/theoneprobe/api/NumberFormat.java deleted file mode 100644 index 689c07d64..000000000 --- a/src/main/java/mcjty/theoneprobe/api/NumberFormat.java +++ /dev/null @@ -1,8 +0,0 @@ -package mcjty.theoneprobe.api; - -public enum NumberFormat { - FULL, // Full format - COMPACT, // Compact format (like 3.5M) - COMMAS, // Language dependent comma separated format - NONE // No output (empty string) -} diff --git a/src/main/java/mcjty/theoneprobe/api/ProbeMode.java b/src/main/java/mcjty/theoneprobe/api/ProbeMode.java deleted file mode 100644 index eb6474ca6..000000000 --- a/src/main/java/mcjty/theoneprobe/api/ProbeMode.java +++ /dev/null @@ -1,10 +0,0 @@ -package mcjty.theoneprobe.api; - -/** A mode that indicates what kind of information we want to display. - * In your IProbeInfoAccessor or IProbeInfoProvider you can use this mode - * to show different information. */ -public enum ProbeMode { - NORMAL, // Normal display. What a user expects to see - EXTENDED, // Extended. This is used when the player is sneaking - DEBUG // Creative only. This is used when the player holds a creative probe -} diff --git a/src/main/java/mcjty/theoneprobe/api/TextStyleClass.java b/src/main/java/mcjty/theoneprobe/api/TextStyleClass.java deleted file mode 100644 index e5b9ca1bb..000000000 --- a/src/main/java/mcjty/theoneprobe/api/TextStyleClass.java +++ /dev/null @@ -1,38 +0,0 @@ -package mcjty.theoneprobe.api; - -/** Represent a style for text. This style is configurable by the user and used server-side. - * Use it like you would use a TextFormatting in your strings. i.e.: - * probeInfo.text(TextStyleClass.ERROR + "Error! World will explode in 5 seconds!"); */ -public enum TextStyleClass { - MODNAME("m", "ModName"), // Name of the mod - NAME("n", "Name"), // Name of the block or entity - INFO("i", "Info"), // General info, neutral - INFOIMP("I", "InfoImportant"), // General info, important - WARNING("w", "Warning"), // Warning, something is not ready (not mature), or missing stuff - ERROR("e", "Error"), // Error, bad situation, out of power, things like that - OBSOLETE("O", "Obsolete"), // Obsolete, deprecated, old information - LABEL("l", "Label"), // A label, use the 'context' code to set the same as the style that follows - OK("o", "Ok"), // Status ok - PROGRESS("p", "Progress"); // Progress rendering in case the bar is not used - - private final String code; - private final String readableName; - - TextStyleClass(String code, String readableName) { - this.code = code; - this.readableName = readableName; - } - - public String getCode() { - return code; - } - - public String getReadableName() { - return readableName; - } - - @Override - public String toString() { - return "{=" + code + "=}"; - } -} diff --git a/src/main/java/mcjty/theoneprobe/api/package-info.java b/src/main/java/mcjty/theoneprobe/api/package-info.java deleted file mode 100644 index fa6d0b0aa..000000000 --- a/src/main/java/mcjty/theoneprobe/api/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -@API(apiVersion = "1.4.4", owner = "theoneprobe", provides = "theoneprobe_api") -package mcjty.theoneprobe.api; - -import net.minecraftforge.fml.common.API; \ No newline at end of file diff --git a/src/main/java/mcp/mobius/waila/api/ITaggedList.java b/src/main/java/mcp/mobius/waila/api/ITaggedList.java deleted file mode 100644 index 2916139e0..000000000 --- a/src/main/java/mcp/mobius/waila/api/ITaggedList.java +++ /dev/null @@ -1,29 +0,0 @@ -package mcp.mobius.waila.api; - -import java.util.Collection; -import java.util.List; -import java.util.Set; - -public interface ITaggedList extends List { - boolean add(E e, T tag); - - boolean add(E e, Collection taglst); - - Set getTags(E e); - - Set getTags(int index); - - void addTag(E e, T tag); - - void addTag(int index, T tag); - - void removeTag(E e, T tag); - - void removeTag(int index, T tag); - - Set getEntries(T tag); - - void removeEntries(T tag); - - String getTagsAsString(E e); -} diff --git a/src/main/java/mcp/mobius/waila/api/IWailaBlockDecorator.java b/src/main/java/mcp/mobius/waila/api/IWailaBlockDecorator.java deleted file mode 100644 index b387a52c8..000000000 --- a/src/main/java/mcp/mobius/waila/api/IWailaBlockDecorator.java +++ /dev/null @@ -1,26 +0,0 @@ -package mcp.mobius.waila.api; - -import net.minecraft.item.ItemStack; - -import javax.annotation.Nonnull; - -/** Callback class interface used to provide Block/TileEntity decorator.
- * All methods in this interface shouldn't to be called by the implementing mod. An instance of the class is to be - * registered to Waila via the {@link IWailaRegistrar} instance provided in the original registration callback method - * (cf. {@link IWailaRegistrar} documentation for more information). - * - * @author ProfMobius */ -public interface IWailaBlockDecorator { - - /** Callback for the decorator. It provides a standard GL stack positioned on the block.
- * Will be used if the implementing class is registered via {@link IWailaRegistrar#registerDecorator}.
- * - * @param itemStack - * Current block scanned, in ItemStack form. - * @param accessor - * Contains most of the relevant information about the current environment. - * @param config - * Current configuration of Waila. */ - void decorateBlock(@Nonnull ItemStack itemStack, @Nonnull IWailaDataAccessor accessor, @Nonnull IWailaConfigHandler config); - -} diff --git a/src/main/java/mcp/mobius/waila/api/IWailaCommonAccessor.java b/src/main/java/mcp/mobius/waila/api/IWailaCommonAccessor.java deleted file mode 100644 index 5bcd78d1a..000000000 --- a/src/main/java/mcp/mobius/waila/api/IWailaCommonAccessor.java +++ /dev/null @@ -1,64 +0,0 @@ -package mcp.mobius.waila.api; - -import net.minecraft.block.Block; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.Vec3d; -import net.minecraft.world.World; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -/** The Accessor is used to get some basic data out of the game without having to request direct access to the game engine.
- * It will also return things that are unmodified by the overriding systems (like getWailaStack).
- * Common accessor for both Entity and Block/TileEntity.
- * Available data depends on what it is called upon (ie : getEntity() will return null if looking at a block, etc).
- */ -public interface IWailaCommonAccessor { - - @Nonnull - World getWorld(); - - @Nonnull - EntityPlayer getPlayer(); - - @Nonnull - Block getBlock(); - - int getBlockID(); - - @Nonnull - String getBlockQualifiedName(); - - int getMetadata(); - - @Nullable - TileEntity getTileEntity(); - - @Nullable - Entity getEntity(); - - @Nonnull - BlockPos getPosition(); - - @Nullable - Vec3d getRenderingPosition(); - - @Nonnull - NBTTagCompound getNBTData(); - - int getNBTInteger(NBTTagCompound tag, String keyname); - - double getPartialFrame(); - - @Nullable - EnumFacing getSide(); - - @Nonnull - ItemStack getStack(); -} diff --git a/src/main/java/mcp/mobius/waila/api/IWailaConfigHandler.java b/src/main/java/mcp/mobius/waila/api/IWailaConfigHandler.java deleted file mode 100644 index cd063f8ff..000000000 --- a/src/main/java/mcp/mobius/waila/api/IWailaConfigHandler.java +++ /dev/null @@ -1,41 +0,0 @@ -package mcp.mobius.waila.api; - -import javax.annotation.Nonnull; -import java.util.HashMap; -import java.util.Set; - -/** Read-only interface for Waila internal config storage.
- * An instance of this interface is passed to most of Waila callbacks as a way to change the behavior depending on client settings. - * - * @author ProfMobius */ -public interface IWailaConfigHandler { - /** Returns a set of all the currently loaded modules in the config handler. - * - * @return a set of all the currently loaded modules in the config handler. */ - @Nonnull - Set getModuleNames(); - - /** Returns all the currently available options for a given module - * - * @param modName - * Module name - * @return all the currently available options for a given module */ - @Nonnull - HashMap getConfigKeys(String modName); - - /** Returns the current value of an option (true/false) with a default value if not set. - * - * @param key - * Option to lookup - * @param defvalue - * Default values - * @return Value of the option or defvalue if not set. */ - boolean getConfig(String key, boolean defvalue); - - /** Returns the current value of an option (true/false) with a default value true if not set - * - * @param key - * Option to lookup - * @return Value of the option or true if not set. */ - boolean getConfig(String key); -} diff --git a/src/main/java/mcp/mobius/waila/api/IWailaDataAccessor.java b/src/main/java/mcp/mobius/waila/api/IWailaDataAccessor.java deleted file mode 100644 index 04888f72d..000000000 --- a/src/main/java/mcp/mobius/waila/api/IWailaDataAccessor.java +++ /dev/null @@ -1,65 +0,0 @@ -package mcp.mobius.waila.api; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.util.math.Vec3d; -import net.minecraft.world.World; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -/** The Accessor is used to get some basic data out of the game without having to request direct access to the game engine.
- * It will also return things that are unmodified by the overriding systems (like getWailaStack).
- * An instance of this interface is passed to most of Waila Block/TileEntity callbacks. - * - * @author ProfMobius */ - -public interface IWailaDataAccessor { - - @Nonnull - World getWorld(); - - @Nonnull - EntityPlayer getPlayer(); - - @Nonnull - Block getBlock(); - - //int getBlockID(); - int getMetadata(); - - @Nonnull - IBlockState getBlockState(); - - @Nullable - TileEntity getTileEntity(); - - @Nonnull - RayTraceResult getMOP(); - - @Nonnull - BlockPos getPosition(); - - @Nullable - Vec3d getRenderingPosition(); - - @Nonnull - NBTTagCompound getNBTData(); - - int getNBTInteger(NBTTagCompound tag, String keyname); - - double getPartialFrame(); - - @Nonnull - EnumFacing getSide(); - - @Nonnull - ItemStack getStack(); -} diff --git a/src/main/java/mcp/mobius/waila/api/IWailaDataProvider.java b/src/main/java/mcp/mobius/waila/api/IWailaDataProvider.java deleted file mode 100644 index dc55436a0..000000000 --- a/src/main/java/mcp/mobius/waila/api/IWailaDataProvider.java +++ /dev/null @@ -1,149 +0,0 @@ -package mcp.mobius.waila.api; - -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import javax.annotation.Nonnull; -import java.util.List; - -/** Callback class interface used to provide Block/TileEntity tooltip informations to Waila.
- * All methods in this interface shouldn't to be called by the implementing mod. An instance of the class is to be - * registered to Waila via the {@link IWailaRegistrar} instance provided in the original registration callback method - * (cf. {@link IWailaRegistrar} documentation for more information). - * - * @author ProfMobius */ -public interface IWailaDataProvider { - - /** Callback used to override the default Waila lookup system.
- * Will only be called if the implementing class is registered via {@link IWailaRegistrar#registerStackProvider}.
- *

- * You may return null if you have not registered this as a stack provider. However, you should return an empty ItemStack - * to be safe. - *

- * While this is annotated with {@link Nonnull}, nulls are still accepted. This is to give plugins a chance to move - * over. - *

- * This method is only called on the client side. If you require data from the server, you should also implement - * {@link #getNBTData(EntityPlayerMP, TileEntity, NBTTagCompound, World, BlockPos)} and add the data to the {@link NBTTagCompound} - * there, which can then be read back using {@link IWailaDataAccessor#getNBTData()}. If you rely on the client knowing - * the data you need, you are not guaranteed to have the proper values. - * - * @param accessor - * Contains most of the relevant information about the current environment. - * @param config - * Current configuration of Waila. - * @return {@link ItemStack#EMPTY} if override is not required, a non-empty ItemStack otherwise. */ - @Nonnull - default ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) { - return accessor.getStack(); - } - - /** Callback used to add lines to one of the three sections of the tooltip (Head, Body, Tail).
- * Will only be called if the implementing class is registered via {@link IWailaRegistrar#registerHeadProvider}.
- * You are supposed to always return the modified input tooltip.
- *

- * You may return null if you have not registered this as a head provider. However, you should return the provided list - * to be safe. - *

- * This method is only called on the client side. If you require data from the server, you should also implement - * {@link #getNBTData(EntityPlayerMP, TileEntity, NBTTagCompound, World, BlockPos)} and add the data to the {@link NBTTagCompound} - * there, which can then be read back using {@link IWailaDataAccessor#getNBTData()}. If you rely on the client knowing - * the data you need, you are not guaranteed to have the proper values. - * - * @param itemStack - * Current block scanned, in ItemStack form. - * @param tooltip - * Current list of tooltip lines (might have been processed by other providers and might be processed - * by other providers). - * @param accessor - * Contains most of the relevant information about the current environment. - * @param config - * Current configuration of Waila. - * @return Modified input tooltip */ - @Nonnull - default List getWailaHead(ItemStack itemStack, List tooltip, IWailaDataAccessor accessor, IWailaConfigHandler config) { - return tooltip; - } - - /** Callback used to add lines to one of the three sections of the tooltip (Head, Body, Tail).
- * Will only be called if the implementing class is registered via {@link IWailaRegistrar#registerBodyProvider}.
- * You are supposed to always return the modified input tooltip.
- *

- * You may return null if you have not registered this as a body provider. However, you should return the provided list - * to be safe. - *

- * This method is only called on the client side. If you require data from the server, you should also implement - * {@link #getNBTData(EntityPlayerMP, TileEntity, NBTTagCompound, World, BlockPos)} and add the data to the {@link NBTTagCompound} - * there, which can then be read back using {@link IWailaDataAccessor#getNBTData()}. If you rely on the client knowing - * the data you need, you are not guaranteed to have the proper values. - * - * @param itemStack - * Current block scanned, in ItemStack form. - * @param tooltip - * Current list of tooltip lines (might have been processed by other providers and might be processed - * by other providers). - * @param accessor - * Contains most of the relevant information about the current environment. - * @param config - * Current configuration of Waila. - * @return Modified input tooltip */ - @Nonnull - default List getWailaBody(ItemStack itemStack, List tooltip, IWailaDataAccessor accessor, IWailaConfigHandler config) { - return tooltip; - } - - /** Callback used to add lines to one of the three sections of the tooltip (Head, Body, Tail).
- * Will only be called if the implementing class is registered via {@link IWailaRegistrar#registerTailProvider}.
- * You are supposed to always return the modified input tooltip.
- *

- * You may return null if you have not registered this as a tail provider. However, you should return the provided list - * to be safe. - *

- * This method is only called on the client side. If you require data from the server, you should also implement - * {@link #getNBTData(EntityPlayerMP, TileEntity, NBTTagCompound, World, BlockPos)} and add the data to the {@link NBTTagCompound} - * there, which can then be read back using {@link IWailaDataAccessor#getNBTData()}. If you rely on the client knowing - * the data you need, you are not guaranteed to have the proper values. - * - * @param itemStack - * Current block scanned, in ItemStack form. - * @param tooltip - * Current list of tooltip lines (might have been processed by other providers and might be processed by other providers). - * @param accessor - * Contains most of the relevant information about the current environment. - * @param config - * Current configuration of Waila. - * @return Modified input tooltip */ - @Nonnull - default List getWailaTail(ItemStack itemStack, List tooltip, IWailaDataAccessor accessor, IWailaConfigHandler config) { - return tooltip; - } - - /** Callback used server side to return a custom synchronization NBTTagCompound.
- * Will only be called if the implementing class is registered via {@link IWailaRegistrar#registerNBTProvider}.
- * You are supposed to always return the modified input NBTTagCompound tag.
- *

- * You may return null if you have not registered this as an NBT provider. However, you should return the provided - * tag to be safe. - *

- * - * @param player - * The player requesting data synchronization (The owner of the current connection). - * @param te - * The TileEntity targeted for synchronization. - * @param tag - * Current synchronization tag (might have been processed by other providers and might be processed by - * other providers). - * @param world - * TileEntity's World. - * @param pos - * Position of the TileEntity. - * @return Modified input NBTTagCompound tag. */ - @Nonnull - default NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, BlockPos pos) { - return tag; - } -} diff --git a/src/main/java/mcp/mobius/waila/api/IWailaEntityAccessor.java b/src/main/java/mcp/mobius/waila/api/IWailaEntityAccessor.java deleted file mode 100644 index 3f109ad2a..000000000 --- a/src/main/java/mcp/mobius/waila/api/IWailaEntityAccessor.java +++ /dev/null @@ -1,42 +0,0 @@ -package mcp.mobius.waila.api; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.util.math.Vec3d; -import net.minecraft.world.World; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -/** The Accessor is used to get some basic data out of the game without having to request direct access to the game engine.
- * It will also return things that are unmodified by the overriding systems (like getWailaStack).
- * An instance of this interface is passed to most of Waila Entity callbacks. - * - * @author ProfMobius */ - -public interface IWailaEntityAccessor { - - @Nonnull - World getWorld(); - - @Nonnull - EntityPlayer getPlayer(); - - @Nonnull - Entity getEntity(); - - @Nonnull - RayTraceResult getMOP(); - - @Nullable - Vec3d getRenderingPosition(); - - @Nonnull - NBTTagCompound getNBTData(); - - int getNBTInteger(NBTTagCompound tag, String keyname); - - double getPartialFrame(); -} diff --git a/src/main/java/mcp/mobius/waila/api/IWailaEntityProvider.java b/src/main/java/mcp/mobius/waila/api/IWailaEntityProvider.java deleted file mode 100644 index 1f5193d43..000000000 --- a/src/main/java/mcp/mobius/waila/api/IWailaEntityProvider.java +++ /dev/null @@ -1,131 +0,0 @@ -package mcp.mobius.waila.api; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import java.util.List; - -/** Callback class interface used to provide Entity tooltip informations to Waila.
- * All methods in this interface shouldn't to be called by the implementing mod. An instance of the class is to be - * registered to Waila via the {@link IWailaRegistrar} instance provided in the original registration callback method - * (cf. {@link IWailaRegistrar} documentation for more information). - * - * @author ProfMobius */ -public interface IWailaEntityProvider { - - /** Callback used to override the default Waila lookup system.
- * Will only be called if the implementing class is registered via {@link IWailaRegistrar#registerOverrideEntityProvider}.
- * - * @param accessor - * Contains most of the relevant information about the current environment. - * @param config - * Current configuration of Waila. - * @return null if override is not required, an Entity otherwise. */ - @Nullable - default Entity getWailaOverride(IWailaEntityAccessor accessor, IWailaConfigHandler config) { - return null; - } - - /** Callback used to add lines to one of the three sections of the tooltip (Head, Body, Tail).
- * Will only be called if the implementing class is registered via {@link IWailaRegistrar#registerHeadProvider}.
- * You are supposed to always return the modified input currenttip.
- *

- * You may return null if you have not registered this as a head provider. However, you should return the provided list - * to be safe. - *

- * This method is only called on the client side. If you require data from the server, you should also implement - * {@link #getNBTData(EntityPlayerMP, Entity, NBTTagCompound, World)} and add the data to the {@link NBTTagCompound} - * there, which can then be read back using {@link IWailaDataAccessor#getNBTData()}. If you rely on the client knowing - * the data you need, you are not guaranteed to have the proper values. - * - * @param entity - * Current Entity scanned. - * @param currenttip - * Current list of tooltip lines (might have been processed by other providers and might be processed by other providers). - * @param accessor - * Contains most of the relevant information about the current environment. - * @param config - * Current configuration of Waila. - * @return Modified input currenttip */ - @Nonnull - default List getWailaHead(Entity entity, List currenttip, IWailaEntityAccessor accessor, IWailaConfigHandler config) { - return currenttip; - } - - /** Callback used to add lines to one of the three sections of the tooltip (Head, Body, Tail).
- * Will only be called if the implementing class is registered via {@link IWailaRegistrar#registerBodyProvider}.
- * You are supposed to always return the modified input currenttip.
- *

- * You may return null if you have not registered this as a body provider. However, you should return the provided list - * to be safe. - *

- * This method is only called on the client side. If you require data from the server, you should also implement - * {@link #getNBTData(EntityPlayerMP, Entity, NBTTagCompound, World)} and add the data to the {@link NBTTagCompound} - * there, which can then be read back using {@link IWailaDataAccessor#getNBTData()}. If you rely on the client knowing - * the data you need, you are not guaranteed to have the proper values. - * - * @param entity - * Current Entity scanned. - * @param currenttip - * Current list of tooltip lines (might have been processed by other providers and might be processed by other providers). - * @param accessor - * Contains most of the relevant information about the current environment. - * @param config - * Current configuration of Waila. - * @return Modified input currenttip */ - @Nonnull - default List getWailaBody(Entity entity, List currenttip, IWailaEntityAccessor accessor, IWailaConfigHandler config) { - return currenttip; - } - - /** Callback used to add lines to one of the three sections of the tooltip (Head, Body, Tail).
- * Will only be called if the implementing class is registered via {@link IWailaRegistrar#registerTailProvider}.
- * You are supposed to always return the modified input currenttip.
- *

- * You may return null if you have not registered this as a tail provider. However, you should return the provided list - * to be safe. - *

- * This method is only called on the client side. If you require data from the server, you should also implement - * {@link #getNBTData(EntityPlayerMP, Entity, NBTTagCompound, World)} and add the data to the {@link NBTTagCompound} - * there, which can then be read back using {@link IWailaDataAccessor#getNBTData()}. If you rely on the client knowing - * the data you need, you are not guaranteed to have the proper values. - * - * @param entity - * Current Entity scanned. - * @param currenttip - * Current list of tooltip lines (might have been processed by other providers and might be processed by other providers). - * @param accessor - * Contains most of the relevant information about the current environment. - * @param config - * Current configuration of Waila. - * @return Modified input currenttip */ - @Nonnull - default List getWailaTail(Entity entity, List currenttip, IWailaEntityAccessor accessor, IWailaConfigHandler config) { - return currenttip; - } - - /** Callback used server side to return a custom synchronization NBTTagCompound.
- * Will only be called if the implementing class is registered via {@link IWailaRegistrar#registerNBTProvider}.
- * You are supposed to always return the modified input NBTTagCompound tag.
- *

- * You may return null if you have not registered this as an NBT provider. However, you should return the provided tag - * to be safe. - * - * @param player - * The player requesting data synchronization (The owner of the current connection). - * @param ent - * The Entity targeted for synchronization. - * @param tag - * Current synchronization tag (might have been processed by other providers and might be processed by other providers). - * @param world - * TileEntity's World. - * @return Modified input NBTTagCompound tag. */ - @Nonnull - default NBTTagCompound getNBTData(EntityPlayerMP player, Entity ent, NBTTagCompound tag, World world) { - return tag; - } -} diff --git a/src/main/java/mcp/mobius/waila/api/IWailaFMPAccessor.java b/src/main/java/mcp/mobius/waila/api/IWailaFMPAccessor.java deleted file mode 100644 index 13c77b092..000000000 --- a/src/main/java/mcp/mobius/waila/api/IWailaFMPAccessor.java +++ /dev/null @@ -1,37 +0,0 @@ -package mcp.mobius.waila.api; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.util.math.Vec3d; -import net.minecraft.world.World; - -/** The Accessor is used to get some basic data out of the game without having to request direct access to the game engine.
- * It will also return things that are unmodified by the overriding systems (like getWailaStack).
- * An instance of this interface is passed to most of Waila FMP callbacks. - * - * @author ProfMobius - * @deprecated FMP is neither updated nor supported. */ -@Deprecated -public interface IWailaFMPAccessor { - World getWorld(); - - EntityPlayer getPlayer(); - - TileEntity getTileEntity(); - - RayTraceResult getPosition(); - - NBTTagCompound getNBTData(); - - NBTTagCompound getFullNBTData(); - - int getNBTInteger(NBTTagCompound tag, String keyname); - - double getPartialFrame(); - - Vec3d getRenderingPosition(); - - String getID(); -} diff --git a/src/main/java/mcp/mobius/waila/api/IWailaFMPDecorator.java b/src/main/java/mcp/mobius/waila/api/IWailaFMPDecorator.java deleted file mode 100644 index afdab62b9..000000000 --- a/src/main/java/mcp/mobius/waila/api/IWailaFMPDecorator.java +++ /dev/null @@ -1,25 +0,0 @@ -package mcp.mobius.waila.api; - -import net.minecraft.item.ItemStack; - -/** Callback class interface used to provide FMP decorator.
- * All methods in this interface shouldn't to be called by the implementing mod. An instance of the class is to be - * registered to Waila via the {@link IWailaRegistrar} instance provided in the original registration callback method - * (cf. {@link IWailaRegistrar} documentation for more information). - * - * @author ProfMobius - * @deprecated FMP is neither updated nor supported. */ -@Deprecated -public interface IWailaFMPDecorator { - - /** Callback for the decorator. It provides a standard GL stack positioned on the block.
- * Will be used if the implementing class is registered via {@link IWailaRegistrar#registerDecorator(IWailaFMPDecorator, String)}.
- * - * @param itemStack - * Current block scanned, in ItemStack form. - * @param accessor - * Contains most of the relevant information about the current environment. - * @param config - * Current configuration of Waila. */ - void decorateBlock(ItemStack itemStack, IWailaFMPAccessor accessor, IWailaConfigHandler config); -} diff --git a/src/main/java/mcp/mobius/waila/api/IWailaFMPProvider.java b/src/main/java/mcp/mobius/waila/api/IWailaFMPProvider.java deleted file mode 100644 index 4f4454a96..000000000 --- a/src/main/java/mcp/mobius/waila/api/IWailaFMPProvider.java +++ /dev/null @@ -1,60 +0,0 @@ -package mcp.mobius.waila.api; - -import net.minecraft.item.ItemStack; - -import java.util.List; - -/** Callback class interface used to provide FMP tooltip informations to Waila.
- * All methods in this interface shouldn't to be called by the implementing mod. An instance of the class is to be - * registered to Waila via the {@link IWailaRegistrar} instance provided in the original registration callback method - * (cf. {@link IWailaRegistrar} documentation for more information). - * - * @author ProfMobius - * @deprecated FMP is neither updated nor supported. */ -@Deprecated -public interface IWailaFMPProvider { - /** Callback used to add lines to one of the three sections of the tooltip (Head, Body, Tail).
- * Will be used if the implementing class is registered via {@link IWailaRegistrar#registerHeadProvider(IWailaFMPProvider, String)} client side.
- * You are supposed to always return the modified input currenttip.
- * - * @param itemStack - * Current block scanned, in ItemStack form. - * @param currenttip - * Current list of tooltip lines (might have been processed by other providers and might be processed by other providers). - * @param accessor - * Contains most of the relevant information about the current environment. - * @param config - * Current configuration of Waila. - * @return Modified input currenttip */ - List getWailaHead(ItemStack itemStack, List currenttip, IWailaFMPAccessor accessor, IWailaConfigHandler config); - - /** Callback used to add lines to one of the three sections of the tooltip (Head, Body, Tail).
- * Will be used if the implementing class is registered via {@link IWailaRegistrar#registerBodyProvider(IWailaFMPProvider, String)} client side.
- * You are supposed to always return the modified input currenttip.
- * - * @param itemStack - * Current block scanned, in ItemStack form. - * @param currenttip - * Current list of tooltip lines (might have been processed by other providers and might be processed by other providers). - * @param accessor - * Contains most of the relevant information about the current environment. - * @param config - * Current configuration of Waila. - * @return Modified input currenttip */ - List getWailaBody(ItemStack itemStack, List currenttip, IWailaFMPAccessor accessor, IWailaConfigHandler config); - - /** Callback used to add lines to one of the three sections of the tooltip (Head, Body, Tail).
- * Will be used if the implementing class is registered via {@link IWailaRegistrar#registerTailProvider(IWailaFMPProvider, String)} client side.
- * You are supposed to always return the modified input currenttip.
- * - * @param itemStack - * Current block scanned, in ItemStack form. - * @param currenttip - * Current list of tooltip lines (might have been processed by other providers and might be processed by other providers). - * @param accessor - * Contains most of the relevant information about the current environment. - * @param config - * Current configuration of Waila. - * @return Modified input currenttip */ - List getWailaTail(ItemStack itemStack, List currenttip, IWailaFMPAccessor accessor, IWailaConfigHandler config); -} diff --git a/src/main/java/mcp/mobius/waila/api/IWailaPlugin.java b/src/main/java/mcp/mobius/waila/api/IWailaPlugin.java deleted file mode 100644 index 9c5f4369e..000000000 --- a/src/main/java/mcp/mobius/waila/api/IWailaPlugin.java +++ /dev/null @@ -1,13 +0,0 @@ -package mcp.mobius.waila.api; - -/** Main interface used for Waila plugins. Provides a valid instance of {@link IWailaRegistrar}. - *

- * Annotate the implementing class with {@link WailaPlugin}. Implementing classes should have a default constructor. */ -public interface IWailaPlugin { - - /** Called during {@link net.minecraftforge.fml.common.event.FMLLoadCompleteEvent}. - * - * @param registrar - * - An instance of IWailaRegistrar to register your providers with. */ - void register(IWailaRegistrar registrar); -} diff --git a/src/main/java/mcp/mobius/waila/api/IWailaRegistrar.java b/src/main/java/mcp/mobius/waila/api/IWailaRegistrar.java deleted file mode 100644 index b008827e1..000000000 --- a/src/main/java/mcp/mobius/waila/api/IWailaRegistrar.java +++ /dev/null @@ -1,90 +0,0 @@ -package mcp.mobius.waila.api; - -import javax.annotation.ParametersAreNonnullByDefault; - -/** Main registration interface for Waila plugins. To register your plugin, annotate your main plugin class with - * {@link WailaPlugin} and implement {@link IWailaPlugin}. - *

- * Note: Deprecated information below. It will still work, but the supported method will now be the annotation. - *

- * Main registration interface. An instance will be provided to a method specified in an IMC msg formatted as follow
- * FMLInterModComms.sendMessage("Waila", "register", "fully.qualified.path.to.registration.method");
- * The registration method need to follow this signature
- * public static void callbackRegister({@link IWailaRegistrar} registrar) - *

- * If not specified otherwise, all the registration methods taking a class can take classes as well as interfaces. - * Waila will do a lookup using instanceof on the registered classes, meaning that if all your targets inherit one interface, you only need - * to specify it to cover the whole hierarchy.
- * For the registration of blocks, both Blocks and TileEntities are accepted. - *

- * For the configuration keys :
- * modname refers to a String used for display in Waila's config panel.
- * keyname refers to an unique key used internally for config query (cf {@link IWailaConfigHandler}). Those keys are shared across Waila, keep them unique !
- * - * @author ProfMobius */ -@ParametersAreNonnullByDefault -public interface IWailaRegistrar { - /* Add a config option in the section modname with displayed text configtext and access key keyname */ - void addConfig(String modname, String keyname, String configtext); - - void addConfig(String modname, String keyname, String configtext, boolean defvalue); - - void addConfigRemote(String modname, String keyname, String configtext); - - void addConfigRemote(String modname, String keyname, String configtext, boolean defvalue); - - void addConfig(String modname, String keyname); - - void addConfig(String modname, String keyname, boolean defvalue); - - void addConfigRemote(String modname, String keyname); - - void addConfigRemote(String modname, String keyname, boolean defvalue); - - /* Register a stack overrider for the given blockID */ - void registerStackProvider(IWailaDataProvider dataProvider, Class block); - - /* Same thing, but works on a class hierarchy instead */ - void registerHeadProvider(IWailaDataProvider dataProvider, Class block); - - void registerBodyProvider(IWailaDataProvider dataProvider, Class block); - - void registerTailProvider(IWailaDataProvider dataProvider, Class block); - - /* Registering an NBT Provider provides a way to override the default "writeToNBT" way of doing things. */ - void registerNBTProvider(IWailaDataProvider dataProvider, Class block); - - /* Entity text registration methods */ - void registerHeadProvider(IWailaEntityProvider dataProvider, Class entity); - - void registerBodyProvider(IWailaEntityProvider dataProvider, Class entity); - - void registerTailProvider(IWailaEntityProvider dataProvider, Class entity); - - void registerOverrideEntityProvider(IWailaEntityProvider dataProvider, Class entity); - - /* Registering an NBT Provider provides a way to override the default "writeToNBT" way of doing things. */ - void registerNBTProvider(IWailaEntityProvider dataProvider, Class entity); - - /* FMP Providers */ - @Deprecated - void registerHeadProvider(IWailaFMPProvider dataProvider, String name); - - @Deprecated - void registerBodyProvider(IWailaFMPProvider dataProvider, String name); - - @Deprecated - void registerTailProvider(IWailaFMPProvider dataProvider, String name); - - /* The block decorators */ - void registerDecorator(IWailaBlockDecorator decorator, Class block); - - @Deprecated - void registerDecorator(IWailaFMPDecorator decorator, String name); - - void registerTooltipRenderer(String name, IWailaTooltipRenderer renderer); - - /* UNUSED FOR NOW (Will be used for the ingame wiki */ - //public void registerDocTextFile (String filename); - //public void registerShortDataProvider (IWailaSummaryProvider dataProvider, Class item); -} diff --git a/src/main/java/mcp/mobius/waila/api/IWailaSummaryProvider.java b/src/main/java/mcp/mobius/waila/api/IWailaSummaryProvider.java deleted file mode 100644 index 66eaf2464..000000000 --- a/src/main/java/mcp/mobius/waila/api/IWailaSummaryProvider.java +++ /dev/null @@ -1,22 +0,0 @@ -package mcp.mobius.waila.api; - -import net.minecraft.item.ItemStack; - -import java.util.LinkedHashMap; - -@Deprecated -public interface IWailaSummaryProvider { - /* This interface is used to control the display data in the description screen */ - - /* BASIC TOOLS & ITEMS DATA */ - //EnumToolMaterial getMaterial(ItemStack stack); - //String getMaterialName(ItemStack stack); - //String getEffectiveBlock(ItemStack stack); - //int getHarvestLevel(ItemStack stack); - //float getEfficiencyOnProperMaterial(ItemStack stack); - //int getEnchantability(ItemStack stack); - //int getDamageVsEntity(ItemStack stack); - //int getDurability(ItemStack stack); - - LinkedHashMap getSummary(ItemStack stack, LinkedHashMap currentSummary, IWailaConfigHandler config); -} diff --git a/src/main/java/mcp/mobius/waila/api/IWailaTooltipRenderer.java b/src/main/java/mcp/mobius/waila/api/IWailaTooltipRenderer.java deleted file mode 100644 index 24708aa46..000000000 --- a/src/main/java/mcp/mobius/waila/api/IWailaTooltipRenderer.java +++ /dev/null @@ -1,25 +0,0 @@ -package mcp.mobius.waila.api; - -import javax.annotation.Nonnull; -import javax.annotation.ParametersAreNonnullByDefault; -import java.awt.Dimension; - -@ParametersAreNonnullByDefault -public interface IWailaTooltipRenderer { - /** @param params - * Array of string parameters as passed to the RENDER arg in the tooltip ({rendername,param1,param2,...}) - * @param accessor - * A global accessor for TileEntities and Entities - * @return Dimension of the reserved area */ - @Nonnull - Dimension getSize(String[] params, IWailaCommonAccessor accessor); - - /** Draw method for the renderer. The GL matrice is automatically moved to the top left of the reserved zone.
- * All calls should be relative to (0,0) - * - * @param params - * Array of string parameters as passed to the RENDER arg in the tooltip ({rendername,param1,param2,...}) - * @param accessor - * A global accessor for TileEntities and Entities */ - void draw(String[] params, IWailaCommonAccessor accessor); -} diff --git a/src/main/java/mcp/mobius/waila/api/SpecialChars.java b/src/main/java/mcp/mobius/waila/api/SpecialChars.java deleted file mode 100644 index 2d60c7d21..000000000 --- a/src/main/java/mcp/mobius/waila/api/SpecialChars.java +++ /dev/null @@ -1,85 +0,0 @@ -package mcp.mobius.waila.api; - -import java.util.regex.Pattern; - -public class SpecialChars { - - // Minecraft values - public static String MCStyle = "\u00A7"; - public static final Pattern patternMinecraft = Pattern.compile("(?i)" + MCStyle + "[0-9A-FK-OR]"); - @Deprecated // Use TextFormatting - public static String BLACK = MCStyle + "0"; - @Deprecated // Use TextFormatting - public static String DBLUE = MCStyle + "1"; - @Deprecated // Use TextFormatting - public static String DGREEN = MCStyle + "2"; - @Deprecated // Use TextFormatting - public static String DAQUA = MCStyle + "3"; - @Deprecated // Use TextFormatting - public static String DRED = MCStyle + "4"; - @Deprecated // Use TextFormatting - public static String DPURPLE = MCStyle + "5"; - @Deprecated // Use TextFormatting - public static String GOLD = MCStyle + "6"; - @Deprecated // Use TextFormatting - public static String GRAY = MCStyle + "7"; - @Deprecated // Use TextFormatting - public static String DGRAY = MCStyle + "8"; - @Deprecated // Use TextFormatting - public static String BLUE = MCStyle + "9"; - @Deprecated // Use TextFormatting - public static String GREEN = MCStyle + "a"; - @Deprecated // Use TextFormatting - public static String AQUA = MCStyle + "b"; - @Deprecated // Use TextFormatting - public static String RED = MCStyle + "c"; - @Deprecated // Use TextFormatting - public static String LPURPLE = MCStyle + "d"; - @Deprecated // Use TextFormatting - public static String YELLOW = MCStyle + "e"; - @Deprecated // Use TextFormatting - public static String WHITE = MCStyle + "f"; - @Deprecated // Use TextFormatting - public static String OBF = MCStyle + "k"; - @Deprecated // Use TextFormatting - public static String BOLD = MCStyle + "l"; - @Deprecated // Use TextFormatting - public static String STRIKE = MCStyle + "m"; - @Deprecated // Use TextFormatting - public static String UNDER = MCStyle + "n"; - @Deprecated // Use TextFormatting - public static String ITALIC = MCStyle + "o"; - @Deprecated // Use TextFormatting - public static String RESET = MCStyle + "r"; - - // Waila values - public static String WailaStyle = "\u00A4"; - public static final Pattern patternWaila = Pattern.compile("(?i)(" + WailaStyle + "(?..))"); - public static String WailaIcon = "\u00A5"; - public static final Pattern patternIcon = Pattern.compile("(?i)(" + WailaStyle + WailaIcon + "(?[0-9a-z]))"); - public static String WailaRenderer = "\u00A6"; - public static final Pattern patternLineSplit = Pattern - .compile("(?i)(" + WailaStyle + WailaStyle + "[^" + WailaStyle + "]+|" + WailaStyle + WailaIcon + "[0-9A-Z]|" + WailaStyle + WailaRenderer + "a\\{([^,}]*),?([^}].*)\\}$|[^" + WailaStyle + "]+)"); - public static String TAB = WailaStyle + WailaStyle + "a"; - public static final Pattern patternTab = Pattern.compile("(?i)" + TAB); - public static String WailaSplitter = WailaStyle + "\u03D6"; - public static String ALIGNRIGHT = WailaStyle + WailaStyle + "b"; - public static final Pattern patternRight = Pattern.compile("(?i)" + ALIGNRIGHT); - public static String ALIGNCENTER = WailaStyle + WailaStyle + "c"; - public static final Pattern patternCenter = Pattern.compile("(?i)" + ALIGNCENTER); - public static String HEART = WailaStyle + WailaIcon + "a"; - public static String HHEART = WailaStyle + WailaIcon + "b"; - public static String EHEART = WailaStyle + WailaIcon + "c"; - public static String RENDER = WailaStyle + WailaRenderer + "a"; - public static final Pattern patternRender = Pattern.compile("(?i)(" + RENDER + "\\{(?[^,}]*)\\+,?(?.*)\\}$)"); - - /** Helper method to get a proper RENDER string. Just put the name of the renderer and the params in, and it will give back a directly usable String for the tooltip. */ - public static String getRenderString(String name, String... params) { - String result = RENDER + "{" + name; - for (String s : params) { - result += "+," + s; - } - result += "}" + WailaSplitter; - return result; - } -} diff --git a/src/main/java/mcp/mobius/waila/api/TagLocation.java b/src/main/java/mcp/mobius/waila/api/TagLocation.java deleted file mode 100644 index 4ae2acdc9..000000000 --- a/src/main/java/mcp/mobius/waila/api/TagLocation.java +++ /dev/null @@ -1,10 +0,0 @@ -package mcp.mobius.waila.api; - -public enum TagLocation { - STACK, // Block only - OVERRIDE, // Entity only - HEAD, - BODY, - TAIL, - DATA -} diff --git a/src/main/java/mcp/mobius/waila/api/WailaPlugin.java b/src/main/java/mcp/mobius/waila/api/WailaPlugin.java deleted file mode 100644 index d8df38b90..000000000 --- a/src/main/java/mcp/mobius/waila/api/WailaPlugin.java +++ /dev/null @@ -1,22 +0,0 @@ -package mcp.mobius.waila.api; - -import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** Used to mark a class as a Waila plugin. Detected at runtime automatically. - *

- * Classes annotated with this must implement {@link IWailaPlugin}. - *

- * To other HUD mods: If you wish to add support for mods that have native support for Waila, use Forge's ASMDataTable - * (accessible via {@link FMLPreInitializationEvent#getAsmData()}) to detect this annotation. */ -@Target(ElementType.TYPE) -@Retention(RetentionPolicy.RUNTIME) -public @interface WailaPlugin { - - /** @return the Mod ID required for this plugin to load. If blank, it will load no matter what. */ - String value() default ""; -} diff --git a/src/main/java/mcp/mobius/waila/api/event/WailaRenderEvent.java b/src/main/java/mcp/mobius/waila/api/event/WailaRenderEvent.java deleted file mode 100644 index b8a0326b6..000000000 --- a/src/main/java/mcp/mobius/waila/api/event/WailaRenderEvent.java +++ /dev/null @@ -1,114 +0,0 @@ -package mcp.mobius.waila.api.event; - -import mcp.mobius.waila.api.IWailaCommonAccessor; -import net.minecraftforge.fml.common.eventhandler.Cancelable; -import net.minecraftforge.fml.common.eventhandler.Event; - -/** The base event for rendering the Waila tooltip. This provides the opportunity to do last minute changes to the tooltip. - *

- * All sub-events are fired from {@link mcp.mobius.waila.overlay.OverlayRenderer#renderOverlay(mcp.mobius.waila.overlay.Tooltip)}. - * All sub-events are fired every render tick. - *

- * {@link #xPos} - The X location that the tooltip is being rendered at. - * {@link #yPos} - The Y location that the tooltip is being rendered at. - * {@link #width} - The width of the tooltip. - * {@link #height} - The height of the tooltip. */ -public class WailaRenderEvent extends Event { - - private int xPos; - private int yPos; - private int width; - private int height; - - public WailaRenderEvent(int xPos, int yPos, int width, int height) { - this.xPos = xPos; - this.yPos = yPos; - this.width = width; - this.height = height; - } - - public int getX() { - return xPos; - } - - protected void setxPos(int xPos) { - this.xPos = xPos; - } - - public int getY() { - return yPos; - } - - protected void setyPos(int yPos) { - this.yPos = yPos; - } - - public int getWidth() { - return width; - } - - protected void setWidth(int width) { - this.width = width; - } - - public int getHeight() { - return height; - } - - protected void setHeight(int height) { - this.height = height; - } - - /** This event is fired just before the Waila tooltip is rendered and right after setting up the GL state in - * {@link mcp.mobius.waila.overlay.OverlayRenderer#renderOverlay(mcp.mobius.waila.overlay.Tooltip)} - *

- * This event is cancelable. - * If this event is canceled, the tooltip will not render. */ - @Cancelable - public static class Pre extends WailaRenderEvent { - - private final IWailaCommonAccessor accessor; - - public Pre(IWailaCommonAccessor accessor, int xPos, int yPos, int width, int height) { - super(xPos, yPos, width, height); - - this.accessor = accessor; - } - - public IWailaCommonAccessor getAccessor() { - return accessor; - } - - @Override - public void setxPos(int xPos) { - super.setxPos(xPos); - } - - @Override - public void setyPos(int yPos) { - super.setyPos(yPos); - } - - @Override - public void setWidth(int width) { - super.setWidth(width); - } - - @Override - public void setHeight(int height) { - super.setHeight(height); - } - } - - /** This event is fired just after the tooltip is rendered and right before the GL state is reset in - * {@link mcp.mobius.waila.overlay.OverlayRenderer#renderOverlay(mcp.mobius.waila.overlay.Tooltip)} - * This event is only fired if {@link Pre} is not cancelled. - *

- * This event is not cancelable. */ - public static class Post extends WailaRenderEvent { - - public Post(int xPos, int yPos, int width, int height) { - super(xPos, yPos, width, height); - } - } -} diff --git a/src/main/java/mcp/mobius/waila/api/event/WailaTooltipEvent.java b/src/main/java/mcp/mobius/waila/api/event/WailaTooltipEvent.java deleted file mode 100644 index 97c018761..000000000 --- a/src/main/java/mcp/mobius/waila/api/event/WailaTooltipEvent.java +++ /dev/null @@ -1,31 +0,0 @@ -package mcp.mobius.waila.api.event; - -import mcp.mobius.waila.api.IWailaCommonAccessor; -import net.minecraftforge.fml.common.eventhandler.Event; - -import java.util.List; - -/** This event is fired just before the Waila tooltip sizes are calculated. This is the last chance to make edits to - * the information being displayed. - *

- * This event is not cancelable. - *

- * {@link #currentTip} - The current tooltip to be drawn. */ -public class WailaTooltipEvent extends Event { - - private final List currentTip; - private final IWailaCommonAccessor accessor; - - public WailaTooltipEvent(List currentTip, IWailaCommonAccessor accessor) { - this.currentTip = currentTip; - this.accessor = accessor; - } - - public List getCurrentTip() { - return currentTip; - } - - public IWailaCommonAccessor getAccessor() { - return accessor; - } -} diff --git a/src/main/java/mcp/mobius/waila/api/package-info.java b/src/main/java/mcp/mobius/waila/api/package-info.java deleted file mode 100644 index 56dbefd7b..000000000 --- a/src/main/java/mcp/mobius/waila/api/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -@API(apiVersion = "1.3", owner = "Waila", provides = "WailaAPI") -package mcp.mobius.waila.api; - -import net.minecraftforge.fml.common.API; \ No newline at end of file diff --git a/src/main/java/mod/chiselsandbits/chiseledblock/TileEntityBlockChiseled.java b/src/main/java/mod/chiselsandbits/chiseledblock/TileEntityBlockChiseled.java deleted file mode 100644 index 707e97d0b..000000000 --- a/src/main/java/mod/chiselsandbits/chiseledblock/TileEntityBlockChiseled.java +++ /dev/null @@ -1,12 +0,0 @@ -package mod.chiselsandbits.chiseledblock; - -import mod.chiselsandbits.chiseledblock.data.VoxelBlob; -import net.minecraft.tileentity.TileEntity; - -public class TileEntityBlockChiseled extends TileEntity { - - public VoxelBlob getBlob() { - return null; - } - -} \ No newline at end of file diff --git a/src/main/java/mod/chiselsandbits/chiseledblock/data/VoxelBlob.java b/src/main/java/mod/chiselsandbits/chiseledblock/data/VoxelBlob.java deleted file mode 100644 index 9408700d9..000000000 --- a/src/main/java/mod/chiselsandbits/chiseledblock/data/VoxelBlob.java +++ /dev/null @@ -1,12 +0,0 @@ -package mod.chiselsandbits.chiseledblock.data; - -public class VoxelBlob { - - public int get(final int x, final int y, final int z) { - return -1; - } - - public void set(final int x, final int y, final int z, final int value) { - - } -} diff --git a/src/main/java/mod/chiselsandbits/core/ChiselsAndBits.java b/src/main/java/mod/chiselsandbits/core/ChiselsAndBits.java deleted file mode 100644 index b515d4615..000000000 --- a/src/main/java/mod/chiselsandbits/core/ChiselsAndBits.java +++ /dev/null @@ -1,11 +0,0 @@ -package mod.chiselsandbits.core; - -import mod.chiselsandbits.registry.ModBlocks; - -public class ChiselsAndBits { - - public static ModBlocks getBlocks() { - return null; - } - -} diff --git a/src/main/java/mod/chiselsandbits/helpers/ModUtil.java b/src/main/java/mod/chiselsandbits/helpers/ModUtil.java deleted file mode 100644 index 135862506..000000000 --- a/src/main/java/mod/chiselsandbits/helpers/ModUtil.java +++ /dev/null @@ -1,18 +0,0 @@ -package mod.chiselsandbits.helpers; - -import mod.chiselsandbits.chiseledblock.data.VoxelBlob; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.ItemStack; - -public class ModUtil { - - public static VoxelBlob getBlobFromStack(final ItemStack stack, final EntityLivingBase rotationPlayer) { - return null; - } - - public static IBlockState getStateById(final int blockStateID) { - return null; - } - -} diff --git a/src/main/java/mod/chiselsandbits/registry/ModBlocks.java b/src/main/java/mod/chiselsandbits/registry/ModBlocks.java deleted file mode 100644 index 6038ff47e..000000000 --- a/src/main/java/mod/chiselsandbits/registry/ModBlocks.java +++ /dev/null @@ -1,11 +0,0 @@ -package mod.chiselsandbits.registry; - -import java.util.Map; - -public class ModBlocks { - - public Map getConversions() { - return null; - } - -} diff --git a/src/main/java/mod/flatcoloredblocks/block/BlockFlatColored.java b/src/main/java/mod/flatcoloredblocks/block/BlockFlatColored.java deleted file mode 100644 index 54aac56f8..000000000 --- a/src/main/java/mod/flatcoloredblocks/block/BlockFlatColored.java +++ /dev/null @@ -1,16 +0,0 @@ -package mod.flatcoloredblocks.block; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; - -public class BlockFlatColored extends Block { - - public BlockFlatColored(Material materialIn) { - super(materialIn); - } - - public int colorFromState(final IBlockState state) { - return 0; - } -} diff --git a/src/main/java/org/zeith/lux/api/LuxManager.java b/src/main/java/org/zeith/lux/api/LuxManager.java deleted file mode 100644 index 63a5c047e..000000000 --- a/src/main/java/org/zeith/lux/api/LuxManager.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.zeith.lux.api; - -import java.util.ArrayList; - -import javax.annotation.Nullable; - -import org.zeith.lux.api.light.ILightBlockHandler; - -import com.zeitheron.hammercore.api.lighting.ColoredLight; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -//Modified to not cause compiler errors - -public class LuxManager { - - public static void registerBlockLight(Block blk, ILightBlockHandler handler) {} - - public static ArrayList getLights(World world, BlockPos pos, IBlockState state, @Nullable TileEntity tile, float partialTicks) { - return null; - } - -} diff --git a/src/main/java/org/zeith/lux/api/event/GatherLightsEvent.java b/src/main/java/org/zeith/lux/api/event/GatherLightsEvent.java deleted file mode 100644 index eec174cba..000000000 --- a/src/main/java/org/zeith/lux/api/event/GatherLightsEvent.java +++ /dev/null @@ -1,75 +0,0 @@ -package org.zeith.lux.api.event; - -import java.util.ArrayList; -import java.util.stream.Stream; - -import com.google.common.collect.ImmutableList; -import com.zeitheron.hammercore.api.lighting.ColoredLight; - -import net.minecraft.client.renderer.culling.Frustum; -import net.minecraft.client.renderer.culling.ICamera; -import net.minecraft.util.math.Vec3d; -import net.minecraftforge.fml.common.eventhandler.Event; - -//Modified to not cause compiler errors - -public class GatherLightsEvent extends Event { - private final ArrayList lights; - private final float maxDistance; - private final Vec3d cameraPosition; - private final Frustum camera; - private final float partialTicks; - - private double furthest; - - public GatherLightsEvent(ArrayList lights, float maxDistance, Vec3d cameraPosition, Frustum camera, float partialTicks) { - this.lights = lights; - this.maxDistance = maxDistance; - this.cameraPosition = cameraPosition; - this.camera = camera; - this.partialTicks = partialTicks; - } - - public float getPartialTicks() { - return partialTicks; - } - - public ImmutableList getLightList() { - return ImmutableList.copyOf(lights); - } - - public float getMaxDistance() { - return maxDistance; - } - - public Vec3d getCameraPosition() { - return cameraPosition; - } - - public ICamera getCamera() { - return camera; - } - - public void addAll(Stream lights) { - lights.forEach(this::add); - } - - public void addAll(Iterable lights) { - lights.forEach(this::add); - } - - public void add(ColoredLight light) { - - } - - public void add(ColoredLight.Builder builder) { - if (builder == null) - return; - add(builder.build()); - } - - @Override - public boolean isCancelable() { - return false; - } -} diff --git a/src/main/java/org/zeith/lux/api/event/ReloadLuxManagerEvent.java b/src/main/java/org/zeith/lux/api/event/ReloadLuxManagerEvent.java deleted file mode 100644 index b5366b644..000000000 --- a/src/main/java/org/zeith/lux/api/event/ReloadLuxManagerEvent.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.zeith.lux.api.event; - -import net.minecraft.block.Block; -import net.minecraftforge.fml.common.eventhandler.Event; -import net.minecraftforge.fml.common.registry.EntityEntry; -import org.zeith.lux.api.LuxManager; -import org.zeith.lux.api.light.ILightBlockHandler; - -/** - * Subscribe to this event to register entity and block lights - */ -public class ReloadLuxManagerEvent - extends Event -{ - public void registerBlockLight(Block blk, ILightBlockHandler handler) - { - LuxManager.registerBlockLight(blk, handler); - } - -} diff --git a/src/main/java/org/zeith/lux/api/light/ILightBlockHandler.java b/src/main/java/org/zeith/lux/api/light/ILightBlockHandler.java deleted file mode 100644 index cf7b6a07d..000000000 --- a/src/main/java/org/zeith/lux/api/light/ILightBlockHandler.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.zeith.lux.api.light; - -import org.zeith.lux.api.event.GatherLightsEvent; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -public interface ILightBlockHandler -{ - void createLights(World world, BlockPos pos, IBlockState state, GatherLightsEvent e); - - default void update(IBlockState state, BlockPos pos) - { - } -} diff --git a/src/main/java/team/chisel/ctm/api/IFacade.java b/src/main/java/team/chisel/ctm/api/IFacade.java deleted file mode 100644 index 5518d9837..000000000 --- a/src/main/java/team/chisel/ctm/api/IFacade.java +++ /dev/null @@ -1,38 +0,0 @@ -package team.chisel.ctm.api; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -/** To be implemented on blocks that "hide" another block inside, so connected textures can still be accomplished. */ -public interface IFacade { - - /** @deprecated Use {@link #getFacade(IBlockAccess, BlockPos, EnumFacing, BlockPos)} */ - @Nonnull - @Deprecated - IBlockState getFacade(@Nonnull IBlockAccess world, @Nonnull BlockPos pos, @Nullable EnumFacing side); - - /** Gets the blockstate this facade appears as. - * - * @param world - * {@link World} - * @param pos - * The Blocks position - * @param side - * The side being rendered, NOT the side being connected from. - *

- * This value can be null if no side is specified. Please handle this appropriately. - * @param connection - * The position of the block being connected to. - * @return The blockstate which your block appears as. */ - @Nonnull - default IBlockState getFacade(@Nonnull IBlockAccess world, @Nonnull BlockPos pos, @Nullable EnumFacing side, @Nonnull BlockPos connection) { - return getFacade(world, pos, side); - } - -} diff --git a/src/main/resources/assets/littletiles/Logo.png b/src/main/resources/assets/littletiles/Logo.png new file mode 100644 index 000000000..2d74e966b Binary files /dev/null and b/src/main/resources/assets/littletiles/Logo.png differ diff --git a/src/main/resources/assets/littletiles/lang/de_DE.lang b/src/main/resources/assets/littletiles/lang/de_de.lang similarity index 100% rename from src/main/resources/assets/littletiles/lang/de_DE.lang rename to src/main/resources/assets/littletiles/lang/de_de.lang diff --git a/src/main/resources/assets/littletiles/lang/en_US.lang b/src/main/resources/assets/littletiles/lang/en_us.lang similarity index 100% rename from src/main/resources/assets/littletiles/lang/en_US.lang rename to src/main/resources/assets/littletiles/lang/en_us.lang diff --git a/src/main/resources/assets/littletiles/lang/fr_FR.lang b/src/main/resources/assets/littletiles/lang/fr_fr.lang similarity index 100% rename from src/main/resources/assets/littletiles/lang/fr_FR.lang rename to src/main/resources/assets/littletiles/lang/fr_fr.lang diff --git a/src/main/resources/assets/littletiles/lang/nl_NL.lang b/src/main/resources/assets/littletiles/lang/nl_nl.lang similarity index 100% rename from src/main/resources/assets/littletiles/lang/nl_NL.lang rename to src/main/resources/assets/littletiles/lang/nl_nl.lang diff --git a/src/main/resources/assets/littletiles/lang/pt_BR.lang b/src/main/resources/assets/littletiles/lang/pt_br.lang similarity index 100% rename from src/main/resources/assets/littletiles/lang/pt_BR.lang rename to src/main/resources/assets/littletiles/lang/pt_br.lang diff --git a/src/main/resources/assets/littletiles/lang/ru_RU.lang b/src/main/resources/assets/littletiles/lang/ru_ru.lang similarity index 100% rename from src/main/resources/assets/littletiles/lang/ru_RU.lang rename to src/main/resources/assets/littletiles/lang/ru_ru.lang diff --git a/src/main/resources/assets/littletiles/lang/zh_CN.lang b/src/main/resources/assets/littletiles/lang/zh_cn.lang similarity index 100% rename from src/main/resources/assets/littletiles/lang/zh_CN.lang rename to src/main/resources/assets/littletiles/lang/zh_cn.lang diff --git a/src/main/resources/assets/littletiles/screenshots/Showcase0.png b/src/main/resources/assets/littletiles/screenshots/Showcase0.png new file mode 100644 index 000000000..e85fe7629 Binary files /dev/null and b/src/main/resources/assets/littletiles/screenshots/Showcase0.png differ diff --git a/src/main/resources/assets/littletiles/screenshots/Showcase1.png b/src/main/resources/assets/littletiles/screenshots/Showcase1.png new file mode 100644 index 000000000..acf61ba6b Binary files /dev/null and b/src/main/resources/assets/littletiles/screenshots/Showcase1.png differ diff --git a/src/main/resources/assets/littletiles/screenshots/Showcase2.png b/src/main/resources/assets/littletiles/screenshots/Showcase2.png new file mode 100644 index 000000000..5b802720a Binary files /dev/null and b/src/main/resources/assets/littletiles/screenshots/Showcase2.png differ diff --git a/src/main/resources/assets/littletiles/screenshots/Showcase3.png b/src/main/resources/assets/littletiles/screenshots/Showcase3.png new file mode 100644 index 000000000..12afc32bf Binary files /dev/null and b/src/main/resources/assets/littletiles/screenshots/Showcase3.png differ diff --git a/src/main/resources/assets/littletiles/screenshots/Showcase4.png b/src/main/resources/assets/littletiles/screenshots/Showcase4.png new file mode 100644 index 000000000..50eb48c2e Binary files /dev/null and b/src/main/resources/assets/littletiles/screenshots/Showcase4.png differ diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index f4edd109b..d481a68e5 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -1,15 +1,25 @@ [ -{ - "modid": "littletiles", - "name": "LittleTiles", - "description": "#BuildItYourself", - "mcversion": "${mcversion}", - "url": "http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2408680", - "updateUrl": "", - "authorList": ["CreativeMD", "Shana"], - "credits": "", - "logoFile": "", - "screenshots": [], - "dependencies": ["creativecore"] -} + { + "modid": "${id}", + "name": "LittleTiles", + "description": "This mod allows you to build anything you want. It adds a way to add more detail to everything. \n\nYou can hammer blocks into tiles which can be 4096 (or even more) times smaller than an ordinary minecraft block. \n\nYou can combine your tiles together to create doors, chairs, ladders, no-clip, storage and any kind of furniture structure.", + "version": "${version}", + "url": "https://www.curseforge.com/minecraft/mc-mods/littletiles", + "authorList": [ + "CreativeMD", + "Shana" + ], + "credits": "_Doc, blakedj012, KevM480, RMSCA, Desoroxxx, skmedix, Edgewalker_Blue, kencinder, Smollet777, TomyLobo, vinz243, QBFreak, N247S", + "logoFile": "assets/littletiles/Logo.png", + "screenshots": [ + "assets/littletiles/screenshots/Showcase0", + "assets/littletiles/screenshots/Showcase1", + "assets/littletiles/screenshots/Showcase2", + "assets/littletiles/screenshots/Showcase3", + "assets/littletiles/screenshots/Showcase4" + ], + "dependencies": [ + "creativecore" + ] + } ] diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta new file mode 100644 index 000000000..82b798eb8 --- /dev/null +++ b/src/main/resources/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "description": "LittleTiles resources", + "pack_format": 2 + } +}