mirror of
https://github.com/GTNewHorizons/ThaumicTinkerer.git
synced 2026-11-28 16:06:07 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6675941d81 | ||
|
|
2f95c81c57 | ||
|
|
373ea9df29 |
No files matched your search
@@ -1,17 +0,0 @@
|
||||
name: Optimize images
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master, main, release/** ]
|
||||
paths:
|
||||
- "**/*.png"
|
||||
|
||||
push:
|
||||
branches: [ master, main, release/** ]
|
||||
paths:
|
||||
- "**/*.png"
|
||||
|
||||
jobs:
|
||||
optimize-images:
|
||||
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/optimize-images.yml@master
|
||||
secrets: inherit
|
||||
@@ -0,0 +1,5 @@
|
||||
//version: 1707058017
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhconvention'
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
plugins {
|
||||
id("com.gtnewhorizons.gtnhconvention")
|
||||
}
|
||||
+20
-19
@@ -1,28 +1,29 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
api('com.github.GTNewHorizons:Baubles-Expanded:2.2.11-GTNH:dev')
|
||||
api('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev') {transitive=false}
|
||||
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-882-GTNH:api')
|
||||
api('com.github.GTNewHorizons:ThaumicBoots:1.5.8:dev') {transitive=false}
|
||||
api('com.github.GTNewHorizons:Baubles-Expanded:2.1.16-GTNH:dev')
|
||||
api('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
|
||||
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-690-GTNH:api')
|
||||
api('com.github.GTNewHorizons:ThaumicBoots:1.4.14:dev') {
|
||||
exclude group: 'com.github.GTNewHorizons', module: 'Electro-Magic-Tools'
|
||||
exclude module: 'Baubles'
|
||||
}
|
||||
|
||||
compileOnly('com.github.GTNewHorizons:Botania:1.13.16-GTNH:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:EnderCore:0.5.12:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:EnderIO:2.10.22:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:EnderStorage:1.8.3:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:waila:1.19.22:api') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:TinkersConstruct:1.14.46-GTNH:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:ForgeMultipart:1.7.3:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:CodeChickenCore:1.4.12:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:OpenComputers:1.12.22-GTNH:api') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:Botania:1.12.26-GTNH:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:EnderCore:0.4.8:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:EnderIO:2.9.26:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:EnderStorage:1.7.7:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:waila:1.8.14:api') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:TinkersConstruct:1.13.54-GTNH:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:ForgeMultipart:1.6.8:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:CodeChickenCore:1.4.7:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:OpenComputers:1.11.19-GTNH:api') {transitive=false}
|
||||
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:api') {transitive=false}
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.52.399:dev") {exclude group: 'com.github.GTNewHorizons', module: 'ThaumicTinkerer'}
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.471:dev") {exclude group: 'com.github.GTNewHorizons', module: 'ThaumicTinkerer'}
|
||||
compileOnly('curse.maven:computercraft-67504:2269339')
|
||||
compileOnly('curse.maven:cofh-core-69162:2388751')
|
||||
|
||||
// For testing purposes
|
||||
//runtimeOnlyNonPublishable("com.github.GTNewHorizons:Electro-Magic-Tools:1.7.20:dev")
|
||||
|
||||
runtimeOnly(rfg.deobf('curse.maven:thaumcraft-nei-plugin-225095:2241913'))
|
||||
runtimeOnly('com.github.GTNewHorizons:TCNEIAdditions:1.5.13:dev')
|
||||
runtimeOnly('com.github.GTNewHorizons:TCNEIAdditions:1.5.4:dev') {
|
||||
exclude module: 'Baubles'
|
||||
}
|
||||
}
|
||||
+5
-37
@@ -39,37 +39,13 @@ remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/co
|
||||
# `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE.
|
||||
developmentEnvironmentUserName = Developer
|
||||
|
||||
# Enables modern Java syntax support. Valid values:
|
||||
# - false: No modern syntax, Java 8 only
|
||||
# - jabel: Jabel syntax-only support, compiles to J8 bytecode
|
||||
# - jvmDowngrader: Full modern Java via JVM Downgrader (syntax + stdlib APIs)
|
||||
# - modern: Native modern Java bytecode, no downgrading
|
||||
enableModernJavaSyntax = jabel
|
||||
|
||||
# If set, ignores the above setting and compiles with the given toolchain. This may cause unexpected issues,
|
||||
# and should *not* be used in most situations. -1 disables this.
|
||||
# forceToolchainVersion = -1
|
||||
|
||||
# Target JVM version for JVM Downgrader bytecode downgrading.
|
||||
# Only used when enableModernJavaSyntax = jvmDowngrader
|
||||
# downgradeTargetVersion = 8
|
||||
|
||||
# Comma-separated list of Java versions for multi-release jar support (JVM Downgrader only).
|
||||
# Classes will be available in META-INF/versions/N/ for each version N in this list.
|
||||
# Default: "21,25" (J25+ gets native classes, J21-24 gets partial downgrade, J8-20 gets full downgrade).
|
||||
# jvmDowngraderMultiReleaseVersions = 21,25
|
||||
|
||||
# Specifies how JVM Downgrader API stubs are provided. Options:
|
||||
# - shade: Shade minimized stubs into the jar
|
||||
# - gtnhlib: GTNHLib provides stubs at runtime (adds version constraint)
|
||||
# - external: Another dependency provides stubs (no constraint, no warning)
|
||||
# - (empty): Warning reminding you to configure stubs
|
||||
# Note: 'shade' option requires you to verify license compliance, see: https://github.com/unimined/JvmDowngrader/blob/main/LICENSE.md
|
||||
# jvmDowngraderStubsProvider =
|
||||
# Enables using modern Java syntax (up to version 17) via Jabel, while still targeting JVM 8.
|
||||
# See https://github.com/bsideup/jabel for details on how this works.
|
||||
enableModernJavaSyntax = true
|
||||
|
||||
# Enables injecting missing generics into the decompiled source code for a better coding experience.
|
||||
# Turns most publicly visible List, Map, etc. into proper List<E>, Map<K, V> types.
|
||||
enableGenericInjection = true
|
||||
enableGenericInjection = false
|
||||
|
||||
# Generate a class with a String field for the mod version named as defined below.
|
||||
# If generateGradleTokenClass is empty or not missing, no such class will be generated.
|
||||
@@ -120,9 +96,7 @@ usesMixinDebug = true
|
||||
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
|
||||
mixinPlugin =
|
||||
|
||||
# Specify the package that contains all of your Mixins. The package must exist or
|
||||
# the build will fail. If you have a package property defined in your mixins.<modid>.json,
|
||||
# it must match with this or the build will fail.
|
||||
# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
|
||||
mixinsPackage = mixins
|
||||
|
||||
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
|
||||
@@ -198,12 +172,6 @@ curseForgeRelations =
|
||||
# projects. New projects should not use this parameter.
|
||||
# customArchiveBaseName =
|
||||
|
||||
# Optional parameter to customize the default working directory used by the runClient* tasks. Relative to the project directory.
|
||||
# runClientWorkingDirectory = run/client
|
||||
|
||||
# Optional parameter to customize the default working directory used by the runServer* tasks. Relative to the project directory.
|
||||
# runServerWorkingDirectory = run/server
|
||||
|
||||
# Optional parameter to have the build automatically fail if an illegal version is used.
|
||||
# This can be useful if you e.g. only want to allow versions in the form of '1.1.xxx'.
|
||||
# The check is ONLY performed if the version is a git tag.
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
#This file is generated by updateDaemonJvm
|
||||
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1630f7ebef05444cb27a2709ea0249b3/redirect
|
||||
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/cd495626d2ee49a75447e3fdc6afb287/redirect
|
||||
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1630f7ebef05444cb27a2709ea0249b3/redirect
|
||||
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/cd495626d2ee49a75447e3fdc6afb287/redirect
|
||||
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/d4fd992c9557644e637ebe98263e0ae7/redirect
|
||||
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/faa12903720d410b387cc69ccafb1a74/redirect
|
||||
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1630f7ebef05444cb27a2709ea0249b3/redirect
|
||||
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/cd495626d2ee49a75447e3fdc6afb287/redirect
|
||||
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/a4c09dd2e2d7079373d30e524bbc2829/redirect
|
||||
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/8e1d9ee5d0f13e442218f6884a306da1/redirect
|
||||
toolchainVersion=25
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015 the original authors.
|
||||
# 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.
|
||||
@@ -57,7 +57,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/b631911858264c0b6e4d6603d677ff5218766cee/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
@@ -114,6 +114,7 @@ case "$( uname )" in #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
@@ -171,6 +172,7 @@ fi
|
||||
# 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" )
|
||||
|
||||
@@ -210,7 +212,8 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
|
||||
Vendored
+2
-1
@@ -70,10 +70,11 @@ goto fail
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
|
||||
@@ -3,8 +3,8 @@ pluginManagement {
|
||||
repositories {
|
||||
maven {
|
||||
// RetroFuturaGradle
|
||||
name = "GTNH Maven"
|
||||
url = uri("https://nexus.gtnewhorizons.com/repository/public/")
|
||||
name "GTNH Maven"
|
||||
url "https://nexus.gtnewhorizons.com/repository/public/"
|
||||
mavenContent {
|
||||
includeGroup("com.gtnewhorizons")
|
||||
includeGroupByRegex("com\\.gtnewhorizons\\..+")
|
||||
@@ -17,7 +17,7 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("com.gtnewhorizons.gtnhsettingsconvention") version "2.0.24"
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.44'
|
||||
}
|
||||
|
||||
|
||||
@@ -26,8 +26,6 @@ import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.network.FMLNetworkEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import thaumcraft.client.fx.ParticleEngine;
|
||||
import thaumic.tinkerer.client.core.handler.ClientTickHandler;
|
||||
@@ -66,11 +64,8 @@ import thaumic.tinkerer.common.item.ItemInfusedSeeds;
|
||||
import thaumic.tinkerer.common.item.ItemMobDisplay;
|
||||
import thaumic.tinkerer.common.item.kami.ItemPlacementMirror;
|
||||
import thaumic.tinkerer.common.item.kami.foci.ItemFocusShadowbeam;
|
||||
import thaumic.tinkerer.common.potion.PotionEffectHandlerClient;
|
||||
|
||||
public final class TTClientProxy extends TTCommonProxy {
|
||||
|
||||
private PotionEffectHandlerClient potionHandlerClient;
|
||||
public class TTClientProxy extends TTCommonProxy {
|
||||
|
||||
public static EntityPlayer getPlayer() {
|
||||
return Minecraft.getMinecraft().thePlayer;
|
||||
@@ -79,21 +74,18 @@ public final class TTClientProxy extends TTCommonProxy {
|
||||
@Override
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
super.preInit(event);
|
||||
FMLCommonHandler.instance().bus().register(this);
|
||||
if (Loader.isModLoaded("ComputerCraft")) {
|
||||
MinecraftForge.EVENT_BUS.register(new FumeTool());
|
||||
}
|
||||
|
||||
if (ConfigHandler.enableKami) {
|
||||
if (ConfigHandler.enableKami)
|
||||
// kamiRarity = EnumHelperClient.addRarity("KAMI", 0x6, "Kami");
|
||||
|
||||
kamiRarity = EnumHelperClient.addEnum(
|
||||
new Class[][] { { EnumRarity.class, EnumChatFormatting.class, String.class } },
|
||||
EnumRarity.class,
|
||||
"KAMI",
|
||||
EnumChatFormatting.LIGHT_PURPLE,
|
||||
"Kami");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -116,22 +108,6 @@ public final class TTClientProxy extends TTCommonProxy {
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onClientConnect(FMLNetworkEvent.ClientConnectedToServerEvent event) {
|
||||
this.potionHandlerClient = new PotionEffectHandlerClient();
|
||||
MinecraftForge.EVENT_BUS.register(potionHandlerClient);
|
||||
FMLCommonHandler.instance().bus().register(potionHandlerClient);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onClientDisconnect(FMLNetworkEvent.ClientDisconnectionFromServerEvent event) {
|
||||
if (this.potionHandlerClient != null) {
|
||||
MinecraftForge.EVENT_BUS.unregister(potionHandlerClient);
|
||||
FMLCommonHandler.instance().bus().unregister(potionHandlerClient);
|
||||
this.potionHandlerClient = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void registerTiles() {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileAnimationTablet.class, new RenderTileAnimationTablet());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileMagnet.class, new RenderTileMagnet());
|
||||
|
||||
@@ -38,6 +38,7 @@ public class GuiAnimationTablet extends GuiContainer {
|
||||
int x, y;
|
||||
|
||||
TileAnimationTablet tablet;
|
||||
List<GuiButtonAT> buttonListAT = new ArrayList<>();
|
||||
List<IRadioButton> radioButtons = new ArrayList<>();
|
||||
|
||||
public GuiAnimationTablet(TileAnimationTablet tablet, InventoryPlayer playerInv) {
|
||||
@@ -50,26 +51,25 @@ public class GuiAnimationTablet extends GuiContainer {
|
||||
super.initGui();
|
||||
x = (width - xSize) / 2;
|
||||
y = (height - ySize) / 2;
|
||||
buttonListAT.clear();
|
||||
addButton(new GuiButtonAT(0, x + xSize / 2 - 7, y + 60, tablet.redstone));
|
||||
addButton(new GuiButtonATRadio(1, x + 52, y + 15, tablet.leftClick, radioButtons));
|
||||
addButton(new GuiButtonATRadio(2, x + 111, y + 15, !tablet.leftClick, radioButtons));
|
||||
buttonList = buttonListAT;
|
||||
}
|
||||
|
||||
private void addButton(GuiButtonAT button) {
|
||||
buttonList.add(button);
|
||||
buttonListAT.add(button);
|
||||
if (button instanceof IRadioButton) radioButtons.add((IRadioButton) button);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton par1GuiButton) {
|
||||
var button0 = (GuiButtonAT) buttonList.get(0);
|
||||
if (par1GuiButton instanceof IRadioButton) ((IRadioButton) par1GuiButton).enableFromClick();
|
||||
else {
|
||||
button0.buttonEnabled = !button0.buttonEnabled;
|
||||
}
|
||||
else buttonListAT.get(0).buttonEnabled = !buttonListAT.get(0).buttonEnabled;
|
||||
|
||||
tablet.leftClick = ((GuiButtonAT) buttonList.get(1)).buttonEnabled;
|
||||
tablet.redstone = button0.buttonEnabled;
|
||||
tablet.leftClick = buttonListAT.get(1).buttonEnabled;
|
||||
tablet.redstone = buttonListAT.get(0).buttonEnabled;
|
||||
|
||||
ThaumicTinkerer.netHandler.sendToServer(new PacketTabletButton(tablet));
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ public class GuiMobMagnet extends GuiContainer {
|
||||
ItemStack stack = null;
|
||||
TileMobMagnet mobMagnet;
|
||||
|
||||
List<GuiButtonMM> buttonListMM = new ArrayList<>();
|
||||
List<IRadioButton> radioButtons = new ArrayList<>();
|
||||
|
||||
public GuiMobMagnet(TileMobMagnet tile, InventoryPlayer playerInv) {
|
||||
@@ -54,21 +55,23 @@ public class GuiMobMagnet extends GuiContainer {
|
||||
super.initGui();
|
||||
x = (width - xSize) / 2;
|
||||
y = (height - ySize) / 2;
|
||||
buttonListMM.clear();
|
||||
addButton(new GuiButtonMMRadio(0, x + 100, y + 28, mobMagnet.adult, radioButtons));
|
||||
addButton(new GuiButtonMMRadio(1, x + 100, y + 48, !mobMagnet.adult, radioButtons));
|
||||
buttonList = buttonListMM;
|
||||
}
|
||||
|
||||
private void addButton(GuiButtonMM button) {
|
||||
buttonList.add(button);
|
||||
buttonListMM.add(button);
|
||||
if (button instanceof IRadioButton) radioButtons.add((IRadioButton) button);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton par1GuiButton) {
|
||||
if (par1GuiButton instanceof IRadioButton) ((IRadioButton) par1GuiButton).enableFromClick();
|
||||
else buttonList.get(0).enabled = !buttonList.get(0).enabled;
|
||||
else buttonListMM.get(0).enabled = !buttonListMM.get(0).enabled;
|
||||
|
||||
mobMagnet.adult = buttonList.get(0).enabled;
|
||||
mobMagnet.adult = buttonListMM.get(0).enabled;
|
||||
|
||||
ThaumicTinkerer.netHandler.sendToServer(new PacketMobMagnetButton(mobMagnet));
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ public class GuiRemotePlacer extends GuiContainer {
|
||||
|
||||
int x, y;
|
||||
List<IRadioButton> radioButtons = new ArrayList<>();
|
||||
List<GuiButtonRP> buttonListRP = new ArrayList<>();
|
||||
TileRPlacer placer;
|
||||
Aspect aspectHovered = null;
|
||||
|
||||
@@ -42,24 +43,23 @@ public class GuiRemotePlacer extends GuiContainer {
|
||||
super.initGui();
|
||||
x = (width - xSize) / 2;
|
||||
y = (height - ySize) / 2;
|
||||
buttonListRP.clear();
|
||||
addButton(new GuiButtonRPRadio(0, x + 100, y + 0, placer.blocks == 1, radioButtons));
|
||||
addButton(new GuiButtonRPRadio(1, x + 100, y + 13, placer.blocks == 2, radioButtons));
|
||||
addButton(new GuiButtonRPRadio(2, x + 100, y + 26, placer.blocks == 3, radioButtons));
|
||||
addButton(new GuiButtonRPRadio(3, x + 100, y + 39, placer.blocks == 4, radioButtons));
|
||||
buttonList = buttonListRP;
|
||||
}
|
||||
|
||||
private void addButton(GuiButtonRP button) {
|
||||
buttonList.add(button);
|
||||
buttonListRP.add(button);
|
||||
if (button instanceof IRadioButton) radioButtons.add((IRadioButton) button);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton par1GuiButton) {
|
||||
if (par1GuiButton instanceof IRadioButton iRadioButton) iRadioButton.enableFromClick();
|
||||
else {
|
||||
var button0 = (GuiButtonRP) buttonList.get(0);
|
||||
button0.buttonEnabled = !button0.buttonEnabled;
|
||||
}
|
||||
if (par1GuiButton instanceof IRadioButton) ((IRadioButton) par1GuiButton).enableFromClick();
|
||||
else buttonListRP.get(0).buttonEnabled = !buttonListRP.get(0).buttonEnabled;
|
||||
|
||||
placer.blocks = par1GuiButton.id + 1;
|
||||
|
||||
|
||||
@@ -13,6 +13,9 @@ package thaumic.tinkerer.common;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import net.minecraft.command.ICommandManager;
|
||||
import net.minecraft.command.ServerCommandManager;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -28,12 +31,14 @@ import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLServerStartingEvent;
|
||||
import cpw.mods.fml.common.event.FMLServerStoppedEvent;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
|
||||
import thaumcraft.common.CommonProxy;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumic.tinkerer.api.InterModCommsOperations;
|
||||
import thaumic.tinkerer.common.core.commands.KamiUnlockedCommand;
|
||||
import thaumic.tinkerer.common.core.commands.MaxResearchCommand;
|
||||
import thaumic.tinkerer.common.core.commands.SetTendencyCommand;
|
||||
import thaumic.tinkerer.common.core.handler.ConfigHandler;
|
||||
import thaumic.tinkerer.common.core.proxy.TTCommonProxy;
|
||||
import thaumic.tinkerer.common.dim.WorldProviderBedrock;
|
||||
@@ -80,27 +85,13 @@ public class ThaumicTinkerer {
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void init(FMLInitializationEvent event) {
|
||||
proxy.init(event);
|
||||
if (ConfigHandler.enableKami && ConfigHandler.bedrockDimensionID != 0) {
|
||||
DimensionManager.registerProviderType(ConfigHandler.bedrockDimensionID, WorldProviderBedrock.class, false);
|
||||
DimensionManager.registerDimension(ConfigHandler.bedrockDimensionID, ConfigHandler.bedrockDimensionID);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
proxy.postInit(event);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void serverStarting(FMLServerStartingEvent event) {
|
||||
proxy.serverStarting(event);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void serverStopped(FMLServerStoppedEvent event) {
|
||||
proxy.serverStopped(event);
|
||||
public void serverStart(FMLServerStartingEvent event) {
|
||||
MinecraftServer server = MinecraftServer.getServer();
|
||||
ICommandManager command = server.getCommandManager();
|
||||
ServerCommandManager manager = (ServerCommandManager) command;
|
||||
manager.registerCommand(new SetTendencyCommand());
|
||||
manager.registerCommand(new MaxResearchCommand());
|
||||
manager.registerCommand(new KamiUnlockedCommand());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@@ -120,4 +111,18 @@ public class ThaumicTinkerer {
|
||||
public void blackListCCDevices(String classname) {
|
||||
PeripheralHandler.Blacklist.add(classname);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void init(FMLInitializationEvent event) {
|
||||
proxy.init(event);
|
||||
if (ConfigHandler.enableKami && ConfigHandler.bedrockDimensionID != 0) {
|
||||
DimensionManager.registerProviderType(ConfigHandler.bedrockDimensionID, WorldProviderBedrock.class, false);
|
||||
DimensionManager.registerDimension(ConfigHandler.bedrockDimensionID, ConfigHandler.bedrockDimensionID);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
proxy.postInit(event);
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -207,6 +208,11 @@ public class BlockAnimationTablet extends BlockModContainer {
|
||||
return new TileAnimationTablet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBlockName() {
|
||||
return LibBlockNames.ANIMATION_TABLET;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -134,6 +135,11 @@ public class BlockAspectAnalyzer extends BlockModContainer {
|
||||
return new TileAspectAnalyzer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBlockName() {
|
||||
return LibBlockNames.ASPECT_ANALYZER;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -152,6 +153,11 @@ public class BlockEnchanter extends BlockModContainer {
|
||||
return new TileEnchanter();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBlockName() {
|
||||
return LibBlockNames.ENCHANTER;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -178,6 +179,11 @@ public class BlockFunnel extends BlockModContainer {
|
||||
return new TileFunnel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBlockName() {
|
||||
return LibBlockNames.FUNNEL;
|
||||
|
||||
@@ -136,6 +136,11 @@ public abstract class BlockGas extends BlockMod implements ITTinkererBlock {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRegister() {
|
||||
return true;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package thaumic.tinkerer.common.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
@@ -46,6 +48,11 @@ public class BlockGolemConnector extends BlockCamo {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBlockName() {
|
||||
return LibBlockNames.GOLEMCONNECTOR;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package thaumic.tinkerer.common.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.BlockFarmland;
|
||||
@@ -52,6 +53,11 @@ public class BlockInfusedFarmland extends BlockFarmland implements ITTinkererBlo
|
||||
return new TileInfusedFarmland();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBlockName() {
|
||||
return LibBlockNames.BLOCK_INFUSED_FARMLAND;
|
||||
|
||||
@@ -6,7 +6,6 @@ import java.util.Random;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockCrops;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -38,6 +37,7 @@ public class BlockInfusedGrain extends BlockCrops implements ITTinkererBlock {
|
||||
|
||||
public static final int BREEDING_CHANCE = 10;
|
||||
private IIcon[][] icons;
|
||||
private TileInfusedGrain tileEntity;
|
||||
|
||||
// Returns 0-5 for primal aspects, or 6 if compound aspect
|
||||
public static int getNumberFromAspectForTexture(Aspect aspect) {
|
||||
@@ -116,6 +116,10 @@ public class BlockInfusedGrain extends BlockCrops implements ITTinkererBlock {
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int metadata) {
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if (tile instanceof TileInfusedGrain) {
|
||||
tileEntity = (TileInfusedGrain) tile;
|
||||
}
|
||||
super.breakBlock(world, x, y, z, block, metadata);
|
||||
}
|
||||
|
||||
@@ -126,11 +130,11 @@ public class BlockInfusedGrain extends BlockCrops implements ITTinkererBlock {
|
||||
Random rand = new Random();
|
||||
int count = 1;
|
||||
for (int i = 0; i < count; i++) {
|
||||
TileEntity tileGrain = world.getTileEntity(x, y, z);
|
||||
TileInfusedGrain tileGrain = getTileEntitySafe(world, x, y, z);
|
||||
ItemStack seedStack = new ItemStack(ThaumicTinkerer.registry.getFirstItemFromClass(ItemInfusedSeeds.class));
|
||||
ItemInfusedSeeds.setAspect(seedStack, getAspectDropped(world, x, y, z, metadata));
|
||||
if (tileGrain != null) {
|
||||
ItemInfusedSeeds.setAspectTendencies(seedStack, ((TileInfusedGrain) tileGrain).primalTendencies);
|
||||
ItemInfusedSeeds.setAspectTendencies(seedStack, tileGrain.primalTendencies);
|
||||
}
|
||||
while (rand.nextInt(10000) < Math.pow(getPrimalTendencyCount(world, x, y, z, Aspect.ENTROPY), 2)) {
|
||||
seedStack.stackSize++;
|
||||
@@ -140,42 +144,27 @@ public class BlockInfusedGrain extends BlockCrops implements ITTinkererBlock {
|
||||
}
|
||||
if (metadata >= 7) {
|
||||
do {
|
||||
Aspect aspect = getAspect(world, x, y, z);
|
||||
Aspect aspect = getAspectSafe(world, x, y, z);
|
||||
ItemStack retItem = AspectCropLootManager.getLootForAspect(aspect);
|
||||
if (retItem != null) ret.add(retItem);
|
||||
|
||||
} while (world.rand.nextInt(75) < getPrimalTendencyCount(world, x, y, z, Aspect.ORDER));
|
||||
}
|
||||
tileEntity = null;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z, boolean willHarvest) {
|
||||
if (willHarvest) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.removedByPlayer(world, player, x, y, z, willHarvest);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void harvestBlock(World world, EntityPlayer player, int x, int y, int z, int meta) {
|
||||
super.harvestBlock(world, player, x, y, z, meta);
|
||||
world.setBlockToAir(x, y, z);
|
||||
}
|
||||
|
||||
public int getPrimalTendencyCount(World world, int x, int y, int z, Aspect aspect) {
|
||||
TileEntity tileGrain = world.getTileEntity(x, y, z);
|
||||
return tileGrain instanceof TileInfusedGrain ? ((TileInfusedGrain) tileGrain).primalTendencies.getAmount(aspect)
|
||||
: 0;
|
||||
TileInfusedGrain tileGrain = getTileEntitySafe(world, x, y, z);
|
||||
return tileGrain != null ? tileGrain.primalTendencies.getAmount(aspect) : 0;
|
||||
}
|
||||
|
||||
private void fertilizeSoil(World world, int x, int y, int z, int metadata) {
|
||||
if (metadata >= 7) {
|
||||
do {
|
||||
if (world.getTileEntity(x, y - 1, z) instanceof TileInfusedFarmland) {
|
||||
Aspect currentAspect = getAspect(world, x, y, z);
|
||||
Aspect currentAspect = getAspectSafe(world, x, y, z);
|
||||
((TileInfusedFarmland) world.getTileEntity(x, y - 1, z)).aspectList.add(currentAspect, 1);
|
||||
((TileInfusedFarmland) world.getTileEntity(x, y - 1, z)).reduceSaturatedAspects();
|
||||
world.markBlockForUpdate(x, y - 1, z);
|
||||
@@ -192,7 +181,7 @@ public class BlockInfusedGrain extends BlockCrops implements ITTinkererBlock {
|
||||
}
|
||||
|
||||
public Aspect getAspectDropped(World world, int x, int y, int z, int metadata) {
|
||||
Aspect currentAspect = getAspect(world, x, y, z);
|
||||
Aspect currentAspect = getAspectSafe(world, x, y, z);
|
||||
if (metadata >= 7 && currentAspect != null) {
|
||||
if (world.getTileEntity(x, y - 1, z) instanceof TileInfusedFarmland) {
|
||||
AspectList farmlandAspectList = ((TileInfusedFarmland) world.getTileEntity(x, y - 1, z)).aspectList;
|
||||
@@ -211,6 +200,11 @@ public class BlockInfusedGrain extends BlockCrops implements ITTinkererBlock {
|
||||
return currentAspect;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBlockName() {
|
||||
return LibBlockNames.INFUSED_GRAIN_BLOCK;
|
||||
@@ -256,4 +250,31 @@ public class BlockInfusedGrain extends BlockCrops implements ITTinkererBlock {
|
||||
return null;
|
||||
}
|
||||
|
||||
private TileInfusedGrain getTileEntitySafe(World world, int x, int y, int z) {
|
||||
if (tileEntity != null) {
|
||||
return tileEntity;
|
||||
}
|
||||
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
if (tile != null && tile instanceof TileInfusedGrain) {
|
||||
return (TileInfusedGrain) tile;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private Aspect getAspectSafe(World world, int x, int y, int z) {
|
||||
if (tileEntity != null) {
|
||||
return tileEntity.aspect;
|
||||
}
|
||||
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
if (tile != null && tile instanceof TileInfusedGrain) {
|
||||
return ((TileInfusedGrain) tile).aspect;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
@@ -190,6 +191,11 @@ public class BlockMagnet extends BlockModContainer implements IMultiTileEntityBl
|
||||
return (metadata & 2) == 2 ? new TileMobMagnet() : new TileMagnet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBlockName() {
|
||||
return LibBlockNames.MAGNET;
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -40,6 +42,11 @@ public abstract class BlockMod extends Block implements ITTinkererBlock {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRegister() {
|
||||
return true;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -64,6 +65,11 @@ public class BlockPlatform extends BlockCamo {
|
||||
return new TileCamo();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBlockName() {
|
||||
return LibBlockNames.PLATFORM;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package thaumic.tinkerer.common.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -82,6 +83,11 @@ public class BlockRPlacer extends BlockCamo implements IWandable {
|
||||
return new TileRPlacer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBlockName() {
|
||||
return LibBlockNames.REMOTE_PLACER;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -181,6 +182,11 @@ public class BlockRepairer extends BlockModContainer {
|
||||
return new TileRepairer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBlockName() {
|
||||
return LibBlockNames.REPAIRER;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -93,6 +94,11 @@ public class BlockSummon extends Block implements ITTinkererBlock {
|
||||
: par1 == ForgeDirection.DOWN.ordinal() ? Block.getBlockFromName("obsidian").getIcon(0, 0) : iconSide;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBlockName() {
|
||||
return LibBlockNames.SPAWNER;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package thaumic.tinkerer.common.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockSlab;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -81,8 +81,10 @@ public class BlockTravelSlab extends BlockSlab implements ITTinkererBlock {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block[] getMetaBlocks() {
|
||||
return new Block[] { new BlockTravelSlab(true) };
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
ArrayList result = new ArrayList();
|
||||
result.add(true);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package thaumic.tinkerer.common.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.BlockStairs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -30,6 +32,11 @@ public class BlockTravelStairs extends BlockStairs implements ITTinkererBlock {
|
||||
setCreativeTab(ModCreativeTab.INSTANCE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBlockName() {
|
||||
return LibBlockNames.TRAVEL_STAIRS;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package thaumic.tinkerer.common.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockSlab;
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
import net.minecraft.block.material.Material;
|
||||
@@ -88,8 +88,10 @@ public class BlockWardSlab extends BlockSlab implements ITTinkererBlock, ITileEn
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block[] getMetaBlocks() {
|
||||
return new Block[] { new BlockWardSlab(true) };
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
ArrayList result = new ArrayList();
|
||||
result.add(true);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -7,6 +7,7 @@ import static net.minecraftforge.common.util.ForgeDirection.SOUTH;
|
||||
import static net.minecraftforge.common.util.ForgeDirection.UP;
|
||||
import static net.minecraftforge.common.util.ForgeDirection.WEST;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Random;
|
||||
|
||||
@@ -388,6 +389,11 @@ public abstract class BlockFireBase extends BlockFire implements ITTinkererBlock
|
||||
return MapColor.tntColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRegister() {
|
||||
return true;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.block.kami;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -150,6 +151,11 @@ public class BlockWarpGate extends BlockModContainer {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBlockName() {
|
||||
return LibBlockNames.WARP_GATE;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.block.quartz;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
@@ -129,6 +130,11 @@ public class BlockDarkQuartz extends BlockMod {
|
||||
pillarDarkQuartzIcon = IconHelper.forName(par1IconRegister, "pillarDarkQuartz1");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBlockName() {
|
||||
return LibBlockNames.DARK_QUARTZ;
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.block.quartz;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockSlab;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -83,8 +83,10 @@ public class BlockDarkQuartzSlab extends BlockSlab implements ITTinkererBlock {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block[] getMetaBlocks() {
|
||||
return new Block[] { new BlockDarkQuartzSlab(true) };
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
ArrayList result = new ArrayList();
|
||||
result.add(true);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.block.quartz;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.BlockStairs;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -33,6 +35,11 @@ public class BlockDarkQuartzStairs extends BlockStairs implements ITTinkererBloc
|
||||
setCreativeTab(ModCreativeTab.INSTANCE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBlockName() {
|
||||
return LibBlockNames.DARK_QUARTZ_STAIRS;
|
||||
|
||||
@@ -65,13 +65,11 @@ public class TileEntityRelay extends TileEntity implements IMovableTile {
|
||||
if (partnerX - xCoord != 0) {
|
||||
xInc = ((float) Math.copySign(.05, partnerX - xCoord)) * (worldObj.getTotalWorldTime() % 20);
|
||||
}
|
||||
if (worldObj.isRemote) {
|
||||
ThaumicTinkerer.tcProxy.sparkle(
|
||||
(float) (0.5 + i + xInc),
|
||||
(float) (yCoord + 0.5),
|
||||
(float) (j + 0.5 + zInc),
|
||||
xCoord < partnerX || zCoord > partnerX ? 2 : 14);
|
||||
}
|
||||
ThaumicTinkerer.tcProxy.sparkle(
|
||||
(float) (0.5 + i + xInc),
|
||||
(float) (yCoord + 0.5),
|
||||
(float) (j + 0.5 + zInc),
|
||||
xCoord < partnerX || zCoord > partnerX ? 2 : 14);
|
||||
j += Math.copySign(1, partnerZ - zCoord);
|
||||
} while (j < partnerZ);
|
||||
i += Math.copySign(1, partnerX - xCoord);
|
||||
|
||||
@@ -17,8 +17,7 @@ public class TileForcefield extends TileEntity {
|
||||
worldObj.setBlockToAir(xCoord, yCoord, zCoord);
|
||||
}
|
||||
ticks--;
|
||||
if (worldObj.isRemote) {
|
||||
ThaumicTinkerer.tcProxy.blockSparkle(worldObj, xCoord, yCoord, zCoord, 255, 1);
|
||||
}
|
||||
|
||||
ThaumicTinkerer.tcProxy.blockSparkle(worldObj, xCoord, yCoord, zCoord, 255, 1);
|
||||
}
|
||||
}
|
||||
@@ -73,9 +73,7 @@ public class TileMagnet extends TileEntity implements IPeripheral, IMovableTile,
|
||||
|
||||
if (distanceSqrd > 1) {
|
||||
MiscHelper.setEntityMotionFromVector(entity, new Vector3(x1, y1, z1), speedMod * 0.25F);
|
||||
if (worldObj.isRemote) {
|
||||
ThaumicTinkerer.tcProxy.sparkle((float) x2, (float) y2, (float) z2, blue ? 2 : 4);
|
||||
}
|
||||
ThaumicTinkerer.tcProxy.sparkle((float) x2, (float) y2, (float) z2, blue ? 2 : 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,6 @@ import thaumic.tinkerer.common.lib.LibBlockNames;
|
||||
public class TileRepairer extends TileEntity
|
||||
implements ISidedInventory, IAspectContainer, IEssentiaTransport, IMovableTile {
|
||||
|
||||
private static final String TAG_TOOK_LAST_TICK = "tookLastTick";
|
||||
private static final Map<Aspect, Integer> repairValues = new HashMap<>();
|
||||
|
||||
static {
|
||||
@@ -54,25 +53,12 @@ public class TileRepairer extends TileEntity
|
||||
|
||||
public int ticksExisted = 0;
|
||||
public boolean tookLastTick = true;
|
||||
int dmgLastTick = 0;
|
||||
ItemStack[] inventorySlots = new ItemStack[1];
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
if (++ticksExisted % 10 == 0) {
|
||||
if (worldObj.isRemote) {
|
||||
if (tookLastTick) {
|
||||
ThaumicTinkerer.tcProxy.sparkle(
|
||||
(float) (xCoord + 0.25 + Math.random() / 2F),
|
||||
(float) (yCoord + 1 + Math.random() / 2F),
|
||||
(float) (zCoord + 0.25 + Math.random() / 2F),
|
||||
0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
boolean oldTookLastTick = tookLastTick;
|
||||
tookLastTick = false;
|
||||
|
||||
if (Loader.isModLoaded("TConstruct") && ConfigHandler.repairTConTools) {
|
||||
if (inventorySlots[0] != null) {
|
||||
if (TinkersConstructCompat.isTConstructTool(inventorySlots[0])) {
|
||||
@@ -80,11 +66,18 @@ public class TileRepairer extends TileEntity
|
||||
if (dmg > 0) {
|
||||
int essentia = drawEssentia();
|
||||
TinkersConstructCompat.fixDamage(inventorySlots[0], essentia);
|
||||
int newDmg = TinkersConstructCompat.getDamage(inventorySlots[0]);
|
||||
tookLastTick = newDmg != dmg;
|
||||
markDirty();
|
||||
}
|
||||
if (tookLastTick != oldTookLastTick) worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
if (dmgLastTick != 0 && dmgLastTick != dmg) {
|
||||
ThaumicTinkerer.tcProxy.sparkle(
|
||||
(float) (xCoord + 0.25 + Math.random() / 2F),
|
||||
(float) (yCoord + 1 + Math.random() / 2F),
|
||||
(float) (zCoord + 0.25 + Math.random() / 2F),
|
||||
0);
|
||||
tookLastTick = true;
|
||||
} else tookLastTick = false;
|
||||
} else tookLastTick = false;
|
||||
dmgLastTick = inventorySlots[0] == null ? 0
|
||||
: TinkersConstructCompat.getDamage(inventorySlots[0]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -92,12 +85,20 @@ public class TileRepairer extends TileEntity
|
||||
if (inventorySlots[0] != null && inventorySlots[0].getItemDamage() > 0) {
|
||||
int essentia = drawEssentia();
|
||||
int dmg = inventorySlots[0].getItemDamage();
|
||||
int newDmg = Math.max(0, dmg - essentia);
|
||||
inventorySlots[0].setItemDamage(newDmg);
|
||||
tookLastTick = newDmg != dmg;
|
||||
inventorySlots[0].setItemDamage(Math.max(0, dmg - essentia));
|
||||
markDirty();
|
||||
}
|
||||
if (tookLastTick != oldTookLastTick) worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
|
||||
if (dmgLastTick != 0 && dmgLastTick != dmg) {
|
||||
ThaumicTinkerer.tcProxy.sparkle(
|
||||
(float) (xCoord + 0.25 + Math.random() / 2F),
|
||||
(float) (yCoord + 1 + Math.random() / 2F),
|
||||
(float) (zCoord + 0.25 + Math.random() / 2F),
|
||||
0);
|
||||
tookLastTick = true;
|
||||
} else tookLastTick = false;
|
||||
} else tookLastTick = false;
|
||||
|
||||
dmgLastTick = inventorySlots[0] == null ? 0 : inventorySlots[0].getItemDamage();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +117,6 @@ public class TileRepairer extends TileEntity
|
||||
}
|
||||
|
||||
public void readCustomNBT(NBTTagCompound par1NBTTagCompound) {
|
||||
tookLastTick = par1NBTTagCompound.getBoolean(TAG_TOOK_LAST_TICK);
|
||||
NBTTagList nbttaglist = par1NBTTagCompound.getTagList("Items", Constants.NBT.TAG_COMPOUND);
|
||||
inventorySlots = new ItemStack[1];
|
||||
|
||||
@@ -127,7 +127,6 @@ public class TileRepairer extends TileEntity
|
||||
}
|
||||
|
||||
public void writeCustomNBT(NBTTagCompound par1NBTTagCompound) {
|
||||
par1NBTTagCompound.setBoolean(TAG_TOOK_LAST_TICK, tookLastTick);
|
||||
NBTTagList nbttaglist = new NBTTagList();
|
||||
if (inventorySlots[0] != null) {
|
||||
NBTTagCompound tagList = new NBTTagCompound();
|
||||
|
||||
@@ -51,23 +51,22 @@ public class TileWarpGate extends TileEntity implements IInventory {
|
||||
if (!destGate.locked) {
|
||||
player.worldObj.playSoundAtEntity(player, "thaumcraft:wand", 1F, 1F);
|
||||
|
||||
if (player.worldObj.isRemote) {
|
||||
for (int i = 0; i < 20; i++) ThaumicTinkerer.tcProxy.sparkle(
|
||||
(float) player.posX + player.worldObj.rand.nextFloat() - 0.5F,
|
||||
(float) player.posY + player.worldObj.rand.nextFloat(),
|
||||
(float) player.posZ + player.worldObj.rand.nextFloat() - 0.5F,
|
||||
6);
|
||||
}
|
||||
for (int i = 0; i < 20; i++) ThaumicTinkerer.tcProxy.sparkle(
|
||||
(float) player.posX + player.worldObj.rand.nextFloat() - 0.5F,
|
||||
(float) player.posY + player.worldObj.rand.nextFloat(),
|
||||
(float) player.posZ + player.worldObj.rand.nextFloat() - 0.5F,
|
||||
6);
|
||||
|
||||
player.mountEntity(null);
|
||||
if (player instanceof EntityPlayerMP) ((EntityPlayerMP) player).playerNetServerHandler
|
||||
.setPlayerLocation(x + 0.5, y + 1.6, z + 0.5, player.rotationYaw, player.rotationPitch);
|
||||
if (player.worldObj.isRemote) {
|
||||
for (int i = 0; i < 20; i++) ThaumicTinkerer.tcProxy.sparkle(
|
||||
(float) player.posX + player.worldObj.rand.nextFloat() - 0.5F,
|
||||
(float) player.posY + player.worldObj.rand.nextFloat(),
|
||||
(float) player.posZ + player.worldObj.rand.nextFloat() - 0.5F,
|
||||
6);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 20; i++) ThaumicTinkerer.tcProxy.sparkle(
|
||||
(float) player.posX + player.worldObj.rand.nextFloat() - 0.5F,
|
||||
(float) player.posY + player.worldObj.rand.nextFloat(),
|
||||
(float) player.posZ + player.worldObj.rand.nextFloat() - 0.5F,
|
||||
6);
|
||||
|
||||
player.worldObj.playSoundAtEntity(player, "thaumcraft:wand", 1F, 0.1F);
|
||||
return true;
|
||||
} else
|
||||
|
||||
+6
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.block.transvector;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -133,6 +134,11 @@ public class BlockTransvectorDislocator extends BlockCamo {
|
||||
return new TileTransvectorDislocator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBlockName() {
|
||||
return LibBlockNames.DISLOCATOR;
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.block.transvector;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
@@ -47,6 +49,11 @@ public class BlockTransvectorInterface extends BlockCamo {
|
||||
return new TileTransvectorInterface();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBlockName() {
|
||||
return LibBlockNames.INTERFACE;
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
package thaumic.tinkerer.common.compat;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class EMTCompat {
|
||||
|
||||
public static final boolean EMTLoaded = Loader.isModLoaded("EMT");
|
||||
public static Item electricHoe;
|
||||
|
||||
public static void init() {
|
||||
electricHoe = GameRegistry.findItem("EMT", "ElectricHoeGrowth");
|
||||
}
|
||||
}
|
||||
@@ -41,7 +41,7 @@ public class AspectCropLootManager {
|
||||
Random rand = new Random();
|
||||
int randInt = rand.nextInt(sum);
|
||||
for (Map.Entry<ItemStack, Integer> pair : aspectHashmap.entrySet()) {
|
||||
if (randInt < pair.getValue()) {
|
||||
if (randInt <= 0) {
|
||||
return pair.getKey().copy();
|
||||
}
|
||||
randInt -= pair.getValue();
|
||||
@@ -55,7 +55,15 @@ public class AspectCropLootManager {
|
||||
}
|
||||
|
||||
public static void addAspectLoot(Aspect aspect, String target) {
|
||||
|
||||
addAspectLoot(aspect, target, 1);
|
||||
for (String ore : OreDictionary.getOreNames()) {
|
||||
if (ore.contains(WordUtils.capitalizeFully(target)) || ore.contains(target)) {
|
||||
for (ItemStack stack : OreDictionary.getOres(ore)) {
|
||||
addAspectLoot(aspect, stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void addAspectLoot(Aspect aspect, String target, int count) {
|
||||
@@ -209,7 +217,8 @@ public class AspectCropLootManager {
|
||||
addAspectLoot(Aspect.MAGIC, new ItemStack(ConfigItems.itemShard, 1, 6));
|
||||
|
||||
addAspectLoot(Aspect.HEAL, new ItemStack(Items.golden_apple));
|
||||
addAspectLoot(Aspect.HEAL, new ItemStack(Items.cake));
|
||||
|
||||
addAspectLoot(Aspect.HEAL, new ItemStack(Blocks.cake));
|
||||
|
||||
addAspectLoot(Aspect.SENSES, new ItemStack(Items.dye, 20, 4));
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package thaumic.tinkerer.common.core.helper;
|
||||
|
||||
import static thaumic.tinkerer.common.compat.EMTCompat.EMTLoaded;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.block.IGrowable;
|
||||
import net.minecraftforge.event.entity.player.BonemealEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
||||
|
||||
@@ -10,7 +8,6 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
import thaumic.tinkerer.common.block.BlockInfusedGrain;
|
||||
import thaumic.tinkerer.common.compat.EMTCompat;
|
||||
import thaumic.tinkerer.common.core.handler.ConfigHandler;
|
||||
|
||||
/**
|
||||
@@ -29,37 +26,26 @@ public class BonemealEventHandler {
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isMagicHoe(ItemStack stack) {
|
||||
if (stack == null) return false;
|
||||
var item = stack.getItem();
|
||||
return item == ConfigItems.itemHoeElemental || (EMTLoaded && item == EMTCompat.electricHoe);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||
var world = event.world;
|
||||
if (world.isRemote) return;
|
||||
if (!(world.getBlock(event.x, event.y, event.z) instanceof BlockInfusedGrain infusedGrain)) return;
|
||||
if (!event.world.isRemote) {
|
||||
if (event.world.getBlock(event.x, event.y, event.z) instanceof BlockInfusedGrain) {
|
||||
if (event.entityPlayer != null && event.entityPlayer.getCurrentEquippedItem() != null) {
|
||||
if (event.entityPlayer.getCurrentEquippedItem().getItem() == ConfigItems.itemHoeElemental) {
|
||||
IGrowable igrowable = (IGrowable) event.world.getBlock(event.x, event.y, event.z);
|
||||
|
||||
var player = event.entityPlayer;
|
||||
if (player == null) return;
|
||||
|
||||
var hoeOfGrowth = player.getCurrentEquippedItem();
|
||||
if (!isMagicHoe(hoeOfGrowth)) return;
|
||||
|
||||
if (!infusedGrain.func_149851_a(world, event.x, event.y, event.z, false)
|
||||
|| !infusedGrain.func_149852_a(world, world.rand, event.x, event.y, event.z)) {
|
||||
return;
|
||||
if (igrowable.func_149851_a(event.world, event.x, event.y, event.z, event.world.isRemote)) {
|
||||
if (!event.world.isRemote) {
|
||||
if (igrowable.func_149852_a(event.world, event.world.rand, event.x, event.y, event.z)) {
|
||||
igrowable.func_149853_b(event.world, event.world.rand, event.x, event.y, event.z);
|
||||
}
|
||||
}
|
||||
}
|
||||
event.entityPlayer.getCurrentEquippedItem().damageItem(25, event.entityPlayer);
|
||||
Thaumcraft.proxy.blockSparkle(event.world, event.x, event.y, event.z, 0, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
infusedGrain.func_149853_b(world, world.rand, event.x, event.y, event.z);
|
||||
hoeOfGrowth.damageItem(25, player);
|
||||
Thaumcraft.proxy.blockSparkle(world, event.x, event.y, event.z, 0, 2);
|
||||
world.playSoundEffect(
|
||||
event.x + 0.5D,
|
||||
event.y + 0.5D,
|
||||
event.z + 0.5D,
|
||||
"thaumcraft:wand",
|
||||
0.75F,
|
||||
0.9F + world.rand.nextFloat() * 0.2F);
|
||||
}
|
||||
}
|
||||
@@ -1,22 +1,20 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as part of the ThaumicTinkerer Mod.
|
||||
* <p>
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0
|
||||
* License (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
* <p>
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 4. Thaumcraft 4 (c) Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
* <p>
|
||||
*
|
||||
* File Created @ [4 Sep 2013, 16:29:41 (GMT)]
|
||||
*/
|
||||
package thaumic.tinkerer.common.core.proxy;
|
||||
|
||||
import net.minecraft.command.ICommandManager;
|
||||
import net.minecraft.command.ServerCommandManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
@@ -26,10 +24,9 @@ import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLServerStartingEvent;
|
||||
import cpw.mods.fml.common.event.FMLServerStoppedEvent;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import dan200.computercraft.api.ComputerCraftAPI;
|
||||
@@ -54,12 +51,8 @@ import thaumic.tinkerer.common.ThaumicTinkerer;
|
||||
import thaumic.tinkerer.common.block.tile.TileFunnel;
|
||||
import thaumic.tinkerer.common.block.tile.TileRepairer;
|
||||
import thaumic.tinkerer.common.block.tile.transvector.TileTransvectorInterface;
|
||||
import thaumic.tinkerer.common.compat.EMTCompat;
|
||||
import thaumic.tinkerer.common.compat.EnderIO;
|
||||
import thaumic.tinkerer.common.compat.FumeTool;
|
||||
import thaumic.tinkerer.common.core.commands.KamiUnlockedCommand;
|
||||
import thaumic.tinkerer.common.core.commands.MaxResearchCommand;
|
||||
import thaumic.tinkerer.common.core.commands.SetTendencyCommand;
|
||||
import thaumic.tinkerer.common.core.handler.ConfigHandler;
|
||||
import thaumic.tinkerer.common.core.handler.ModCreativeTab;
|
||||
import thaumic.tinkerer.common.core.handler.kami.DimensionalShardDropHandler;
|
||||
@@ -75,6 +68,7 @@ import thaumic.tinkerer.common.item.SpellClothCraftingHandler;
|
||||
import thaumic.tinkerer.common.item.foci.ItemFocusDeflect;
|
||||
import thaumic.tinkerer.common.item.kami.wand.CapIchor;
|
||||
import thaumic.tinkerer.common.item.kami.wand.RodIchorcloth;
|
||||
import thaumic.tinkerer.common.lib.LibMisc;
|
||||
import thaumic.tinkerer.common.network.GuiHandler;
|
||||
import thaumic.tinkerer.common.network.PlayerTracker;
|
||||
import thaumic.tinkerer.common.network.packet.PacketEnchanterAddEnchant;
|
||||
@@ -94,7 +88,6 @@ import thaumic.tinkerer.common.peripheral.OpenComputers.DriverEssentiaTransport;
|
||||
import thaumic.tinkerer.common.peripheral.OpenComputers.DriverIAspectContainer;
|
||||
import thaumic.tinkerer.common.peripheral.PeripheralHandler;
|
||||
import thaumic.tinkerer.common.potion.ModPotions;
|
||||
import thaumic.tinkerer.common.potion.PotionEffectHandlerServer;
|
||||
import thaumic.tinkerer.common.research.ResearchHelper;
|
||||
|
||||
public class TTCommonProxy {
|
||||
@@ -103,7 +96,6 @@ public class TTCommonProxy {
|
||||
public WandCap capIchor;
|
||||
public WandRod rodIchor;
|
||||
public Item.ToolMaterial toolMaterialIchor;
|
||||
private PotionEffectHandlerServer potionHandlerServer;
|
||||
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
toolMaterialIchor = EnumHelper.addToolMaterial("ICHOR", 4, -1, 10F, 5F, 25);
|
||||
@@ -121,6 +113,7 @@ public class TTCommonProxy {
|
||||
if (Loader.isModLoaded("ComputerCraft")) {
|
||||
initCCPeripherals();
|
||||
}
|
||||
registerVersionChecker();
|
||||
|
||||
kamiRarity = EnumHelper.addEnum(
|
||||
new Class[][] { { EnumRarity.class, EnumChatFormatting.class, String.class } },
|
||||
@@ -165,8 +158,43 @@ public class TTCommonProxy {
|
||||
} else {
|
||||
ThaumicTinkerer.log.info("Skipping TC Multipart integration");
|
||||
}
|
||||
}
|
||||
|
||||
EMTCompat.init();
|
||||
protected void registerPackets() {
|
||||
ThaumicTinkerer.netHandler
|
||||
.registerMessage(PacketSoulHearts.class, PacketSoulHearts.class, 142 + 0, Side.CLIENT);
|
||||
ThaumicTinkerer.netHandler
|
||||
.registerMessage(PacketToggleArmor.class, PacketToggleArmor.class, 142 + 1, Side.CLIENT);
|
||||
ThaumicTinkerer.netHandler
|
||||
.registerMessage(PacketToggleArmor.class, PacketToggleArmor.class, 142 + 2, Side.SERVER);
|
||||
ThaumicTinkerer.netHandler
|
||||
.registerMessage(PacketWarpGateButton.class, PacketWarpGateButton.class, 142 + 3, Side.SERVER);
|
||||
ThaumicTinkerer.netHandler
|
||||
.registerMessage(PacketWarpGateTeleport.class, PacketWarpGateTeleport.class, 142 + 4, Side.SERVER);
|
||||
ThaumicTinkerer.netHandler.registerMessage(
|
||||
PacketEnchanterAddEnchant.class,
|
||||
PacketEnchanterAddEnchant.class,
|
||||
142 + 5,
|
||||
Side.SERVER);
|
||||
ThaumicTinkerer.netHandler.registerMessage(
|
||||
PacketEnchanterStartWorking.class,
|
||||
PacketEnchanterStartWorking.class,
|
||||
142 + 6,
|
||||
Side.SERVER);
|
||||
ThaumicTinkerer.netHandler
|
||||
.registerMessage(PacketMobMagnetButton.class, PacketMobMagnetButton.class, 142 + 7, Side.SERVER);
|
||||
ThaumicTinkerer.netHandler
|
||||
.registerMessage(PacketTabletButton.class, PacketTabletButton.class, 142 + 8, Side.SERVER);
|
||||
ThaumicTinkerer.netHandler
|
||||
.registerMessage(PacketPlacerButton.class, PacketPlacerButton.class, 142 + 9, Side.SERVER);
|
||||
}
|
||||
|
||||
public void registerVersionChecker() {
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
compound.setString("curseProjectName", "75598-thaumic-tinkerer");
|
||||
compound.setString("curseFilenameParser", "ThaumicTinkerer-[].jar");
|
||||
compound.setString("modDisplayName", "Thaumic Tinkerer");
|
||||
FMLInterModComms.sendRuntimeMessage(LibMisc.MOD_ID, "VersionChecker", "addCurseCheck", compound);
|
||||
}
|
||||
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
@@ -176,41 +204,6 @@ public class TTCommonProxy {
|
||||
ItemFocusDeflect.setupBlackList();
|
||||
}
|
||||
|
||||
public void serverStarting(FMLServerStartingEvent event) {
|
||||
MinecraftServer server = MinecraftServer.getServer();
|
||||
ICommandManager command = server.getCommandManager();
|
||||
ServerCommandManager manager = (ServerCommandManager) command;
|
||||
manager.registerCommand(new SetTendencyCommand());
|
||||
manager.registerCommand(new MaxResearchCommand());
|
||||
manager.registerCommand(new KamiUnlockedCommand());
|
||||
this.potionHandlerServer = new PotionEffectHandlerServer();
|
||||
MinecraftForge.EVENT_BUS.register(potionHandlerServer);
|
||||
FMLCommonHandler.instance().bus().register(potionHandlerServer);
|
||||
}
|
||||
|
||||
public void serverStopped(FMLServerStoppedEvent event) {
|
||||
if (this.potionHandlerServer != null) {
|
||||
MinecraftForge.EVENT_BUS.unregister(potionHandlerServer);
|
||||
FMLCommonHandler.instance().bus().unregister(potionHandlerServer);
|
||||
this.potionHandlerServer = null;
|
||||
}
|
||||
}
|
||||
|
||||
// spotless:off
|
||||
protected void registerPackets() {
|
||||
ThaumicTinkerer.netHandler.registerMessage(PacketSoulHearts.class, PacketSoulHearts.class, 142 + 0, Side.CLIENT);
|
||||
ThaumicTinkerer.netHandler.registerMessage(PacketToggleArmor.class, PacketToggleArmor.class, 142 + 1, Side.CLIENT);
|
||||
ThaumicTinkerer.netHandler.registerMessage(PacketToggleArmor.class, PacketToggleArmor.class, 142 + 2, Side.SERVER);
|
||||
ThaumicTinkerer.netHandler.registerMessage(PacketWarpGateButton.class, PacketWarpGateButton.class, 142 + 3, Side.SERVER);
|
||||
ThaumicTinkerer.netHandler.registerMessage(PacketWarpGateTeleport.class, PacketWarpGateTeleport.class, 142 + 4, Side.SERVER);
|
||||
ThaumicTinkerer.netHandler.registerMessage(PacketEnchanterAddEnchant.class, PacketEnchanterAddEnchant.class, 142 + 5, Side.SERVER);
|
||||
ThaumicTinkerer.netHandler.registerMessage(PacketEnchanterStartWorking.class, PacketEnchanterStartWorking.class, 142 + 6, Side.SERVER);
|
||||
ThaumicTinkerer.netHandler.registerMessage(PacketMobMagnetButton.class, PacketMobMagnetButton.class, 142 + 7, Side.SERVER);
|
||||
ThaumicTinkerer.netHandler.registerMessage(PacketTabletButton.class, PacketTabletButton.class, 142 + 8, Side.SERVER);
|
||||
ThaumicTinkerer.netHandler.registerMessage(PacketPlacerButton.class, PacketPlacerButton.class, 142 + 9, Side.SERVER);
|
||||
}
|
||||
// spotless:on
|
||||
|
||||
@Optional.Method(modid = "EnderIO")
|
||||
protected void InitEnderIO() {
|
||||
EnderIO.registerPlanters();
|
||||
|
||||
@@ -71,7 +71,7 @@ public class ModEnchantmentHandler {
|
||||
int finalStrike = EnchantmentHelper.getEnchantmentLevel(LibEnchantIDs.finalStrike, heldItem);
|
||||
if (finalStrike > 0) {
|
||||
Random rand = new Random();
|
||||
if (finalStrike > rand.nextInt(19)) {
|
||||
if ((finalStrike >= 19 || rand.nextInt(20 - finalStrike) == 0)) {
|
||||
event.ammount *= 3;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package thaumic.tinkerer.common.item;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
@@ -30,6 +32,11 @@ public class ItemBlockFire extends ItemBlock implements ITTinkererItem {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemName() {
|
||||
return ((ITTinkererBlock) field_150939_a).getBlockName();
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.item;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -37,6 +39,11 @@ public class ItemBlockMagnet extends ItemBlock implements ITTinkererItem {
|
||||
return "tile." + (par1ItemStack.getItemDamage() == 0 ? LibBlockNames.MAGNET : LibBlockNames.MOB_MAGNET);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemName() {
|
||||
return LibBlockNames.MAGNET;
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.item;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -131,6 +133,11 @@ public class ItemBloodSword extends ItemSword implements IRepairable, ITTinkerer
|
||||
return cache;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemName() {
|
||||
return LibItemNames.BLOOD_SWORD;
|
||||
|
||||
@@ -11,9 +11,10 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.item;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -47,8 +48,10 @@ public class ItemGas extends ItemBase {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item[] getMetaItems() {
|
||||
return new Item[] { new ItemGas(ThaumicTinkerer.registry.getFirstBlockFromClass(BlockGaseousLight.class)) };
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
ArrayList<Object> result = new ArrayList<>();
|
||||
result.add(ThaumicTinkerer.registry.getFirstBlockFromClass(BlockGaseousLight.class));
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,7 +16,6 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -66,7 +65,6 @@ public class ItemGasRemover extends ItemBase {
|
||||
|
||||
@Override
|
||||
public ThaumicTinkererRecipe getRecipeItem() {
|
||||
Item[] gasTypes = ThaumicTinkerer.registry.getItemArrayFromClass(ItemGas.class);
|
||||
return new ThaumicTinkererArcaneRecipe(
|
||||
LibResearch.KEY_GAS_REMOVER,
|
||||
LibResearch.KEY_GAS_REMOVER,
|
||||
@@ -78,9 +76,9 @@ public class ItemGasRemover extends ItemBase {
|
||||
'D',
|
||||
new ItemStack(ThaumicTinkerer.registry.getFirstItemFromClass(ItemDarkQuartz.class)),
|
||||
'T',
|
||||
new ItemStack(gasTypes[0]),
|
||||
new ItemStack(ThaumicTinkerer.registry.getItemFromClass(ItemGas.class).get(0)),
|
||||
'G',
|
||||
new ItemStack(gasTypes[1]),
|
||||
new ItemStack(ThaumicTinkerer.registry.getItemFromClass(ItemGas.class).get(1)),
|
||||
'Q',
|
||||
new ItemStack(Items.quartz));
|
||||
}
|
||||
|
||||
@@ -118,6 +118,11 @@ public class ItemInfusedPotion extends ItemPotion implements ITTinkererItem {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemName() {
|
||||
return LibItemNames.INFUSED_POTION;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package thaumic.tinkerer.common.item;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.BlockFarmland;
|
||||
@@ -137,6 +138,11 @@ public class ItemInfusedSeeds extends ItemSeeds implements ITTinkererItem {
|
||||
: icons[BlockInfusedGrain.getNumberFromAspectForTexture(getAspect(stack))];
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemName() {
|
||||
return LibItemNames.INFUSED_SEEDS;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.item;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -111,6 +112,11 @@ public class ItemRevealingHelm extends ItemArmor
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemName() {
|
||||
return LibItemNames.REVEALING_HELM;
|
||||
|
||||
@@ -76,7 +76,7 @@ public class ItemSpellCloth extends ItemBase {
|
||||
return new ThaumicTinkererCrucibleRecipe(
|
||||
LibResearch.KEY_SPELL_CLOTH,
|
||||
new ItemStack(this),
|
||||
new ItemStack(ConfigItems.itemResource, 1, 7),
|
||||
new ItemStack(ConfigItems.itemResource, 0, 7),
|
||||
new AspectList().add(Aspect.MAGIC, 10).add(Aspect.ENTROPY, 6).add(Aspect.EXCHANGE, 4));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package thaumic.tinkerer.common.item;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockSlab;
|
||||
import net.minecraft.item.ItemSlab;
|
||||
@@ -20,10 +22,15 @@ public class ItemTravelSlab extends ItemSlab implements ITTinkererItem {
|
||||
super(
|
||||
par1,
|
||||
(BlockSlab) ThaumicTinkerer.registry.getFirstBlockFromClass(BlockTravelSlab.class),
|
||||
(BlockSlab) ThaumicTinkerer.registry.getBlockFromClass(BlockTravelSlab.class, 1),
|
||||
(BlockSlab) ThaumicTinkerer.registry.getBlockFromClass(BlockTravelSlab.class).get(1),
|
||||
false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemName() {
|
||||
return LibBlockNames.TRAVEL_SLAB;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package thaumic.tinkerer.common.item;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockSlab;
|
||||
import net.minecraft.item.ItemSlab;
|
||||
@@ -20,10 +22,15 @@ public class ItemWardSlab extends ItemSlab implements ITTinkererItem {
|
||||
super(
|
||||
par1,
|
||||
(BlockSlab) ThaumicTinkerer.registry.getFirstBlockFromClass(BlockWardSlab.class),
|
||||
(BlockSlab) ThaumicTinkerer.registry.getBlockFromClass(BlockWardSlab.class, 1),
|
||||
(BlockSlab) ThaumicTinkerer.registry.getBlockFromClass(BlockWardSlab.class).get(1),
|
||||
false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemName() {
|
||||
return LibBlockNames.WARD_SLAB;
|
||||
|
||||
@@ -85,13 +85,11 @@ public class ItemXPTalisman extends ItemBase implements IBauble {
|
||||
int xp = getXP(par1ItemStack);
|
||||
setXP(par1ItemStack, xp - LibFeatures.XP_TALISMAN_ENCHANTING_BOTTLE_COST);
|
||||
par2World.playSoundAtEntity(par3EntityPlayer, "random.orb", 0.1F, (float) (0.1F + Math.random() / 2F));
|
||||
if (par2World.isRemote) {
|
||||
for (int i = 0; par2World.isRemote && i < 6; i++) ThaumicTinkerer.tcProxy.sparkle(
|
||||
(float) (par3EntityPlayer.posX + (Math.random() - 0.5)),
|
||||
(float) (par3EntityPlayer.posY + Math.random() - 0.5),
|
||||
(float) (par3EntityPlayer.posZ + (Math.random() - 0.5)),
|
||||
3);
|
||||
}
|
||||
for (int i = 0; par2World.isRemote && i < 6; i++) ThaumicTinkerer.tcProxy.sparkle(
|
||||
(float) (par3EntityPlayer.posX + (Math.random() - 0.5)),
|
||||
(float) (par3EntityPlayer.posY + Math.random() - 0.5),
|
||||
(float) (par3EntityPlayer.posZ + (Math.random() - 0.5)),
|
||||
3);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,13 +97,10 @@ public class ItemXPTalisman extends ItemBase implements IBauble {
|
||||
}
|
||||
|
||||
private void consumeXPOrb(EntityXPOrb orb) {
|
||||
if (!orb.worldObj.isRemote) {
|
||||
orb.setDead();
|
||||
orb.worldObj.playSoundAtEntity(orb, "thaumcraft:zap", orb.getXpValue() / 10F, 1F);
|
||||
} else {
|
||||
ThaumicTinkerer.tcProxy
|
||||
.wispFX(orb.worldObj, orb.posX, orb.posY, orb.posZ, orb.getXpValue() / 5F, 0.1F, 0.9F, 0.1F);
|
||||
}
|
||||
orb.setDead();
|
||||
orb.worldObj.playSoundAtEntity(orb, "thaumcraft:zap", orb.getXpValue() / 10F, 1F);
|
||||
ThaumicTinkerer.tcProxy
|
||||
.wispFX(orb.worldObj, orb.posX, orb.posY, orb.posZ, orb.getXpValue() / 5F, 0.1F, 0.9F, 0.1F);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -184,15 +179,13 @@ public class ItemXPTalisman extends ItemBase implements IBauble {
|
||||
@Override
|
||||
public void onWornTick(ItemStack par1ItemStack, EntityLivingBase player) {
|
||||
World par2World = player.worldObj;
|
||||
if (par1ItemStack.getItemDamage() == 1) {
|
||||
if (par1ItemStack.getItemDamage() == 1 && !par2World.isRemote) {
|
||||
int r = LibFeatures.XP_TALISMAN_RANGE;
|
||||
int currentXP = getXP(par1ItemStack);
|
||||
int xpToAdd = 0;
|
||||
int maxXP = LibFeatures.XP_TALISMAN_MAX_XP - currentXP; // Max, to prevent overflow.
|
||||
if (maxXP <= 0) {
|
||||
if (!par2World.isRemote) {
|
||||
par1ItemStack.setItemDamage(0);
|
||||
}
|
||||
par1ItemStack.setItemDamage(0);
|
||||
return; // Can't take any XP.
|
||||
}
|
||||
|
||||
@@ -218,9 +211,8 @@ public class ItemXPTalisman extends ItemBase implements IBauble {
|
||||
if (maxXP <= 0) break;
|
||||
}
|
||||
}
|
||||
if (!par2World.isRemote) {
|
||||
setXP(par1ItemStack, Math.min(LibFeatures.XP_TALISMAN_MAX_XP, currentXP + xpToAdd));
|
||||
}
|
||||
|
||||
setXP(par1ItemStack, Math.min(LibFeatures.XP_TALISMAN_MAX_XP, currentXP + xpToAdd));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ public class ItemFocusDeflect extends ItemModFocus {
|
||||
range = wand.getFocusEnlarge(stack);
|
||||
}
|
||||
|
||||
var projectiles = p.worldObj.getEntitiesWithinAABB(
|
||||
List<Entity> projectiles = p.worldObj.getEntitiesWithinAABB(
|
||||
IProjectile.class,
|
||||
AxisAlignedBB.getBoundingBox(
|
||||
p.posX - (4 + range),
|
||||
@@ -74,19 +74,17 @@ public class ItemFocusDeflect extends ItemModFocus {
|
||||
p.posY + (3 + range),
|
||||
p.posZ + (3 + range)));
|
||||
|
||||
for (var projectile : projectiles) {
|
||||
if (!(projectile instanceof Entity e)) continue;
|
||||
|
||||
for (Entity e : projectiles) {
|
||||
if (CheckBlackList(e) || ProjectileHelper.getOwner(e) == p) continue;
|
||||
Vector3 motionVec = new Vector3(e.motionX, e.motionY, e.motionZ).normalize().multiply(
|
||||
Math.sqrt(
|
||||
(e.posX - p.posX) * (e.posX - p.posX) + (e.posY - p.posY) * (e.posY - p.posY)
|
||||
+ (e.posZ - p.posZ) * (e.posZ - p.posZ))
|
||||
* 2);
|
||||
if (p.worldObj.isRemote) {
|
||||
for (int i = 0; i < 6; i++)
|
||||
ThaumicTinkerer.tcProxy.sparkle((float) e.posX, (float) e.posY, (float) e.posZ, 6);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 6; i++)
|
||||
ThaumicTinkerer.tcProxy.sparkle((float) e.posX, (float) e.posY, (float) e.posZ, 6);
|
||||
|
||||
e.posX += motionVec.x;
|
||||
e.posY += motionVec.y;
|
||||
e.posZ += motionVec.z;
|
||||
@@ -104,11 +102,19 @@ public class ItemFocusDeflect extends ItemModFocus {
|
||||
|
||||
@Override
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack itemstack, int rank) {
|
||||
return switch (rank) {
|
||||
case 1, 3, 5 -> new FocusUpgradeType[] { FocusUpgradeType.frugal };
|
||||
case 2, 4 -> new FocusUpgradeType[] { FocusUpgradeType.frugal, FocusUpgradeType.enlarge };
|
||||
default -> null;
|
||||
};
|
||||
switch (rank) {
|
||||
case 1:
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal };
|
||||
case 2:
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal, FocusUpgradeType.enlarge };
|
||||
case 3:
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal };
|
||||
case 4:
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal, FocusUpgradeType.enlarge };
|
||||
case 5:
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal };
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static boolean CheckBlackList(Entity entity) {
|
||||
|
||||
@@ -126,17 +126,15 @@ public class ItemFocusDislocation extends ItemModFocus {
|
||||
tile1.zCoord = mop.blockZ;
|
||||
world.setTileEntity(mop.blockX, mop.blockY, mop.blockZ, tile1);
|
||||
}
|
||||
} else {
|
||||
player.swingItem();
|
||||
for (int i = 0; i < 8; i++) {
|
||||
float x = (float) (mop.blockX + Math.random());
|
||||
float y = (float) (mop.blockY + Math.random()) + 0.65F;
|
||||
float z = (float) (mop.blockZ + Math.random());
|
||||
ThaumicTinkerer.tcProxy.burst(world, x, y, z, 0.2F);
|
||||
}
|
||||
}
|
||||
} else player.swingItem();
|
||||
clearPickedBlock(itemstack);
|
||||
|
||||
for (int i = 0; i < 8; i++) {
|
||||
float x = (float) (mop.blockX + Math.random());
|
||||
float y = (float) (mop.blockY + Math.random()) + 0.65F;
|
||||
float z = (float) (mop.blockZ + Math.random());
|
||||
ThaumicTinkerer.tcProxy.burst(world, x, y, z, 0.2F);
|
||||
}
|
||||
world.playSoundAtEntity(player, "thaumcraft:wand", 0.5F, 1F);
|
||||
}
|
||||
} else if (!blacklist.contains(block) && isBlockAllowed(block)
|
||||
@@ -148,13 +146,13 @@ public class ItemFocusDislocation extends ItemModFocus {
|
||||
world.removeTileEntity(mop.blockX, mop.blockY, mop.blockZ);
|
||||
world.setBlock(mop.blockX, mop.blockY, mop.blockZ, Blocks.air, 0, 1 | 2);
|
||||
storePickedBlock(itemstack, block, (short) meta, tile);
|
||||
} else {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
float x = (float) (mop.blockX + Math.random());
|
||||
float y = (float) (mop.blockY + Math.random());
|
||||
float z = (float) (mop.blockZ + Math.random());
|
||||
ThaumicTinkerer.tcProxy.burst(world, x, y, z, 0.2F);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 8; i++) {
|
||||
float x = (float) (mop.blockX + Math.random());
|
||||
float y = (float) (mop.blockY + Math.random());
|
||||
float z = (float) (mop.blockZ + Math.random());
|
||||
ThaumicTinkerer.tcProxy.burst(world, x, y, z, 0.2F);
|
||||
}
|
||||
world.playSoundAtEntity(player, block.stepSound.getBreakSound(), 1F, 1F);
|
||||
world.playSoundAtEntity(player, "thaumcraft:wand", 0.5F, 1F);
|
||||
|
||||
@@ -56,17 +56,15 @@ public class ItemFocusFlight extends ItemModFocus {
|
||||
if (p instanceof EntityPlayerMP) {
|
||||
((EntityPlayerMP) p).playerNetServerHandler.floatingTickCount = 0;
|
||||
}
|
||||
if (world.isRemote) {
|
||||
for (int i = 0; i < 5; i++) ThaumicTinkerer.tcProxy.smokeSpiral(
|
||||
world,
|
||||
p.posX,
|
||||
p.posY - p.motionY,
|
||||
p.posZ,
|
||||
2F,
|
||||
(int) (Math.random() * 360),
|
||||
(int) p.posY,
|
||||
0x9E2FF);
|
||||
}
|
||||
for (int i = 0; i < 5; i++) ThaumicTinkerer.tcProxy.smokeSpiral(
|
||||
world,
|
||||
p.posX,
|
||||
p.posY - p.motionY,
|
||||
p.posZ,
|
||||
2F,
|
||||
(int) (Math.random() * 360),
|
||||
(int) p.posY,
|
||||
0x9E2FF);
|
||||
world.playSoundAtEntity(p, "thaumcraft:wind", 0.4F, 1F);
|
||||
}
|
||||
|
||||
|
||||
@@ -58,13 +58,11 @@ public class ItemFocusHeal extends ItemModFocus {
|
||||
int progress = playerHealData.get(p.getGameProfile().getName()) + 1;
|
||||
playerHealData.put(p.getGameProfile().getName(), progress);
|
||||
|
||||
if (p.worldObj.isRemote) {
|
||||
ThaumicTinkerer.tcProxy.sparkle(
|
||||
(float) p.posX + p.worldObj.rand.nextFloat() - 0.5F,
|
||||
(float) p.posY + p.worldObj.rand.nextFloat(),
|
||||
(float) p.posZ + p.worldObj.rand.nextFloat() - 0.5F,
|
||||
0);
|
||||
}
|
||||
ThaumicTinkerer.tcProxy.sparkle(
|
||||
(float) p.posX + p.worldObj.rand.nextFloat() - 0.5F,
|
||||
(float) p.posY + p.worldObj.rand.nextFloat(),
|
||||
(float) p.posZ + p.worldObj.rand.nextFloat() - 0.5F,
|
||||
0);
|
||||
|
||||
if (progress >= 30 - potency * 10 / 3) {
|
||||
playerHealData.put(p.getGameProfile().getName(), 0);
|
||||
|
||||
@@ -117,23 +117,21 @@ public class ItemFocusSmelt extends ItemModFocus {
|
||||
p.worldObj.playSoundAtEntity(p, "fire.fire", 1F, 1F);
|
||||
// Particle
|
||||
////////////////////
|
||||
if (p.worldObj.isRemote) {
|
||||
for (int i = 0; i < 25; i++) {
|
||||
double x = pos.blockX + Math.random();
|
||||
double y = pos.blockY + Math.random();
|
||||
double z = pos.blockZ + Math.random();
|
||||
for (int i = 0; i < 25; i++) {
|
||||
double x = pos.blockX + Math.random();
|
||||
double y = pos.blockY + Math.random();
|
||||
double z = pos.blockZ + Math.random();
|
||||
|
||||
ThaumicTinkerer.tcProxy.wispFX2(
|
||||
p.worldObj,
|
||||
x,
|
||||
y,
|
||||
z,
|
||||
(float) Math.random() / 2F,
|
||||
4,
|
||||
true,
|
||||
true,
|
||||
(float) -Math.random() / 10F);
|
||||
}
|
||||
ThaumicTinkerer.tcProxy.wispFX2(
|
||||
p.worldObj,
|
||||
x,
|
||||
y,
|
||||
z,
|
||||
(float) Math.random() / 2F,
|
||||
4,
|
||||
true,
|
||||
true,
|
||||
(float) -Math.random() / 10F);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -148,23 +146,21 @@ public class ItemFocusSmelt extends ItemModFocus {
|
||||
if (time % soundCooldown == 0) p.worldObj.playSoundAtEntity(p, "fire.fire", 0.2F, 1F);
|
||||
// Particle
|
||||
////////////////////
|
||||
if (p.worldObj.isRemote) {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
double x = pos.blockX + Math.random();
|
||||
double y = pos.blockY + Math.random();
|
||||
double z = pos.blockZ + Math.random();
|
||||
for (int i = 0; i < 2; i++) {
|
||||
double x = pos.blockX + Math.random();
|
||||
double y = pos.blockY + Math.random();
|
||||
double z = pos.blockZ + Math.random();
|
||||
|
||||
ThaumicTinkerer.tcProxy.wispFX2(
|
||||
p.worldObj,
|
||||
x,
|
||||
y,
|
||||
z,
|
||||
(float) Math.random() / 2F,
|
||||
4,
|
||||
true,
|
||||
true,
|
||||
(float) -Math.random() / 10F);
|
||||
}
|
||||
ThaumicTinkerer.tcProxy.wispFX2(
|
||||
p.worldObj,
|
||||
x,
|
||||
y,
|
||||
z,
|
||||
(float) Math.random() / 2F,
|
||||
4,
|
||||
true,
|
||||
true,
|
||||
(float) -Math.random() / 10F);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -65,9 +65,7 @@ public class ItemFocusTelekinesis extends ItemModFocus {
|
||||
if (!entities.isEmpty() && wand.consumeAllVis(stack, player, getVisCost(stack), true, false)) {
|
||||
for (EntityItem item : entities) {
|
||||
MiscHelper.setEntityMotionFromVector(item, target, 0.3333F);
|
||||
if (player.worldObj.isRemote) {
|
||||
ThaumicTinkerer.tcProxy.sparkle((float) item.posX, (float) item.posY, (float) item.posZ, 0);
|
||||
}
|
||||
ThaumicTinkerer.tcProxy.sparkle((float) item.posX, (float) item.posY, (float) item.posZ, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.item.foci;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -57,6 +58,11 @@ public abstract class ItemModFocus extends ItemFocusBasic implements ITTinkererI
|
||||
if (hasDepth()) depth = IconHelper.forItem(par1IconRegister, this, "Depth");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRegister() {
|
||||
return true;
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.item.kami;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
@@ -33,6 +35,11 @@ public class ItemBlockWarpGate extends ItemBlock implements ITTinkererItem {
|
||||
return TTCommonProxy.kamiRarity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemName() {
|
||||
return LibBlockNames.WARP_GATE;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.item.kami;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -146,6 +147,11 @@ public class ItemIchorPouch extends ItemFocusPouch implements IBauble, IBaubleEx
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemName() {
|
||||
return LibItemNames.ICHOR_POUCH;
|
||||
|
||||
@@ -218,9 +218,9 @@ public class ItemKamiResource extends ItemKamiBase {
|
||||
new AspectList().add(Aspect.MAN, 32).add(Aspect.LIGHT, 32).add(Aspect.SOUL, 64),
|
||||
new ItemStack(Items.nether_star),
|
||||
new ItemStack(Items.diamond),
|
||||
new ItemStack(this, 1, 7),
|
||||
new ItemStack(this, 8, 7),
|
||||
new ItemStack(Items.ender_eye),
|
||||
new ItemStack(this, 1, 6)),
|
||||
new ItemStack(this, 8, 6)),
|
||||
new ThaumicTinkererInfusionRecipe(
|
||||
LibResearch.KEY_ICHORCLOTH_ROD,
|
||||
new ItemStack(this, 1, 5),
|
||||
|
||||
@@ -127,7 +127,7 @@ public class ItemGemLegs extends ItemIchorclothArmorAdv {
|
||||
new ItemStack(ThaumicTinkerer.registry.getFirstItemFromClass(ItemKamiResource.class)),
|
||||
new ItemStack(ConfigItems.itemFocusPrimal),
|
||||
new ItemStack(ConfigItems.itemThaumonomicon),
|
||||
new ItemStack(Items.golden_leggings),
|
||||
new ItemStack(Items.golden_chestplate),
|
||||
new ItemStack(Items.potionitem, 1, 8195),
|
||||
new ItemStack(ThaumicTinkerer.registry.getFirstItemFromClass(ItemFocusSmelt.class)),
|
||||
new ItemStack(ThaumicTinkerer.registry.getFirstItemFromClass(ItemBrightNitor.class)),
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.item.kami.armor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -18,7 +19,6 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DamageSource;
|
||||
@@ -121,8 +121,12 @@ public class ItemIchorclothArmor extends ItemArmor
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item[] getMetaItems() {
|
||||
return new Item[] { new ItemIchorclothArmor(1), new ItemIchorclothArmor(2), new ItemIchorclothArmor(3) };
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
ArrayList<Object> result = new ArrayList<>();
|
||||
result.add(1);
|
||||
result.add(2);
|
||||
result.add(3);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.item.kami.armor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
@@ -46,7 +46,7 @@ public abstract class ItemIchorclothArmorAdv extends ItemIchorclothArmor impleme
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item[] getMetaItems() {
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ import thaumic.tinkerer.common.research.ResearchHelper;
|
||||
public class ItemFocusXPDrain extends ItemModKamiFocus {
|
||||
|
||||
AspectList visUsage = new AspectList();
|
||||
private int lastGiven = 0;
|
||||
|
||||
@Override
|
||||
public boolean isVisCostPerTick(ItemStack stack) {
|
||||
@@ -45,38 +46,32 @@ public class ItemFocusXPDrain extends ItemModKamiFocus {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUsingFocusTick(ItemStack stack, EntityPlayer player, int count) {
|
||||
if (player.worldObj.isRemote) return;
|
||||
public void onUsingFocusTick(ItemStack paramItemStack, EntityPlayer paramEntityPlayer, int paramInt) {
|
||||
if (paramEntityPlayer.worldObj.isRemote) return;
|
||||
|
||||
ItemWandCasting wand = (ItemWandCasting) stack.getItem();
|
||||
AspectList aspects = wand.getAllVis(stack);
|
||||
ItemWandCasting wand = (ItemWandCasting) paramItemStack.getItem();
|
||||
AspectList aspects = wand.getAllVis(paramItemStack);
|
||||
|
||||
Aspect lowestAspect = null;
|
||||
int lowestAmount = Integer.MAX_VALUE;
|
||||
int maxVis = wand.getMaxVis(stack);
|
||||
Aspect aspectToAdd = null;
|
||||
int takes = 0;
|
||||
|
||||
for (Aspect aspect : Aspect.getPrimalAspects()) {
|
||||
int amount = aspects.getAmount(aspect);
|
||||
while (aspectToAdd == null && takes < 7) {
|
||||
lastGiven = lastGiven == 5 ? 0 : lastGiven + 1;
|
||||
|
||||
if (amount < maxVis && amount < lowestAmount) {
|
||||
lowestAmount = amount;
|
||||
lowestAspect = aspect;
|
||||
}
|
||||
Aspect aspect = Aspect.getPrimalAspects().get(lastGiven);
|
||||
|
||||
if (aspects.getAmount(aspect) < wand.getMaxVis(paramItemStack)) aspectToAdd = aspect;
|
||||
|
||||
++takes;
|
||||
}
|
||||
|
||||
if (lowestAspect != null) {
|
||||
int potency = wand.getFocusPotency(stack);
|
||||
float multiplier = 1.0F + (0.2F * potency);
|
||||
|
||||
int intendedAdd = Math.round(500 * multiplier);
|
||||
int actualAdd = Math.min(intendedAdd, maxVis - lowestAmount);
|
||||
|
||||
int xpUse = getXpUse(wand.getFocusItem(stack));
|
||||
int scaledXp = Math.max(1, Math.round(xpUse * (actualAdd / (float) intendedAdd)));
|
||||
|
||||
if (player.experienceTotal >= scaledXp) {
|
||||
ExperienceHelper.drainPlayerXP(player, scaledXp);
|
||||
wand.storeVis(stack, lowestAspect, lowestAmount + actualAdd);
|
||||
if (aspectToAdd != null) {
|
||||
int xpUse = getXpUse(paramItemStack);
|
||||
if (paramEntityPlayer.experienceTotal >= xpUse) {
|
||||
ExperienceHelper.drainPlayerXP(paramEntityPlayer, xpUse);
|
||||
int amount = wand.getVis(paramItemStack, aspectToAdd) + 500;
|
||||
ThaumicTinkerer.log.info(amount);
|
||||
wand.storeVis(paramItemStack, aspectToAdd, Math.min(wand.getMaxVis(paramItemStack), amount));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -93,12 +88,12 @@ public class ItemFocusXPDrain extends ItemModKamiFocus {
|
||||
}
|
||||
|
||||
int getXpUse(ItemStack stack) {
|
||||
return 15 - this.getUpgradeLevel(stack, FocusUpgradeType.frugal);
|
||||
return 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addVisCostTooltip(AspectList cost, ItemStack stack, EntityPlayer player, List list, boolean par4) {
|
||||
list.add(StatCollector.translateToLocal("item.Focus.cost2"));
|
||||
list.add(StatCollector.translateToLocal(isVisCostPerTick(stack) ? "item.Focus.cost2" : "item.Focus.cost1"));
|
||||
list.add(
|
||||
" " + EnumChatFormatting.GREEN
|
||||
+ StatCollector.translateToLocal("ttmisc.experience")
|
||||
@@ -113,11 +108,8 @@ public class ItemFocusXPDrain extends ItemModKamiFocus {
|
||||
}
|
||||
|
||||
@Override
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack itemstack, int rank) {
|
||||
if (rank <= 5) {
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal, FocusUpgradeType.potency };
|
||||
}
|
||||
return null;
|
||||
public boolean canApplyUpgrade(ItemStack focusstack, EntityPlayer player, FocusUpgradeType type, int rank) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.item.kami.foci;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -80,6 +81,11 @@ public abstract class ItemModKamiFocus extends ItemFocusBasic implements ITTinke
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
|
||||
super.addInformation(stack, player, list, par4);
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.item.kami.tool;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemAxe;
|
||||
@@ -58,6 +60,11 @@ public class ItemIchorAxe extends ItemAxe implements ITTinkererItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemName() {
|
||||
return LibItemNames.ICHOR_AXE;
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.item.kami.tool;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemPickaxe;
|
||||
@@ -62,6 +64,11 @@ public class ItemIchorPick extends ItemPickaxe implements ITTinkererItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemName() {
|
||||
return LibItemNames.ICHOR_PICK;
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.item.kami.tool;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemSpade;
|
||||
@@ -58,6 +60,11 @@ public class ItemIchorShovel extends ItemSpade implements ITTinkererItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemName() {
|
||||
return LibItemNames.ICHOR_SHOVEL;
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.item.kami.tool;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -57,6 +59,11 @@ public class ItemIchorSword extends ItemSword implements ITTinkererItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemName() {
|
||||
return LibItemNames.ICHOR_SWORD;
|
||||
|
||||
@@ -81,7 +81,7 @@ public class ItemIchorSwordAdv extends ItemIchorSword implements IAdvancedTool {
|
||||
break;
|
||||
case 1: {
|
||||
int range = 3;
|
||||
var entities = player.worldObj.getEntitiesWithinAABB(
|
||||
List<Entity> entities = player.worldObj.getEntitiesWithinAABB(
|
||||
entity.getClass(),
|
||||
AxisAlignedBB.getBoundingBox(
|
||||
entity.posX - range,
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.item.quartz;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemMultiTexture;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -38,6 +40,11 @@ public class ItemDarkQuartzBlock extends ItemMultiTexture implements ITTinkererI
|
||||
: LibBlockNames.DARK_QUARTZ_BLOCK_NAMES[par1ItemStack.getItemDamage()];
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemName() {
|
||||
return LibBlockNames.DARK_QUARTZ;
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.item.quartz;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockSlab;
|
||||
import net.minecraft.item.ItemSlab;
|
||||
@@ -28,10 +30,15 @@ public class ItemDarkQuartzSlab extends ItemSlab implements ITTinkererItem {
|
||||
super(
|
||||
par1,
|
||||
(BlockSlab) ThaumicTinkerer.registry.getFirstBlockFromClass(BlockDarkQuartzSlab.class),
|
||||
(BlockSlab) ThaumicTinkerer.registry.getBlockFromClass(BlockDarkQuartzSlab.class, 1),
|
||||
(BlockSlab) ThaumicTinkerer.registry.getBlockFromClass(BlockDarkQuartzSlab.class).get(1),
|
||||
false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemName() {
|
||||
return LibBlockNames.DARK_QUARTZ_SLAB;
|
||||
|
||||
@@ -15,7 +15,9 @@ import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import thaumic.tinkerer.common.core.handler.ConfigHandler;
|
||||
|
||||
public final class ModPotions {
|
||||
@@ -26,6 +28,8 @@ public final class ModPotions {
|
||||
public static Potion potionAir;
|
||||
|
||||
public static void initPotions() {
|
||||
MinecraftForge.EVENT_BUS.register(new PotionEffectHandler());
|
||||
FMLCommonHandler.instance().bus().register(new PotionEffectHandler());
|
||||
|
||||
// Code based on potion code from WayOfTime
|
||||
Potion[] potionTypes = null;
|
||||
|
||||
+50
-18
@@ -11,28 +11,28 @@ import net.minecraftforge.event.entity.living.LivingAttackEvent;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import thaumic.tinkerer.common.ThaumicTinkerer;
|
||||
import thaumic.tinkerer.common.block.BlockForcefield;
|
||||
|
||||
/**
|
||||
* Created by pixlepix on 4/19/14.
|
||||
*/
|
||||
public final class PotionEffectHandlerServer {
|
||||
public class PotionEffectHandler {
|
||||
|
||||
private final HashMap<Entity, Long> airPotionHitServer = new HashMap<>();
|
||||
private final HashMap<Entity, Long> firePotionHitServer = new HashMap<>();
|
||||
public static HashMap<Entity, Long> airPotionHit = new HashMap<>();
|
||||
public static HashMap<Entity, Long> firePotionHit = new HashMap<>();
|
||||
|
||||
@SubscribeEvent
|
||||
public void onLivingHurt(LivingAttackEvent e) {
|
||||
if (e.source.getSourceOfDamage() instanceof EntityPlayer p && !p.worldObj.isRemote) {
|
||||
if (p.isPotionActive(ModPotions.potionAir)) {
|
||||
airPotionHitServer.put(e.entity, e.entity.worldObj.getTotalWorldTime());
|
||||
if (e.source.getSourceOfDamage() instanceof EntityPlayer) {
|
||||
EntityPlayer p = (EntityPlayer) e.source.getSourceOfDamage();
|
||||
if (p.isPotionActive(ModPotions.potionAir) && !p.worldObj.isRemote) {
|
||||
airPotionHit.put(e.entity, e.entity.worldObj.getTotalWorldTime());
|
||||
}
|
||||
if (p.isPotionActive(ModPotions.potionFire)) {
|
||||
firePotionHitServer.put(e.entity, e.entity.worldObj.getTotalWorldTime());
|
||||
if (p.isPotionActive(ModPotions.potionFire) && !p.worldObj.isRemote) {
|
||||
firePotionHit.put(e.entity, e.entity.worldObj.getTotalWorldTime());
|
||||
}
|
||||
if (p.isPotionActive(ModPotions.potionEarth)) {
|
||||
if (p.isPotionActive(ModPotions.potionEarth) && !p.worldObj.isRemote) {
|
||||
boolean xAxis = Math.abs(e.entity.posZ - p.posZ) < Math.abs(e.entity.posX - p.posX);
|
||||
int centerX = (int) ((e.entity.posX + p.posX) / 2);
|
||||
|
||||
@@ -48,6 +48,8 @@ public final class PotionEffectHandlerServer {
|
||||
centerY + i,
|
||||
centerZ + j,
|
||||
ThaumicTinkerer.registry.getFirstBlockFromClass(BlockForcefield.class));
|
||||
ThaumicTinkerer.tcProxy
|
||||
.blockSparkle(p.worldObj, centerX, centerY + i, centerZ + j, 100, 100);
|
||||
}
|
||||
} else {
|
||||
if (p.worldObj.isAirBlock(centerX + j, centerY + i, centerZ)) {
|
||||
@@ -56,6 +58,9 @@ public final class PotionEffectHandlerServer {
|
||||
centerY + i,
|
||||
centerZ,
|
||||
ThaumicTinkerer.registry.getFirstBlockFromClass(BlockForcefield.class));
|
||||
|
||||
ThaumicTinkerer.tcProxy
|
||||
.blockSparkle(p.worldObj, centerX + j, centerY + i, centerZ, 100, 100);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -66,13 +71,14 @@ public final class PotionEffectHandlerServer {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPlayerTick(TickEvent.PlayerTickEvent e) {
|
||||
if (e.side == Side.SERVER && e.player.isPotionActive(ModPotions.potionWater)) {
|
||||
if (e.player.isPotionActive(ModPotions.potionWater)) {
|
||||
for (int x = (int) (e.player.posX - 2); x < e.player.posX + 2; x++) {
|
||||
for (int y = (int) (e.player.posY - 2); y < e.player.posY + 2; y++) {
|
||||
for (int z = (int) (e.player.posZ - 2); z < e.player.posZ + 2; z++) {
|
||||
if (e.player.worldObj.getBlock(x, y, z) == Blocks.lava
|
||||
|| e.player.worldObj.getBlock(x, y, z) == Blocks.flowing_lava) {
|
||||
e.player.worldObj.setBlock(x, y, z, Blocks.obsidian);
|
||||
ThaumicTinkerer.tcProxy.burst(e.player.worldObj, x + .5, y + .5, z + .5, 1.2F);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -81,32 +87,58 @@ public final class PotionEffectHandlerServer {
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onTickServer(TickEvent.ServerTickEvent e) {
|
||||
public void onTick(TickEvent.ServerTickEvent e) {
|
||||
|
||||
Iterator<Entity> iter = airPotionHitServer.keySet().iterator();
|
||||
Iterator<Entity> iter = airPotionHit.keySet().iterator();
|
||||
while (iter.hasNext()) {
|
||||
Entity target = iter.next();
|
||||
Entity target = (Entity) iter.next();
|
||||
if (target.isEntityAlive()) {
|
||||
if (target.worldObj.getTotalWorldTime() % 5 == 0) {
|
||||
Random rand = new Random();
|
||||
target.setVelocity(rand.nextFloat() - .5, rand.nextFloat(), rand.nextFloat() - .5);
|
||||
ThaumicTinkerer.tcProxy.burst(target.worldObj, target.posX, target.posY, target.posZ, .5F);
|
||||
}
|
||||
}
|
||||
if (target.worldObj.getTotalWorldTime() > airPotionHitServer.get(target) + 20) {
|
||||
if (target.worldObj.getTotalWorldTime() > airPotionHit.get(target) + 20) {
|
||||
iter.remove();
|
||||
}
|
||||
}
|
||||
|
||||
// Fire Potion
|
||||
iter = firePotionHitServer.keySet().iterator();
|
||||
iter = firePotionHit.keySet().iterator();
|
||||
while (iter.hasNext()) {
|
||||
Entity target = iter.next();
|
||||
Entity target = (Entity) iter.next();
|
||||
if (target.isEntityAlive()) {
|
||||
if (target.worldObj.getTotalWorldTime() % 5 == 0) {
|
||||
Random rand = new Random();
|
||||
target.setFire(6);
|
||||
|
||||
for (int i = 0; i < 30; i++) {
|
||||
double theta = rand.nextFloat() * 2 * Math.PI;
|
||||
|
||||
double phi = rand.nextFloat() * 2 * Math.PI;
|
||||
double r = 2.5;
|
||||
|
||||
double x = r * Math.sin(theta) * Math.cos(phi);
|
||||
|
||||
double y = r * Math.sin(theta) * Math.sin(phi);
|
||||
|
||||
double z = r * Math.cos(theta);
|
||||
|
||||
ThaumicTinkerer.tcProxy.wispFX2(
|
||||
target.worldObj,
|
||||
target.posX + x,
|
||||
target.posY + y + 1,
|
||||
target.posZ + z,
|
||||
.1F,
|
||||
4,
|
||||
true,
|
||||
true,
|
||||
1F);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (target.worldObj.getTotalWorldTime() > firePotionHitServer.get(target) + 6000) {
|
||||
if (target.worldObj.getTotalWorldTime() > firePotionHit.get(target) + 6000) {
|
||||
iter.remove();
|
||||
}
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
package thaumic.tinkerer.common.potion;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraftforge.event.entity.living.LivingAttackEvent;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import thaumic.tinkerer.common.ThaumicTinkerer;
|
||||
|
||||
public final class PotionEffectHandlerClient {
|
||||
|
||||
private final HashMap<Entity, Long> airPotionHitClient = new HashMap<>();
|
||||
private final HashMap<Entity, Long> firePotionHitClient = new HashMap<>();
|
||||
|
||||
@SubscribeEvent
|
||||
public void onLivingHurt(LivingAttackEvent e) {
|
||||
if (e.source.getSourceOfDamage() instanceof EntityPlayer p && p.worldObj.isRemote) {
|
||||
if (p.isPotionActive(ModPotions.potionAir)) {
|
||||
airPotionHitClient.put(e.entity, e.entity.worldObj.getTotalWorldTime());
|
||||
}
|
||||
if (p.isPotionActive(ModPotions.potionFire)) {
|
||||
firePotionHitClient.put(e.entity, e.entity.worldObj.getTotalWorldTime());
|
||||
}
|
||||
if (p.isPotionActive(ModPotions.potionEarth)) {
|
||||
boolean xAxis = Math.abs(e.entity.posZ - p.posZ) < Math.abs(e.entity.posX - p.posX);
|
||||
int centerX = (int) ((e.entity.posX + p.posX) / 2);
|
||||
|
||||
int centerY = (int) (p.posY + 2);
|
||||
int centerZ = (int) ((e.entity.posZ + p.posZ) / 2);
|
||||
|
||||
for (int i = -2; i < 3; i++) {
|
||||
for (int j = -2; j < 3; j++) {
|
||||
if (xAxis) {
|
||||
ThaumicTinkerer.tcProxy
|
||||
.blockSparkle(p.worldObj, centerX, centerY + i, centerZ + j, 100, 100);
|
||||
} else {
|
||||
ThaumicTinkerer.tcProxy
|
||||
.blockSparkle(p.worldObj, centerX + j, centerY + i, centerZ, 100, 100);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPlayerTick(TickEvent.PlayerTickEvent e) {
|
||||
if (e.side == Side.CLIENT && e.player.isPotionActive(ModPotions.potionWater)) {
|
||||
for (int x = (int) (e.player.posX - 2); x < e.player.posX + 2; x++) {
|
||||
for (int y = (int) (e.player.posY - 2); y < e.player.posY + 2; y++) {
|
||||
for (int z = (int) (e.player.posZ - 2); z < e.player.posZ + 2; z++) {
|
||||
if (e.player.worldObj.getBlock(x, y, z) == Blocks.lava
|
||||
|| e.player.worldObj.getBlock(x, y, z) == Blocks.flowing_lava) {
|
||||
ThaumicTinkerer.tcProxy.burst(e.player.worldObj, x + .5, y + .5, z + .5, 1.2F);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onTickClient(TickEvent.ClientTickEvent e) {
|
||||
|
||||
Iterator<Entity> iter = airPotionHitClient.keySet().iterator();
|
||||
while (iter.hasNext()) {
|
||||
Entity target = iter.next();
|
||||
if (target.isEntityAlive()) {
|
||||
if (target.worldObj.getTotalWorldTime() % 5 == 0) {
|
||||
ThaumicTinkerer.tcProxy.burst(target.worldObj, target.posX, target.posY, target.posZ, .5F);
|
||||
}
|
||||
}
|
||||
if (target.worldObj.getTotalWorldTime() > airPotionHitClient.get(target) + 20) {
|
||||
iter.remove();
|
||||
}
|
||||
}
|
||||
|
||||
iter = firePotionHitClient.keySet().iterator();
|
||||
while (iter.hasNext()) {
|
||||
Entity target = iter.next();
|
||||
if (target.isEntityAlive()) {
|
||||
if (target.worldObj.getTotalWorldTime() % 5 == 0) {
|
||||
Random rand = new Random();
|
||||
|
||||
for (int i = 0; i < 30; i++) {
|
||||
double theta = rand.nextFloat() * 2 * Math.PI;
|
||||
|
||||
double phi = rand.nextFloat() * 2 * Math.PI;
|
||||
double r = 2.5;
|
||||
|
||||
double x = r * Math.sin(theta) * Math.cos(phi);
|
||||
|
||||
double y = r * Math.sin(theta) * Math.sin(phi);
|
||||
|
||||
double z = r * Math.cos(theta);
|
||||
|
||||
ThaumicTinkerer.tcProxy.wispFX2(
|
||||
target.worldObj,
|
||||
target.posX + x,
|
||||
target.posY + y + 1,
|
||||
target.posZ + z,
|
||||
.1F,
|
||||
4,
|
||||
true,
|
||||
true,
|
||||
1F);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (target.worldObj.getTotalWorldTime() > firePotionHitClient.get(target) + 6000) {
|
||||
iter.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package thaumic.tinkerer.common.registry;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
@@ -9,18 +10,15 @@ import net.minecraft.tileentity.TileEntity;
|
||||
*/
|
||||
public interface ITTinkererBlock extends ITTinkererRegisterable {
|
||||
|
||||
String getBlockName();
|
||||
public ArrayList<Object> getSpecialParameters();
|
||||
|
||||
boolean shouldRegister();
|
||||
public String getBlockName();
|
||||
|
||||
boolean shouldDisplayInTab();
|
||||
public boolean shouldRegister();
|
||||
|
||||
Class<? extends ItemBlock> getItemBlock();
|
||||
public boolean shouldDisplayInTab();
|
||||
|
||||
Class<? extends TileEntity> getTileEntity();
|
||||
public Class<? extends ItemBlock> getItemBlock();
|
||||
|
||||
default Block[] getMetaBlocks() {
|
||||
throw new UnsupportedOperationException(
|
||||
"Called getMetaBlocks on a block without any meta blocks - this is a mistake by the developers!");
|
||||
}
|
||||
public Class<? extends TileEntity> getTileEntity();
|
||||
}
|
||||
@@ -1,20 +1,17 @@
|
||||
package thaumic.tinkerer.common.registry;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Created by localmacaccount on 6/9/14.
|
||||
*/
|
||||
public interface ITTinkererItem extends ITTinkererRegisterable {
|
||||
|
||||
String getItemName();
|
||||
public ArrayList<Object> getSpecialParameters();
|
||||
|
||||
boolean shouldRegister();
|
||||
public String getItemName();
|
||||
|
||||
boolean shouldDisplayInTab();
|
||||
public boolean shouldRegister();
|
||||
|
||||
default Item[] getMetaItems() {
|
||||
throw new UnsupportedOperationException(
|
||||
"Called getMetaItems on an item without any meta items - this is a mistake by the developers!");
|
||||
}
|
||||
public boolean shouldDisplayInTab();
|
||||
}
|
||||
@@ -11,6 +11,8 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.registry;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
@@ -32,6 +34,11 @@ public abstract class ItemBase extends Item implements ITTinkererItem {
|
||||
itemIcon = IconHelper.forItem(par1IconRegister, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Object> getSpecialParameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRegister() {
|
||||
return true;
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package thaumic.tinkerer.common.registry;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -10,119 +13,232 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
import com.google.common.reflect.ClassPath;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import thaumic.tinkerer.client.lib.LibResources;
|
||||
import thaumic.tinkerer.common.ThaumicTinkerer;
|
||||
import thaumic.tinkerer.common.block.BlockAnimationTablet;
|
||||
import thaumic.tinkerer.common.core.handler.ModCreativeTab;
|
||||
import thaumic.tinkerer.common.item.kami.ItemBlockTalisman;
|
||||
import thaumic.tinkerer.common.item.kami.ItemPlacementMirror;
|
||||
import thaumic.tinkerer.common.research.IRegisterableResearch;
|
||||
|
||||
public class TTRegistry {
|
||||
|
||||
private final HashMap<Class, Item[]> itemRegistry = new HashMap<>();
|
||||
private ArrayList<Class> itemClasses = new ArrayList<>();
|
||||
private HashMap<Class, ArrayList<Item>> itemRegistry = new HashMap<>();
|
||||
|
||||
private final HashMap<Class, Block[]> blockRegistry = new HashMap<>();
|
||||
private ArrayList<Class> blockClasses = new ArrayList<>();
|
||||
private HashMap<Class, ArrayList<Block>> blockRegistry = new HashMap<>();
|
||||
|
||||
public static Block dynamismTablet;
|
||||
public static Item itemPlacementMirror;
|
||||
public static Item itemBlackHoleTalisman;
|
||||
|
||||
/**
|
||||
* <strong>THIS NO LONGER USES REFLECTION. IF YOU WANT TO ADD A BLOCK/ITEM, ADD THE CLASS HERE.</strong>
|
||||
*/
|
||||
public void registerClasses() {
|
||||
try {
|
||||
ClassPath classPath = ClassPath.from(this.getClass().getClassLoader());
|
||||
for (ClassPath.ClassInfo classInfo : classPath
|
||||
.getTopLevelClassesRecursive("thaumic.tinkerer.common.block")) {
|
||||
if (ITTinkererBlock.class.isAssignableFrom(classInfo.load())
|
||||
&& !Modifier.isAbstract(classInfo.load().getModifiers())) {
|
||||
blockClasses.add(classInfo.load());
|
||||
}
|
||||
}
|
||||
for (ClassPath.ClassInfo classInfo : classPath
|
||||
.getTopLevelClassesRecursive("thaumic.tinkerer.common.item")) {
|
||||
if (ITTinkererItem.class.isAssignableFrom(classInfo.load())
|
||||
&& !ItemBlock.class.isAssignableFrom(classInfo.load())
|
||||
&& !Modifier.isAbstract(classInfo.load().getModifiers())) {
|
||||
itemClasses.add(classInfo.load());
|
||||
}
|
||||
}
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void registerResearch(ITTinkererRegisterable nextItem) {
|
||||
IRegisterableResearch registerableResearch = nextItem.getResearchItem();
|
||||
if (registerableResearch != null) {
|
||||
registerableResearch.registerResearch();
|
||||
}
|
||||
}
|
||||
|
||||
public void registerRecipe(ITTinkererRegisterable nextItem) {
|
||||
ThaumicTinkererRecipe thaumicTinkererRecipe = nextItem.getRecipeItem();
|
||||
if (thaumicTinkererRecipe != null) {
|
||||
thaumicTinkererRecipe.registerRecipe();
|
||||
}
|
||||
}
|
||||
|
||||
public void preInit() {
|
||||
dynamismTablet = loadSimpleBlock(new thaumic.tinkerer.common.block.BlockAnimationTablet());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.BlockAspectAnalyzer());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.BlockEnchanter());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.BlockForcefield());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.BlockFunnel());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.BlockGaseousLight());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.BlockGaseousShadow());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.BlockGolemConnector());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.BlockInfusedFarmland());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.BlockInfusedGrain());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.BlockMagnet());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.BlockNitorGas());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.BlockPlatform());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.BlockRepairer());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.BlockRPlacer());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.BlockSummon());
|
||||
loadMetaBlock(new thaumic.tinkerer.common.block.BlockTravelSlab());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.BlockTravelStairs());
|
||||
loadMetaBlock(new thaumic.tinkerer.common.block.BlockWardSlab());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.fire.BlockFireAir());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.fire.BlockFireChaos());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.fire.BlockFireEarth());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.fire.BlockFireIgnis());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.fire.BlockFireOrder());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.fire.BlockFireWater());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.kami.BlockBedrockPortal());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.kami.BlockWarpGate());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.mobilizer.BlockMobilizer());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.mobilizer.BlockMobilizerRelay());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.quartz.BlockDarkQuartz());
|
||||
loadMetaBlock(new thaumic.tinkerer.common.block.quartz.BlockDarkQuartzSlab());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.quartz.BlockDarkQuartzStairs());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.transvector.BlockTransvectorDislocator());
|
||||
loadSimpleBlock(new thaumic.tinkerer.common.block.transvector.BlockTransvectorInterface());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.foci.ItemFocusDeflect());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.foci.ItemFocusDislocation());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.foci.ItemFocusEnderChest());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.foci.ItemFocusFlight());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.foci.ItemFocusHeal());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.foci.ItemFocusSmelt());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.foci.ItemFocusTelekinesis());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.ItemBloodSword());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.ItemBrightNitor());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.ItemCleansingTalisman());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.ItemConnector());
|
||||
loadMetaItem(new thaumic.tinkerer.common.item.ItemGas());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.ItemGasRemover());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.ItemInfusedGrain());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.ItemInfusedInkwell());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.ItemInfusedPotion());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.ItemInfusedSeeds());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.ItemMobAspect());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.ItemMobDisplay());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.ItemRevealingHelm());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.ItemShareBook());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.ItemSoulMould());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.ItemSpellCloth());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.ItemXPTalisman());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.kami.armor.ItemGemBoots());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.kami.armor.ItemGemChest());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.kami.armor.ItemGemHelm());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.kami.armor.ItemGemLegs());
|
||||
loadMetaItem(new thaumic.tinkerer.common.item.kami.armor.ItemIchorclothArmor());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.kami.foci.ItemFocusRecall());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.kami.foci.ItemFocusShadowbeam());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.kami.foci.ItemFocusXPDrain());
|
||||
itemBlackHoleTalisman = loadSimpleItem(new thaumic.tinkerer.common.item.kami.ItemBlockTalisman());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.kami.ItemCatAmulet());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.kami.ItemIchorPouch());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.kami.ItemKamiResource());
|
||||
itemPlacementMirror = loadSimpleItem(new thaumic.tinkerer.common.item.kami.ItemPlacementMirror());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.kami.ItemProtoclay());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.kami.ItemSkyPearl());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.kami.tool.ItemIchorAxe());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.kami.tool.ItemIchorAxeAdv());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.kami.tool.ItemIchorPick());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.kami.tool.ItemIchorPickAdv());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.kami.tool.ItemIchorShovel());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.kami.tool.ItemIchorShovelAdv());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.kami.tool.ItemIchorSword());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.kami.tool.ItemIchorSwordAdv());
|
||||
loadSimpleItem(new thaumic.tinkerer.common.item.quartz.ItemDarkQuartz());
|
||||
registerClasses();
|
||||
for (Class clazz : blockClasses) {
|
||||
try {
|
||||
Block newBlock = (Block) clazz.newInstance();
|
||||
if (((ITTinkererBlock) newBlock).shouldRegister()) {
|
||||
newBlock.setBlockName(((ITTinkererBlock) newBlock).getBlockName());
|
||||
ArrayList<Block> blockList = new ArrayList<>();
|
||||
blockList.add(newBlock);
|
||||
|
||||
if (newBlock == null) {
|
||||
ThaumicTinkerer.log.debug(clazz.getName() + " Returned a null block upon registration");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (((ITTinkererBlock) newBlock).getSpecialParameters() != null) {
|
||||
for (Object param : ((ITTinkererBlock) newBlock).getSpecialParameters()) {
|
||||
|
||||
for (Constructor constructor : clazz.getConstructors()) {
|
||||
if (constructor.getParameterTypes().length > 0
|
||||
&& constructor.getParameterTypes()[0].isAssignableFrom(param.getClass())) {
|
||||
Block nextBlock = (Block) clazz.getConstructor(param.getClass()).newInstance(param);
|
||||
nextBlock.setBlockName(((ITTinkererBlock) nextBlock).getBlockName());
|
||||
blockList.add(nextBlock);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
blockRegistry.put(clazz, blockList);
|
||||
|
||||
if (((ITTinkererBlock) newBlock).getItemBlock() != null) {
|
||||
Item newItem = ((ITTinkererBlock) newBlock).getItemBlock().getConstructor(Block.class)
|
||||
.newInstance(newBlock);
|
||||
newItem.setUnlocalizedName(((ITTinkererItem) newItem).getItemName());
|
||||
ArrayList<Item> itemList = new ArrayList<>();
|
||||
itemList.add(newItem);
|
||||
itemRegistry.put(((ITTinkererBlock) newBlock).getItemBlock(), itemList);
|
||||
}
|
||||
}
|
||||
} catch (InstantiationException | InvocationTargetException | NoSuchMethodException
|
||||
| IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
for (Class clazz : itemClasses) {
|
||||
try {
|
||||
Item newItem = (Item) clazz.newInstance();
|
||||
if (((ITTinkererItem) newItem).shouldRegister()) {
|
||||
newItem.setUnlocalizedName(((ITTinkererItem) newItem).getItemName());
|
||||
ArrayList<Item> itemList = new ArrayList<>();
|
||||
itemList.add(newItem);
|
||||
if (newItem == null) {
|
||||
ThaumicTinkerer.log.debug(clazz.getName() + " Returned a null item upon registration");
|
||||
continue;
|
||||
}
|
||||
if (((ITTinkererItem) newItem).getSpecialParameters() != null) {
|
||||
for (Object param : ((ITTinkererItem) newItem).getSpecialParameters()) {
|
||||
for (Constructor constructor : clazz.getConstructors()) {
|
||||
if (constructor.getParameterTypes().length > 0
|
||||
&& constructor.getParameterTypes()[0].isAssignableFrom(param.getClass())) {
|
||||
Item nextItem = (Item) constructor.newInstance(param);
|
||||
nextItem.setUnlocalizedName(((ITTinkererItem) nextItem).getItemName());
|
||||
itemList.add(nextItem);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
itemRegistry.put(clazz, itemList);
|
||||
}
|
||||
} catch (InstantiationException | InvocationTargetException | IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
for (ArrayList<Block> blockArrayList : blockRegistry.values()) {
|
||||
for (Block block : blockArrayList) {
|
||||
if (((ITTinkererBlock) block).getItemBlock() != null) {
|
||||
GameRegistry.registerBlock(
|
||||
block,
|
||||
((ITTinkererBlock) block).getItemBlock(),
|
||||
((ITTinkererBlock) block).getBlockName());
|
||||
} else {
|
||||
GameRegistry.registerBlock(block, ((ITTinkererBlock) block).getBlockName());
|
||||
}
|
||||
if (((ITTinkererBlock) block).getTileEntity() != null) {
|
||||
GameRegistry.registerTileEntity(
|
||||
((ITTinkererBlock) block).getTileEntity(),
|
||||
LibResources.PREFIX_MOD + ((ITTinkererBlock) block).getBlockName());
|
||||
}
|
||||
if (block instanceof IMultiTileEntityBlock) {
|
||||
for (Map.Entry<Class<? extends TileEntity>, String> tile : ((IMultiTileEntityBlock) block)
|
||||
.getAdditionalTileEntities().entrySet()) {
|
||||
GameRegistry.registerTileEntity(tile.getKey(), tile.getValue());
|
||||
}
|
||||
}
|
||||
if (((ITTinkererBlock) block).shouldDisplayInTab()
|
||||
&& FMLCommonHandler.instance().getSide() == Side.CLIENT) {
|
||||
ModCreativeTab.INSTANCE.addBlock(block);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dynamismTablet = ThaumicTinkerer.registry.getFirstBlockFromClass(BlockAnimationTablet.class);
|
||||
itemBlackHoleTalisman = getFirstItemFromClass(ItemBlockTalisman.class);
|
||||
itemPlacementMirror = getFirstItemFromClass(ItemPlacementMirror.class);
|
||||
}
|
||||
|
||||
public ArrayList<Item> getItemFromClass(Class clazz) {
|
||||
return itemRegistry.get(clazz);
|
||||
}
|
||||
|
||||
public Item getFirstItemFromClass(Class clazz) {
|
||||
return itemRegistry.get(clazz) != null ? itemRegistry.get(clazz).get(0) : null;
|
||||
}
|
||||
|
||||
public Item getItemFromClassAndName(Class clazz, String s) {
|
||||
if (itemRegistry.get(clazz) == null) {
|
||||
return null;
|
||||
}
|
||||
for (Item i : getItemFromClass(clazz)) {
|
||||
if (((ITTinkererItem) i).getItemName().equals(s)) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Block getBlockFromClassAndName(Class clazz, String s) {
|
||||
if (blockRegistry.get(clazz) == null) {
|
||||
return null;
|
||||
}
|
||||
for (Block i : getBlockFromClass(clazz)) {
|
||||
if (((ITTinkererBlock) i).getBlockName().equals(s)) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public ArrayList<Block> getBlockFromClass(Class clazz) {
|
||||
return blockRegistry.get(clazz);
|
||||
}
|
||||
|
||||
public Block getFirstBlockFromClass(Class clazz) {
|
||||
return blockRegistry.get(clazz) != null ? blockRegistry.get(clazz).get(0) : null;
|
||||
}
|
||||
|
||||
public void init() {
|
||||
for (Item[] itemArrayList : itemRegistry.values()) {
|
||||
|
||||
for (ArrayList<Item> itemArrayList : itemRegistry.values()) {
|
||||
for (Item item : itemArrayList) {
|
||||
registerRecipe((ITTinkererRegisterable) item);
|
||||
}
|
||||
}
|
||||
|
||||
for (ArrayList<Block> blockArrayList : blockRegistry.values()) {
|
||||
for (Block block : blockArrayList) {
|
||||
registerRecipe((ITTinkererRegisterable) block);
|
||||
}
|
||||
}
|
||||
for (ArrayList<Item> itemArrayList : itemRegistry.values()) {
|
||||
for (Item item : itemArrayList) {
|
||||
if (!(item instanceof ItemBlock)) {
|
||||
GameRegistry.registerItem(item, ((ITTinkererItem) item).getItemName());
|
||||
|
||||
@@ -133,232 +249,16 @@ public class TTRegistry {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (Block[] blockArrayList : blockRegistry.values()) {
|
||||
for (Block block : blockArrayList) {
|
||||
registerRecipe((ITTinkererRegisterable) block);
|
||||
}
|
||||
}
|
||||
ModCreativeTab.INSTANCE.addAllItemsAndBlocks();
|
||||
}
|
||||
|
||||
private void registerResearch(ITTinkererRegisterable nextItem) {
|
||||
IRegisterableResearch registerableResearch = nextItem.getResearchItem();
|
||||
if (registerableResearch != null) {
|
||||
registerableResearch.registerResearch();
|
||||
}
|
||||
}
|
||||
|
||||
private void registerRecipe(ITTinkererRegisterable nextItem) {
|
||||
ThaumicTinkererRecipe thaumicTinkererRecipe = nextItem.getRecipeItem();
|
||||
if (thaumicTinkererRecipe != null) {
|
||||
thaumicTinkererRecipe.registerRecipe();
|
||||
}
|
||||
}
|
||||
|
||||
private Block loadSimpleBlock(Block newBlock) {
|
||||
try {
|
||||
final ITTinkererBlock ittBlock = (ITTinkererBlock) newBlock;
|
||||
if (ittBlock.shouldRegister()) {
|
||||
newBlock.setBlockName(ittBlock.getBlockName());
|
||||
blockRegistry.put(newBlock.getClass(), new Block[] { newBlock });
|
||||
registerBlock(newBlock, ittBlock);
|
||||
|
||||
Class<? extends ItemBlock> itemBlock = ittBlock.getItemBlock();
|
||||
if (itemBlock != null) {
|
||||
Item newItem = itemBlock.getConstructor(Block.class).newInstance(newBlock);
|
||||
newItem.setUnlocalizedName(((ITTinkererItem) newItem).getItemName());
|
||||
itemRegistry.put(itemBlock, new Item[] { newItem });
|
||||
}
|
||||
return newBlock;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
FMLLog.log(
|
||||
Level.WARN,
|
||||
"Failed to load Block " + newBlock.getClass().getSimpleName() + ". This shouldn't happen!");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private Block[] loadMetaBlock(Block newBlock) {
|
||||
try {
|
||||
final ITTinkererBlock ittBlock = (ITTinkererBlock) newBlock;
|
||||
if (ittBlock.shouldRegister()) {
|
||||
newBlock.setBlockName(ittBlock.getBlockName());
|
||||
|
||||
Block[] metaBlocks = ittBlock.getMetaBlocks();
|
||||
|
||||
Block[] blockList = new Block[1 + metaBlocks.length];
|
||||
blockRegistry.put(newBlock.getClass(), blockList);
|
||||
blockList[0] = newBlock;
|
||||
|
||||
int index = 1;
|
||||
registerBlock(newBlock, ittBlock);
|
||||
for (Block metaBlock : metaBlocks) {
|
||||
ITTinkererBlock metaIttBlock = (ITTinkererBlock) metaBlock;
|
||||
metaBlock.setBlockName(metaIttBlock.getBlockName());
|
||||
blockList[index++] = metaBlock;
|
||||
registerBlock(metaBlock, metaIttBlock);
|
||||
}
|
||||
|
||||
Class<? extends ItemBlock> itemBlock = ittBlock.getItemBlock();
|
||||
if (itemBlock != null) {
|
||||
Item newItem = itemBlock.getConstructor(Block.class).newInstance(newBlock);
|
||||
newItem.setUnlocalizedName(((ITTinkererItem) newItem).getItemName());
|
||||
itemRegistry.put(itemBlock, new Item[] { newItem });
|
||||
}
|
||||
|
||||
return blockList;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
FMLLog.log(
|
||||
Level.WARN,
|
||||
"Failed to load Block " + newBlock.getClass().getSimpleName() + ". This shouldn't happen!");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private Item loadSimpleItem(Item newItem) {
|
||||
try {
|
||||
final ITTinkererItem ittItem = (ITTinkererItem) newItem;
|
||||
if (ittItem.shouldRegister()) {
|
||||
newItem.setUnlocalizedName(ittItem.getItemName());
|
||||
itemRegistry.put(newItem.getClass(), new Item[] { newItem });
|
||||
|
||||
return newItem;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
FMLLog.log(
|
||||
Level.WARN,
|
||||
"Failed to load Item " + newItem.getClass().getSimpleName() + ". This shouldn't happen!");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private Item[] loadMetaItem(Item newItem) {
|
||||
try {
|
||||
final ITTinkererItem ittItem = (ITTinkererItem) newItem;
|
||||
if (ittItem.shouldRegister()) {
|
||||
newItem.setUnlocalizedName(ittItem.getItemName());
|
||||
|
||||
Item[] metaItems = ittItem.getMetaItems();
|
||||
|
||||
Item[] itemList = new Item[1 + metaItems.length];
|
||||
itemList[0] = newItem;
|
||||
|
||||
int index = 1;
|
||||
for (Item metaItem : metaItems) {
|
||||
metaItem.setUnlocalizedName(((ITTinkererItem) metaItem).getItemName());
|
||||
itemList[index++] = metaItem;
|
||||
}
|
||||
itemRegistry.put(newItem.getClass(), itemList);
|
||||
return itemList;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
FMLLog.log(
|
||||
Level.WARN,
|
||||
"Failed to load Item " + newItem.getClass().getSimpleName() + ". This shouldn't happen!");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void registerBlock(Block block, ITTinkererBlock ittBlock) {
|
||||
String blockName = ittBlock.getBlockName();
|
||||
Class<? extends ItemBlock> itemBlock = ittBlock.getItemBlock();
|
||||
if (itemBlock != null) {
|
||||
GameRegistry.registerBlock(block, itemBlock, blockName);
|
||||
} else {
|
||||
GameRegistry.registerBlock(block, blockName);
|
||||
}
|
||||
Class<? extends TileEntity> tileEntity = ittBlock.getTileEntity();
|
||||
if (tileEntity != null) {
|
||||
GameRegistry.registerTileEntity(tileEntity, LibResources.PREFIX_MOD + blockName);
|
||||
}
|
||||
if (block instanceof IMultiTileEntityBlock) {
|
||||
for (Map.Entry<Class<? extends TileEntity>, String> tile : ((IMultiTileEntityBlock) block)
|
||||
.getAdditionalTileEntities().entrySet()) {
|
||||
GameRegistry.registerTileEntity(tile.getKey(), tile.getValue());
|
||||
}
|
||||
}
|
||||
if (FMLCommonHandler.instance().getSide() == Side.CLIENT) {
|
||||
if (ittBlock.shouldDisplayInTab()) {
|
||||
ModCreativeTab.INSTANCE.addBlock(block);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated // Use getItemArrayFromClass instead
|
||||
public ArrayList<Item> getItemFromClass(Class clazz) {
|
||||
return new ArrayList<>(Arrays.asList(getItemArrayFromClass(clazz)));
|
||||
}
|
||||
|
||||
public Item[] getItemArrayFromClass(Class clazz) {
|
||||
return itemRegistry.get(clazz);
|
||||
}
|
||||
|
||||
public Item getItemFromClass(Class clazz, int index) {
|
||||
return itemRegistry.get(clazz)[index];
|
||||
}
|
||||
|
||||
public Item getFirstItemFromClass(Class clazz) {
|
||||
final Item[] items = itemRegistry.get(clazz);
|
||||
return items != null ? items[0] : null;
|
||||
}
|
||||
|
||||
public Item getItemFromClassAndName(Class clazz, String s) {
|
||||
final Item[] itemsFromClass = itemRegistry.get(clazz);
|
||||
if (itemsFromClass != null) {
|
||||
for (Item i : itemsFromClass) {
|
||||
if (((ITTinkererItem) i).getItemName().equals(s)) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Block getBlockFromClassAndName(Class clazz, String s) {
|
||||
final Block[] blocksFromClass = blockRegistry.get(clazz);
|
||||
if (blocksFromClass != null) {
|
||||
for (Block i : blocksFromClass) {
|
||||
if (((ITTinkererBlock) i).getBlockName().equals(s)) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Deprecated // Use getBlockArrayFromClass instead
|
||||
public ArrayList<Block> getBlockFromClass(Class clazz) {
|
||||
return new ArrayList<>(Arrays.asList(getBlockArrayFromClass(clazz)));
|
||||
}
|
||||
|
||||
public Block[] getBlockArrayFromClass(Class clazz) {
|
||||
return blockRegistry.get(clazz);
|
||||
}
|
||||
|
||||
public Block getBlockFromClass(Class clazz, int index) {
|
||||
return blockRegistry.get(clazz)[index];
|
||||
}
|
||||
|
||||
public Block getFirstBlockFromClass(Class clazz) {
|
||||
final Block[] blocks = blockRegistry.get(clazz);
|
||||
return blocks != null ? blocks[0] : null;
|
||||
}
|
||||
|
||||
public void postInit() {
|
||||
for (Item[] itemArrayList : itemRegistry.values()) {
|
||||
for (ArrayList<Item> itemArrayList : itemRegistry.values()) {
|
||||
for (Item item : itemArrayList) {
|
||||
registerResearch((ITTinkererRegisterable) item);
|
||||
}
|
||||
}
|
||||
for (Block[] blockArrayList : blockRegistry.values()) {
|
||||
for (ArrayList<Block> blockArrayList : blockRegistry.values()) {
|
||||
for (Block block : blockArrayList) {
|
||||
registerResearch((ITTinkererRegisterable) block);
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ ttmisc.notAbsorbing=Nicht Absorbierend
|
||||
ttmisc.absorbing=Absorbierend
|
||||
ttmisc.shareTome.write=Forschung niedergeschrieben!
|
||||
ttmisc.shareTome.notOnline=Der Spieler, dem diese Forschung gehört, ist nicht online.
|
||||
ttmisc.shareTome.offlineshare=Offline teilen
|
||||
ttmisc.shareTomb.offlineshare=Offline teilen
|
||||
ttmisc.shareTome.sync=Forschung erlangt.
|
||||
ttmisc.shareTome.noAssign=Nicht zugewiesen
|
||||
ttmisc.shareTome.playerName=Gebunden an die Forschung von %s.
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
# MISC
|
||||
ttmisc.toggleArmor=Toggle Awakened Armour
|
||||
|
||||
# KAMI MISC
|
||||
ttmisc.awakenedArmor0=Armour Piece Enabled
|
||||
ttmisc.awakenedArmor1=Armour Piece Disabled
|
||||
ttmisc.disableAllArmor=Kami Armour Disabled
|
||||
ttmisc.enableAllArmor=Kami Armour Enabled
|
||||
|
||||
# ITEM NAMES
|
||||
item.soulMould.name=Soul Mould
|
||||
|
||||
# RESEARCH
|
||||
ttresearch.page.MAGNETS.1=You designed two devices. The Kinetic and Corporeal Attractors, these, respectively affect items and living beings.<BR><BR>The Corporeal Attractor involves some more complex mechanisms, to which you can access by right clicking it with a casting wand. Using a Soul Mould, you can right click on a mob to save it as a pattern, which you can set in the attractor's interface, as a filter, along with settings for child or adult animals, if available.
|
||||
|
||||
ttresearch.page.TTENCH_ASCENT_BOOST.0=You have formulated an enchantment that allows you to jump higher than you normally can.<BR><BR>This enchantment can be applied on leg armour. When done so, the wearer will be able to jump a lot higher than normal.
|
||||
|
||||
ttresearch.page.TTENCH_SLOW_FALL.0=You have formulated an enchantment that allows you to fall slowly.<BR><BR>This enchantment can be applied on foot armour. When done so, the wearer will fall at a slower rate, this will also reduce, if not negating the fall damage.<BR><BR>Pressing Shift will temporarily disable this effect allowing you to fall normally.
|
||||
|
||||
ttresearch.page.ICHORCLOTH_ARMOR.0=You have found how to weave Ichorcloth into clothing.<BR><BR>These new clothes are about as effective as mundane diamond armour, when it comes to protecting the wearer from damage. However, this cloth is completely unbreakable and will never sustain as much as a scratch.
|
||||
|
||||
ttresearch.page.ICHORCLOTH_HELM_GEM.0=You found a way of upgrading the Ichorcloth Cowl into a more powerful form.<BR><BR>First and foremost, the cowl doubles as goggles of revealing.<BR>Second, the wearer is granted unlimited underwater breath as well as crystal clear underwater vision.<BR>Lastly, if one wearing this cowl finds themselves without a full belly, the effects of health restoration will still apply, as if that was the case. Pressing U will toggle this armour's effects.
|
||||
|
||||
ttresearch.page.ICHORCLOTH_CHEST_GEM.0=You found a way of upgrading the Ichorcloth Robes into a more powerful form.<BR><BR>Starting off, by simply wearing these robes, the wearer is blessed with the power of eternal flight (wings that don't burn after 5 minutes included), as well as having all fall damage negated.<BR>The robes also passively protect the wearer from any incoming simple projectiles, akin to the focus of Distortion. Pressing U will toggle this armour's effects.
|
||||
|
||||
ttresearch.page.ICHORCLOTH_LEGS_GEM.0=You found a way of upgrading the Ichorcloth Leggings into a more powerful form.<BR><BR>These leggings are infused with the soul of fire.<BR>For one, they cast a light around the holder, brighter even than that of Hyperenergetic Nitor. This light also expands to where the wearer is looking, akin to a flashlight, and prevails given the creator's existence in a much extended range.<BR>Furthermore, these leggings not only provide fire resistance, but they convert any incoming fire damage into healing. Pressing U will toggle this armour's effects.
|
||||
|
||||
ttresearch.page.ICHORCLOTH_BOOTS_GEM.0=You found a way of upgrading the Ichorcloth Boots into a more powerful form.<BR><BR>These boots allow for extremely smooth movement, akin to the Boots of the Traveller. The wearer's speed, jump height and jump reach all become magnified by wearing the boots, making movement a breeze. One can also walk on 1 high blocks as if they are slabs, this can be suppressed by sneaking.<BR>Wearing the boots also induces a constant Haste II effect, turns any dirt below them into grass and negates all fall damage. Pressing U will toggle this armour's effects.
|
||||
@@ -36,7 +36,7 @@ ttmisc.notAbsorbing=Not Absorbing
|
||||
ttmisc.absorbing=Absorbing
|
||||
ttmisc.shareTome.write=Research Written!
|
||||
ttmisc.shareTome.notOnline=The player who this research belongs to is not online.
|
||||
ttmisc.shareTome.offlineshare=Offline share
|
||||
ttmisc.shareTomb.offlineshare=Offline share
|
||||
ttmisc.shareTome.sync=Research Acquired.
|
||||
ttmisc.shareTome.noAssign=Not Assigned
|
||||
ttmisc.shareTome.playerName=Bound to %s's research.
|
||||
@@ -87,7 +87,7 @@ item.focusDislocation.name=Wand Focus: Dislocation
|
||||
item.cleansingTalisman.name=Talisman of Remedium
|
||||
item.brightNitor.name=Hyperenergetic Nitor
|
||||
item.focusTelekinesis.name=Wand Focus: Telekinesis
|
||||
item.soulMould.name=Soul Mold
|
||||
item.soulMould.name=Soul Mould
|
||||
item.xpTalisman.name=Talisman of Withhold
|
||||
item.focusSmelt.name=Wand Focus: Efreet's Flame
|
||||
item.focusHeal.name=Wand Focus: Mending
|
||||
@@ -276,7 +276,7 @@ ttresearch.page.GAS_REMOVER.0=After knowing both the Gaseous Illuminae and Teneb
|
||||
|
||||
# -- SPELLBINDING CLOTH
|
||||
ttresearch.name.SPELL_CLOTH=Spellbinding Cloth
|
||||
ttresearch.lore.SPELL_CLOTH=Enchanted eraser
|
||||
ttresearch.lore.SPELL_CLOTH=Enchanted erasor
|
||||
ttresearch.page.SPELL_CLOTH.0=By mixing some Enchanted Fabric with raw magic power, you created a cloth that can be rubbed on an item to wipe it of its enchantments by combining them in a Crafting Recipe.
|
||||
|
||||
# -- DYNAMISM TABLET
|
||||
@@ -314,7 +314,7 @@ ttresearch.page.FOCUS_TELEKINESIS.0=You created a wand focus that kinetically mo
|
||||
ttresearch.name.MAGNETS=Kinetic Attraction
|
||||
ttresearch.lore.MAGNETS=How do they work?
|
||||
ttresearch.page.MAGNETS.0=Working with the telekinesis focus, you managed to apply this knowledge to create a device to attract items or living beings, like a magnet.<BR><BR>These two blocks have two states, north (red) and south (blue), in north mode it'll push items, or entities away; in south mode it'll pull them in.<BR><BR>The range of the attraction depends on the redstone signal applied to it. A lever next to it will allow for 7.5 blocks, while a current from farther away will make it shorter. In general, the attraction is equal to half the redstone signal's strength in blocks, in every direction.
|
||||
ttresearch.page.MAGNETS.1=You designed two devices. The Kinetic and Corporeal Attractors, these, respectively affect items and living beings.<BR><BR>The Corporeal Attractor involves some more complex mechanisms, to which you can access by right clicking it with a casting wand. Using a Soul Mold, you can right click on a mob to save it as a pattern, which you can set in the attractor's interface, as a filter, along with settings for child or adult animals, if available.
|
||||
ttresearch.page.MAGNETS.1=You designed two devices. The Kinetic and Corporeal Attractors, these, respectively affect items and living beings.<BR><BR>The Corporeal Attractor involves some more complex mechanisms, to which you can access by right clicking it with a casting wand. Using a Soul Mould, you can right click on a mob to save it as a pattern, which you can set in the attractor's interface, as a filter, along with settings for child or adult animals, if available.
|
||||
|
||||
# -- OSMOTIC ENCHANTER
|
||||
ttresearch.name.ENCHANTER=Osmotic Enchanter
|
||||
@@ -355,7 +355,7 @@ ttresearch.page.TTENCH_DESINTEGRATE.0=You have formulated an enchantment that al
|
||||
|
||||
# -- ENCHANTMENT: QUICK DRAW
|
||||
ttresearch.name.TTENCH_QUICK_DRAW=Enchantment: Quick Draw
|
||||
ttresearch.lore.TTENCH_QUICK_DRAW=May the odds ever be in your favor
|
||||
ttresearch.lore.TTENCH_QUICK_DRAW=May the odds ever be in your favour
|
||||
ttresearch.page.TTENCH_QUICK_DRAW.0=You have formulated an enchantment that allows you to draw your bow in a quicker fashion.<BR><BR>This enchantment can be applied on bows. When done so, the bow can be fully drawn faster than normally.
|
||||
|
||||
# -- ENCHANTMENT: VAMPIRISM
|
||||
@@ -381,7 +381,7 @@ ttresearch.page.TTENCH_FINAL.0=You have formulated an enchantment that enables y
|
||||
# -- ENCHANTMENT: VALIANCE
|
||||
ttresearch.name.TTENCH_VALIANCE=Enchantment: Valiance
|
||||
ttresearch.lore.TTENCH_VALIANCE=Back from the edge
|
||||
ttresearch.page.TTENCH_VALIANCE.0=You have formulated an enchantment that enables you to fight better when at low health.<BR><BR>This enchantment can be applied on swords. When done so, damage done with the sword will be increased when the wielder is at low health.
|
||||
ttresearch.page.TTENCH_VALIANCE.0=You have formulated an enchantment that enables you to fight better when at low health.<BR><BR>This enchantment can be applied on swords. When done so, damage done with the sword will be increased when the weilder is at low health.
|
||||
|
||||
|
||||
# -- ENCHANTMENT: TUNNEL
|
||||
@@ -397,7 +397,7 @@ ttresearch.page.TTENCH_SHATTER.0=You have formulated an enchantment that enables
|
||||
# -- ENCHANTMENT: SHOCKWAVE
|
||||
ttresearch.name.TTENCH_SHOCKWAVE=Enchantment: Shockwave
|
||||
ttresearch.lore.TTENCH_SHOCKWAVE=Mini Earthquakes
|
||||
ttresearch.page.TTENCH_SHOCKWAVE.0=You have formulated an enchantment that enables you to become to kill enemies while falling.<BR><BR>This enchantment can be applied on boots. When done so, whenever the wearer falls, damage will be dealt to surrounding mobs or players.<BR><BR>Unfortunately Magics of all types that make the player lighter, so to prevent damage from falling, will make the player too light to damage entities. You feel there may be ways to stop this at a later time, once you know the magic better.
|
||||
ttresearch.page.TTENCH_SHOCKWAVE.0=You have formulated an enchantment that enables you to become to kill enemies while falling.<BR><BR>This enchantment can be applied on boots. When done so, whenever the wearer falls, damage will be dealt to surrounding mobs or players.<BR><BR>Unfortunatly Magics of all types that make the player lighter, so to prevent damage from falling, will make the player too light to damage entities. You feel there may be ways to stop this at a later time, once you know the magic better.
|
||||
|
||||
# -- ENCHANTMENT: POUNCE
|
||||
ttresearch.name.TTENCH_POUNCE=Enchantment: Pounce
|
||||
@@ -503,23 +503,23 @@ ttresearch.page.ICHORCLOTH_ARMOR.0=You have found how to weave Ichorcloth into c
|
||||
# -- COWL OF THE ABYSSAL DEPTHS
|
||||
ttresearch.name.ICHORCLOTH_HELM_GEM=Cowl of the Abyssal Depths
|
||||
ttresearch.lore.ICHORCLOTH_HELM_GEM=Just friendly crustaceans
|
||||
ttresearch.page.ICHORCLOTH_HELM_GEM.0=You found a way of upgrading the Ichorcloth Cowl into a more powerful form.<BR><BR>First and foremost, the cowl doubles as goggles of revealing.<BR>Second, the wearer is granted unlimited underwater breath as well as crystal clear underwater vision.<BR>Lastly, if one wearing this cowl finds themselves without a full belly, the effects of health restoration will still apply, as if that was the case. Pressing U will toggle this armor's effects.
|
||||
ttresearch.page.ICHORCLOTH_HELM_GEM.0=You found a way of upgrading the Ichorcloth Cowl into a more powerful form.<BR><BR>First and foremost, the cowl doubles as goggles of revealing.<BR>Second, the wearer is granted unlimited underwater breath as well as crystal clear underwater vision.<BR>Lastly, if one wearing this cowl finds themselves without a full belly, the effects of health restoration will still apply, as if that was the case. Pressing U will toggle this armors effects.
|
||||
|
||||
# -- ROBES OF THE STRATOSPHERE
|
||||
ttresearch.name.ICHORCLOTH_CHEST_GEM=Robes of the Stratosphere
|
||||
ttresearch.lore.ICHORCLOTH_CHEST_GEM=Guys can wear these too
|
||||
ttresearch.page.ICHORCLOTH_CHEST_GEM.0=You found a way of upgrading the Ichorcloth Robes into a more powerful form.<BR><BR>Starting off, by simply wearing these robes, the wearer is blessed with the power of eternal flight (wings that don't burn after 5 minutes included), as well as having all fall damage negated.<BR>The robes also passively protect the wearer from any incoming simple projectiles, akin to the focus of Distortion. Pressing U will toggle this armor's effects.
|
||||
ttresearch.page.ICHORCLOTH_CHEST_GEM.0=You found a way of upgrading the Ichorcloth Robes into a more powerful form.<BR><BR>Starting off, by simply wearing these robes, the wearer is blessed with the power of eternal flight (wings that don't burn after 5 minutes included), as well as having all fall damage negated.<BR>The robes also passively protect the wearer from any incoming simple projectiles, akin to the focus of Distortion. Pressing U will toggle this armors effects.
|
||||
|
||||
# -- LEGGINGS OF THE BURNING MANTLE
|
||||
ttresearch.name.ICHORCLOTH_LEGS_GEM=Leggings of the Burning Mantle
|
||||
ttresearch.lore.ICHORCLOTH_LEGS_GEM=A warm feeling
|
||||
ttresearch.page.ICHORCLOTH_LEGS_GEM.0=You found a way of upgrading the Ichorcloth Leggings into a more powerful form.<BR><BR>These leggings are infused with the soul of fire.<BR>For one, they cast a light around the holder, brighter even than that of Hyperenergetic Nitor. This light also expands to where the wearer is looking, akin to a flashlight, and prevails given the creator's existence in a much extended range.<BR>Furthermore, these leggings not only provide fire resistance, but they convert any incoming fire damage into healing. Pressing U will toggle this armor's effects.
|
||||
ttresearch.page.ICHORCLOTH_LEGS_GEM.1=In case you find yourself wanting to be in the darkness for whatever reason, Shift-right clicking with these leggings will toggle on or off the light feature.
|
||||
ttresearch.page.ICHORCLOTH_LEGS_GEM.0=You found a way of upgrading the Ichorcloth Leggings into a more powerful form.<BR><BR>These leggings are infused with the soul of fire.<BR>For one, they cast a light around the holder, brighter even than that of Hyperenergetic Nitor. This light also expands to where the wearer is looking, akin to a flashlight, and prevails given the creator's existence in a much extended range.<BR>Furthermore, these leggings not only provide fire resistance, but they convert any incoming fire damage into healing. Pressing U will toggle this armors effects.
|
||||
ttresearch.page.ICHORCLOTH_LEGS_GEM.1=Case you find yourself wanting to be in the darkness for whatever reason, Shift-right clicking with these leggings will toggle on or off the light feature.
|
||||
|
||||
# -- BOOTS OF THE HORIZONTAL SHIELD
|
||||
ttresearch.name.ICHORCLOTH_BOOTS_GEM=Boots of the Horizontal Shield
|
||||
ttresearch.lore.ICHORCLOTH_BOOTS_GEM=Recommended by 9/10 Landstriders
|
||||
ttresearch.page.ICHORCLOTH_BOOTS_GEM.0=You found a way of upgrading the Ichorcloth Boots into a more powerful form.<BR><BR>These boots allow for extremely smooth movement, akin to the Boots of the Traveller. The wearer's speed, jump height and jump reach all become magnified by wearing the boots, making movement a breeze. One can also walk on 1 high blocks as if they are slabs, this can be suppressed by sneaking.<BR>Wearing the boots also induces a constant Haste II effect, turns any dirt below them into grass and negates all fall damage. Pressing U will toggle this armor's effects.
|
||||
ttresearch.page.ICHORCLOTH_BOOTS_GEM.0=You found a way of upgrading the Ichorcloth Boots into a more powerful form.<BR><BR>These boots allow for extremely smooth movement, akin to the Boots of the Traveller. The wearer's speed, jump height and jump reach all become magnified by wearing the boots, making movement a breeze. One can also walk on 1 high blocks as if they are slabs, this can be suppressed by sneaking.<BR>Wearing the boots also induces a constant Haste II effect, turns any dirt below them into grass and negates all fall damage. Pressing U will toggle this armors effects.
|
||||
|
||||
# -- FELINE AMULET
|
||||
ttresearch.name.CAT_AMULET=Feline Amulet
|
||||
@@ -528,7 +528,7 @@ ttresearch.page.CAT_AMULET.0=It didn't take you long to come to the conclusion t
|
||||
|
||||
# -- ICHORIUM TOOLS
|
||||
ttresearch.name.ICHOR_TOOLS=Ichorium Tools
|
||||
ttresearch.lore.ICHOR_TOOLS=Pinnacle of design
|
||||
ttresearch.lore.ICHOR_TOOLS=Pinacle of design
|
||||
ttresearch.page.ICHOR_TOOLS.0=You discovered how to create tools out of Ichorium. These tools are extremely powerful, even more so than diamond, furthermore, they never break.<BR><BR>For the creation of these tools, mundane sticks aren't enough, you decided to use Silverwood rods in replacement.
|
||||
|
||||
# -- AWAKENED ICHORIUM PICKAXE
|
||||
@@ -550,7 +550,7 @@ ttresearch.page.ICHOR_AXE_GEM.0=You awakened the real potential of an Ichorium A
|
||||
|
||||
# -- AWAKENED ICHORIUM SWORD
|
||||
ttresearch.name.ICHOR_SWORD_GEM=Awakened Ichorium Sword
|
||||
ttresearch.lore.ICHOR_SWORD_GEM=An elegant weapon from a more civilized age
|
||||
ttresearch.lore.ICHOR_SWORD_GEM=An elegant weapon from a more civilised age
|
||||
ttresearch.page.ICHOR_SWORD_GEM.0=You awakened the real potential of an Ichorium Sword. This sword contains all the traits from the regular one, however, by shift right clicking on it, you can change what mode it's on.<BR><BR>On Single Mode (Green) it'll attack mobs normally.<BR><BR>On Area Mode (Red) it'll attack all mobs of the same type in a 3 block radius of the attacked one.<BR><BR>On Soul Mode (Blue) it'll deal less damage than normally, but every hit will bless the attacker with a Soul Heart.<BR>[continued]
|
||||
ttresearch.page.ICHOR_SWORD_GEM.1=Soul Hearts are hearts that can only be used once. They show up as metallic hearts below your food bar, when existent. They block damage their wielder would take, but disappear in the process.
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ ttmisc.notAbsorbing=Ne pas Absorber
|
||||
ttmisc.absorbing=Absorber
|
||||
ttmisc.shareTome.write=Recherche écrite !
|
||||
ttmisc.shareTome.notOnline=Le joueur à qui appartient cette Recherche n'est pas connecté.
|
||||
ttmisc.shareTome.offlineshare=Partage hors-connexion
|
||||
ttmisc.shareTomb.offlineshare=Partage hors-connexion
|
||||
ttmisc.shareTome.sync=Recherche acquise.
|
||||
ttmisc.shareTome.noAssign=Non assigné
|
||||
ttmisc.shareTome.playerName=Lié aux recherches de %s.
|
||||
@@ -376,7 +376,7 @@ ttresearch.page.TTENCH_FINAL.0=You have formulated an enchantment that enables y
|
||||
# -- ENCHANTMENT: VALIANCE
|
||||
ttresearch.name.TTENCH_VALIANCE=Enchantement: Valliance
|
||||
ttresearch.lore.TTENCH_VALIANCE=Et nous voilà repartis !
|
||||
ttresearch.page.TTENCH_VALIANCE.0=You have formulated an enchantment that enables you to fight better when at low health.<BR><BR>This enchantment can be applied on swords. When done so, damage done with the sword will be increased when the wielder is at low health.
|
||||
ttresearch.page.TTENCH_VALIANCE.0=You have formulated an enchantment that enables you to fight better when at low health.<BR><BR>This enchantment can be applied on swords. When done so, damage done with the sword will be increased when the weilder is at low health.
|
||||
|
||||
|
||||
# -- ENCHANTMENT: TUNNEL
|
||||
@@ -392,7 +392,7 @@ ttresearch.page.TTENCH_SHATTER.0=You have formulated an enchantment that enables
|
||||
# -- ENCHANTMENT: SHOCKWAVE
|
||||
ttresearch.name.TTENCH_SHOCKWAVE=Enchantement: Séïsme
|
||||
ttresearch.lore.TTENCH_SHOCKWAVE=Ondes de choc
|
||||
ttresearch.page.TTENCH_SHOCKWAVE.0=You have formulated an enchantment that enables you to become to kill enemies while falling.<BR><BR>This enchantment can be applied on boots. When done so, whenever the wearer falls, damage will be dealt to surrounding mobs or players.<BR><BR>Unfortunately Magics of all types that make the player lighter, so to prevent damage from falling, will make the player too light to damage entities. You feel there may be ways to stop this at a later time, once you know the magic better.
|
||||
ttresearch.page.TTENCH_SHOCKWAVE.0=You have formulated an enchantment that enables you to become to kill enemies while falling.<BR><BR>This enchantment can be applied on boots. When done so, whenever the wearer falls, damage will be dealt to surrounding mobs or players.<BR><BR>Unfortunatly Magics of all types that make the player lighter, so to prevent damage from falling, will make the player too light to damage entities. You feel there may be ways to stop this at a later time, once you know the magic better.
|
||||
|
||||
# -- ENCHANTMENT: POUNCE
|
||||
ttresearch.name.TTENCH_POUNCE=Enchantement: Rebond
|
||||
@@ -509,7 +509,7 @@ ttresearch.page.ICHORCLOTH_CHEST_GEM.0=You found a way of upgrading the Ichorclo
|
||||
ttresearch.name.ICHORCLOTH_LEGS_GEM=Jambières du Manteau brûlant
|
||||
ttresearch.lore.ICHORCLOTH_LEGS_GEM=Coup de chaud
|
||||
ttresearch.page.ICHORCLOTH_LEGS_GEM.0=You found a way of upgrading the Ichorcloth Leggings into a more powerful form.<BR><BR>These leggings are infused with the soul of fire.<BR>For one, they cast a light around the holder, brighter even than that of Hyperenergetic Nitor. This light also expands to where the wearer is looking, akin to a flashlight, and prevails given the creator's existence in a much extended range.<BR>Furthermore, these leggings not only provide fire resistance, but they convert any incoming fire damage into healing. Pressing U will toggle this armors effects.
|
||||
ttresearch.page.ICHORCLOTH_LEGS_GEM.1=In case you find yourself wanting to be in the darkness for whatever reason, Shift-right clicking with these leggings will toggle on or off the light feature.
|
||||
ttresearch.page.ICHORCLOTH_LEGS_GEM.1=Case you find yourself wanting to be in the darkness for whatever reason, Shift-right clicking with these leggings will toggle on or off the light feature.
|
||||
|
||||
# -- BOOTS OF THE HORIZONTAL SHIELD
|
||||
ttresearch.name.ICHORCLOTH_BOOTS_GEM=Bottes du Bouclier de l'horizon
|
||||
|
||||
@@ -36,7 +36,7 @@ ttmisc.notAbsorbing=비활성화
|
||||
ttmisc.absorbing=활성화
|
||||
ttmisc.shareTome.write=연구 현황이 작성되었습니다.
|
||||
ttmisc.shareTome.notOnline=이 연구 현황의 주인이 현재 접속중이 아닙니다.
|
||||
ttmisc.shareTome.offlineshare=오프라인 공유
|
||||
ttmisc.shareTomb.offlineshare=오프라인 공유
|
||||
ttmisc.shareTome.sync=연구 현황을 동기화하였습니다.
|
||||
ttmisc.shareTome.noAssign=활성화되지 않았습니다.
|
||||
ttmisc.shareTome.playerName=%s의 연구 현황에 연결되어있습니다.
|
||||
|
||||
@@ -36,7 +36,7 @@ ttmisc.notAbsorbing=Не поглощ.
|
||||
ttmisc.absorbing=Поглощ.
|
||||
ttmisc.shareTome.write=Исследования записаны!
|
||||
ttmisc.shareTome.notOnline=Игрок, записи которого здесь записаны, не в сети.
|
||||
ttmisc.shareTome.offlineshare=Оффлайновый обмен
|
||||
ttmisc.shareTomb.offlineshare=Оффлайновый обмен
|
||||
ttmisc.shareTome.sync=Исследования выучены.
|
||||
ttmisc.shareTome.noAssign=Не привязан
|
||||
ttmisc.shareTome.playerName=Привязан к исследованиям %s .
|
||||
|
||||
@@ -36,7 +36,7 @@ ttmisc.notAbsorbing=§c关闭吸引模式
|
||||
ttmisc.absorbing=§a开启吸引模式
|
||||
ttmisc.shareTome.write=研究已写入!
|
||||
ttmisc.shareTome.notOnline=拥有这项研究的玩家当前不在线.
|
||||
ttmisc.shareTome.offlineshare=离线分享
|
||||
ttmisc.shareTomb.offlineshare=离线分享
|
||||
ttmisc.shareTome.sync=已获得研究.
|
||||
ttmisc.shareTome.noAssign=未分配
|
||||
ttmisc.shareTome.playerName=绑定到%s的研究上.
|
||||
|
||||
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 612 B After Width: | Height: | Size: 783 B |
Binary file not shown.
|
Before Width: | Height: | Size: 633 B After Width: | Height: | Size: 725 B |
Loaded 100 of 372 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user