Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e448f44274 | ||
|
|
69f0a4d207 | ||
|
|
8aaa62aa02 |
No files matched your search
@@ -1,62 +0,0 @@
|
||||
name: Report Bug
|
||||
description: "Report a bug."
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: "A bug/crash report with sufficient information and logs to reproduce and track down."
|
||||
- type: input
|
||||
id: discord
|
||||
attributes:
|
||||
label: Your GTNH Discord Username
|
||||
description: Leave empty if you don't have one, but this will make it harder to contact you if we need additional info.
|
||||
placeholder: "Example: Fake#1234"
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: Mod Version
|
||||
description: "What version of the Mod are you using?"
|
||||
placeholder: "Example: 1.0.0"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: report
|
||||
attributes:
|
||||
label: Bug Report
|
||||
description: "Relevant information, as well as relevant logs attached such as `logs/fml-client-latest.log."
|
||||
placeholder: "Example: https://mclo.gs/ OR submit the file to github by dragging it to this textbox."
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: java
|
||||
attributes:
|
||||
label: Java Version
|
||||
description: What Java version are you using? It's worth mentioning that if you play on Java9+ you should try update to latest minor release (e.g. prefer Java 17.0.6 over 17.0.2) of that version.
|
||||
options:
|
||||
- Java 8
|
||||
- Java 9
|
||||
- Java 11
|
||||
- Java 17
|
||||
- Java 19
|
||||
- Java 20
|
||||
- Java 21
|
||||
- Other (Please Specify)
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: modlist
|
||||
attributes:
|
||||
label: Mod List or GTNH Pack Version
|
||||
description: "List of mods, ideally a minimal reproducible set (can be retrieved from latest.log). If using GTNH please indicate pack version and any changed mods, not the entire modlist."
|
||||
placeholder: "List of mods or GTNH Pack version goes here"
|
||||
validations:
|
||||
required: true
|
||||
- type: checkboxes
|
||||
id: final
|
||||
attributes:
|
||||
label: Final Checklist
|
||||
description: Certify that you read things
|
||||
options:
|
||||
- label: "I have searched the issues and haven't found a similar issue."
|
||||
required: true
|
||||
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
name: Feature Request
|
||||
description: "Request a feature."
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: "Please use this form to request features. We ask you check if it was already requested though"
|
||||
- type: input
|
||||
id: discord
|
||||
attributes:
|
||||
label: Your GTNH Discord Username
|
||||
description: Leave empty if you don't have one, but this will make it harder to contact you if we need additional info.
|
||||
placeholder: "Example: Wumpus#1234"
|
||||
- type: textarea
|
||||
id: request
|
||||
attributes:
|
||||
label: Feature Request
|
||||
description: "Relevant information, as well as relevant images"
|
||||
placeholder: "Example: https://mclo.gs/ OR submit the file to github by dragging it to this textbox."
|
||||
validations:
|
||||
required: true
|
||||
- type: checkboxes
|
||||
id: final
|
||||
attributes:
|
||||
label: Final Checklist
|
||||
description: Certify that you read things
|
||||
options:
|
||||
- label: "I have searched the issues and haven't found a similar issue."
|
||||
required: true
|
||||
@@ -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
|
||||
@@ -29,4 +29,3 @@ src/main/resources/mixins.*.json
|
||||
*.bat
|
||||
*.DS_Store
|
||||
!gradlew.bat
|
||||
layout.json
|
||||
@@ -1,10 +1,9 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
api('com.github.GTNewHorizons:Baubles-Expanded:2.2.21-GTNH:dev')
|
||||
api('com.github.GTNewHorizons:Baubles:1.0.4:dev')
|
||||
|
||||
api('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
|
||||
|
||||
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.52.548:dev') {transitive = false}
|
||||
|
||||
runtimeOnlyNonPublishable('com.github.GTNewHorizons:AspectRecipeIndex:1.1.0:dev')
|
||||
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.45.166:dev') {transitive = false}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ modId = ThaumicHorizons
|
||||
modGroup = com.kentington.thaumichorizons
|
||||
|
||||
# Whether to use modGroup as the maven publishing group.
|
||||
# When false, com.github.GTNewHorizons is used.
|
||||
# Due to a history of using JitPack, the default is com.github.GTNewHorizons for all mods.
|
||||
useModGroupForPublishing = false
|
||||
|
||||
# Updates your build.gradle and settings.gradle automatically whenever an update is available.
|
||||
@@ -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.
|
||||
@@ -109,20 +85,13 @@ accessTransformersFile =
|
||||
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
|
||||
usesMixins = false
|
||||
|
||||
# Set to a non-empty string to configure mixins in a separate source set under src/VALUE, instead of src/main.
|
||||
# This can speed up compile times thanks to not running the mixin annotation processor on all input sources.
|
||||
# Mixin classes will have access to "main" classes, but not the other way around.
|
||||
separateMixinSourceSet =
|
||||
|
||||
# Adds some debug arguments like verbose output and class export.
|
||||
usesMixinDebug = false
|
||||
|
||||
# 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 =
|
||||
|
||||
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
|
||||
@@ -148,15 +117,9 @@ minimizeShadowedDependencies = true
|
||||
# If disabled, won't rename the shadowed classes.
|
||||
relocateShadowedDependencies = true
|
||||
|
||||
# Adds CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
|
||||
# Adds the GTNH maven, CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
|
||||
includeWellKnownRepositories = true
|
||||
|
||||
# A list of repositories to exclude from the includeWellKnownRepositories setting. Should be a space separated
|
||||
# list of strings, with the acceptable keys being(case does not matter):
|
||||
# cursemaven
|
||||
# modrinth
|
||||
excludeWellKnownRepositories =
|
||||
|
||||
# Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven.
|
||||
# Authenticate with the MAVEN_USER and MAVEN_PASSWORD environment variables.
|
||||
# If you need a more complex setup disable maven publishing here and add a publishing repository to addon.gradle.
|
||||
@@ -177,7 +140,7 @@ modrinthProjectId = 1wDWP1tN
|
||||
# type can be one of [project, version],
|
||||
# and the name is the Modrinth project or version slug/id of the other mod.
|
||||
# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
|
||||
# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
|
||||
# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
|
||||
modrinthRelations =
|
||||
|
||||
# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
|
||||
@@ -198,12 +161,6 @@ curseForgeRelations = requiredDependency\:thaumcraft
|
||||
# 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.
|
||||
@@ -233,6 +190,3 @@ curseForgeRelations = requiredDependency\:thaumcraft
|
||||
# This is meant to be set in $HOME/.gradle/gradle.properties.
|
||||
# ideaCheckSpotlessOnBuild = true
|
||||
|
||||
# Non-GTNH properties
|
||||
org.gradle.configuration-cache = true
|
||||
org.gradle.parallel = true
|
||||
@@ -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.X86_64=https\://api.foojay.io/disco/v3.0/ids/8e1d9ee5d0f13e442218f6884a306da1/redirect
|
||||
toolchainVendor=ADOPTIUM
|
||||
toolchainVersion=25
|
||||
@@ -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.7-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.
|
||||
@@ -15,8 +15,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
@@ -57,7 +55,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/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
@@ -86,7 +84,7 @@ done
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
@@ -114,6 +112,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 +170,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" )
|
||||
|
||||
@@ -203,14 +203,15 @@ fi
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
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.
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@@ -70,10 +68,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
|
||||
|
||||
@@ -17,7 +17,7 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.24'
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.22'
|
||||
}
|
||||
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
package com.kentington.thaumichorizons.client;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -29,9 +27,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.world.WorldEvent;
|
||||
|
||||
import com.kentington.thaumichorizons.client.audio.VortexSound;
|
||||
import com.kentington.thaumichorizons.client.fx.FXSonic;
|
||||
import com.kentington.thaumichorizons.client.gui.GuiBloodInfuser;
|
||||
import com.kentington.thaumichorizons.client.gui.GuiCase;
|
||||
@@ -167,7 +163,6 @@ import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import thaumcraft.api.wands.IWandTriggerManager;
|
||||
import thaumcraft.client.fx.ParticleEngine;
|
||||
import thaumcraft.client.fx.particles.FXBurst;
|
||||
@@ -186,7 +181,6 @@ public class ClientProxy extends CommonProxy {
|
||||
|
||||
@Override
|
||||
public void registerHandlers() {
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
MinecraftForge.EVENT_BUS.register(ThaumicHorizons.instance.renderEventHandler);
|
||||
final IResourceManager resourceManager = Minecraft.getMinecraft().getResourceManager();
|
||||
if (resourceManager instanceof IReloadableResourceManager) {
|
||||
@@ -201,7 +195,6 @@ public class ClientProxy extends CommonProxy {
|
||||
|
||||
@Override
|
||||
public void registerRenderers() {
|
||||
// spotless:off
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileNodeMonitor.class, new TileNodeMonitorRender());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileSyntheticNode.class, new TileEtherealShardRender());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileVisDynamo.class, new TileVisDynamoRender());
|
||||
@@ -213,7 +206,8 @@ public class ClientProxy extends CommonProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileVatMatrix.class, new TileVatMatrixRender(0));
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileBloodInfuser.class, new TileBloodInfuserRender());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileSoulBeacon.class, new TileSoulBeaconRender());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileTransductionAmplifier.class, new TileTransductionAmplifierRender());
|
||||
ClientRegistry
|
||||
.bindTileEntitySpecialRenderer(TileTransductionAmplifier.class, new TileTransductionAmplifierRender());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileRecombinator.class, new TileRecombinatorRender());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileVortexStabilizer.class, new TileVortexStabilizerRender());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileVortex.class, new TileVortexRender());
|
||||
@@ -223,29 +217,61 @@ public class ClientProxy extends CommonProxy {
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityAlchemitePrimed.class, new RenderAlchemitePrimed());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntitySyringe.class, new RenderSyringe());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBlastPhial.class, new BlastPhialRender());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityChocolateCow.class, new RenderChocolateCow(new ModelCow(), 0.7f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityOrePig.class, new RenderOreBoar(new ModelPig(), new ModelPig(0.5f), 0.7f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityGuardianPanther.class, new RenderGuardianPanther(new ModelOcelot(), 1.0f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityFamiliar.class, new RenderFamiliar(new ModelFamiliar(), 0.5f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityGravekeeper.class, new RenderGravekeeper(new ModelOcelot(), 0.5f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityGoldChicken.class, new RenderGoldChicken(new ModelChicken(), 0.5f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityScholarChicken.class, new RenderScholarChicken(new ModelChicken(), 0.5f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityTaintPig.class, new RenderTaintfeeder(new ModelPig(), new ModelPig(0.5f), 0.5f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityNetherHound.class, new RenderNetherHound(new ModelWolf(), new ModelWolf(), 0.5f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntitySeawolf.class, new RenderSeawolf(new ModelWolf(), new ModelWolf(), 0.5f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityLunarWolf.class, new RenderLunarWolf(new ModelWolf(), new ModelWolf(), 0.5f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityGolemTH.class, new RenderGolemTH(new ModelGolemTH(false)));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityEndersteed.class, new RenderEndersteed(new ModelHorse(), 0.75f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityNightmare.class, new RenderNightmare(new ModelHorse(), 0.75f));
|
||||
RenderingRegistry
|
||||
.registerEntityRenderingHandler(EntityChocolateCow.class, new RenderChocolateCow(new ModelCow(), 0.7f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(
|
||||
EntityOrePig.class,
|
||||
new RenderOreBoar(new ModelPig(), new ModelPig(0.5f), 0.7f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(
|
||||
EntityGuardianPanther.class,
|
||||
new RenderGuardianPanther(new ModelOcelot(), 1.0f));
|
||||
RenderingRegistry
|
||||
.registerEntityRenderingHandler(EntityFamiliar.class, new RenderFamiliar(new ModelFamiliar(), 0.5f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(
|
||||
EntityGravekeeper.class,
|
||||
new RenderGravekeeper(new ModelOcelot(), 0.5f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(
|
||||
EntityGoldChicken.class,
|
||||
new RenderGoldChicken(new ModelChicken(), 0.5f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(
|
||||
EntityScholarChicken.class,
|
||||
new RenderScholarChicken(new ModelChicken(), 0.5f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(
|
||||
EntityTaintPig.class,
|
||||
new RenderTaintfeeder(new ModelPig(), new ModelPig(0.5f), 0.5f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(
|
||||
EntityNetherHound.class,
|
||||
new RenderNetherHound(new ModelWolf(), new ModelWolf(), 0.5f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(
|
||||
EntitySeawolf.class,
|
||||
new RenderSeawolf(new ModelWolf(), new ModelWolf(), 0.5f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(
|
||||
EntityLunarWolf.class,
|
||||
new RenderLunarWolf(new ModelWolf(), new ModelWolf(), 0.5f));
|
||||
RenderingRegistry
|
||||
.registerEntityRenderingHandler(EntityGolemTH.class, new RenderGolemTH(new ModelGolemTH(false)));
|
||||
RenderingRegistry
|
||||
.registerEntityRenderingHandler(EntityEndersteed.class, new RenderEndersteed(new ModelHorse(), 0.75f));
|
||||
RenderingRegistry
|
||||
.registerEntityRenderingHandler(EntityNightmare.class, new RenderNightmare(new ModelHorse(), 0.75f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBoatGreatwood.class, new RenderBoatGreatwood());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBoatThaumium.class, new RenderBoatThaumium());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityMeatSlime.class, new RenderMeatSlime(new ModelSlime(16), new ModelSlime(0), 0.25f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityMercurialSlime.class, new RenderMercurialSlime(new ModelSlime(16), new ModelSlime(0), 0.25f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityVoltSlime.class, new RenderVoltSlime(new ModelSlime(16), new ModelSlime(0), 0.25f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityMedSlime.class, new RenderMedSlime(new ModelSlime(16), new ModelSlime(0), 0.25f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(
|
||||
EntityMeatSlime.class,
|
||||
new RenderMeatSlime(new ModelSlime(16), new ModelSlime(0), 0.25f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(
|
||||
EntityMercurialSlime.class,
|
||||
new RenderMercurialSlime(new ModelSlime(16), new ModelSlime(0), 0.25f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(
|
||||
EntityVoltSlime.class,
|
||||
new RenderVoltSlime(new ModelSlime(16), new ModelSlime(0), 0.25f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(
|
||||
EntityMedSlime.class,
|
||||
new RenderMedSlime(new ModelSlime(16), new ModelSlime(0), 0.25f));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntitySheeder.class, new RenderSheeder());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntitySoul.class, new RenderSoul());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityLightningBoltFinite.class, new RenderLightningBoltFinite());
|
||||
RenderingRegistry
|
||||
.registerEntityRenderingHandler(EntityLightningBoltFinite.class, new RenderLightningBoltFinite());
|
||||
MinecraftForgeClient.registerItemRenderer(ThaumicHorizons.itemSyringeBloodSample, new ItemSyringeRender());
|
||||
MinecraftForgeClient.registerItemRenderer(ThaumicHorizons.itemSyringeHuman, new ItemSyringeRender());
|
||||
MinecraftForgeClient.registerItemRenderer(ThaumicHorizons.itemSyringeEmpty, new ItemSyringeRender());
|
||||
@@ -253,7 +279,6 @@ public class ClientProxy extends CommonProxy {
|
||||
MinecraftForgeClient.registerItemRenderer(ThaumicHorizons.itemCorpseEffigy, new ItemCorpseEffigyRender());
|
||||
MinecraftForgeClient.registerItemRenderer(ThaumicHorizons.itemInjector, new ItemInjectorRender());
|
||||
MinecraftForgeClient.registerItemRenderer(ThaumicHorizons.itemWandCastingDisposable, new ItemWandRenderer());
|
||||
// spotless:on
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -530,62 +555,4 @@ public class ClientProxy extends CommonProxy {
|
||||
1.0f,
|
||||
0.1f);
|
||||
}
|
||||
|
||||
private final Map<TileCoord, VortexSound> activeVortexSounds = new HashMap<>();
|
||||
|
||||
@SubscribeEvent
|
||||
public void onWorldUnload(WorldEvent.Unload event) {
|
||||
if (event.world.isRemote) {
|
||||
activeVortexSounds.clear();
|
||||
ThaumicHorizons.instance.renderEventHandler.thingsThatSparkle.clear();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void playVortexSound(TileVortex tile) {
|
||||
if (tile == null || tile.isInvalid() || tile.getWorldObj() == null) return;
|
||||
|
||||
TileCoord pos = new TileCoord(tile.xCoord, tile.yCoord, tile.zCoord);
|
||||
if (activeVortexSounds.containsKey(pos)) return;
|
||||
|
||||
VortexSound sound = new VortexSound(tile);
|
||||
Minecraft.getMinecraft().getSoundHandler().playSound(sound);
|
||||
activeVortexSounds.put(pos, sound);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stopVortexSound(TileVortex tile) {
|
||||
if (tile == null) return;
|
||||
|
||||
TileCoord pos = new TileCoord(tile.xCoord, tile.yCoord, tile.zCoord);
|
||||
VortexSound sound = activeVortexSounds.remove(pos);
|
||||
if (sound != null) {
|
||||
sound.markDone();
|
||||
}
|
||||
}
|
||||
|
||||
// Inner class to replace BlockPos for 1.7.10
|
||||
private static class TileCoord {
|
||||
|
||||
final int x, y, z;
|
||||
|
||||
TileCoord(int x, int y, int z) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (!(o instanceof TileCoord)) return false;
|
||||
TileCoord other = (TileCoord) o;
|
||||
return this.x == other.x && this.y == other.y && this.z == other.z;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return x * 31 * 31 + y * 31 + z;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
package com.kentington.thaumichorizons.client.audio;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.MovingSound;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class VortexSound extends MovingSound {
|
||||
|
||||
private final TileEntity tile;
|
||||
|
||||
public VortexSound(TileEntity tile) {
|
||||
super(new ResourceLocation("thaumichorizons:vortex"));
|
||||
this.tile = tile;
|
||||
this.repeat = true;
|
||||
this.field_147665_h = 0;
|
||||
this.volume = 1.0F;
|
||||
}
|
||||
|
||||
// Let me know if update needs to be cached or if that's a good idea or not for performance.
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
if (tile == null || tile.isInvalid() || tile.getWorldObj() == null) {
|
||||
this.donePlaying = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// follow tile
|
||||
this.xPosF = tile.xCoord + 0.5F;
|
||||
this.yPosF = tile.yCoord + 0.5F;
|
||||
this.zPosF = tile.zCoord + 0.5F;
|
||||
|
||||
// distance-based volume
|
||||
EntityPlayer p = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
if (p != null) {
|
||||
double dist = p.getDistance(this.xPosF, this.yPosF, this.zPosF);
|
||||
this.volume = Math.max(0.0F, 1.0F / (1.0F + (float) (dist / 8.0F)));
|
||||
}
|
||||
}
|
||||
|
||||
public void markDone() {
|
||||
this.donePlaying = true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
package com.kentington.thaumichorizons.client.fx;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@@ -37,9 +36,8 @@ public class FXContainment extends EntityFX {
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
public void renderParticle(final Tessellator tessellator, final float p_70539_2_, final float p_70539_3_,
|
||||
public void renderParticle(final Tessellator p_70539_1_, final float p_70539_2_, final float p_70539_3_,
|
||||
final float p_70539_4_, final float p_70539_5_, final float p_70539_6_, final float p_70539_7_) {
|
||||
tessellator.draw();
|
||||
final long nt = System.nanoTime();
|
||||
final long time = nt / 50000000L;
|
||||
final int frame = (int) time % 16;
|
||||
@@ -56,26 +54,26 @@ public class FXContainment extends EntityFX {
|
||||
final float f7 = (float) (this.posX - FXContainment.interpPosX);
|
||||
final float f8 = (float) (this.posY - FXContainment.interpPosY);
|
||||
final float f9 = (float) (this.posZ - FXContainment.interpPosZ);
|
||||
tessellator.setColorRGBA_F(this.particleRed, this.particleGreen, this.particleBlue, 0.1f);
|
||||
tessellator.addVertexWithUV(
|
||||
p_70539_1_.setColorRGBA_F(this.particleRed, this.particleGreen, this.particleBlue, 0.1f);
|
||||
p_70539_1_.addVertexWithUV(
|
||||
f7 - p_70539_3_ * f6 - p_70539_6_ * f6,
|
||||
f8 - p_70539_4_ * f6,
|
||||
f9 - p_70539_5_ * f6 - p_70539_7_ * f6,
|
||||
f2,
|
||||
f4);
|
||||
tessellator.addVertexWithUV(
|
||||
p_70539_1_.addVertexWithUV(
|
||||
f7 - p_70539_3_ * f6 + p_70539_6_ * f6,
|
||||
f8 + p_70539_4_ * f6,
|
||||
f9 - p_70539_5_ * f6 + p_70539_7_ * f6,
|
||||
f3,
|
||||
f4);
|
||||
tessellator.addVertexWithUV(
|
||||
p_70539_1_.addVertexWithUV(
|
||||
f7 + p_70539_3_ * f6 + p_70539_6_ * f6,
|
||||
f8 + p_70539_4_ * f6,
|
||||
f9 + p_70539_5_ * f6 + p_70539_7_ * f6,
|
||||
f3,
|
||||
f5);
|
||||
tessellator.addVertexWithUV(
|
||||
p_70539_1_.addVertexWithUV(
|
||||
f7 + p_70539_3_ * f6 - p_70539_6_ * f6,
|
||||
f8 - p_70539_4_ * f6,
|
||||
f9 + p_70539_5_ * f6 - p_70539_7_ * f6,
|
||||
@@ -84,8 +82,6 @@ public class FXContainment extends EntityFX {
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glPopMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(UtilsFX.getParticleTexture());
|
||||
tessellator.startDrawingQuads();
|
||||
}
|
||||
|
||||
public int getFXLayer() {
|
||||
|
||||
@@ -25,8 +25,8 @@ public class GuiCase extends GuiContainer {
|
||||
final int z) {
|
||||
super(new ContainerCase(par1InventoryPlayer, world, x, y, z));
|
||||
this.blockSlot = par1InventoryPlayer.currentItem;
|
||||
this.xSize = 176;
|
||||
this.ySize = 233;
|
||||
this.xSize = 175;
|
||||
this.ySize = 232;
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(final int par1, final int par2) {
|
||||
|
||||
@@ -22,7 +22,7 @@ public class GuiInspiratron extends GuiContainer {
|
||||
public GuiInspiratron(final InventoryPlayer player, final TileInspiratron tile) {
|
||||
super(new ContainerInspiratron(player, tile));
|
||||
this.tile = tile;
|
||||
this.xSize = 176;
|
||||
this.xSize = 175;
|
||||
this.ySize = 219;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ public class GuiSoulExtractor extends GuiContainer {
|
||||
public GuiSoulExtractor(final InventoryPlayer player, final TileSoulExtractor tile) {
|
||||
super(new ContainerSoulExtractor(player, tile));
|
||||
this.tile = tile;
|
||||
this.xSize = 176;
|
||||
this.ySize = 166;
|
||||
this.xSize = 175;
|
||||
this.ySize = 165;
|
||||
}
|
||||
|
||||
protected void drawGuiContainerBackgroundLayer(final float p_146976_1_, final int p_146976_2_,
|
||||
|
||||
@@ -36,7 +36,6 @@ import com.kentington.thaumichorizons.common.ThaumicHorizons;
|
||||
import com.kentington.thaumichorizons.common.entities.EntityBoatThaumium;
|
||||
import com.kentington.thaumichorizons.common.items.lenses.ILens;
|
||||
import com.kentington.thaumichorizons.common.items.lenses.ItemLensCase;
|
||||
import com.kentington.thaumichorizons.common.items.lenses.ItemLensFire;
|
||||
import com.kentington.thaumichorizons.common.items.lenses.LensManager;
|
||||
import com.kentington.thaumichorizons.common.lib.THKeyHandler;
|
||||
import com.kentington.thaumichorizons.common.lib.networking.PacketHandler;
|
||||
@@ -98,7 +97,8 @@ public class RenderEventHandler {
|
||||
if (LensManager.nightVisionOffTime > 0L
|
||||
&& (goggles == null || !(goggles.getItem() instanceof IRevealer)
|
||||
|| goggles.stackTagCompound == null)
|
||||
&& ItemLensFire.isEffectGrantedByLens(mc.thePlayer.getActivePotionEffect(Potion.nightVision))) {
|
||||
&& mc.thePlayer.getActivePotionEffect(Potion.nightVision) != null
|
||||
&& mc.thePlayer.getActivePotionEffect(Potion.nightVision).getIsAmbient()) {
|
||||
mc.thePlayer.removePotionEffect(Potion.nightVision.id);
|
||||
LensManager.nightVisionOffTime = 0L;
|
||||
}
|
||||
|
||||
@@ -29,9 +29,8 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
|
||||
if (boss == null) {
|
||||
return false;
|
||||
}
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
tess.setColorRGBA(255, 255, 255, 192);
|
||||
tess.setBrightness(241);
|
||||
Tessellator.instance.setColorRGBA(255, 255, 255, 192);
|
||||
Tessellator.instance.setBrightness(241);
|
||||
renderer.enableAO = false;
|
||||
final int dx = boss.xCoord - tco.xCoord;
|
||||
final int dy = boss.yCoord - tco.yCoord;
|
||||
@@ -43,7 +42,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
|
||||
renderer.renderFaceZPos(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassTR);
|
||||
block.setBlockBounds(0.0f, 0.0f, 0.0f, 0.75f, 1.0f, 0.75f);
|
||||
renderer.setRenderBoundsFromBlock(block);
|
||||
tess.setColorRGBA(255, 255, 255, 255);
|
||||
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
|
||||
renderer.renderFaceXPos(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
|
||||
renderer.renderFaceZPos(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
|
||||
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
|
||||
@@ -53,7 +52,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
|
||||
renderer.renderFaceZPos(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassTL);
|
||||
block.setBlockBounds(0.25f, 0.0f, 0.0f, 1.0f, 1.0f, 0.75f);
|
||||
renderer.setRenderBoundsFromBlock(block);
|
||||
tess.setColorRGBA(255, 255, 255, 255);
|
||||
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
|
||||
renderer.renderFaceXNeg(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
|
||||
renderer.renderFaceZPos(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
|
||||
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
|
||||
@@ -63,7 +62,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
|
||||
renderer.renderFaceZNeg(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassTR);
|
||||
block.setBlockBounds(0.25f, 0.0f, 0.25f, 1.0f, 1.0f, 1.0f);
|
||||
renderer.setRenderBoundsFromBlock(block);
|
||||
tess.setColorRGBA(255, 255, 255, 255);
|
||||
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
|
||||
renderer.renderFaceXNeg(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
|
||||
renderer.renderFaceZNeg(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
|
||||
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
|
||||
@@ -73,7 +72,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
|
||||
renderer.renderFaceZNeg(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassTL);
|
||||
block.setBlockBounds(0.0f, 0.0f, 0.25f, 0.75f, 1.0f, 1.0f);
|
||||
renderer.setRenderBoundsFromBlock(block);
|
||||
tess.setColorRGBA(255, 255, 255, 255);
|
||||
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
|
||||
renderer.renderFaceXPos(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
|
||||
renderer.renderFaceZNeg(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
|
||||
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
|
||||
@@ -83,7 +82,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
|
||||
renderer.renderFaceZPos(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassT);
|
||||
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.75f);
|
||||
renderer.setRenderBoundsFromBlock(block);
|
||||
tess.setColorRGBA(255, 255, 255, 255);
|
||||
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
|
||||
renderer.renderFaceZPos(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
|
||||
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
|
||||
renderer.setRenderBoundsFromBlock(block);
|
||||
@@ -91,7 +90,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
|
||||
renderer.renderFaceZNeg(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassT);
|
||||
block.setBlockBounds(0.0f, 0.0f, 0.25f, 1.0f, 1.0f, 1.0f);
|
||||
renderer.setRenderBoundsFromBlock(block);
|
||||
tess.setColorRGBA(255, 255, 255, 255);
|
||||
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
|
||||
renderer.renderFaceZNeg(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
|
||||
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
|
||||
renderer.setRenderBoundsFromBlock(block);
|
||||
@@ -101,7 +100,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
|
||||
renderer.renderFaceXPos(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassT);
|
||||
block.setBlockBounds(0.0f, 0.0f, 0.0f, 0.75f, 1.0f, 1.0f);
|
||||
renderer.setRenderBoundsFromBlock(block);
|
||||
tess.setColorRGBA(255, 255, 255, 255);
|
||||
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
|
||||
renderer.renderFaceXPos(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
|
||||
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
|
||||
renderer.setRenderBoundsFromBlock(block);
|
||||
@@ -109,7 +108,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
|
||||
renderer.renderFaceXNeg(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassT);
|
||||
block.setBlockBounds(0.25f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
|
||||
renderer.setRenderBoundsFromBlock(block);
|
||||
tess.setColorRGBA(255, 255, 255, 255);
|
||||
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
|
||||
renderer.renderFaceXNeg(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
|
||||
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
|
||||
renderer.setRenderBoundsFromBlock(block);
|
||||
@@ -123,7 +122,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
|
||||
renderer.renderFaceZPos(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassBR);
|
||||
block.setBlockBounds(0.0f, 0.0f, 0.0f, 0.75f, 1.0f, 0.75f);
|
||||
renderer.setRenderBoundsFromBlock(block);
|
||||
tess.setColorRGBA(255, 255, 255, 255);
|
||||
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
|
||||
renderer.renderFaceXPos(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
|
||||
renderer.renderFaceZPos(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
|
||||
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
|
||||
@@ -133,7 +132,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
|
||||
renderer.renderFaceZPos(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassBL);
|
||||
block.setBlockBounds(0.25f, 0.0f, 0.0f, 1.0f, 1.0f, 0.75f);
|
||||
renderer.setRenderBoundsFromBlock(block);
|
||||
tess.setColorRGBA(255, 255, 255, 255);
|
||||
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
|
||||
renderer.renderFaceXNeg(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
|
||||
renderer.renderFaceZPos(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
|
||||
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
|
||||
@@ -143,7 +142,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
|
||||
renderer.renderFaceZNeg(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassBR);
|
||||
block.setBlockBounds(0.25f, 0.0f, 0.25f, 1.0f, 1.0f, 1.0f);
|
||||
renderer.setRenderBoundsFromBlock(block);
|
||||
tess.setColorRGBA(255, 255, 255, 255);
|
||||
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
|
||||
renderer.renderFaceXNeg(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
|
||||
renderer.renderFaceZNeg(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
|
||||
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
|
||||
@@ -153,7 +152,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
|
||||
renderer.renderFaceZNeg(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassBL);
|
||||
block.setBlockBounds(0.0f, 0.0f, 0.25f, 0.75f, 1.0f, 1.0f);
|
||||
renderer.setRenderBoundsFromBlock(block);
|
||||
tess.setColorRGBA(255, 255, 255, 255);
|
||||
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
|
||||
renderer.renderFaceXPos(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
|
||||
renderer.renderFaceZNeg(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
|
||||
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
|
||||
@@ -163,7 +162,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
|
||||
renderer.renderFaceZPos(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassB);
|
||||
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.75f);
|
||||
renderer.setRenderBoundsFromBlock(block);
|
||||
tess.setColorRGBA(255, 255, 255, 255);
|
||||
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
|
||||
renderer.renderFaceZPos(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
|
||||
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
|
||||
renderer.setRenderBoundsFromBlock(block);
|
||||
@@ -171,7 +170,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
|
||||
renderer.renderFaceZNeg(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassB);
|
||||
block.setBlockBounds(0.0f, 0.0f, 0.25f, 1.0f, 1.0f, 1.0f);
|
||||
renderer.setRenderBoundsFromBlock(block);
|
||||
tess.setColorRGBA(255, 255, 255, 255);
|
||||
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
|
||||
renderer.renderFaceZNeg(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
|
||||
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
|
||||
renderer.setRenderBoundsFromBlock(block);
|
||||
@@ -181,7 +180,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
|
||||
renderer.renderFaceXPos(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassB);
|
||||
block.setBlockBounds(0.0f, 0.0f, 0.0f, 0.75f, 1.0f, 1.0f);
|
||||
renderer.setRenderBoundsFromBlock(block);
|
||||
tess.setColorRGBA(255, 255, 255, 255);
|
||||
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
|
||||
renderer.renderFaceXPos(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
|
||||
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
|
||||
renderer.setRenderBoundsFromBlock(block);
|
||||
@@ -189,7 +188,7 @@ public class BlockVatRender implements ISimpleBlockRenderingHandler {
|
||||
renderer.renderFaceXNeg(block, x, y, z, ((BlockVat) ThaumicHorizons.blockVat).iconGlassB);
|
||||
block.setBlockBounds(0.25f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
|
||||
renderer.setRenderBoundsFromBlock(block);
|
||||
tess.setColorRGBA(255, 255, 255, 255);
|
||||
Tessellator.instance.setColorRGBA(255, 255, 255, 255);
|
||||
renderer.renderFaceXNeg(block, x, y, z, Blocks.water.getBlockTextureFromSide(0));
|
||||
block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
|
||||
renderer.setRenderBoundsFromBlock(block);
|
||||
|
||||
@@ -23,14 +23,13 @@ public class BlockVatSolidRender implements ISimpleBlockRenderingHandler {
|
||||
|
||||
public boolean renderWorldBlock(final IBlockAccess world, final int x, final int y, final int z, final Block block,
|
||||
final int modelId, final RenderBlocks renderer) {
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
if (world.getTileEntity(x, y, z) instanceof final TileVatSlave tco) {
|
||||
final TileVat boss = tco.getBoss(-1);
|
||||
if (boss == null) {
|
||||
return false;
|
||||
}
|
||||
tess.setColorOpaque_F(1.0f, 1.0f, 1.0f);
|
||||
tess.setBrightness(150);
|
||||
Tessellator.instance.setColorOpaque_F(1.0f, 1.0f, 1.0f);
|
||||
Tessellator.instance.setBrightness(150);
|
||||
renderer.enableAO = false;
|
||||
final int dx = boss.xCoord - tco.xCoord;
|
||||
final int dy = boss.yCoord - tco.yCoord;
|
||||
@@ -304,7 +303,7 @@ public class BlockVatSolidRender implements ISimpleBlockRenderingHandler {
|
||||
}
|
||||
}
|
||||
} else if (world.getBlockMetadata(x, y, z) == 7) {
|
||||
tess.setColorOpaque_F(1.0f, 1.0f, 1.0f);
|
||||
Tessellator.instance.setColorOpaque_F(1.0f, 1.0f, 1.0f);
|
||||
renderer.enableAO = false;
|
||||
renderer.renderFaceYPos(block, x, y, z, ((BlockVatSolid) ThaumicHorizons.blockVatSolid).iconLidCenterTop);
|
||||
renderer.renderFaceYNeg(block, x, y, z, ((BlockVatSolid) ThaumicHorizons.blockVatSolid).iconInnerCenter);
|
||||
|
||||
@@ -158,7 +158,9 @@ public class TileEtherealShardRender extends TileEntitySpecialRenderer {
|
||||
}
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1f);
|
||||
} catch (Exception ignored) {} finally {
|
||||
} catch (Exception e) {
|
||||
System.out.println(e.getMessage());
|
||||
} finally {
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,12 +7,13 @@ package com.kentington.thaumichorizons.client.renderer.tile;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.ActiveRenderInfo;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Vec3;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -22,6 +23,7 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.client.lib.QuadHelper;
|
||||
import thaumcraft.client.lib.UtilsFX;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -32,20 +34,25 @@ public class TileVortexRender extends TileEntitySpecialRenderer {
|
||||
|
||||
public void renderTileEntityAt(final TileEntity tile, final double x, final double y, final double z,
|
||||
final float partialTicks) {
|
||||
if (!(tile instanceof final TileVortex node) || !node.clientSynced) {
|
||||
if (!(tile instanceof final TileVortex node)) {
|
||||
return;
|
||||
}
|
||||
final float size = 10.0f;
|
||||
final double viewDistance = 64.0;
|
||||
final EntityLivingBase viewer = Minecraft.getMinecraft().renderViewEntity;
|
||||
final boolean condition = true;
|
||||
final boolean depthIgnore = false;
|
||||
renderNode(
|
||||
Minecraft.getMinecraft().renderViewEntity,
|
||||
64.0,
|
||||
true,
|
||||
false,
|
||||
10.0f,
|
||||
viewer,
|
||||
viewDistance,
|
||||
condition,
|
||||
depthIgnore,
|
||||
size,
|
||||
tile.xCoord,
|
||||
tile.yCoord,
|
||||
tile.zCoord,
|
||||
partialTicks,
|
||||
node.aspects,
|
||||
((TileVortex) tile).aspects,
|
||||
node.count,
|
||||
node.collapsing,
|
||||
node.beams,
|
||||
@@ -65,10 +72,6 @@ public class TileVortexRender extends TileEntitySpecialRenderer {
|
||||
return;
|
||||
}
|
||||
float alpha = (float) ((viewDistance - distance) / viewDistance);
|
||||
// Camera-relative center — avoids float precision loss at large world coords.
|
||||
final double cx = x + 0.5 - RenderManager.renderPosX;
|
||||
final double cy = y + 0.5 - RenderManager.renderPosY;
|
||||
final double cz = z + 0.5 - RenderManager.renderPosZ;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0.003921569f);
|
||||
GL11.glDepthMask(false);
|
||||
@@ -76,6 +79,7 @@ public class TileVortexRender extends TileEntitySpecialRenderer {
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
}
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
final long time = nt / 5000000L;
|
||||
final float bscale = 0.25f;
|
||||
GL11.glPushMatrix();
|
||||
final float rad = ((float) Math.PI * 2F);
|
||||
@@ -97,10 +101,10 @@ public class TileVortexRender extends TileEntitySpecialRenderer {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, aspect.getBlend());
|
||||
scale = MathHelper.sin(viewer.ticksExisted / (14.0f - count)) * bscale + bscale * 2.0f;
|
||||
scale = 0.4f;
|
||||
scale *= size;
|
||||
final long periodNs = (5000L + 500L * count) * 5_000_000L;
|
||||
angle = (float) ((double) (nt % periodNs) / periodNs) * rad;
|
||||
angle = time % (5000 + 500 * count) / (5000.0f + 500 * count) * rad;
|
||||
if (beams < 6 || timeOpen < 50) {
|
||||
UtilsFX.renderFacingStrip(
|
||||
x + 0.5,
|
||||
@@ -149,9 +153,9 @@ public class TileVortexRender extends TileEntitySpecialRenderer {
|
||||
if (!cheat && (beams < 6 || timeOpen < 50)) {
|
||||
UtilsFX.bindTexture(TileVortexRender.vortextex);
|
||||
renderVortex(
|
||||
cx,
|
||||
cy,
|
||||
cz,
|
||||
x + 0.5,
|
||||
y + 0.5,
|
||||
z + 0.5,
|
||||
angle * 20.0f * corescale / (1 + 2 * beams),
|
||||
scale / 5.0f * corescale,
|
||||
0.8f,
|
||||
@@ -186,10 +190,10 @@ public class TileVortexRender extends TileEntitySpecialRenderer {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
scale = MathHelper.sin(viewer.ticksExisted / (14.0f - count)) * bscale + bscale * 2.0f;
|
||||
scale = 0.4f;
|
||||
scale *= size;
|
||||
final long periodNs2 = (5000L + 500L * count) * 5_000_000L;
|
||||
angle = (float) ((double) (nt % periodNs2) / periodNs2) * rad;
|
||||
angle = time % (5000 + 500 * count) / (5000.0f + 500 * count) * rad;
|
||||
UtilsFX.renderFacingStrip(
|
||||
x + 0.5,
|
||||
y + 0.5,
|
||||
@@ -229,29 +233,37 @@ public class TileVortexRender extends TileEntitySpecialRenderer {
|
||||
final float arYZ = ActiveRenderInfo.rotationYZ;
|
||||
final float arXY = ActiveRenderInfo.rotationXY;
|
||||
final float arXZ = ActiveRenderInfo.rotationXZ;
|
||||
|
||||
// Rotate screen-plane basis vectors (H = right, V = up) by angle.
|
||||
// This avoids Rodrigues rotation around a qvec that shifts with every head movement,
|
||||
// which caused the vortex to jerk whenever the player moved the camera.
|
||||
final float cos = MathHelper.cos(angle);
|
||||
final float sin = MathHelper.sin(angle);
|
||||
final float hX = cos * arX + sin * arYZ;
|
||||
final float hY = sin * arXZ;
|
||||
final float hZ = cos * arZ + sin * arXY;
|
||||
final float vX = cos * arYZ - sin * arX;
|
||||
final float vY = cos * arXZ;
|
||||
final float vZ = cos * arXY - sin * arZ;
|
||||
|
||||
final EntityPlayer player = (EntityPlayer) Minecraft.getMinecraft().renderViewEntity;
|
||||
final double iPX = player.prevPosX + (player.posX - player.prevPosX) * partialTicks;
|
||||
final double iPY = player.prevPosY + (player.posY - player.prevPosY) * partialTicks;
|
||||
final double iPZ = player.prevPosZ + (player.posZ - player.prevPosZ) * partialTicks;
|
||||
GL11.glTranslated(-iPX, -iPY, -iPZ);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setBrightness(220);
|
||||
tessellator.setColorRGBA_I(color, (int) (alpha * 255.0f));
|
||||
final Vec3 v1 = Vec3
|
||||
.createVectorHelper(-arX * scale - arYZ * scale, -arXZ * scale, -arZ * scale - arXY * scale);
|
||||
final Vec3 v2 = Vec3.createVectorHelper(-arX * scale + arYZ * scale, arXZ * scale, -arZ * scale + arXY * scale);
|
||||
final Vec3 v3 = Vec3.createVectorHelper(arX * scale + arYZ * scale, arXZ * scale, arZ * scale + arXY * scale);
|
||||
final Vec3 v4 = Vec3.createVectorHelper(arX * scale - arYZ * scale, -arXZ * scale, arZ * scale - arXY * scale);
|
||||
if (angle != 0.0f) {
|
||||
final Vec3 pvec = Vec3.createVectorHelper(iPX, iPY, iPZ);
|
||||
final Vec3 tvec = Vec3.createVectorHelper(px, py, pz);
|
||||
final Vec3 qvec = pvec.subtract(tvec).normalize();
|
||||
QuadHelper.setAxis(qvec, angle).rotate(v1);
|
||||
QuadHelper.setAxis(qvec, angle).rotate(v2);
|
||||
QuadHelper.setAxis(qvec, angle).rotate(v3);
|
||||
QuadHelper.setAxis(qvec, angle).rotate(v4);
|
||||
}
|
||||
final float f2 = 0.0f;
|
||||
final float f3 = 1.0f;
|
||||
final float f4 = 0.0f;
|
||||
final float f5 = 1.0f;
|
||||
tessellator.setNormal(0.0f, 0.0f, -1.0f);
|
||||
tessellator
|
||||
.addVertexWithUV(px + (-hX - vX) * scale, py + (-hY - vY) * scale, pz + (-hZ - vZ) * scale, 0.0, 1.0);
|
||||
tessellator
|
||||
.addVertexWithUV(px + (-hX + vX) * scale, py + (-hY + vY) * scale, pz + (-hZ + vZ) * scale, 1.0, 1.0);
|
||||
tessellator.addVertexWithUV(px + (hX + vX) * scale, py + (hY + vY) * scale, pz + (hZ + vZ) * scale, 1.0, 0.0);
|
||||
tessellator.addVertexWithUV(px + (hX - vX) * scale, py + (hY - vY) * scale, pz + (hZ - vZ) * scale, 0.0, 0.0);
|
||||
tessellator.addVertexWithUV(px + v1.xCoord, py + v1.yCoord, pz + v1.zCoord, f2, f5);
|
||||
tessellator.addVertexWithUV(px + v2.xCoord, py + v2.yCoord, pz + v2.zCoord, f3, f5);
|
||||
tessellator.addVertexWithUV(px + v3.xCoord, py + v3.yCoord, pz + v3.zCoord, f3, f4);
|
||||
tessellator.addVertexWithUV(px + v4.xCoord, py + v4.yCoord, pz + v4.zCoord, f2, f4);
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ import com.kentington.thaumichorizons.common.tiles.TileSoulExtractor;
|
||||
import com.kentington.thaumichorizons.common.tiles.TileSoulforge;
|
||||
import com.kentington.thaumichorizons.common.tiles.TileVat;
|
||||
import com.kentington.thaumichorizons.common.tiles.TileVisDynamo;
|
||||
import com.kentington.thaumichorizons.common.tiles.TileVortex;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
@@ -135,8 +134,4 @@ public class CommonProxy implements IGuiHandler {
|
||||
|
||||
public void lightningBolt(final World worldObj, final double x, final double y, final double z,
|
||||
final int boltLength) {}
|
||||
|
||||
public void playVortexSound(TileVortex tile) {}
|
||||
|
||||
public void stopVortexSound(TileVortex tile) {}
|
||||
}
|
||||
@@ -8,24 +8,16 @@ package com.kentington.thaumichorizons.common;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockDispenser;
|
||||
import net.minecraft.block.material.MapColor;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.dispenser.BehaviorDefaultDispenseItem;
|
||||
import net.minecraft.dispenser.BehaviorProjectileDispense;
|
||||
import net.minecraft.dispenser.IBlockSource;
|
||||
import net.minecraft.dispenser.IPosition;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IProjectile;
|
||||
import net.minecraft.entity.monster.EntityBlaze;
|
||||
import net.minecraft.entity.monster.EntityEnderman;
|
||||
import net.minecraft.entity.monster.EntityGhast;
|
||||
@@ -52,9 +44,7 @@ import net.minecraft.item.crafting.ShapelessRecipes;
|
||||
import net.minecraft.nbt.NBTTagByte;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
@@ -67,7 +57,6 @@ import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import com.kentington.thaumichorizons.client.lib.RenderEventHandler;
|
||||
import com.kentington.thaumichorizons.common.blocks.BlockAlchemite;
|
||||
import com.kentington.thaumichorizons.common.blocks.BlockBloodInfuser;
|
||||
@@ -143,7 +132,6 @@ import com.kentington.thaumichorizons.common.entities.EntitySyringe;
|
||||
import com.kentington.thaumichorizons.common.entities.EntityTaintPig;
|
||||
import com.kentington.thaumichorizons.common.entities.EntityVoltSlime;
|
||||
import com.kentington.thaumichorizons.common.entities.ItemSpawnerEgg;
|
||||
import com.kentington.thaumichorizons.common.handlers.BehaviorDispenseBoat;
|
||||
import com.kentington.thaumichorizons.common.items.ItemAmuletMirror;
|
||||
import com.kentington.thaumichorizons.common.items.ItemBarChocolate;
|
||||
import com.kentington.thaumichorizons.common.items.ItemBoatGreatwood;
|
||||
@@ -242,7 +230,7 @@ import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import gregtech.api.enums.Materials;
|
||||
import gregtech.api.enums.OrePrefixes;
|
||||
import gregtech.api.util.GTOreDictUnificator;
|
||||
import gregtech.api.util.GT_OreDictUnificator;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
@@ -485,7 +473,7 @@ public class ThaumicHorizons {
|
||||
} catch (Exception var8) {
|
||||
log.error("Thaumic Horizons could not load its configuration file");
|
||||
} finally {
|
||||
if (config != null && config.hasChanged()) {
|
||||
if (config != null) {
|
||||
config.save();
|
||||
}
|
||||
}
|
||||
@@ -503,10 +491,10 @@ public class ThaumicHorizons {
|
||||
ROD_CRYSTAL = new WandRod(
|
||||
"disposable",
|
||||
250,
|
||||
new ItemStack(Blocks.bedrock),
|
||||
null,
|
||||
99,
|
||||
new ResourceLocation("thaumichorizons", "textures/models/crystalRod.png"));
|
||||
CAP_CRYSTAL = new WandCap("disposable", 0.9F, new ItemStack(Blocks.bedrock), 99);
|
||||
CAP_CRYSTAL = new WandCap("disposable", 0.9F, null, 99);
|
||||
CAP_CRYSTAL.setTexture(new ResourceLocation("thaumichorizons", "textures/models/crystalCap.png"));
|
||||
ROD_CRYSTAL.setGlowing(true);
|
||||
blockSynthNode = new BlockSyntheticNode();
|
||||
@@ -764,7 +752,6 @@ public class ThaumicHorizons {
|
||||
proxy.registerHandlers();
|
||||
proxy.registerRenderers();
|
||||
FMLCommonHandler.instance().bus().register(instance);
|
||||
initPotions();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@@ -809,6 +796,7 @@ public class ThaumicHorizons {
|
||||
shapelessOreDictRecipe(
|
||||
new ItemStack(ConfigItems.itemTripleMeatTreat),
|
||||
new Object[] { Items.sugar, itemMeatNugget, ConfigItems.itemNuggetBeef, ConfigItems.itemNuggetFish });
|
||||
initPotions();
|
||||
ResearchCategories.registerCategory(
|
||||
"ThaumicHorizons",
|
||||
new ResourceLocation("thaumichorizons", "textures/misc/vat.png"),
|
||||
@@ -2082,17 +2070,17 @@ public class ThaumicHorizons {
|
||||
.add(Aspect.AURA, 32).add(Aspect.MIND, 16).add(Aspect.ELDRITCH, 64),
|
||||
new ItemStack(itemPlanarConduit),
|
||||
new ItemStack[] { new ItemStack(ConfigItems.itemShard, 1, 6),
|
||||
GTOreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Glass, 1L),
|
||||
GTOreDictUnificator.get(OrePrefixes.lens, Materials.InfusedOrder, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Glass, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.lens, Materials.InfusedOrder, 1L),
|
||||
new ItemStack(ConfigItems.itemShard, 1, 6),
|
||||
GTOreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Glass, 1L),
|
||||
GTOreDictUnificator.get(OrePrefixes.lens, Materials.InfusedOrder, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Glass, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.lens, Materials.InfusedOrder, 1L),
|
||||
new ItemStack(ConfigItems.itemShard, 1, 6),
|
||||
GTOreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Glass, 1L),
|
||||
GTOreDictUnificator.get(OrePrefixes.lens, Materials.InfusedOrder, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Glass, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.lens, Materials.InfusedOrder, 1L),
|
||||
new ItemStack(ConfigItems.itemShard, 1, 6),
|
||||
GTOreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Glass, 1L),
|
||||
GTOreDictUnificator.get(OrePrefixes.lens, Materials.InfusedOrder, 1L) });
|
||||
GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Glass, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.lens, Materials.InfusedOrder, 1L) });
|
||||
recipeKeystone1 = ThaumcraftApi.addInfusionCraftingRecipe(
|
||||
"planarKeystone",
|
||||
new ItemStack(itemKeystone),
|
||||
@@ -2102,11 +2090,11 @@ public class ThaumicHorizons {
|
||||
new ItemStack(Items.ender_eye),
|
||||
new ItemStack[] { new ItemStack(ConfigItems.itemShard, 1, 6),
|
||||
new ItemStack(ConfigItems.itemResource, 1, 3),
|
||||
GTOreDictUnificator.get(OrePrefixes.lens, Materials.Glass, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Glass, 1L),
|
||||
new ItemStack(ConfigItems.itemResource, 1, 3),
|
||||
new ItemStack(ConfigItems.itemShard, 1, 6),
|
||||
new ItemStack(ConfigItems.itemResource, 1, 3),
|
||||
GTOreDictUnificator.get(OrePrefixes.lens, Materials.Glass, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Glass, 1L),
|
||||
new ItemStack(ConfigItems.itemResource, 1, 3) });
|
||||
recipeSlot = ThaumcraftApi.addInfusionCraftingRecipe(
|
||||
"planarKeystone",
|
||||
@@ -2115,18 +2103,18 @@ public class ThaumicHorizons {
|
||||
(new AspectList()).add(Aspect.VOID, 48).add(Aspect.TRAVEL, 64).add(Aspect.AIR, 64)
|
||||
.add(Aspect.MECHANISM, 32).add(Aspect.ELDRITCH, 64).add(Aspect.MAGIC, 16),
|
||||
new ItemStack(itemPlanarConduit),
|
||||
new ItemStack[] { GTOreDictUnificator.get(OrePrefixes.plateDense, Materials.Void, 1L),
|
||||
GTOreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L),
|
||||
GTOreDictUnificator.get(OrePrefixes.plateDense, Materials.Enderium, 1L),
|
||||
GTOreDictUnificator.get(OrePrefixes.plateDense, Materials.Void, 1L),
|
||||
GTOreDictUnificator.get(OrePrefixes.plateDense, Materials.InfusedGold, 1L),
|
||||
GTOreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L),
|
||||
GTOreDictUnificator.get(OrePrefixes.plateDense, Materials.Void, 1L),
|
||||
GTOreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L),
|
||||
GTOreDictUnificator.get(OrePrefixes.plateDense, Materials.InfusedGold, 1L),
|
||||
GTOreDictUnificator.get(OrePrefixes.plateDense, Materials.Void, 1L),
|
||||
GTOreDictUnificator.get(OrePrefixes.plateDense, Materials.Enderium, 1L),
|
||||
GTOreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L) });
|
||||
new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Void, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Enderium, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Void, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.InfusedGold, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Void, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.InfusedGold, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Void, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Enderium, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L) });
|
||||
} else {
|
||||
recipeKeystone = ThaumcraftApi.addInfusionCraftingRecipe(
|
||||
"pocketPlane",
|
||||
@@ -3643,7 +3631,6 @@ public class ThaumicHorizons {
|
||||
new ItemStack(Items.dye, 1, 0), new ItemStack(Items.dye, 1, 15) },
|
||||
10));
|
||||
addAspectsToAllTheThings();
|
||||
registerDispenserBehavior();
|
||||
}
|
||||
|
||||
public static CreatureInfusionRecipe getCreatureInfusion(EntityLivingBase entityContained,
|
||||
@@ -3680,6 +3667,7 @@ public class ThaumicHorizons {
|
||||
public static void initPotions() {
|
||||
byte customPotions = 5;
|
||||
int potionOffset = Potion.potionTypes.length;
|
||||
boolean start = false;
|
||||
int var4;
|
||||
if (potionOffset < 128 - customPotions) {
|
||||
Potion[] potionTypes = new Potion[potionOffset + customPotions];
|
||||
@@ -3691,54 +3679,40 @@ public class ThaumicHorizons {
|
||||
var4 = -1;
|
||||
}
|
||||
|
||||
int visBoostPotionId = potionVisBoostID;
|
||||
var4 = getNextPotionId(var4);
|
||||
if (Potion.potionTypes[visBoostPotionId] != null) {
|
||||
visBoostPotionId = getNextPotionId(visBoostPotionId);
|
||||
if (var4 >= 0) {
|
||||
potionVisBoostID = var4;
|
||||
PotionVisBoost.instance = new PotionVisBoost(potionVisBoostID, true, 6697847);
|
||||
PotionVisBoost.init();
|
||||
}
|
||||
potionVisBoostID = visBoostPotionId;
|
||||
PotionVisBoost.instance = new PotionVisBoost(potionVisBoostID, true, 6697847);
|
||||
PotionVisBoost.init();
|
||||
|
||||
int visRegenPotionId = potionVisRegenID;
|
||||
var4 = getNextPotionId(var4);
|
||||
if (Potion.potionTypes[visRegenPotionId] != null) {
|
||||
visRegenPotionId = getNextPotionId(visRegenPotionId);
|
||||
if (var4 >= 0) {
|
||||
potionVisRegenID = var4;
|
||||
PotionVisRegen.instance = new PotionVisRegen(potionVisRegenID, true, 5701759);
|
||||
PotionVisRegen.init();
|
||||
}
|
||||
|
||||
potionVisRegenID = visRegenPotionId;
|
||||
PotionVisRegen.instance = new PotionVisRegen(potionVisRegenID, true, 5701759);
|
||||
PotionVisRegen.init();
|
||||
|
||||
int vacuumPotionId = potionVacuumID;
|
||||
|
||||
if (Potion.potionTypes[vacuumPotionId] != null) {
|
||||
vacuumPotionId = getNextPotionId(vacuumPotionId);
|
||||
var4 = getNextPotionId(var4);
|
||||
if (var4 >= 0) {
|
||||
potionVacuumID = var4;
|
||||
PotionVacuum.instance = new PotionVacuum(potionVacuumID, true, 4210752);
|
||||
PotionVacuum.init();
|
||||
}
|
||||
|
||||
potionVacuumID = vacuumPotionId;
|
||||
PotionVacuum.instance = new PotionVacuum(potionVacuumID, true, 4210752);
|
||||
PotionVacuum.init();
|
||||
|
||||
int shockPotionId = potionShockID;
|
||||
|
||||
if (Potion.potionTypes[shockPotionId] != null) {
|
||||
shockPotionId = getNextPotionId(shockPotionId);
|
||||
var4 = getNextPotionId(var4);
|
||||
if (var4 >= 0) {
|
||||
potionShockID = var4;
|
||||
PotionShock.instance = new PotionShock(potionShockID, true, 11513861);
|
||||
PotionShock.init();
|
||||
}
|
||||
|
||||
potionShockID = shockPotionId;
|
||||
PotionShock.instance = new PotionShock(potionShockID, true, 11513861);
|
||||
PotionShock.init();
|
||||
|
||||
int synthesisPotionId = potionSynthesisID;
|
||||
|
||||
if (Potion.potionTypes[synthesisPotionId] != null) {
|
||||
synthesisPotionId = getNextPotionId(synthesisPotionId);
|
||||
var4 = getNextPotionId(var4);
|
||||
if (var4 >= 0) {
|
||||
potionSynthesisID = var4;
|
||||
PotionSynthesis.instance = new PotionSynthesis(potionSynthesisID, false, 3253280);
|
||||
PotionSynthesis.init();
|
||||
}
|
||||
|
||||
potionSynthesisID = synthesisPotionId;
|
||||
PotionSynthesis.instance = new PotionSynthesis(potionSynthesisID, false, 3253280);
|
||||
PotionSynthesis.init();
|
||||
}
|
||||
|
||||
static int getNextPotionId(int start) {
|
||||
@@ -3915,96 +3889,6 @@ public class ThaumicHorizons {
|
||||
(new AspectList()).add(Aspect.WEAPON, 3).add(Aspect.BEAST, 3));
|
||||
}
|
||||
|
||||
private static void registerDispenserBehavior() {
|
||||
BlockDispenser.dispenseBehaviorRegistry
|
||||
.putObject(Item.getItemFromBlock(blockAlchemite), new BehaviorDefaultDispenseItem() {
|
||||
|
||||
@Override
|
||||
protected ItemStack dispenseStack(IBlockSource dispenser, ItemStack dispensedItem) {
|
||||
EnumFacing enumfacing = BlockDispenser.func_149937_b(dispenser.getBlockMetadata());
|
||||
World world = dispenser.getWorld();
|
||||
int x = dispenser.getXInt() + enumfacing.getFrontOffsetX();
|
||||
int y = dispenser.getYInt() + enumfacing.getFrontOffsetY();
|
||||
int z = dispenser.getZInt() + enumfacing.getFrontOffsetZ();
|
||||
|
||||
EntityAlchemitePrimed primedAlchemite = new EntityAlchemitePrimed(
|
||||
world,
|
||||
x + 0.5F,
|
||||
y + 0.5F,
|
||||
z + 0.5F,
|
||||
null);
|
||||
world.spawnEntityInWorld(primedAlchemite);
|
||||
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "game.tnt.primed", 1.0F, 1.0F);
|
||||
|
||||
dispensedItem.stackSize--;
|
||||
return dispensedItem;
|
||||
}
|
||||
});
|
||||
BlockDispenser.dispenseBehaviorRegistry.putObject(itemSyringeInjection, new BehaviorDefaultDispenseItem() {
|
||||
|
||||
@Override
|
||||
public ItemStack dispenseStack(IBlockSource dispenser, ItemStack stack) {
|
||||
if (!(stack.getItem() instanceof ItemSyringeInjection)) {
|
||||
return super.dispenseStack(dispenser, stack);
|
||||
}
|
||||
|
||||
World world = dispenser.getWorld();
|
||||
EnumFacing facing = BlockDispenser.func_149937_b(dispenser.getBlockMetadata());
|
||||
|
||||
double spawnX = dispenser.getX() + facing.getFrontOffsetX();
|
||||
double spawnY = dispenser.getY() + facing.getFrontOffsetY();
|
||||
double spawnZ = dispenser.getZ() + facing.getFrontOffsetZ();
|
||||
|
||||
IProjectile projectile = createProjectile(
|
||||
(ItemSyringeInjection) stack.getItem(),
|
||||
stack,
|
||||
world,
|
||||
spawnX,
|
||||
spawnY,
|
||||
spawnZ);
|
||||
|
||||
projectile.setThrowableHeading(
|
||||
facing.getFrontOffsetX(),
|
||||
facing.getFrontOffsetY() + 0.1F,
|
||||
facing.getFrontOffsetZ(),
|
||||
1.1F, // velocity
|
||||
6F // inaccuracy
|
||||
);
|
||||
|
||||
world.spawnEntityInWorld((Entity) projectile);
|
||||
|
||||
stack.stackSize--;
|
||||
return stack;
|
||||
}
|
||||
|
||||
private IProjectile createProjectile(ItemSyringeInjection item, ItemStack stack, World world, double x,
|
||||
double y, double z) {
|
||||
if (item.isPhial(stack.getItemDamage())) {
|
||||
return new EntityBlastPhial(world, x, y, z, stack);
|
||||
} else {
|
||||
return new EntitySyringe(world, x, y, z, stack.stackTagCompound);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void playDispenseSound(IBlockSource source) {
|
||||
source.getWorld().playAuxSFX(1002, source.getXInt(), source.getYInt(), source.getZInt(), 0);
|
||||
}
|
||||
});
|
||||
BlockDispenser.dispenseBehaviorRegistry.putObject(itemEggIncubated, new BehaviorProjectileDispense() {
|
||||
|
||||
protected IProjectile getProjectileEntity(World worldIn, IPosition position) {
|
||||
return new EntityEggIncubated(worldIn, position.getX(), position.getY(), position.getZ());
|
||||
}
|
||||
});
|
||||
BlockDispenser.dispenseBehaviorRegistry.putObject(
|
||||
itemBoatGreatwood,
|
||||
new BehaviorDispenseBoat(Collections.singleton(Material.water), EntityBoatGreatwood::new));
|
||||
BlockDispenser.dispenseBehaviorRegistry.putObject(
|
||||
itemBoatThaumium,
|
||||
new BehaviorDispenseBoat(Sets.newHashSet(Material.water, Material.lava), EntityBoatThaumium::new));
|
||||
}
|
||||
|
||||
static IRecipe shapelessOreDictRecipe(ItemStack res, Object[] params) {
|
||||
ShapelessOreRecipe rec = new ShapelessOreRecipe(res, params);
|
||||
CraftingManager.getInstance().getRecipeList().add(rec);
|
||||
@@ -4023,7 +3907,7 @@ public class ThaumicHorizons {
|
||||
Property alternateBell = config.get("general", "alternateGolemBell", true);
|
||||
alternateBell.comment = "Enable alternate golemancer\'s bell recipe (in case of mod conflict).";
|
||||
alternateBell.setRequiresMcRestart(true);
|
||||
useAlternateBell = alternateBell.getBoolean();
|
||||
useAlternateBell = true; // alternateBell.getBoolean();
|
||||
Property enablePocketPlane = config.get("general", "enablePocketPlane", true);
|
||||
enablePocketPlane.comment = "Enable pocket plane content (currently incomplete - many aspects will not generate the cool stuff they are supposed to). World backups are highly suggested.";
|
||||
enablePocketPlane.setRequiresMcRestart(true);
|
||||
@@ -4032,32 +3916,6 @@ public class ThaumicHorizons {
|
||||
warpedTumorValueProperty.comment = "Points of warp held by warped tumor.";
|
||||
warpedTumorValueProperty.setRequiresMcRestart(true);
|
||||
warpedTumorValue = warpedTumorValueProperty.getInt();
|
||||
|
||||
Property visboostPotionProperty = config.get("potions", "visboostPotionID", 24);
|
||||
visboostPotionProperty.comment = "Potion ID for the VisBoost Potion";
|
||||
visboostPotionProperty.setRequiresMcRestart(true);
|
||||
potionVisBoostID = visboostPotionProperty.getInt();
|
||||
|
||||
Property visregenPotionProperty = config.get("potions", "visregenPotionID", 25);
|
||||
visregenPotionProperty.comment = "Potion ID for the VisRegen Potion";
|
||||
visregenPotionProperty.setRequiresMcRestart(true);
|
||||
potionVisRegenID = visregenPotionProperty.getInt();
|
||||
|
||||
Property vacuumPotionProperty = config.get("potions", "vacuumPotionID", 26);
|
||||
vacuumPotionProperty.comment = "Potion ID for the Vacuum";
|
||||
vacuumPotionProperty.setRequiresMcRestart(true);
|
||||
potionVacuumID = vacuumPotionProperty.getInt();
|
||||
|
||||
Property shockPotionProperty = config.get("potions", "shockPotionID", 27);
|
||||
shockPotionProperty.comment = "Potion ID for the Shock Potion";
|
||||
shockPotionProperty.setRequiresMcRestart(true);
|
||||
potionShockID = shockPotionProperty.getInt();
|
||||
|
||||
Property synthesisPotionProperty = config.get("potions", "synthesisPotionID", 28);
|
||||
synthesisPotionProperty.comment = "Potion ID for the Sythesis Potion";
|
||||
synthesisPotionProperty.setRequiresMcRestart(true);
|
||||
potionSynthesisID = synthesisPotionProperty.getInt();
|
||||
|
||||
config.save();
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ public class BlockAlchemite extends BlockTNT {
|
||||
this.setBlockName("ThaumicHorizons_alchemite");
|
||||
this.setBlockTextureName("ThaumicHorizons:alchemite");
|
||||
this.setCreativeTab(ThaumicHorizons.tabTH);
|
||||
this.setStepSound(soundTypeGrass); // same place/break sound as TNT
|
||||
}
|
||||
|
||||
public void onBlockDestroyedByExplosion(final World p_149723_1_, final int p_149723_2_, final int p_149723_3_,
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
//
|
||||
// Decompiled by Procyon v0.5.30
|
||||
//
|
||||
|
||||
package com.kentington.thaumichorizons.common.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
@@ -77,16 +81,28 @@ public class BlockGatewayPortal extends Block {
|
||||
if (world.getBlock(x + 1, y, z) == ThaumicHorizons.blockGateway) {
|
||||
slotZ = z;
|
||||
switch (md) {
|
||||
case 6 -> slotX = x + 1;
|
||||
case 7 -> slotX = x;
|
||||
case 9 -> slotX = x - 1;
|
||||
case 6 -> {
|
||||
slotX = x + 1;
|
||||
}
|
||||
case 7 -> {
|
||||
slotX = x;
|
||||
}
|
||||
case 9 -> {
|
||||
slotX = x - 1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
slotX = x;
|
||||
switch (md) {
|
||||
case 6 -> slotZ = z + 1;
|
||||
case 7 -> slotZ = z;
|
||||
case 9 -> slotZ = z - 1;
|
||||
case 6 -> {
|
||||
slotZ = z + 1;
|
||||
}
|
||||
case 7 -> {
|
||||
slotZ = z;
|
||||
}
|
||||
case 9 -> {
|
||||
slotZ = z - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -101,7 +117,7 @@ public class BlockGatewayPortal extends Block {
|
||||
}
|
||||
}
|
||||
final TileEntity te = world.getTileEntity(slotX, slotY, slotZ);
|
||||
if (te instanceof TileSlot && ((TileSlot) te).portalOpen) {
|
||||
if (te instanceof TileSlot) {
|
||||
((TileSlot) te).destroyPortal();
|
||||
}
|
||||
}
|
||||
@@ -135,93 +151,313 @@ public class BlockGatewayPortal extends Block {
|
||||
|| world.getBlock(x + 1, y, z) == ThaumicHorizons.blockPortal
|
||||
|| world.getBlock(x - 1, y, z) == ThaumicHorizons.blockGateway
|
||||
|| world.getBlock(x - 1, y, z) == ThaumicHorizons.blockPortal;
|
||||
return switch (world.getBlockMetadata(x, y, z)) {
|
||||
case 0 -> switch (side) {
|
||||
case 0 -> this.lapiz;
|
||||
case 1 -> this.stone;
|
||||
case 2 -> isXAligned ? this.CornerTR : this.stone;
|
||||
case 3 -> isXAligned ? this.CornerTL : this.stone;
|
||||
case 4 -> isXAligned ? this.stone : this.CornerTL;
|
||||
case 5 -> isXAligned ? this.stone : this.CornerTR;
|
||||
default -> this.leftSide(isXAligned, side);
|
||||
};
|
||||
case 1, 2, 3 -> this.leftSide(isXAligned, side);
|
||||
case 4 -> switch (side) {
|
||||
case 0 -> this.stone;
|
||||
case 1 -> this.lapiz;
|
||||
case 2 -> isXAligned ? this.CornerBR : this.stone;
|
||||
case 3 -> isXAligned ? this.CornerBL : this.stone;
|
||||
case 4 -> isXAligned ? this.stone : this.CornerBL;
|
||||
case 5 -> isXAligned ? this.stone : this.CornerBR;
|
||||
default -> this.lapiz;
|
||||
};
|
||||
case 5 -> switch (side) {
|
||||
case 0 -> this.lapiz;
|
||||
case 1 -> this.stone;
|
||||
case 2 -> isXAligned ? this.topR : this.stone;
|
||||
case 3 -> isXAligned ? this.topL : this.stone;
|
||||
case 4 -> isXAligned ? this.stone : this.topL;
|
||||
case 5 -> isXAligned ? this.stone : this.topR;
|
||||
default -> this.lapiz;
|
||||
};
|
||||
case 6, 7, 9 -> this.bottomSide(isXAligned, side);
|
||||
case 8 -> switch (side) {
|
||||
case 0 -> this.lapiz;
|
||||
case 1 -> this.stone;
|
||||
case 2 -> isXAligned ? this.topL : this.stone;
|
||||
case 3 -> isXAligned ? this.topR : this.stone;
|
||||
case 4 -> isXAligned ? this.stone : this.topR;
|
||||
case 5 -> isXAligned ? this.stone : this.topL;
|
||||
default -> this.lapiz;
|
||||
};
|
||||
case 10 -> switch (side) {
|
||||
case 0 -> this.lapiz;
|
||||
case 1 -> this.stone;
|
||||
case 2 -> isXAligned ? this.CornerTL : this.stone;
|
||||
case 3 -> isXAligned ? this.CornerTR : this.stone;
|
||||
case 4 -> isXAligned ? this.stone : this.CornerTR;
|
||||
case 5 -> isXAligned ? this.stone : this.CornerTL;
|
||||
default -> this.rightSide(isXAligned, side);
|
||||
};
|
||||
case 11, 12, 13 -> this.rightSide(isXAligned, side);
|
||||
case 14 -> switch (side) {
|
||||
case 0 -> this.stone;
|
||||
case 1 -> this.lapiz;
|
||||
case 2 -> isXAligned ? this.CornerBL : this.stone;
|
||||
case 3 -> isXAligned ? this.CornerBR : this.stone;
|
||||
case 4 -> isXAligned ? this.stone : this.CornerBR;
|
||||
case 5 -> isXAligned ? this.stone : this.CornerBL;
|
||||
default -> this.lapiz;
|
||||
};
|
||||
default -> this.lapiz;
|
||||
};
|
||||
Label_0410: {
|
||||
switch (world.getBlockMetadata(x, y, z)) {
|
||||
case 0 -> {
|
||||
switch (side) {
|
||||
case 0 -> {
|
||||
return this.lapiz;
|
||||
}
|
||||
case 1 -> {
|
||||
return this.stone;
|
||||
}
|
||||
case 2 -> {
|
||||
if (isXAligned) {
|
||||
return this.CornerTR;
|
||||
}
|
||||
return this.stone;
|
||||
}
|
||||
case 3 -> {
|
||||
if (isXAligned) {
|
||||
return this.CornerTL;
|
||||
}
|
||||
return this.stone;
|
||||
}
|
||||
case 4 -> {
|
||||
if (isXAligned) {
|
||||
return this.stone;
|
||||
}
|
||||
return this.CornerTL;
|
||||
}
|
||||
case 5 -> {
|
||||
if (isXAligned) {
|
||||
return this.stone;
|
||||
}
|
||||
return this.CornerTR;
|
||||
}
|
||||
default -> {
|
||||
return this.leftSide(isXAligned, side);
|
||||
}
|
||||
}
|
||||
}
|
||||
case 1, 2, 3 -> {
|
||||
return this.leftSide(isXAligned, side);
|
||||
}
|
||||
case 4 -> {
|
||||
switch (side) {
|
||||
case 0 -> {
|
||||
return this.stone;
|
||||
}
|
||||
case 1 -> {
|
||||
return this.lapiz;
|
||||
}
|
||||
case 2 -> {
|
||||
if (isXAligned) {
|
||||
return this.CornerBR;
|
||||
}
|
||||
return this.stone;
|
||||
}
|
||||
case 3 -> {
|
||||
if (isXAligned) {
|
||||
return this.CornerBL;
|
||||
}
|
||||
return this.stone;
|
||||
}
|
||||
case 4 -> {
|
||||
if (isXAligned) {
|
||||
return this.stone;
|
||||
}
|
||||
return this.CornerBL;
|
||||
}
|
||||
case 5 -> {
|
||||
if (isXAligned) {
|
||||
return this.stone;
|
||||
}
|
||||
return this.CornerBR;
|
||||
}
|
||||
default -> {
|
||||
break Label_0410;
|
||||
}
|
||||
}
|
||||
}
|
||||
case 5 -> {
|
||||
switch (side) {
|
||||
case 0: {
|
||||
return this.lapiz;
|
||||
}
|
||||
case 1: {
|
||||
return this.stone;
|
||||
}
|
||||
case 2: {
|
||||
if (isXAligned) {
|
||||
return this.topR;
|
||||
}
|
||||
}
|
||||
case 3: {
|
||||
if (isXAligned) {
|
||||
return this.topL;
|
||||
}
|
||||
}
|
||||
case 4: {
|
||||
if (!isXAligned) {
|
||||
return this.topL;
|
||||
}
|
||||
}
|
||||
case 5: {
|
||||
if (!isXAligned) {
|
||||
return this.topR;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return this.lapiz;
|
||||
}
|
||||
case 6, 7, 9 -> {
|
||||
return this.bottomSide(isXAligned, side);
|
||||
}
|
||||
case 8 -> {
|
||||
switch (side) {
|
||||
case 0: {
|
||||
return this.lapiz;
|
||||
}
|
||||
case 1: {
|
||||
return this.stone;
|
||||
}
|
||||
case 2: {
|
||||
if (isXAligned) {
|
||||
return this.topL;
|
||||
}
|
||||
}
|
||||
case 3: {
|
||||
if (isXAligned) {
|
||||
return this.topR;
|
||||
}
|
||||
}
|
||||
case 4: {
|
||||
if (!isXAligned) {
|
||||
return this.topR;
|
||||
}
|
||||
}
|
||||
case 5: {
|
||||
if (!isXAligned) {
|
||||
return this.topL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return this.lapiz;
|
||||
}
|
||||
case 10 -> {
|
||||
switch (side) {
|
||||
case 0 -> {
|
||||
return this.stone;
|
||||
}
|
||||
case 1 -> {
|
||||
return this.lapiz;
|
||||
}
|
||||
case 2 -> {
|
||||
if (isXAligned) {
|
||||
return this.CornerTL;
|
||||
}
|
||||
return this.stone;
|
||||
}
|
||||
case 3 -> {
|
||||
if (isXAligned) {
|
||||
return this.CornerTR;
|
||||
}
|
||||
return this.stone;
|
||||
}
|
||||
case 4 -> {
|
||||
if (isXAligned) {
|
||||
return this.stone;
|
||||
}
|
||||
return this.CornerTR;
|
||||
}
|
||||
case 5 -> {
|
||||
if (isXAligned) {
|
||||
return this.stone;
|
||||
}
|
||||
return this.CornerTL;
|
||||
}
|
||||
default -> {
|
||||
return this.rightSide(isXAligned, side);
|
||||
}
|
||||
}
|
||||
}
|
||||
case 11, 12, 13 -> {
|
||||
return this.rightSide(isXAligned, side);
|
||||
}
|
||||
case 14 -> {
|
||||
switch (side) {
|
||||
case 0 -> {
|
||||
return this.stone;
|
||||
}
|
||||
case 1 -> {
|
||||
return this.lapiz;
|
||||
}
|
||||
case 2 -> {
|
||||
if (isXAligned) {
|
||||
return this.CornerBL;
|
||||
}
|
||||
return this.stone;
|
||||
}
|
||||
case 3 -> {
|
||||
if (isXAligned) {
|
||||
return this.CornerBR;
|
||||
}
|
||||
return this.stone;
|
||||
}
|
||||
case 4 -> {
|
||||
if (isXAligned) {
|
||||
return this.stone;
|
||||
}
|
||||
return this.CornerBR;
|
||||
}
|
||||
case 5 -> {
|
||||
if (isXAligned) {
|
||||
return this.stone;
|
||||
}
|
||||
return this.CornerBL;
|
||||
}
|
||||
default -> {
|
||||
break Label_0410;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.lapiz;
|
||||
}
|
||||
|
||||
IIcon leftSide(final boolean xAligned, final int side) {
|
||||
return switch (side) {
|
||||
case 2 -> xAligned ? this.R : this.stone;
|
||||
case 3 -> xAligned ? this.L : this.lapiz;
|
||||
case 4 -> xAligned ? this.stone : this.L;
|
||||
case 5 -> xAligned ? this.lapiz : this.R;
|
||||
default -> this.lapiz;
|
||||
};
|
||||
if (xAligned) {
|
||||
switch (side) {
|
||||
case 2 -> {
|
||||
return this.R;
|
||||
}
|
||||
case 3 -> {
|
||||
return this.L;
|
||||
}
|
||||
case 4 -> {
|
||||
return this.stone;
|
||||
}
|
||||
default -> {
|
||||
return this.lapiz;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
switch (side) {
|
||||
case 2 -> {
|
||||
return this.stone;
|
||||
}
|
||||
case 4 -> {
|
||||
return this.L;
|
||||
}
|
||||
case 5 -> {
|
||||
return this.R;
|
||||
}
|
||||
default -> {
|
||||
return this.lapiz;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IIcon rightSide(final boolean xAligned, final int side) {
|
||||
return switch (side) {
|
||||
case 2 -> xAligned ? this.L : this.lapiz;
|
||||
case 3 -> xAligned ? this.R : this.stone;
|
||||
case 4 -> xAligned ? this.lapiz : this.R;
|
||||
case 5 -> xAligned ? this.stone : this.L;
|
||||
default -> this.lapiz;
|
||||
};
|
||||
if (xAligned) {
|
||||
switch (side) {
|
||||
case 2 -> {
|
||||
return this.L;
|
||||
}
|
||||
case 3 -> {
|
||||
return this.R;
|
||||
}
|
||||
case 5 -> {
|
||||
return this.stone;
|
||||
}
|
||||
default -> {
|
||||
return this.lapiz;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
switch (side) {
|
||||
case 3 -> {
|
||||
return this.stone;
|
||||
}
|
||||
case 4 -> {
|
||||
return this.R;
|
||||
}
|
||||
case 5 -> {
|
||||
return this.L;
|
||||
}
|
||||
default -> {
|
||||
return this.lapiz;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IIcon bottomSide(final boolean xAligned, final int side) {
|
||||
return switch (side) {
|
||||
case 0 -> this.stone;
|
||||
case 1 -> this.lapiz;
|
||||
default -> this.B;
|
||||
};
|
||||
switch (side) {
|
||||
case 0 -> {
|
||||
return this.stone;
|
||||
}
|
||||
case 1 -> {
|
||||
return this.lapiz;
|
||||
}
|
||||
default -> {
|
||||
return this.B;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,6 @@ import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
|
||||
import com.kentington.thaumichorizons.common.ThaumicHorizons;
|
||||
import com.kentington.thaumichorizons.common.lib.GatewayTeleporter;
|
||||
@@ -84,12 +83,12 @@ public class BlockPortalTH extends BlockBreakable {
|
||||
|
||||
public void onEntityCollidedWithBlock(final World world, final int x, final int y, final int z,
|
||||
final Entity player) {
|
||||
if (player.ridingEntity == null && player.riddenByEntity == null && player instanceof final EntityPlayerMP playerMP) {
|
||||
if (playerMP.timeUntilPortal > 0) {
|
||||
playerMP.timeUntilPortal = 10;
|
||||
if (player.ridingEntity == null && player.riddenByEntity == null && player instanceof EntityPlayerMP) {
|
||||
if (player.timeUntilPortal > 0) {
|
||||
player.timeUntilPortal = 10;
|
||||
return;
|
||||
}
|
||||
playerMP.timeUntilPortal = 10;
|
||||
player.timeUntilPortal = 10;
|
||||
int targetX = 0;
|
||||
int targetY = 0;
|
||||
int targetZ = 0;
|
||||
@@ -117,21 +116,15 @@ public class BlockPortalTH extends BlockBreakable {
|
||||
if (portal.length > 3) targetDim = portal[3];
|
||||
|
||||
final MinecraftServer mServer = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
final WorldServer targetWorld = mServer.worldServerForDimension(targetDim);
|
||||
float exitYaw = playerMP.rotationYaw;
|
||||
// face perpendicular to portal plane, away from portal into the world
|
||||
if (targetWorld.getTileEntity(targetX, targetY + 2, targetZ) instanceof final TileSlot slotTE) {
|
||||
exitYaw = slotTE.xAligned ? 0.0f : 270.0f;
|
||||
}
|
||||
playerMP.mcServer.getConfigurationManager().transferPlayerToDimension(
|
||||
playerMP,
|
||||
((EntityPlayerMP) player).mcServer.getConfigurationManager().transferPlayerToDimension(
|
||||
(EntityPlayerMP) player,
|
||||
targetDim,
|
||||
new GatewayTeleporter(
|
||||
targetWorld,
|
||||
mServer.worldServerForDimension(ThaumicHorizons.dimensionPocketId),
|
||||
targetX,
|
||||
targetY,
|
||||
targetZ,
|
||||
exitYaw));
|
||||
player.rotationYaw));
|
||||
} else {
|
||||
int slotY = y;
|
||||
int slotX = x;
|
||||
@@ -174,8 +167,8 @@ public class BlockPortalTH extends BlockBreakable {
|
||||
}
|
||||
}
|
||||
final MinecraftServer mServer2 = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
playerMP.mcServer.getConfigurationManager().transferPlayerToDimension(
|
||||
playerMP,
|
||||
((EntityPlayerMP) player).mcServer.getConfigurationManager().transferPlayerToDimension(
|
||||
(EntityPlayerMP) player,
|
||||
ThaumicHorizons.dimensionPocketId,
|
||||
new GatewayTeleporter(
|
||||
mServer2.worldServerForDimension(ThaumicHorizons.dimensionPocketId),
|
||||
|
||||
@@ -32,7 +32,6 @@ public class BlockSlot extends BlockContainer {
|
||||
|
||||
public void breakBlock(final World world, final int x, final int y, final int z, final Block block, final int md) {
|
||||
final TileSlot tco = (TileSlot) world.getTileEntity(x, y, z);
|
||||
if (tco == null) return;
|
||||
if (tco.portalOpen) {
|
||||
tco.destroyPortal();
|
||||
}
|
||||
@@ -60,20 +59,15 @@ public class BlockSlot extends BlockContainer {
|
||||
if (tco.portalOpen) {
|
||||
tco.destroyPortal();
|
||||
}
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
return true;
|
||||
} else if (!tco.portalOpen && player.getHeldItem().getItem() instanceof ItemWandCasting) {
|
||||
tco.makePortal(player);
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
return true;
|
||||
}
|
||||
} else if (theItem != null && theItem.getItem() == ThaumicHorizons.itemKeystone
|
||||
&& theItem.stackTagCompound != null) {
|
||||
tco.insertKeystone(theItem.stackTagCompound.getInteger("dimension"));
|
||||
--theItem.stackSize;
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
return true;
|
||||
}
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,10 +45,10 @@ public class ContainerCase extends Container {
|
||||
new SlotLimitedByClass(ILens.class, this.input, a, 37 + a % 6 * 18, 51 + a / 6 * 18));
|
||||
}
|
||||
this.bindPlayerInventory(iinventory);
|
||||
if (!par2World.isRemote && this.pouch != null
|
||||
&& this.pouch.getItem() instanceof ItemLensCase lensCase
|
||||
&& this.input instanceof InventoryCase inv) {
|
||||
inv.stackList = lensCase.getInventory(this.pouch);
|
||||
if (!par2World.isRemote) {
|
||||
try {
|
||||
((InventoryCase) this.input).stackList = ((ItemLensCase) this.pouch.getItem()).getInventory(this.pouch);
|
||||
} catch (Exception ignored) {}
|
||||
}
|
||||
this.onCraftMatrixChanged(this.input);
|
||||
}
|
||||
|
||||
@@ -12,27 +12,23 @@ import net.minecraft.world.World;
|
||||
|
||||
public class EntityBlastPhial extends EntityPotion {
|
||||
|
||||
public EntityBlastPhial(final World world) {
|
||||
super(world);
|
||||
public EntityBlastPhial(final World p_i1790_1_) {
|
||||
super(p_i1790_1_);
|
||||
}
|
||||
|
||||
public EntityBlastPhial(final World world, final double x, final double y, final double z, final ItemStack stack) {
|
||||
super(world, x, y, z, stack);
|
||||
}
|
||||
|
||||
public EntityBlastPhial(final World world, final EntityLivingBase thrower, final float power,
|
||||
final ItemStack stack) {
|
||||
super(world, thrower, stack);
|
||||
public EntityBlastPhial(final World p_i1790_1_, final EntityLivingBase p_i1790_2_, final float power,
|
||||
final ItemStack p_i1790_3_) {
|
||||
super(p_i1790_1_, p_i1790_2_, p_i1790_3_);
|
||||
this.setSize(0.25f, 0.25f);
|
||||
this.setSize(0.5f, 0.5f);
|
||||
this.setLocationAndAngles(
|
||||
thrower.posX,
|
||||
thrower.posY + thrower.getEyeHeight(),
|
||||
thrower.posZ,
|
||||
thrower.rotationYaw,
|
||||
thrower.rotationPitch);
|
||||
p_i1790_2_.posX,
|
||||
p_i1790_2_.posY + p_i1790_2_.getEyeHeight(),
|
||||
p_i1790_2_.posZ,
|
||||
p_i1790_2_.rotationYaw,
|
||||
p_i1790_2_.rotationPitch);
|
||||
this.posX -= MathHelper.cos(this.rotationYaw / 180.0f * (float) Math.PI) * 0.16f;
|
||||
this.posY -= 0.1;
|
||||
this.posY -= 0.10000000149011612;
|
||||
this.posZ -= MathHelper.sin(this.rotationYaw / 180.0f * (float) Math.PI) * 0.16f;
|
||||
this.setPosition(this.posX, this.posY, this.posZ);
|
||||
this.yOffset = 0.0f;
|
||||
|
||||
@@ -8,8 +8,6 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
@@ -28,11 +26,10 @@ public class EntityEndersteed extends EntityHorse {
|
||||
this.initialized = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readEntityFromNBT(final NBTTagCompound p_70037_1_) {
|
||||
super.readEntityFromNBT(p_70037_1_);
|
||||
if (!(this.initialized = p_70037_1_.getBoolean("initialized"))) {
|
||||
final Multimap<String, AttributeModifier> map = HashMultimap.create();
|
||||
final Multimap map = HashMultimap.create();
|
||||
map.put("generic.movementSpeed", new AttributeModifier("generic.movementSpeed", 0.1, 1));
|
||||
map.put("horse.jumpStrength", new AttributeModifier("horse.jumpStrength", 0.25, 1));
|
||||
map.put("generic.maxHealth", new AttributeModifier("generic.maxHealth", 4.0, 1));
|
||||
@@ -41,13 +38,11 @@ public class EntityEndersteed extends EntityHorse {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeEntityToNBT(final NBTTagCompound p_70014_1_) {
|
||||
super.writeEntityToNBT(p_70014_1_);
|
||||
p_70014_1_.setBoolean("initialized", this.initialized);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setJumpPower(final int p_110206_1_) {
|
||||
final double blocks = p_110206_1_ / 7.0;
|
||||
this.teleportTo(
|
||||
@@ -56,7 +51,6 @@ public class EntityEndersteed extends EntityHorse {
|
||||
this.posZ + blocks * Math.cos(Math.toRadians(this.rotationYaw)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCommandSenderName() {
|
||||
if (this.hasCustomNameTag()) {
|
||||
return this.getCustomNameTag();
|
||||
@@ -64,15 +58,6 @@ public class EntityEndersteed extends EntityHorse {
|
||||
return StatCollector.translateToLocal("entity.ThaumicHorizons.Endersteed.name");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChatComponent func_145748_c_() {
|
||||
if (this.hasCustomNameTag()) {
|
||||
return super.func_145748_c_();
|
||||
} else {
|
||||
return new ChatComponentTranslation("entity.ThaumicHorizons.Endersteed.name");
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean teleportTo(final double p_70825_1_, final double p_70825_3_, final double p_70825_5_) {
|
||||
final EnderTeleportEvent event = new EnderTeleportEvent(this, p_70825_1_, p_70825_3_, p_70825_5_, 0.0f);
|
||||
if (MinecraftForge.EVENT_BUS.post(event)) {
|
||||
|
||||
@@ -10,8 +10,6 @@ import net.minecraft.entity.passive.EntityOcelot;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -28,27 +26,16 @@ public class EntityFamiliar extends EntityOcelot {
|
||||
super(p_i1688_1_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCommandSenderName() {
|
||||
return this.hasCustomNameTag() ? this.getCustomNameTag()
|
||||
: (this.isTamed() ? StatCollector.translateToLocal("entity.ThaumicHorizons.Familiar.name")
|
||||
: super.getCommandSenderName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChatComponent func_145748_c_() {
|
||||
if (this.hasCustomNameTag() || !this.isTamed()) {
|
||||
return super.func_145748_c_();
|
||||
} else {
|
||||
return new ChatComponentTranslation("entity.ThaumicHorizons.Familiar.name");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateAITick() {
|
||||
super.updateAITick();
|
||||
if (this.ticksExisted % 10 == 0) {
|
||||
final List<EntityPlayer> players = this.worldObj.getEntitiesWithinAABB(
|
||||
final List<EntityPlayer> players = (List<EntityPlayer>) this.worldObj.getEntitiesWithinAABB(
|
||||
EntityPlayer.class,
|
||||
AxisAlignedBB.getBoundingBox(
|
||||
this.posX - 5.0,
|
||||
|
||||
@@ -22,11 +22,9 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.ChatStyle;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
@@ -130,7 +128,6 @@ public class EntityGolemTH extends EntityGolemBase {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValidTarget(final Entity target) {
|
||||
if (!this.berserk) {
|
||||
return super.isValidTarget(target) || target instanceof EntityCreeper;
|
||||
@@ -140,7 +137,6 @@ public class EntityGolemTH extends EntityGolemBase {
|
||||
&& !target.getCommandSenderName().equals(this.getCommandSenderName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setupGolem() {
|
||||
super.setupGolem();
|
||||
if (this.getCore() == -1) {
|
||||
@@ -166,13 +162,14 @@ public class EntityGolemTH extends EntityGolemBase {
|
||||
this.getNavigator().setAvoidsWater(
|
||||
this.getGolemTHType() != EnumGolemTHType.ROCK && this.getGolemTHType() != EnumGolemTHType.METAL
|
||||
&& this.getGolemTHType() != EnumGolemTHType.REDSTONE);
|
||||
final String decor = this.getGolemDecoration();
|
||||
final int bonus = decor == null ? 0 : (decor.contains("H") ? 5 : 0);
|
||||
int bonus = 0;
|
||||
try {
|
||||
bonus = (this.getGolemDecoration().contains("H") ? 5 : 0);
|
||||
} catch (Exception ignored) {}
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(this.getGolemTHType().health + bonus);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean attackEntityFrom(final DamageSource ds, float par2) {
|
||||
this.paused = false;
|
||||
if (ds == DamageSource.cactus) {
|
||||
@@ -197,7 +194,6 @@ public class EntityGolemTH extends EntityGolemBase {
|
||||
return super.attackEntityFrom(ds, par2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCarryLimit() {
|
||||
int base = this.type.carry;
|
||||
if (this.worldObj.isRemote) {
|
||||
@@ -207,7 +203,6 @@ public class EntityGolemTH extends EntityGolemBase {
|
||||
return base;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getAIMoveSpeed() {
|
||||
if (this.paused || this.inactive) {
|
||||
return 0.0f;
|
||||
@@ -228,7 +223,6 @@ public class EntityGolemTH extends EntityGolemBase {
|
||||
return speed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLivingUpdate() {
|
||||
super.onLivingUpdate();
|
||||
if (!this.worldObj.isRemote) {
|
||||
@@ -247,13 +241,37 @@ public class EntityGolemTH extends EntityGolemBase {
|
||||
if (this.ticksExisted % 10 == 0 && this.worldObj.rand.nextInt(500) == 0) {
|
||||
final EntityPlayer player = this.worldObj.getPlayerEntityByName(this.getOwnerName());
|
||||
switch (this.voidCount) {
|
||||
case 0, 1, 2 -> {
|
||||
case 0 -> {
|
||||
if (player != null) {
|
||||
final ChatComponentTranslation message = new ChatComponentTranslation(
|
||||
"thaumichorizons.golemWarning" + this.voidCount);
|
||||
message.setChatStyle(
|
||||
new ChatStyle().setColor(EnumChatFormatting.DARK_PURPLE).setItalic(true));
|
||||
player.addChatMessage(message);
|
||||
player.addChatMessage(
|
||||
new ChatComponentText(
|
||||
EnumChatFormatting.ITALIC + ""
|
||||
+ EnumChatFormatting.DARK_PURPLE
|
||||
+ StatCollector
|
||||
.translateToLocal("thaumichorizons.golemWarning1")));
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 1 -> {
|
||||
if (player != null) {
|
||||
player.addChatMessage(
|
||||
new ChatComponentText(
|
||||
EnumChatFormatting.ITALIC + ""
|
||||
+ EnumChatFormatting.DARK_PURPLE
|
||||
+ StatCollector
|
||||
.translateToLocal("thaumichorizons.golemWarning2")));
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 2 -> {
|
||||
if (player != null) {
|
||||
player.addChatMessage(
|
||||
new ChatComponentText(
|
||||
EnumChatFormatting.ITALIC + ""
|
||||
+ EnumChatFormatting.DARK_PURPLE
|
||||
+ StatCollector
|
||||
.translateToLocal("thaumichorizons.golemWarning3")));
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 3 -> {
|
||||
@@ -279,7 +297,7 @@ public class EntityGolemTH extends EntityGolemBase {
|
||||
if (this.regenTimer <= 0) {
|
||||
this.regenTimer = this.type.regenDelay;
|
||||
if (this.decoration.contains("F")) {
|
||||
this.regenTimer = (this.regenTimer * 2) / 3;
|
||||
this.regenTimer *= (int) 0.66f;
|
||||
}
|
||||
if (!this.worldObj.isRemote && this.getHealth() < this.getMaxHealth()) {
|
||||
this.worldObj.setEntityState(this, (byte) 5);
|
||||
@@ -289,25 +307,23 @@ public class EntityGolemTH extends EntityGolemBase {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isWithinHomeDistance(final int par1, final int par2, final int par3) {
|
||||
return this.getCore() == -1 || super.isWithinHomeDistance(par1, par2, par3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFire(final int par1) {
|
||||
if (!this.type.fireResist) {
|
||||
super.setFire(par1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeEntityToNBT(final NBTTagCompound nbt) {
|
||||
super.writeEntityToNBT(nbt);
|
||||
nbt.setByte("GolemTypeTH", (byte) this.type.ordinal());
|
||||
nbt.setByte("GolemType", (byte) EnumGolemType.FLESH.ordinal());
|
||||
if (this.blocky != null) {
|
||||
final String s = "block";
|
||||
final Block blocky = this.blocky;
|
||||
nbt.setInteger(s, Block.getIdFromBlock(this.blocky));
|
||||
} else {
|
||||
nbt.setInteger("block", 0);
|
||||
@@ -320,21 +336,24 @@ public class EntityGolemTH extends EntityGolemBase {
|
||||
nbt.setBoolean("explosive", this.kaboom);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readEntityFromNBT(final NBTTagCompound nbt) {
|
||||
super.readEntityFromNBT(nbt);
|
||||
this.type = EnumGolemTHType.getType(nbt.getByte("GolemTypeTH"));
|
||||
|
||||
final int upgradeSlots = this.type.upgrades + (this.advanced ? 1 : 0);
|
||||
this.upgrades = new byte[this.type.upgrades + (this.advanced ? 1 : 0)];
|
||||
final int ul = this.upgrades.length;
|
||||
this.upgrades = nbt.getByteArray("upgrades");
|
||||
if (upgradeSlots != this.upgrades.length) {
|
||||
byte[] tt = Arrays.copyOf(this.upgrades, upgradeSlots);
|
||||
if (this.upgrades.length < upgradeSlots) {
|
||||
Arrays.fill(tt, this.upgrades.length, upgradeSlots, (byte) -1);
|
||||
if (ul != this.upgrades.length) {
|
||||
final byte[] tt = new byte[ul];
|
||||
for (int a = 0; a < ul; ++a) {
|
||||
tt[a] = -1;
|
||||
}
|
||||
for (int a = 0; a < this.upgrades.length; ++a) {
|
||||
if (a < ul) {
|
||||
tt[a] = this.upgrades[a];
|
||||
}
|
||||
}
|
||||
this.upgrades = tt;
|
||||
}
|
||||
|
||||
StringBuilder st = new StringBuilder();
|
||||
for (final byte c : this.upgrades) {
|
||||
st.append(Integer.toHexString(c));
|
||||
@@ -351,7 +370,6 @@ public class EntityGolemTH extends EntityGolemBase {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void damageEntity(final DamageSource ds, final float par2) {
|
||||
if (ds.isFireDamage() && this.type.fireResist) {
|
||||
return;
|
||||
@@ -359,7 +377,6 @@ public class EntityGolemTH extends EntityGolemBase {
|
||||
super.damageEntity(ds, par2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTotalArmorValue() {
|
||||
int var1 = super.getTotalArmorValue() + this.type.armor;
|
||||
if (this.decoration.contains("V")) {
|
||||
@@ -469,6 +486,7 @@ public class EntityGolemTH extends EntityGolemBase {
|
||||
this.md,
|
||||
3);
|
||||
final SimpleNetworkWrapper instance = PacketHandler.INSTANCE;
|
||||
final Block blocky = this.blocky;
|
||||
instance.sendToAllAround(
|
||||
new PacketFXBlocksplosion(
|
||||
Block.getIdFromBlock(this.blocky),
|
||||
@@ -500,6 +518,7 @@ public class EntityGolemTH extends EntityGolemBase {
|
||||
this.md,
|
||||
3);
|
||||
final SimpleNetworkWrapper instance2 = PacketHandler.INSTANCE;
|
||||
final Block blocky2 = this.blocky;
|
||||
instance2.sendToAllAround(
|
||||
new PacketFXBlocksplosion(
|
||||
Block.getIdFromBlock(this.blocky),
|
||||
@@ -533,6 +552,7 @@ public class EntityGolemTH extends EntityGolemBase {
|
||||
this.md,
|
||||
3);
|
||||
final SimpleNetworkWrapper instance3 = PacketHandler.INSTANCE;
|
||||
final Block blocky3 = this.blocky;
|
||||
instance3.sendToAllAround(
|
||||
new PacketFXBlocksplosion(
|
||||
Block.getIdFromBlock(this.blocky),
|
||||
@@ -566,6 +586,7 @@ public class EntityGolemTH extends EntityGolemBase {
|
||||
this.md,
|
||||
3);
|
||||
final SimpleNetworkWrapper instance4 = PacketHandler.INSTANCE;
|
||||
final Block blocky4 = this.blocky;
|
||||
instance4.sendToAllAround(
|
||||
new PacketFXBlocksplosion(
|
||||
Block.getIdFromBlock(this.blocky),
|
||||
@@ -586,10 +607,10 @@ public class EntityGolemTH extends EntityGolemBase {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeSpawnData(final ByteBuf data) {
|
||||
super.writeSpawnData(data);
|
||||
if (this.blocky != null) {
|
||||
final Block blocky = this.blocky;
|
||||
data.writeInt(Block.getIdFromBlock(this.blocky));
|
||||
} else {
|
||||
data.writeInt(0);
|
||||
@@ -601,7 +622,6 @@ public class EntityGolemTH extends EntityGolemBase {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readSpawnData(final ByteBuf data) {
|
||||
super.readSpawnData(data);
|
||||
this.blocky = Block.getBlockById(data.readInt());
|
||||
@@ -612,38 +632,18 @@ public class EntityGolemTH extends EntityGolemBase {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCommandSenderName() {
|
||||
if (this.hasCustomNameTag()) {
|
||||
return this.getCustomNameTag();
|
||||
}
|
||||
|
||||
if (this.blocky == null || this.blocky == Blocks.air) {
|
||||
return StatCollector.translateToLocal("entity.ThaumicHorizons.GolemTH.voidling.name");
|
||||
}
|
||||
|
||||
return StatCollector.translateToLocalFormatted("entity.ThaumicHorizons.GolemTH.name", getBlockLangKey());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChatComponent func_145748_c_() {
|
||||
if (this.hasCustomNameTag()) {
|
||||
return super.func_145748_c_();
|
||||
}
|
||||
|
||||
if (this.blocky == null || this.blocky == Blocks.air) {
|
||||
return new ChatComponentTranslation("entity.ThaumicHorizons.GolemTH.voidling.name");
|
||||
}
|
||||
|
||||
return new ChatComponentTranslation("entity.ThaumicHorizons.GolemTH.name", getBlockLangKey());
|
||||
}
|
||||
|
||||
private String getBlockLangKey() {
|
||||
final ItemStack stack = new ItemStack(this.blocky, 1, this.md);
|
||||
if (stack.getItem() != null) {
|
||||
return stack.getUnlocalizedName();
|
||||
return stack.getDisplayName() + " Golem";
|
||||
}
|
||||
return this.blocky.getUnlocalizedName();
|
||||
if (this.blocky == null || this.blocky == Blocks.air) {
|
||||
return "Voidling Golem";
|
||||
}
|
||||
return this.blocky.getLocalizedName() + " Golem";
|
||||
}
|
||||
|
||||
public EnumGolemType getGolemType() {
|
||||
@@ -667,8 +667,10 @@ public class EntityGolemTH extends EntityGolemBase {
|
||||
this.action = 6;
|
||||
} else if (par1 == 5) {
|
||||
this.healing = 5;
|
||||
final String decor = this.getGolemDecoration();
|
||||
final int bonus = decor == null ? 0 : (decor.contains("H") ? 5 : 0);
|
||||
int bonus = 0;
|
||||
try {
|
||||
bonus = (this.getGolemDecoration().contains("H") ? 5 : 0);
|
||||
} catch (Exception ignored) {}
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(this.type.health + bonus);
|
||||
} else if (par1 == 6) {
|
||||
this.leftArm = 5;
|
||||
|
||||
@@ -17,9 +17,7 @@ import net.minecraft.entity.monster.EntitySkeleton;
|
||||
import net.minecraft.entity.monster.EntityZombie;
|
||||
import net.minecraft.entity.passive.EntityOcelot;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -46,32 +44,20 @@ public class EntityGravekeeper extends EntityOcelot {
|
||||
this.targetTasks.addTask(10, new EntityAINearestAttackableTarget(this, EntityInhabitedZombie.class, 0, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean attackEntityAsMob(final Entity p_70652_1_) {
|
||||
return (p_70652_1_ instanceof EntityLivingBase && ((EntityLivingBase) p_70652_1_).isEntityUndead())
|
||||
|| p_70652_1_.attackEntityFrom(DamageSource.causeMobDamage(this), 2.0f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCommandSenderName() {
|
||||
return this.hasCustomNameTag() ? this.getCustomNameTag()
|
||||
: (this.isTamed() ? StatCollector.translateToLocal("entity.ThaumicHorizons.Gravekeeper.name")
|
||||
: super.getCommandSenderName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChatComponent func_145748_c_() {
|
||||
if (this.hasCustomNameTag() || !this.isTamed()) {
|
||||
return super.func_145748_c_();
|
||||
} else {
|
||||
return new ChatComponentTranslation("entity.ThaumicHorizons.Gravekeeper.name");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateAITick() {
|
||||
super.updateAITick();
|
||||
final List<EntityLivingBase> critters = this.worldObj.getEntitiesWithinAABB(
|
||||
final List<EntityLivingBase> critters = (List<EntityLivingBase>) this.worldObj.getEntitiesWithinAABB(
|
||||
EntityLivingBase.class,
|
||||
AxisAlignedBB.getBoundingBox(
|
||||
this.posX - 5.0,
|
||||
@@ -100,14 +86,12 @@ public class EntityGravekeeper extends EntityOcelot {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit() {
|
||||
super.entityInit();
|
||||
final byte b0 = this.dataWatcher.getWatchableObjectByte(16);
|
||||
this.dataWatcher.updateObject(16, (byte) (b0 | 0x4));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTamed() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -23,9 +23,7 @@ import net.minecraft.entity.passive.EntityOcelot;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemFood;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -51,14 +49,12 @@ public class EntityGuardianPanther extends EntityOcelot implements IEntityInfuse
|
||||
this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void applyEntityAttributes() {
|
||||
super.applyEntityAttributes();
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(24.0);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.5000000119209289);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean interact(final EntityPlayer p_70085_1_) {
|
||||
final ItemStack itemstack = p_70085_1_.inventory.getCurrentItem();
|
||||
if (itemstack != null && itemstack.getItem() instanceof final ItemFood itemfood) {
|
||||
@@ -74,45 +70,30 @@ public class EntityGuardianPanther extends EntityOcelot implements IEntityInfuse
|
||||
return super.interact(p_70085_1_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean attackEntityAsMob(final Entity p_70652_1_) {
|
||||
return p_70652_1_.attackEntityFrom(DamageSource.causeMobDamage(this), 6.0f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCommandSenderName() {
|
||||
return this.hasCustomNameTag() ? this.getCustomNameTag()
|
||||
: (this.isTamed() ? StatCollector.translateToLocal("entity.ThaumicHorizons.GuardianPanther.name")
|
||||
: super.getCommandSenderName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChatComponent func_145748_c_() {
|
||||
if (this.hasCustomNameTag() || !this.isTamed()) {
|
||||
return super.func_145748_c_();
|
||||
} else {
|
||||
return new ChatComponentTranslation("entity.ThaumicHorizons.GuardianPanther.name");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateAITick() {
|
||||
super.updateAITick();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit() {
|
||||
super.entityInit();
|
||||
final byte b0 = this.dataWatcher.getWatchableObjectByte(16);
|
||||
this.dataWatcher.updateObject(16, (byte) (b0 | 0x4));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTamed() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetStats() {
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(24.0);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.5000000119209289);
|
||||
|
||||
@@ -25,7 +25,7 @@ public class EntityMedSlime extends EntitySlime {
|
||||
|
||||
public void setDead() {
|
||||
final int i = this.getSlimeSize();
|
||||
if (!this.worldObj.isRemote && i > 1 && this.getHealth() <= 0.0f) {
|
||||
if (!this.worldObj.isRemote && i > 1) {
|
||||
for (int j = 2 + this.rand.nextInt(3), k = 0; k < j; ++k) {
|
||||
final float f = (k % 2 - 0.5f) * i / 4.0f;
|
||||
final float f2 = (k / 2 - 0.5f) * i / 4.0f;
|
||||
|
||||
@@ -12,8 +12,6 @@ import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
@@ -128,16 +126,6 @@ public class EntityNightmare extends EntityEndersteed {
|
||||
return StatCollector.translateToLocal("entity.ThaumicHorizons.NightmareTH.name");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChatComponent func_145748_c_() {
|
||||
if (this.hasCustomNameTag()) {
|
||||
return super.func_145748_c_();
|
||||
} else {
|
||||
return new ChatComponentTranslation("entity.ThaumicHorizons.NightmareTH.name");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
final AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(
|
||||
this.boundingBox.minX,
|
||||
@@ -189,7 +177,6 @@ public class EntityNightmare extends EntityEndersteed {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInWeb() {
|
||||
this.isInWeb = false;
|
||||
this.fallDistance = 0.0f;
|
||||
|
||||
@@ -39,7 +39,6 @@ import io.netty.buffer.ByteBuf;
|
||||
public class EntitySyringe extends Entity implements IProjectile, IEntityAdditionalSpawnData {
|
||||
|
||||
public int color;
|
||||
public int canBePickedUp;
|
||||
public NBTTagCompound effects;
|
||||
private boolean inGround;
|
||||
private int field_145791_d;
|
||||
@@ -51,6 +50,7 @@ public class EntitySyringe extends Entity implements IProjectile, IEntityAdditio
|
||||
private int ticksInAir;
|
||||
private int knockbackStrength;
|
||||
private EntityLivingBase shootingEntity;
|
||||
private int canBePickedUp;
|
||||
private byte arrowShake;
|
||||
private double damage;
|
||||
|
||||
@@ -146,13 +146,6 @@ public class EntitySyringe extends Entity implements IProjectile, IEntityAdditio
|
||||
this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5f, 1.0f);
|
||||
}
|
||||
|
||||
public EntitySyringe(World world, double x, double y, double z, NBTTagCompound effects) {
|
||||
this(world, x, y, z);
|
||||
this.effects = effects;
|
||||
this.color = this.effects.getInteger("color");
|
||||
this.canBePickedUp = 1;
|
||||
}
|
||||
|
||||
public void writeEntityToNBT(final NBTTagCompound p_70014_1_) {
|
||||
p_70014_1_.setTag("effects", this.effects);
|
||||
p_70014_1_.setShort("xTile", (short) this.field_145791_d);
|
||||
|
||||
@@ -31,7 +31,7 @@ public class EntityAIHurtByTargetTH extends EntityAITargetTH {
|
||||
this.field_142052_b = this.taskOwner.func_142015_aE();
|
||||
if (this.entityCallsForHelp) {
|
||||
final double d0 = this.getTargetDistance();
|
||||
final List<? extends EntityLiving> list = this.taskOwner.worldObj.getEntitiesWithinAABB(
|
||||
final List<EntityLiving> list = this.taskOwner.worldObj.getEntitiesWithinAABB(
|
||||
this.taskOwner.getClass(),
|
||||
AxisAlignedBB.getBoundingBox(
|
||||
this.taskOwner.posX,
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
package com.kentington.thaumichorizons.common.handlers;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.block.BlockDispenser;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.dispenser.BehaviorDefaultDispenseItem;
|
||||
import net.minecraft.dispenser.IBlockSource;
|
||||
import net.minecraft.entity.item.EntityBoat;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BehaviorDispenseBoat extends BehaviorDefaultDispenseItem {
|
||||
|
||||
public interface BoatFactory {
|
||||
|
||||
EntityBoat create(World world, double x, double y, double z);
|
||||
}
|
||||
|
||||
private final Set<Material> validMaterials;
|
||||
private final BoatFactory boatFactory;
|
||||
|
||||
public BehaviorDispenseBoat(Set<Material> validMaterials, BoatFactory boatFactory) {
|
||||
this.validMaterials = validMaterials;
|
||||
this.boatFactory = boatFactory;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ItemStack dispenseStack(IBlockSource dispenser, ItemStack stack) {
|
||||
EnumFacing facing = BlockDispenser.func_149937_b(dispenser.getBlockMetadata());
|
||||
World world = dispenser.getWorld();
|
||||
|
||||
// Calculate spawn position slightly in front of the dispenser
|
||||
double spawnX = dispenser.getX() + (facing.getFrontOffsetX() * 1.25F);
|
||||
double spawnY = dispenser.getY() + (facing.getFrontOffsetY() * 1.125F) - 0.5F;
|
||||
double spawnZ = dispenser.getZ() + (facing.getFrontOffsetZ() * 1.25F);
|
||||
|
||||
// Block coordinates in front of the dispenser
|
||||
int targetX = dispenser.getXInt() + facing.getFrontOffsetX();
|
||||
int targetY = dispenser.getYInt() + facing.getFrontOffsetY();
|
||||
int targetZ = dispenser.getZInt() + facing.getFrontOffsetZ();
|
||||
|
||||
Material frontMaterial = world.getBlock(targetX, targetY, targetZ).getMaterial();
|
||||
|
||||
if (validMaterials.contains(frontMaterial)) {
|
||||
spawnY++;
|
||||
} else if (!Material.air.equals(frontMaterial)) {
|
||||
return stack;
|
||||
}
|
||||
|
||||
EntityBoat boat = boatFactory.create(world, spawnX, spawnY, spawnZ);
|
||||
|
||||
boat.rotationYaw = switch (facing) {
|
||||
case NORTH -> 90.0F;
|
||||
case WEST -> 180.0F;
|
||||
case EAST -> 0.0F;
|
||||
default -> -90.0F; // SOUTH or other
|
||||
};
|
||||
|
||||
world.spawnEntityInWorld(boat);
|
||||
|
||||
stack.stackSize--;
|
||||
return stack;
|
||||
}
|
||||
}
|
||||
@@ -96,9 +96,9 @@ public class ItemFocusDisintegration extends ItemFocusBasic {
|
||||
if (!wand.consumeAllVis(stack, p, this.getVisCost(stack), false, true)) {
|
||||
p.stopUsingItem();
|
||||
} else {
|
||||
String pp = "SP|" + p.getCommandSenderName();
|
||||
String pp = "R" + p.getCommandSenderName();
|
||||
if (!p.worldObj.isRemote) {
|
||||
pp = "MP|" + p.getCommandSenderName();
|
||||
pp = "S" + p.getCommandSenderName();
|
||||
}
|
||||
ItemFocusDisintegration.soundDelay.putIfAbsent(pp, 0L);
|
||||
ItemFocusDisintegration.breakcount.putIfAbsent(pp, 0.0f);
|
||||
|
||||
@@ -89,72 +89,57 @@ public class ItemFocusLiquefaction extends ItemFocusBasic {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUsingFocusTick(final ItemStack stack, final EntityPlayer player, final int count) {
|
||||
public void onUsingFocusTick(final ItemStack stack, final EntityPlayer p, final int count) {
|
||||
final ItemWandCasting wand = (ItemWandCasting) stack.getItem();
|
||||
final int size = 2 + wand.getFocusEnlarge(stack) * 8;
|
||||
if (!wand.consumeAllVis(stack, player, this.getVisCost(stack), false, true)) {
|
||||
player.stopUsingItem();
|
||||
if (!wand.consumeAllVis(stack, p, this.getVisCost(stack), false, true)) {
|
||||
p.stopUsingItem();
|
||||
} else {
|
||||
String playerProfile = "SP|" + player.getCommandSenderName();
|
||||
if (!player.worldObj.isRemote) {
|
||||
playerProfile = "MP|" + player.getCommandSenderName();
|
||||
String pp = "R" + p.getCommandSenderName();
|
||||
if (!p.worldObj.isRemote) {
|
||||
pp = "S" + p.getCommandSenderName();
|
||||
}
|
||||
ItemFocusLiquefaction.soundDelay.putIfAbsent(playerProfile, 0L);
|
||||
ItemFocusLiquefaction.breakcount.putIfAbsent(playerProfile, 0.0f);
|
||||
ItemFocusLiquefaction.lastX.putIfAbsent(playerProfile, 0);
|
||||
ItemFocusLiquefaction.lastY.putIfAbsent(playerProfile, 0);
|
||||
ItemFocusLiquefaction.lastZ.putIfAbsent(playerProfile, 0);
|
||||
|
||||
final MovingObjectPosition mop = BlockUtils.getTargetBlock(player.worldObj, player, true);
|
||||
final Entity ent = getPointedEntity(player.worldObj, player, 10.0);
|
||||
final Vec3 v = player.getLookVec();
|
||||
double tx = player.posX + v.xCoord * 10.0;
|
||||
double ty = player.posY + v.yCoord * 10.0;
|
||||
double tz = player.posZ + v.zCoord * 10.0;
|
||||
ItemFocusLiquefaction.soundDelay.putIfAbsent(pp, 0L);
|
||||
ItemFocusLiquefaction.breakcount.putIfAbsent(pp, 0.0f);
|
||||
ItemFocusLiquefaction.lastX.putIfAbsent(pp, 0);
|
||||
ItemFocusLiquefaction.lastY.putIfAbsent(pp, 0);
|
||||
ItemFocusLiquefaction.lastZ.putIfAbsent(pp, 0);
|
||||
final MovingObjectPosition mop = BlockUtils.getTargetBlock(p.worldObj, p, true);
|
||||
final Entity ent = getPointedEntity(p.worldObj, p, 10.0);
|
||||
final Vec3 v = p.getLookVec();
|
||||
double tx = p.posX + v.xCoord * 10.0;
|
||||
double ty = p.posY + v.yCoord * 10.0;
|
||||
double tz = p.posZ + v.zCoord * 10.0;
|
||||
byte impact = 0;
|
||||
|
||||
ItemStack droppedItem = null;
|
||||
ItemStack resultItem = null;
|
||||
|
||||
if (ent instanceof EntityItem) {
|
||||
droppedItem = ((EntityItem) ent).getEntityItem();
|
||||
if (droppedItem != null && droppedItem.stackSize > 0) {
|
||||
ItemStack smeltingOutput = FurnaceRecipes.smelting().getSmeltingResult(droppedItem);
|
||||
if (smeltingOutput != null) {
|
||||
resultItem = smeltingOutput.copy();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ent instanceof EntityLiving) {
|
||||
tx = ent.posX;
|
||||
ty = ent.posY;
|
||||
tz = ent.posZ;
|
||||
impact = 5;
|
||||
if (!player.worldObj.isRemote
|
||||
&& ItemFocusLiquefaction.soundDelay.get(playerProfile) < System.currentTimeMillis()) {
|
||||
player.worldObj.playSoundEffect(tx, ty, tz, "fire.fire", 0.3f, 1.0f);
|
||||
ItemFocusLiquefaction.soundDelay.put(playerProfile, System.currentTimeMillis() + 1200L);
|
||||
}
|
||||
} else if (resultItem == null && mop != null) {
|
||||
if ((ent == null || (ent instanceof EntityItem
|
||||
&& FurnaceRecipes.smelting().getSmeltingResult(((EntityItem) ent).getEntityItem()) == null))
|
||||
&& mop != null) {
|
||||
tx = mop.hitVec.xCoord;
|
||||
ty = mop.hitVec.yCoord;
|
||||
tz = mop.hitVec.zCoord;
|
||||
impact = 5;
|
||||
if (!player.worldObj.isRemote
|
||||
&& ItemFocusLiquefaction.soundDelay.get(playerProfile) < System.currentTimeMillis()) {
|
||||
player.worldObj.playSoundEffect(tx, ty, tz, "fire.fire", 8.0f, 1.0f);
|
||||
ItemFocusLiquefaction.soundDelay.put(playerProfile, System.currentTimeMillis() + 1200L);
|
||||
if (!p.worldObj.isRemote && ItemFocusLiquefaction.soundDelay.get(pp) < System.currentTimeMillis()) {
|
||||
p.worldObj.playSoundEffect(tx, ty, tz, "fire.fire", 8.0f, 1.0f);
|
||||
ItemFocusLiquefaction.soundDelay.put(pp, System.currentTimeMillis() + 1200L);
|
||||
}
|
||||
} else if (ent != null) {
|
||||
tx = ent.posX;
|
||||
ty = ent.posY;
|
||||
tz = ent.posZ;
|
||||
impact = 5;
|
||||
if (!p.worldObj.isRemote && ItemFocusLiquefaction.soundDelay.get(pp) < System.currentTimeMillis()) {
|
||||
p.worldObj.playSoundEffect(tx, ty, tz, "fire.fire", 0.3f, 1.0f);
|
||||
ItemFocusLiquefaction.soundDelay.put(pp, System.currentTimeMillis() + 1200L);
|
||||
}
|
||||
} else {
|
||||
ItemFocusLiquefaction.soundDelay.put(playerProfile, 0L);
|
||||
ItemFocusLiquefaction.soundDelay.put(pp, 0L);
|
||||
}
|
||||
if (player.worldObj.isRemote) {
|
||||
if (p.worldObj.isRemote) {
|
||||
ItemFocusLiquefaction.beam.put(
|
||||
playerProfile,
|
||||
pp,
|
||||
Thaumcraft.proxy.beamCont(
|
||||
player.worldObj,
|
||||
player,
|
||||
p.worldObj,
|
||||
p,
|
||||
tx,
|
||||
ty,
|
||||
tz,
|
||||
@@ -162,62 +147,47 @@ public class ItemFocusLiquefaction extends ItemFocusBasic {
|
||||
16729156,
|
||||
false,
|
||||
(impact > 0) ? ((float) size) : 0.0f,
|
||||
ItemFocusLiquefaction.beam.get(playerProfile),
|
||||
ItemFocusLiquefaction.beam.get(pp),
|
||||
5));
|
||||
}
|
||||
|
||||
if (ent instanceof EntityLiving) {
|
||||
if (wand.consumeAllVis(stack, player, ItemFocusLiquefaction.costCritter, true, true)) {
|
||||
ThaumicHorizons.proxy.smeltFX(ent.posX - 0.5, ent.posY, ent.posZ - 0.5, player.worldObj, 5, false);
|
||||
ent.attackEntityFrom(DamageSource.inFire, 1.0f + 0.5f * wand.getFocusPotency(stack));
|
||||
}
|
||||
} else if (resultItem != null) {
|
||||
final int quantity = ((EntityItem) ent).getEntityItem().stackSize;
|
||||
if (wand.consumeAllVis(stack, player, this.getVisCost(stack), true, true)) {
|
||||
ThaumicHorizons.proxy
|
||||
.smeltFX(ent.posX - 0.5, ent.posY, ent.posZ - 0.5, player.worldObj, 5 * quantity, false);
|
||||
|
||||
resultItem.stackSize = quantity;
|
||||
((EntityItem) ent).setEntityItemStack(resultItem);
|
||||
}
|
||||
} else if (mop != null && mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
|
||||
final Block block = player.worldObj.getBlock(mop.blockX, mop.blockY, mop.blockZ);
|
||||
final int meta = player.worldObj.getBlockMetadata(mop.blockX, mop.blockY, mop.blockZ);
|
||||
final ItemStack resultBlock = FurnaceRecipes.smelting()
|
||||
.getSmeltingResult(new ItemStack(block, 1, meta));
|
||||
final int meltingBehaviour = this.isMeltableBlock(block, meta);
|
||||
final boolean flammable = block
|
||||
.isFlammable(player.worldObj, mop.blockX, mop.blockY, mop.blockZ, ForgeDirection.UNKNOWN);
|
||||
if (meltingBehaviour > 0 || flammable || resultBlock != null) {
|
||||
if ((ent == null || (!(ent instanceof EntityLiving) && (!(ent instanceof EntityItem)
|
||||
|| FurnaceRecipes.smelting().getSmeltingResult(((EntityItem) ent).getEntityItem()) == null)))
|
||||
&& mop != null
|
||||
&& mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
|
||||
final Block bi = p.worldObj.getBlock(mop.blockX, mop.blockY, mop.blockZ);
|
||||
final int md = p.worldObj.getBlockMetadata(mop.blockX, mop.blockY, mop.blockZ);
|
||||
final int meltable = this.isMeltableBlock(bi, md);
|
||||
final boolean flammable = bi
|
||||
.isFlammable(p.worldObj, mop.blockX, mop.blockY, mop.blockZ, ForgeDirection.UNKNOWN);
|
||||
if (meltable > 0 || flammable
|
||||
|| FurnaceRecipes.smelting().getSmeltingResult(new ItemStack(bi, 1, md)) != null) {
|
||||
final int pot = wand.getFocusPotency(stack);
|
||||
final float speed = 0.15f + pot * 0.05f;
|
||||
float hardness = 2.0f;
|
||||
|
||||
if (meltingBehaviour == 6) {
|
||||
if (meltable > 0
|
||||
|| bi.isFlammable(p.worldObj, mop.blockX, mop.blockY, mop.blockZ, ForgeDirection.UP)) {
|
||||
hardness = 0.25f;
|
||||
}
|
||||
if (meltable == 6) {
|
||||
hardness = 20.0f;
|
||||
} else if (meltingBehaviour > 0 || block
|
||||
.isFlammable(player.worldObj, mop.blockX, mop.blockY, mop.blockZ, ForgeDirection.UP)) {
|
||||
hardness = 0.25f;
|
||||
}
|
||||
|
||||
if (ItemFocusLiquefaction.lastX.get(playerProfile) == mop.blockX
|
||||
&& ItemFocusLiquefaction.lastY.get(playerProfile) == mop.blockY
|
||||
&& ItemFocusLiquefaction.lastZ.get(playerProfile) == mop.blockZ) {
|
||||
final float breakcount = ItemFocusLiquefaction.breakcount.get(playerProfile);
|
||||
|
||||
if (player.worldObj.isRemote) {
|
||||
if (breakcount > 0.0f) {
|
||||
ThaumicHorizons.proxy
|
||||
.smeltFX(mop.blockX, mop.blockY, mop.blockZ, player.worldObj, 15, size > 2);
|
||||
}
|
||||
if (breakcount >= hardness) {
|
||||
player.worldObj.playAuxSFX(2001, mop.blockX, mop.blockY, mop.blockZ, 0);
|
||||
ItemFocusLiquefaction.breakcount.put(playerProfile, 0.0f);
|
||||
}
|
||||
if (ItemFocusLiquefaction.lastX.get(pp) == mop.blockX
|
||||
&& ItemFocusLiquefaction.lastY.get(pp) == mop.blockY
|
||||
&& ItemFocusLiquefaction.lastZ.get(pp) == mop.blockZ) {
|
||||
final float bc = ItemFocusLiquefaction.breakcount.get(pp);
|
||||
if (p.worldObj.isRemote && bc > 0.0f && bi != null) {
|
||||
final int gt = (int) (bc / hardness * 9.0f);
|
||||
ThaumicHorizons.proxy.smeltFX(mop.blockX, mop.blockY, mop.blockZ, p.worldObj, 15, size > 2);
|
||||
}
|
||||
if (p.worldObj.isRemote) {
|
||||
if (bc >= hardness) {
|
||||
p.worldObj.playAuxSFX(2001, mop.blockX, mop.blockY, mop.blockZ, 0);
|
||||
ItemFocusLiquefaction.breakcount.put(pp, 0.0f);
|
||||
} else {
|
||||
ItemFocusLiquefaction.breakcount.put(playerProfile, breakcount + speed);
|
||||
ItemFocusLiquefaction.breakcount.put(pp, bc + speed);
|
||||
}
|
||||
} else if (breakcount >= hardness) {
|
||||
this.processBlock(mop.blockX, mop.blockY, mop.blockZ, wand, stack, player, playerProfile);
|
||||
} else if (bc >= hardness) {
|
||||
this.processBlock(mop.blockX, mop.blockY, mop.blockZ, wand, stack, p, pp);
|
||||
if (size > 2) {
|
||||
for (int x = -1; x < 2; ++x) {
|
||||
for (int y = -1; y < 2; ++y) {
|
||||
@@ -229,36 +199,52 @@ public class ItemFocusLiquefaction extends ItemFocusBasic {
|
||||
mop.blockZ + z,
|
||||
wand,
|
||||
stack,
|
||||
player,
|
||||
playerProfile);
|
||||
p,
|
||||
pp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ItemFocusLiquefaction.breakcount.put(playerProfile, breakcount + speed);
|
||||
ItemFocusLiquefaction.breakcount.put(pp, bc + speed);
|
||||
}
|
||||
} else {
|
||||
ItemFocusLiquefaction.lastX.put(playerProfile, mop.blockX);
|
||||
ItemFocusLiquefaction.lastY.put(playerProfile, mop.blockY);
|
||||
ItemFocusLiquefaction.lastZ.put(playerProfile, mop.blockZ);
|
||||
ItemFocusLiquefaction.breakcount.put(playerProfile, 0.0f);
|
||||
ItemFocusLiquefaction.lastX.put(pp, mop.blockX);
|
||||
ItemFocusLiquefaction.lastY.put(pp, mop.blockY);
|
||||
ItemFocusLiquefaction.lastZ.put(pp, mop.blockZ);
|
||||
ItemFocusLiquefaction.breakcount.put(pp, 0.0f);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ItemFocusLiquefaction.lastX.put(playerProfile, Integer.MAX_VALUE);
|
||||
ItemFocusLiquefaction.lastY.put(playerProfile, Integer.MAX_VALUE);
|
||||
ItemFocusLiquefaction.lastZ.put(playerProfile, Integer.MAX_VALUE);
|
||||
ItemFocusLiquefaction.breakcount.put(playerProfile, 0.0f);
|
||||
}
|
||||
} else if (ent instanceof EntityLiving
|
||||
&& wand.consumeAllVis(stack, p, ItemFocusLiquefaction.costCritter, true, true)) {
|
||||
ThaumicHorizons.proxy.smeltFX(ent.posX - 0.5, ent.posY, ent.posZ - 0.5, p.worldObj, 5, false);
|
||||
ent.attackEntityFrom(DamageSource.inFire, 1.0f + 0.5f * wand.getFocusPotency(stack));
|
||||
} else
|
||||
if (ent instanceof EntityItem
|
||||
&& FurnaceRecipes.smelting().getSmeltingResult(((EntityItem) ent).getEntityItem()) != null) {
|
||||
final int num = ((EntityItem) ent).getEntityItem().stackSize;
|
||||
if (wand.consumeAllVis(stack, p, this.getVisCost(stack), true, true)) {
|
||||
ThaumicHorizons.proxy
|
||||
.smeltFX(ent.posX - 0.5, ent.posY, ent.posZ - 0.5, p.worldObj, 5 * num, false);
|
||||
final ItemStack stacky = FurnaceRecipes.smelting()
|
||||
.getSmeltingResult(((EntityItem) ent).getEntityItem());
|
||||
stacky.stackSize = num;
|
||||
((EntityItem) ent).setEntityItemStack(stacky);
|
||||
}
|
||||
} else {
|
||||
ItemFocusLiquefaction.lastX.put(pp, Integer.MAX_VALUE);
|
||||
ItemFocusLiquefaction.lastY.put(pp, Integer.MAX_VALUE);
|
||||
ItemFocusLiquefaction.lastZ.put(pp, Integer.MAX_VALUE);
|
||||
ItemFocusLiquefaction.breakcount.put(pp, 0.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onPlayerStoppedUsing(final ItemStack stack, final World world, final EntityPlayer p, final int count) {
|
||||
String pp = "SP|" + p.getCommandSenderName();
|
||||
String pp = "R" + p.getCommandSenderName();
|
||||
if (!p.worldObj.isRemote) {
|
||||
pp = "MP|" + p.getCommandSenderName();
|
||||
pp = "S" + p.getCommandSenderName();
|
||||
}
|
||||
ItemFocusLiquefaction.soundDelay.putIfAbsent(pp, 0L);
|
||||
ItemFocusLiquefaction.breakcount.putIfAbsent(pp, 0.0f);
|
||||
|
||||
@@ -50,11 +50,8 @@ public class ItemKeystone extends Item {
|
||||
|
||||
public void addInformation(final ItemStack par1ItemStack, final EntityPlayer par2EntityPlayer, final List par3List,
|
||||
final boolean par4) {
|
||||
if (par1ItemStack.getTagCompound() != null) {
|
||||
final int dim = par1ItemStack.getTagCompound().getInteger("dimension");
|
||||
if (dim >= 0 && dim < PocketPlaneData.planes.size()) {
|
||||
par3List.add(PocketPlaneData.planes.get(dim).name);
|
||||
}
|
||||
if (par1ItemStack.getTagCompound() != null && par1ItemStack.getTagCompound().getInteger("dimension") != 0) {
|
||||
par3List.add(PocketPlaneData.planes.get(par1ItemStack.getTagCompound().getInteger("dimension")).name);
|
||||
}
|
||||
super.addInformation(par1ItemStack, par2EntityPlayer, par3List, par4);
|
||||
}
|
||||
@@ -74,13 +71,9 @@ public class ItemKeystone extends Item {
|
||||
float hitX, float hitY, float hitZ) {
|
||||
if (stack.getTagCompound() == null && player.dimension == ThaumicHorizons.dimensionPocketId
|
||||
&& !world.isRemote) {
|
||||
if (world.getTileEntity(x, y, z) instanceof final TileVortex vortex) {
|
||||
stack.stackTagCompound = new NBTTagCompound();
|
||||
stack.stackTagCompound.setInteger("dimension", vortex.dimensionID);
|
||||
player.inventory.markDirty();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
if (world.getTileEntity(x, y, z) instanceof TileVortex)
|
||||
(stack.stackTagCompound = new NBTTagCompound()).setInteger("dimension", (z + 128) / 256);
|
||||
return true;
|
||||
}
|
||||
return super.onItemUseFirst(stack, player, world, x, y, z, side, hitX, hitY, hitZ);
|
||||
}
|
||||
|
||||
@@ -36,20 +36,14 @@ public class ItemLensFire extends Item implements ILens {
|
||||
|
||||
public void handleRender(final Minecraft mc, final float partialTicks) {
|
||||
final boolean inWater = mc.thePlayer.isInsideOfMaterial(Material.water);
|
||||
final PotionEffect effect = mc.thePlayer.getActivePotionEffect(Potion.nightVision);
|
||||
|
||||
if (!inWater) {
|
||||
// Apply effect.
|
||||
if ((effect == null || (isEffectGrantedByLens(effect) && effect.getDuration() < 242))
|
||||
&& Minecraft.getSystemTime() > LensManager.nightVisionOffTime) {
|
||||
LensManager.nightVisionOffTime = Minecraft.getSystemTime();
|
||||
mc.thePlayer.addPotionEffect(new IlluminePotionEffect(Potion.nightVision.id, 255, -1, true));
|
||||
}
|
||||
} else {
|
||||
// Remove effect.
|
||||
if (isEffectGrantedByLens(effect)) {
|
||||
mc.thePlayer.removePotionEffect(Potion.nightVision.id);
|
||||
}
|
||||
if (!inWater
|
||||
&& (mc.thePlayer.getActivePotionEffect(Potion.nightVision) == null
|
||||
|| mc.thePlayer.getActivePotionEffect(Potion.nightVision).getDuration() < 242)
|
||||
&& Minecraft.getSystemTime() > LensManager.nightVisionOffTime) {
|
||||
LensManager.nightVisionOffTime = Minecraft.getSystemTime();
|
||||
mc.thePlayer.addPotionEffect(new PotionEffect(Potion.nightVision.id, 255, 0, true));
|
||||
} else if (inWater) {
|
||||
mc.thePlayer.removePotionEffect(Potion.nightVision.id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,30 +62,7 @@ public class ItemLensFire extends Item implements ILens {
|
||||
}
|
||||
|
||||
public void handleRemoval(final EntityPlayer p) {
|
||||
if (isEffectGrantedByLens(p.getActivePotionEffect(Potion.nightVision))) {
|
||||
p.removePotionEffect(Potion.nightVision.id);
|
||||
PacketHandler.INSTANCE.sendTo(new PacketRemoveNightvision(), (EntityPlayerMP) p);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isEffectGrantedByLens(PotionEffect effect) {
|
||||
return effect instanceof IlluminePotionEffect illumineEffect && illumineEffect.isGrantedByLens;
|
||||
}
|
||||
|
||||
private static class IlluminePotionEffect extends PotionEffect {
|
||||
|
||||
public boolean isGrantedByLens;
|
||||
|
||||
public IlluminePotionEffect(int potionID, int duration, int amplifier, boolean isAmbient) {
|
||||
super(potionID, duration, amplifier, isAmbient);
|
||||
isGrantedByLens = true;
|
||||
}
|
||||
|
||||
public void combine(PotionEffect effect) {
|
||||
// If this is replaced by another night vision effect, for example from drinking a potion, it should not be
|
||||
// turned off by the lens.
|
||||
super.combine(effect);
|
||||
isGrantedByLens = effect instanceof IlluminePotionEffect;
|
||||
}
|
||||
p.removePotionEffect(Potion.nightVision.id);
|
||||
PacketHandler.INSTANCE.sendTo(new PacketRemoveNightvision(), (EntityPlayerMP) p);
|
||||
}
|
||||
}
|
||||
@@ -85,6 +85,10 @@ public class ItemLensOrderEntropy extends Item implements ILens {
|
||||
try {
|
||||
text = stack.getDisplayName();
|
||||
} catch (Exception ignored) {}
|
||||
} else if (stack.getItem() != null) {
|
||||
try {
|
||||
text = stack.getItem().getItemStackDisplayName(stack);
|
||||
} catch (Exception ignored) {}
|
||||
}
|
||||
}
|
||||
if (scan.type == 2) {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
package com.kentington.thaumichorizons.common.lib;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -24,6 +25,7 @@ import net.minecraft.entity.passive.EntityAnimal;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.Potion;
|
||||
@@ -67,8 +69,7 @@ import com.kentington.thaumichorizons.common.lib.networking.PacketPlayerInfusion
|
||||
import com.kentington.thaumichorizons.common.tiles.TileSoulBeacon;
|
||||
import com.kentington.thaumichorizons.common.tiles.TileVat;
|
||||
|
||||
import baubles.common.container.InventoryBaubles;
|
||||
import baubles.common.lib.PlayerHandler;
|
||||
import baubles.api.BaublesApi;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -81,7 +82,6 @@ import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
import thaumcraft.common.entities.EntityAspectOrb;
|
||||
import thaumcraft.common.entities.EntityFollowingItem;
|
||||
import thaumcraft.common.entities.EntityPermanentItem;
|
||||
import thaumcraft.common.items.relics.ItemHandMirror;
|
||||
import thaumcraft.common.lib.network.fx.PacketFXShield;
|
||||
import thaumcraft.common.lib.utils.EntityUtils;
|
||||
@@ -171,9 +171,7 @@ public class EventHandlerEntity {
|
||||
final PotionEffect effect = new PotionEffect(Potion.resistance.id, Integer.MAX_VALUE, 0, true);
|
||||
effect.setCurativeItems(new ArrayList<>());
|
||||
entity.addPotionEffect(effect);
|
||||
if (entity.worldObj.isRemote) {
|
||||
ThaumicHorizons.instance.renderEventHandler.thingsThatSparkle.add(entity);
|
||||
}
|
||||
ThaumicHorizons.instance.renderEventHandler.thingsThatSparkle.add(entity);
|
||||
} else if (infusions[i] == 8 && !entity.getEntityData().hasKey("runicCharge")) {
|
||||
entity.getEntityData().setInteger("runicCharge", 6);
|
||||
} else if (infusions[i] == 7) {
|
||||
@@ -680,7 +678,6 @@ public class EventHandlerEntity {
|
||||
}
|
||||
if (!event.entity.worldObj.isRemote && event.entity instanceof final EntityPlayer player
|
||||
&& event.entityLiving.getHealth() - event.ammount <= 0.0f) {
|
||||
// Clear player infusions
|
||||
if (prop.tumorWarpPermanent > 0 || prop.tumorWarp > 0 || prop.tumorWarpTemp > 0) {
|
||||
Thaumcraft.proxy.getPlayerKnowledge()
|
||||
.addWarpPerm(event.entity.getCommandSenderName(), prop.tumorWarpPermanent);
|
||||
@@ -690,136 +687,150 @@ public class EventHandlerEntity {
|
||||
.addWarpTemp(event.entity.getCommandSenderName(), prop.tumorWarpTemp);
|
||||
}
|
||||
prop.resetPlayerInfusions();
|
||||
|
||||
// Mirrored Amulet returning items
|
||||
ItemStack amulet = null;
|
||||
for (ItemStack bauble : PlayerHandler.getPlayerBaubles(player).stackList) {
|
||||
if (bauble != null && bauble.getItem() instanceof ItemAmuletMirror) {
|
||||
amulet = bauble;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (amulet != null) {
|
||||
boolean transportedSomething = false;
|
||||
for (int i = 0; i < player.inventory.armorInventory.length; ++i) {
|
||||
final ItemStack item = player.inventory.armorInventory[i];
|
||||
if (item != null && ItemHandMirror.transport(amulet, item, player, player.worldObj)) {
|
||||
transportedSomething = true;
|
||||
player.inventory.armorInventory[i] = null;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < player.inventory.mainInventory.length; ++i) {
|
||||
final ItemStack item = player.inventory.mainInventory[i];
|
||||
if (item != null && ItemHandMirror.transport(amulet, item, player, player.worldObj)) {
|
||||
transportedSomething = true;
|
||||
player.inventory.mainInventory[i] = null;
|
||||
}
|
||||
}
|
||||
InventoryBaubles baubles = PlayerHandler.getPlayerBaubles(player);
|
||||
int amuletIndex = 0;
|
||||
for (int i = 0; i < baubles.stackList.length; ++i) {
|
||||
final ItemStack item = baubles.stackList[i];
|
||||
if (item == amulet) {
|
||||
amuletIndex = i;
|
||||
} else if (item != null && ItemHandMirror.transport(amulet, item, player, player.worldObj)) {
|
||||
transportedSomething = true;
|
||||
baubles.stackList[i] = null;
|
||||
}
|
||||
}
|
||||
PlayerHandler.setPlayerBaubles(player, baubles);
|
||||
if (transportedSomething) {
|
||||
baubles.stackList[amuletIndex] = null;
|
||||
PlayerHandler.setPlayerBaubles(player, baubles);
|
||||
PacketHandler.INSTANCE.sendToAllAround(
|
||||
new PacketFXContainment(
|
||||
final IInventory baubles = BaublesApi.getBaubles(player);
|
||||
for (int a = 0; a < 4; ++a) {
|
||||
final ItemStack amulet = baubles.getStackInSlot(a);
|
||||
if (amulet != null) {
|
||||
if (amulet.getItem() instanceof ItemAmuletMirror) {
|
||||
boolean transportedSomething = false;
|
||||
for (int i = 0; i < player.inventory.armorInventory.length; ++i) {
|
||||
final ItemStack item = player.inventory.armorInventory[i];
|
||||
if (item != null && ItemHandMirror.transport(amulet, item, player, player.worldObj)) {
|
||||
transportedSomething = true;
|
||||
player.inventory.armorInventory[i] = null;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < player.inventory.mainInventory.length; ++i) {
|
||||
final ItemStack item = player.inventory.mainInventory[i];
|
||||
if (item != null && ItemHandMirror.transport(amulet, item, player, player.worldObj)) {
|
||||
transportedSomething = true;
|
||||
player.inventory.mainInventory[i] = null;
|
||||
}
|
||||
}
|
||||
for (int b = 0; b < 4; ++b) {
|
||||
if (a != b && baubles.getStackInSlot(b) != null
|
||||
&& ItemHandMirror
|
||||
.transport(amulet, baubles.getStackInSlot(b), player, player.worldObj)) {
|
||||
transportedSomething = true;
|
||||
baubles.setInventorySlotContents(b, null);
|
||||
}
|
||||
}
|
||||
if (transportedSomething) {
|
||||
PacketHandler.INSTANCE.sendToAllAround(
|
||||
new PacketFXContainment(
|
||||
player.posX,
|
||||
player.posY + player.getEyeHeight(),
|
||||
player.posZ),
|
||||
new NetworkRegistry.TargetPoint(
|
||||
player.worldObj.provider.dimensionId,
|
||||
player.posX,
|
||||
player.posY,
|
||||
player.posZ,
|
||||
32.0));
|
||||
player.worldObj.playSoundEffect(
|
||||
player.posX,
|
||||
player.posY + player.getEyeHeight(),
|
||||
player.posZ),
|
||||
new NetworkRegistry.TargetPoint(
|
||||
player.worldObj.provider.dimensionId,
|
||||
player.posZ,
|
||||
"thaumcraft:craftfail",
|
||||
1.0f,
|
||||
1.0f);
|
||||
baubles.setInventorySlotContents(a, null);
|
||||
player.inventory.markDirty();
|
||||
baubles.markDirty();
|
||||
final ItemStack droppedPearl = new ItemStack(ConfigItems.itemEldritchObject, 1, 3);
|
||||
final EntityItem drop = new EntityItem(
|
||||
player.worldObj,
|
||||
player.posX,
|
||||
player.posY,
|
||||
player.posZ,
|
||||
32.0));
|
||||
player.worldObj.playSoundEffect(
|
||||
player.posX,
|
||||
player.posY + player.getEyeHeight(),
|
||||
player.posZ,
|
||||
"thaumcraft:craftfail",
|
||||
1.0f,
|
||||
1.0f);
|
||||
player.inventory.markDirty();
|
||||
final ItemStack droppedPearl = new ItemStack(ConfigItems.itemEldritchObject, 1, 3);
|
||||
final EntityPermanentItem drop = new EntityPermanentItem(
|
||||
player.worldObj,
|
||||
player.posX,
|
||||
player.posY,
|
||||
player.posZ,
|
||||
droppedPearl);
|
||||
player.worldObj.spawnEntityInWorld(drop);
|
||||
droppedPearl);
|
||||
player.worldObj.spawnEntityInWorld(drop);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Return to Soul Beacon before death
|
||||
if (player.getEntityData().getBoolean("soulBeacon")) {
|
||||
final int dim = player.getEntityData().getInteger("soulBeaconDim");
|
||||
final World beaconWorld = MinecraftServer.getServer().worldServerForDimension(dim);
|
||||
final World playerWorld = player.worldObj;
|
||||
final int x = player.getEntityData().getIntArray("soulBeaconCoords")[0];
|
||||
final int y = player.getEntityData().getIntArray("soulBeaconCoords")[1];
|
||||
final int z = player.getEntityData().getIntArray("soulBeaconCoords")[2];
|
||||
if (beaconWorld.getTileEntity(x, y, z) instanceof TileSoulBeacon
|
||||
&& beaconWorld.getTileEntity(x, y - 1, z) instanceof TileVat vat
|
||||
&& vat.mode == 4) {
|
||||
event.setCanceled(true);
|
||||
event.ammount = 0.0f;
|
||||
playerWorld.createExplosion(
|
||||
}
|
||||
if (!event.entity.worldObj.isRemote && event.entityLiving instanceof EntityPlayer
|
||||
&& event.entityLiving.getHealth() - event.ammount <= 0.0f
|
||||
&& event.entityLiving.getEntityData().getBoolean("soulBeacon")) {
|
||||
final EntityPlayer player = (EntityPlayer) event.entity;
|
||||
final int dim = player.getEntityData().getInteger("soulBeaconDim");
|
||||
final World world = MinecraftServer.getServer().worldServerForDimension(dim);
|
||||
final int x = player.getEntityData().getIntArray("soulBeaconCoords")[0];
|
||||
final int y = player.getEntityData().getIntArray("soulBeaconCoords")[1];
|
||||
final int z = player.getEntityData().getIntArray("soulBeaconCoords")[2];
|
||||
if (world.getTileEntity(x, y, z) instanceof TileSoulBeacon
|
||||
&& world.getTileEntity(x, y - 1, z) instanceof TileVat
|
||||
&& ((TileVat) world.getTileEntity(x, y - 1, z)).mode == 4) {
|
||||
event.setCanceled(true);
|
||||
if (!world.isRemote) {
|
||||
world.createExplosion(
|
||||
null,
|
||||
player.posX,
|
||||
player.posY + player.getEyeHeight(),
|
||||
player.posZ,
|
||||
0.0f,
|
||||
false);
|
||||
for (int i = 0; i < 25; ++i) {
|
||||
final int xx = (int) player.posX + playerWorld.rand.nextInt(8) - playerWorld.rand.nextInt(8);
|
||||
final int yy = (int) player.posY + playerWorld.rand.nextInt(8) - playerWorld.rand.nextInt(8);
|
||||
final int zz = (int) player.posZ + playerWorld.rand.nextInt(8) - playerWorld.rand.nextInt(8);
|
||||
if (playerWorld.isAirBlock(xx, yy, zz)) {
|
||||
for (int a2 = 0; a2 < 25; ++a2) {
|
||||
final int xx = (int) player.posX + world.rand.nextInt(8) - world.rand.nextInt(8);
|
||||
final int yy = (int) player.posY + world.rand.nextInt(8) - world.rand.nextInt(8);
|
||||
final int zz = (int) player.posZ + world.rand.nextInt(8) - world.rand.nextInt(8);
|
||||
if (world.isAirBlock(xx, yy, zz)) {
|
||||
if (yy <= (int) player.posY + 1) {
|
||||
playerWorld.setBlock(xx, yy, zz, ConfigBlocks.blockFluxGoo, 8, 3);
|
||||
world.setBlock(xx, yy, zz, ConfigBlocks.blockFluxGoo, 8, 3);
|
||||
} else {
|
||||
playerWorld.setBlock(xx, yy, zz, ConfigBlocks.blockFluxGas, 8, 3);
|
||||
world.setBlock(xx, yy, zz, ConfigBlocks.blockFluxGas, 8, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
player.inventory.dropAllItems();
|
||||
for (ItemStack bauble : PlayerHandler.getPlayerBaubles(player).stackList) {
|
||||
if (bauble == null) {
|
||||
continue;
|
||||
}
|
||||
player.func_146097_a(bauble, true, false);
|
||||
}
|
||||
PlayerHandler.clearPlayerBaubles(player);
|
||||
player.inventory.markDirty();
|
||||
PacketHandler.INSTANCE.sendTo(new PacketNoMoreItems(), (EntityPlayerMP) player);
|
||||
player.curePotionEffects(new ItemStack(Items.milk_bucket));
|
||||
player.heal(Float.MAX_VALUE);
|
||||
if (dim != player.worldObj.provider.dimensionId) {
|
||||
player.travelToDimension(dim);
|
||||
}
|
||||
player.setPositionAndUpdate(x + 0.5, y - 2.5, z + 0.5);
|
||||
Thaumcraft.proxy.blockSparkle(beaconWorld, x, y - 2, z, 16777215, 20);
|
||||
Thaumcraft.proxy.blockSparkle(beaconWorld, x, y - 3, z, 16777215, 20);
|
||||
beaconWorld.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "thaumcraft:whispers", 1.0f, beaconWorld.rand.nextFloat());
|
||||
this.applyPlayerInfusions(player, vat);
|
||||
vat.selfInfusions = new int[12];
|
||||
vat.mode = 0;
|
||||
vat.setEntityContained(player);
|
||||
beaconWorld.getTileEntity(x, y - 1, z).markDirty();
|
||||
player.worldObj.markBlockForUpdate(x, y - 1, z);
|
||||
}
|
||||
player.inventory.dropAllItems();
|
||||
final IInventory baubles2 = BaublesApi.getBaubles(player);
|
||||
for (int j = 0; j < 4; ++j) {
|
||||
if (baubles2.getStackInSlot(j) != null) {
|
||||
final EntityItem bauble = new EntityItem(
|
||||
world,
|
||||
player.posX,
|
||||
player.posY,
|
||||
player.posZ,
|
||||
baubles2.getStackInSlot(j));
|
||||
world.spawnEntityInWorld(bauble);
|
||||
baubles2.setInventorySlotContents(j, null);
|
||||
}
|
||||
}
|
||||
baubles2.markDirty();
|
||||
player.inventory.markDirty();
|
||||
PacketHandler.INSTANCE.sendTo(new PacketNoMoreItems(), (EntityPlayerMP) player);
|
||||
player.curePotionEffects(new ItemStack(Items.milk_bucket));
|
||||
player.heal(999.0f);
|
||||
if (dim != player.worldObj.provider.dimensionId) {
|
||||
player.travelToDimension(dim);
|
||||
}
|
||||
player.setPositionAndUpdate(x + 0.5, y - 2.5, z + 0.5);
|
||||
Thaumcraft.proxy.blockSparkle(world, x, y - 2, z, 16777215, 20);
|
||||
Thaumcraft.proxy.blockSparkle(world, x, y - 3, z, 16777215, 20);
|
||||
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "thaumcraft:whispers", 1.0f, world.rand.nextFloat());
|
||||
this.applyPlayerInfusions(player, (TileVat) world.getTileEntity(x, y - 1, z));
|
||||
((TileVat) world.getTileEntity(x, y - 1, z)).selfInfusions = new int[12];
|
||||
((TileVat) world.getTileEntity(x, y - 1, z)).mode = 0;
|
||||
((TileVat) world.getTileEntity(x, y - 1, z)).setEntityContained(player);
|
||||
world.getTileEntity(x, y - 1, z).markDirty();
|
||||
player.worldObj.markBlockForUpdate(x, y - 1, z);
|
||||
}
|
||||
}
|
||||
} else if (event.entity.worldObj.isRemote && event.entityLiving instanceof EntityPlayer
|
||||
&& event.entityLiving.getHealth() - event.ammount <= 0.0f
|
||||
&& event.entityLiving.getEntityData().getBoolean("soulBeacon")) {
|
||||
final EntityPlayer player = (EntityPlayer) event.entity;
|
||||
Arrays.fill(player.inventory.mainInventory, null);
|
||||
Arrays.fill(player.inventory.armorInventory, null);
|
||||
final IInventory baubles3 = BaublesApi.getBaubles(player);
|
||||
baubles3.setInventorySlotContents(0, null);
|
||||
baubles3.setInventorySlotContents(1, null);
|
||||
baubles3.setInventorySlotContents(2, null);
|
||||
baubles3.setInventorySlotContents(3, null);
|
||||
}
|
||||
}
|
||||
|
||||
void applyPlayerInfusions(final EntityPlayer player, final TileVat tile) {
|
||||
@@ -957,11 +968,8 @@ public class EventHandlerEntity {
|
||||
|
||||
@SubscribeEvent
|
||||
public void golemDies(final LivingDeathEvent event) {
|
||||
if (event.entity.worldObj.isRemote) {
|
||||
return;
|
||||
}
|
||||
if (event.entity instanceof EntityGolemTH golem) {
|
||||
golem.die();
|
||||
if (event.entity instanceof EntityGolemTH) {
|
||||
((EntityGolemTH) event.entity).die();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -222,16 +222,8 @@ public class ExplosionAlchemite extends Explosion {
|
||||
if (block.getMaterial() == Material.air) {
|
||||
continue;
|
||||
}
|
||||
Item item = Item.getItemFromBlock(block);
|
||||
int meta = worldObj.getBlockMetadata(i, j, k);
|
||||
if (item == null) {
|
||||
item = block.getItemDropped(meta, worldObj.rand, 0);
|
||||
}
|
||||
if (item == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
final AspectList aspects = this.getAspects(item, meta);
|
||||
final AspectList aspects = this
|
||||
.getAspects(Item.getItemFromBlock(block), this.worldObj.getBlockMetadata(i, j, k));
|
||||
if (aspects != null && aspects.size() > 0) {
|
||||
for (final Aspect asp2 : aspects.getAspects()) {
|
||||
final ItemStack stack = new ItemStack(
|
||||
|
||||
@@ -32,7 +32,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
@@ -112,11 +111,7 @@ public class PocketPlaneData {
|
||||
}
|
||||
}
|
||||
world.setBlock(xCenter, yCenter + 1, zCenter, ThaumicHorizons.blockVortex);
|
||||
TileEntity te = world.getTileEntity(xCenter, yCenter + 1, zCenter);
|
||||
if (!(te instanceof TileVortex)) {
|
||||
te = new TileVortex();
|
||||
}
|
||||
final TileVortex vortex = (TileVortex) te;
|
||||
final TileVortex vortex = (TileVortex) world.getTileEntity(xCenter, yCenter + 1, zCenter);
|
||||
vortex.cheat = true;
|
||||
vortex.returnID = returnID;
|
||||
vortex.dimensionID = PocketPlaneData.planes.size();
|
||||
@@ -128,7 +123,7 @@ public class PocketPlaneData {
|
||||
data.portalD = new int[4];
|
||||
PocketPlaneData.planes.add(data);
|
||||
PocketPlaneData.positions.put(pocketPlaneMAXID, Vec3.createVectorHelper(vortexX, vortexY, vortexZ));
|
||||
world.getChunkFromBlockCoords(xCenter, zCenter).isModified = true;
|
||||
world.getChunkFromBlockCoords(vortexX, vortexZ).isModified = true;
|
||||
creatures = 0;
|
||||
++pocketPlaneMAXID;
|
||||
}
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
package com.kentington.thaumichorizons.common.lib.networking;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.EntityClientPlayerMP;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
import baubles.common.lib.PlayerHandler;
|
||||
import baubles.api.BaublesApi;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
@@ -19,9 +19,12 @@ public class PacketNoMoreItems implements IMessage, IMessageHandler<PacketNoMore
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IMessage onMessage(final PacketNoMoreItems message, final MessageContext ctx) {
|
||||
EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
|
||||
player.inventory.clearInventory(null, -1);
|
||||
PlayerHandler.clearPlayerBaubles(player);
|
||||
Minecraft.getMinecraft().thePlayer.inventory.clearInventory(null, -1);
|
||||
final IInventory baubles = BaublesApi.getBaubles(Minecraft.getMinecraft().thePlayer);
|
||||
baubles.setInventorySlotContents(0, null);
|
||||
baubles.setInventorySlotContents(1, null);
|
||||
baubles.setInventorySlotContents(2, null);
|
||||
baubles.setInventorySlotContents(3, null);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,14 +30,8 @@ public class TileSoulforge extends TileThaumcraft implements ISoulReceiver, IEss
|
||||
int progress;
|
||||
static final int PROGRESS_MAX = 9600;
|
||||
public int souls;
|
||||
static final int MAX_SOULS = 16;
|
||||
int essentia;
|
||||
static final int ESSENTIA_MAX = 4000;
|
||||
// Threshold for drawing more essentia (3 MIND aspects * 1000 each)
|
||||
static final int ESSENTIA_DRAW_THRESHOLD = 3000;
|
||||
static final int ESSENTIA_PER_ASPECT = 1000;
|
||||
static final int SUCTION_PRESSURE = 128;
|
||||
static final double PLAYER_REACH_SQ = 64.0;
|
||||
public float rota;
|
||||
public int forging;
|
||||
|
||||
@@ -89,8 +83,8 @@ public class TileSoulforge extends TileThaumcraft implements ISoulReceiver, IEss
|
||||
public void addSoulBits(final int bits) {
|
||||
this.progress += bits;
|
||||
this.essentia -= bits;
|
||||
while (this.progress >= PROGRESS_MAX) {
|
||||
this.progress -= PROGRESS_MAX;
|
||||
if (this.progress >= 9600) {
|
||||
this.progress -= 9600;
|
||||
++this.souls;
|
||||
}
|
||||
this.forging = 3;
|
||||
@@ -100,12 +94,12 @@ public class TileSoulforge extends TileThaumcraft implements ISoulReceiver, IEss
|
||||
|
||||
@Override
|
||||
public boolean canAcceptSouls() {
|
||||
return this.essentia > 0 && this.souls < MAX_SOULS;
|
||||
return this.essentia > 0 && this.souls < 16;
|
||||
}
|
||||
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
if (this.essentia < ESSENTIA_DRAW_THRESHOLD) {
|
||||
if (this.essentia < 3000) {
|
||||
this.drawEssentia();
|
||||
}
|
||||
if (this.forging > 0) {
|
||||
@@ -119,7 +113,7 @@ public class TileSoulforge extends TileThaumcraft implements ISoulReceiver, IEss
|
||||
|
||||
public boolean isUseableByPlayer(final EntityPlayer p_70300_1_) {
|
||||
return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) == this
|
||||
&& p_70300_1_.getDistanceSq(this.xCoord + 0.5, this.yCoord + 0.5, this.zCoord + 0.5) <= PLAYER_REACH_SQ;
|
||||
&& p_70300_1_.getDistanceSq(this.xCoord + 0.5, this.yCoord + 0.5, this.zCoord + 0.5) <= 64.0;
|
||||
}
|
||||
|
||||
void drawEssentia() {
|
||||
@@ -164,12 +158,12 @@ public class TileSoulforge extends TileThaumcraft implements ISoulReceiver, IEss
|
||||
if (this.essentia <= 0) {
|
||||
return null;
|
||||
}
|
||||
return new AspectList().add(Aspect.MIND, (int) Math.ceil(this.essentia / (float) ESSENTIA_PER_ASPECT));
|
||||
return new AspectList().add(Aspect.MIND, (int) Math.ceil(this.essentia / 1000.0f));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAspects(final AspectList aspects) {
|
||||
this.essentia = aspects.getAmount(Aspect.MIND) * ESSENTIA_PER_ASPECT;
|
||||
this.essentia = aspects.getAmount(Aspect.MIND) * 1000;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -194,7 +188,7 @@ public class TileSoulforge extends TileThaumcraft implements ISoulReceiver, IEss
|
||||
|
||||
@Override
|
||||
public boolean doesContainerContainAmount(final Aspect tag, final int amount) {
|
||||
return tag.getTag().equals(Aspect.MIND.getTag()) && this.essentia / ESSENTIA_PER_ASPECT >= amount;
|
||||
return tag.getTag().equals(Aspect.MIND.getTag()) && this.essentia / 1000 >= amount;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -205,7 +199,7 @@ public class TileSoulforge extends TileThaumcraft implements ISoulReceiver, IEss
|
||||
@Override
|
||||
public int containerContains(final Aspect tag) {
|
||||
if (tag.getTag().equals(Aspect.MIND.getTag())) {
|
||||
return this.essentia / ESSENTIA_PER_ASPECT;
|
||||
return this.essentia / 1000;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -235,7 +229,7 @@ public class TileSoulforge extends TileThaumcraft implements ISoulReceiver, IEss
|
||||
|
||||
@Override
|
||||
public int getSuctionAmount(final ForgeDirection face) {
|
||||
return (this.essentia < ESSENTIA_DRAW_THRESHOLD) ? SUCTION_PRESSURE : 0;
|
||||
return (this.essentia < 3000) ? 128 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -245,8 +239,8 @@ public class TileSoulforge extends TileThaumcraft implements ISoulReceiver, IEss
|
||||
|
||||
@Override
|
||||
public int addEssentia(final Aspect aspect, final int amount, final ForgeDirection face) {
|
||||
if (this.essentia < ESSENTIA_DRAW_THRESHOLD) {
|
||||
this.essentia += ESSENTIA_PER_ASPECT;
|
||||
if (this.essentia < 3000) {
|
||||
this.essentia += 1000;
|
||||
this.markDirty();
|
||||
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
return 1;
|
||||
@@ -261,7 +255,7 @@ public class TileSoulforge extends TileThaumcraft implements ISoulReceiver, IEss
|
||||
|
||||
@Override
|
||||
public int getEssentiaAmount(final ForgeDirection face) {
|
||||
return this.essentia / ESSENTIA_PER_ASPECT;
|
||||
return this.essentia / 1000;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -9,6 +9,7 @@ import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
@@ -434,22 +435,16 @@ public class TileSyntheticNode extends TileVisNode implements INode, IWandable {
|
||||
}
|
||||
|
||||
public void addEssence(final EntityPlayer player) {
|
||||
final ItemStack heldItem = player.getHeldItem();
|
||||
// just in case
|
||||
if (heldItem == null) return;
|
||||
if (heldItem.stackSize == 0) return;
|
||||
|
||||
if (heldItem.getItem() instanceof ItemWispEssence essence && essence == ConfigItems.itemWispEssence) {
|
||||
if (essence.getAspects(heldItem) == null) return;
|
||||
var aspectList = essence.getAspects(heldItem).getAspects();
|
||||
if (aspectList == null || aspectList.length == 0) return;
|
||||
final Aspect asp = aspectList[0];
|
||||
|
||||
this.aspectsMax.add(asp, 4 * heldItem.stackSize);
|
||||
final Item essence = player.getHeldItem().getItem();
|
||||
if (essence == ConfigItems.itemWispEssence
|
||||
&& ((ItemWispEssence) essence).getAspects(player.getHeldItem()) != null
|
||||
&& ((ItemWispEssence) essence).getAspects(player.getHeldItem()).getAspects().length > 0) {
|
||||
final Aspect asp = ((ItemWispEssence) essence).getAspects(player.getHeldItem()).getAspects()[0];
|
||||
this.aspectsMax.add(asp, 4);
|
||||
this.aspects.add(asp, 0);
|
||||
this.fractionalAspects.add(asp, 0);
|
||||
|
||||
heldItem.stackSize = 0;
|
||||
final ItemStack heldItem = player.getHeldItem();
|
||||
--heldItem.stackSize;
|
||||
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
this.markDirty();
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ public class TileTransductionAmplifier extends TileThaumcraft {
|
||||
}
|
||||
}
|
||||
if (transducers > 1 && this.count % 50 == 0) {
|
||||
final List<EntityLivingBase> targets = this.worldObj.getEntitiesWithinAABB(
|
||||
final List<Entity> targets = (List<Entity>) this.worldObj.getEntitiesWithinAABB(
|
||||
EntityLivingBase.class,
|
||||
AxisAlignedBB.getBoundingBox(
|
||||
this.xCoord,
|
||||
@@ -240,7 +240,7 @@ public class TileTransductionAmplifier extends TileThaumcraft {
|
||||
this.xCoord + 1,
|
||||
this.yCoord + 1,
|
||||
this.zCoord + 1).expand(10.0, 10.0, 10.0));
|
||||
if (targets != null && !targets.isEmpty()) {
|
||||
if (targets != null && targets.size() > 0) {
|
||||
for (final Entity target : targets) {
|
||||
PacketHandler.INSTANCE.sendToAllAround(
|
||||
new PacketFXBlockZap(
|
||||
|
||||
@@ -78,45 +78,6 @@ import thaumcraft.common.tiles.TilePedestal;
|
||||
|
||||
public class TileVat extends TileThaumcraft implements IAspectContainer, IEssentiaTransport, ISidedInventory {
|
||||
|
||||
// Timers and progress values (in ticks)
|
||||
private static final int CLONE_PROGRESS = 800;
|
||||
private static final int COUNT_DELAY = 10;
|
||||
private static final int HEAL_ASPECT_COOLDOWN = 40;
|
||||
private static final int LIFE_ASPECT_COOLDOWN = 50;
|
||||
private static final int EFFIGY_PROGRESS = 80;
|
||||
private static final int BLOOD_SAMPLE_INITIAL_PROGRESS = 40;
|
||||
private static final int INFUSER_SOUND_INTERVAL = 65;
|
||||
private static final int CRAFTCOUNT_WIND_DOWN_MAX = 50;
|
||||
private static final int INSTABILITY_EFFECT_CHANCE = 200;
|
||||
private static final int INSTABILITY_CRAFT_CHANCE = 500;
|
||||
private static final int INSTABILITY_INCREASE_CHANCE_BASE = 100;
|
||||
private static final int MAX_INSTABILITY = 25;
|
||||
|
||||
// Healing amounts
|
||||
private static final float STRONG_HEAL_AMOUNT = 8.0f;
|
||||
private static final float WEAK_HEAL_AMOUNT = 4.0f;
|
||||
|
||||
// Essentia costs
|
||||
private static final int EFFIGY_ESSENTIA_AMOUNT = 8;
|
||||
private static final int BLOOD_SAMPLE_LIFE_COST = 4;
|
||||
private static final int VIS_DRAIN_AMOUNT = 100;
|
||||
|
||||
// Instability damage divisor
|
||||
private static final float INSTABILITY_DAMAGE_DIVISOR = 10.0f;
|
||||
|
||||
// Pedestal search radius
|
||||
private static final int PEDESTAL_SEARCH_HORIZONTAL = 12;
|
||||
private static final int PEDESTAL_SEARCH_Y_DOWN = 5;
|
||||
private static final int PEDESTAL_SEARCH_Y_UP = 10;
|
||||
private static final int PEDESTAL_SYMMETRY_RANGE = 8;
|
||||
|
||||
// Self-infusion slots
|
||||
private static final int SELF_INFUSION_SLOTS = 12;
|
||||
private static final float SELF_INFUSION_INITIAL_HEALTH = 20.0f;
|
||||
|
||||
// Particle count for infuser effects
|
||||
private static final int INFUSER_PARTICLE_COUNT = 25;
|
||||
|
||||
public int mode;
|
||||
AspectList myEssentia;
|
||||
AspectList essentiaDemanded;
|
||||
@@ -125,6 +86,7 @@ public class TileVat extends TileThaumcraft implements IAspectContainer, IEssent
|
||||
public ItemStack nutrients;
|
||||
public int progress;
|
||||
private EntityLivingBase entityContained;
|
||||
public final int CLONE_TIME = 800;
|
||||
public int[] selfInfusions;
|
||||
public float selfInfusionHealth;
|
||||
private final ArrayList<ChunkCoordinates> pedestals;
|
||||
@@ -143,6 +105,7 @@ public class TileVat extends TileThaumcraft implements IAspectContainer, IEssent
|
||||
public int count;
|
||||
public int craftCount;
|
||||
public float startUp;
|
||||
private final int countDelay;
|
||||
ArrayList<ItemStack> ingredients;
|
||||
public HashMap<String, SourceFX> sourceFX;
|
||||
private NBTTagCompound entityNBTObj = null;
|
||||
@@ -156,8 +119,8 @@ public class TileVat extends TileThaumcraft implements IAspectContainer, IEssent
|
||||
this.sample = null;
|
||||
this.nutrients = null;
|
||||
this.entityContained = null;
|
||||
this.selfInfusions = new int[SELF_INFUSION_SLOTS];
|
||||
this.selfInfusionHealth = SELF_INFUSION_INITIAL_HEALTH;
|
||||
this.selfInfusions = new int[12];
|
||||
this.selfInfusionHealth = 20.0f;
|
||||
this.pedestals = new ArrayList<>();
|
||||
this.dangerCount = 0;
|
||||
this.checkSurroundings = true;
|
||||
@@ -173,6 +136,7 @@ public class TileVat extends TileThaumcraft implements IAspectContainer, IEssent
|
||||
this.itemCount = 0;
|
||||
this.count = 0;
|
||||
this.craftCount = 0;
|
||||
this.countDelay = 10;
|
||||
this.ingredients = new ArrayList<>();
|
||||
this.sourceFX = new HashMap<>();
|
||||
}
|
||||
@@ -232,7 +196,7 @@ public class TileVat extends TileThaumcraft implements IAspectContainer, IEssent
|
||||
this.mode = 0;
|
||||
this.markDirty();
|
||||
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
this.selfInfusions = new int[SELF_INFUSION_SLOTS];
|
||||
this.selfInfusions = new int[12];
|
||||
--possibleJar.stackSize;
|
||||
}
|
||||
} else {
|
||||
@@ -309,22 +273,22 @@ public class TileVat extends TileThaumcraft implements IAspectContainer, IEssent
|
||||
if (this.getEntityContained().getHealth() < this.getEntityContained().getMaxHealth()) {
|
||||
if (this.getEntityContained().getCreatureAttribute() != EnumCreatureAttribute.UNDEAD) {
|
||||
if (this.myEssentia.getAmount(Aspect.HEAL) > 0 && this.progress <= 0) {
|
||||
this.getEntityContained().heal(STRONG_HEAL_AMOUNT);
|
||||
this.getEntityContained().heal(8.0f);
|
||||
this.myEssentia.remove(Aspect.HEAL, 1);
|
||||
this.markDirty();
|
||||
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
this.progress += HEAL_ASPECT_COOLDOWN;
|
||||
this.progress += 40;
|
||||
}
|
||||
if (this.getEntityContained().getHealth() < this.getEntityContained().getMaxHealth()
|
||||
&& this.essentiaDemanded.getAmount(Aspect.HEAL) < 1) {
|
||||
this.essentiaDemanded.add(Aspect.HEAL, 1);
|
||||
}
|
||||
if (this.myEssentia.getAmount(Aspect.LIFE) > 0 && this.progress <= 0) {
|
||||
this.getEntityContained().heal(WEAK_HEAL_AMOUNT);
|
||||
this.getEntityContained().heal(4.0f);
|
||||
this.myEssentia.remove(Aspect.LIFE, 1);
|
||||
this.markDirty();
|
||||
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
this.progress += LIFE_ASPECT_COOLDOWN;
|
||||
this.progress += 50;
|
||||
}
|
||||
if (this.getEntityContained().getHealth() < this.getEntityContained().getMaxHealth()
|
||||
&& this.essentiaDemanded.getAmount(Aspect.LIFE) < 1) {
|
||||
@@ -332,22 +296,22 @@ public class TileVat extends TileThaumcraft implements IAspectContainer, IEssent
|
||||
}
|
||||
} else {
|
||||
if (this.myEssentia.getAmount(Aspect.UNDEAD) > 0 && this.progress <= 0) {
|
||||
this.getEntityContained().heal(STRONG_HEAL_AMOUNT);
|
||||
this.getEntityContained().heal(8.0f);
|
||||
this.myEssentia.remove(Aspect.UNDEAD, 1);
|
||||
this.markDirty();
|
||||
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
this.progress += HEAL_ASPECT_COOLDOWN;
|
||||
this.progress += 40;
|
||||
}
|
||||
if (this.getEntityContained().getHealth() < this.getEntityContained().getMaxHealth()
|
||||
&& this.essentiaDemanded.getAmount(Aspect.UNDEAD) < 1) {
|
||||
this.essentiaDemanded.add(Aspect.UNDEAD, 1);
|
||||
}
|
||||
if (this.myEssentia.getAmount(Aspect.DEATH) > 0 && this.progress <= 0) {
|
||||
this.getEntityContained().heal(WEAK_HEAL_AMOUNT);
|
||||
this.getEntityContained().heal(4.0f);
|
||||
this.myEssentia.remove(Aspect.DEATH, 1);
|
||||
this.markDirty();
|
||||
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
this.progress += LIFE_ASPECT_COOLDOWN;
|
||||
this.progress += 50;
|
||||
}
|
||||
if (this.getEntityContained().getHealth() < this.getEntityContained().getMaxHealth()
|
||||
&& this.essentiaDemanded.getAmount(Aspect.DEATH) < 1) {
|
||||
@@ -391,14 +355,13 @@ public class TileVat extends TileThaumcraft implements IAspectContainer, IEssent
|
||||
}
|
||||
} else if (this.sample != null && this.sample.getItem() == ThaumicHorizons.itemCorpseEffigy) {
|
||||
this.mode = 3;
|
||||
this.essentiaDemanded = new AspectList().add(Aspect.LIFE, EFFIGY_ESSENTIA_AMOUNT)
|
||||
.add(Aspect.HEAL, EFFIGY_ESSENTIA_AMOUNT);
|
||||
this.progress = EFFIGY_PROGRESS;
|
||||
this.essentiaDemanded = new AspectList().add(Aspect.LIFE, 8).add(Aspect.HEAL, 8);
|
||||
this.progress = 80;
|
||||
this.markDirty();
|
||||
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
} else if (this.sample != null && this.nutrients != null) {
|
||||
this.mode = 1;
|
||||
this.essentiaDemanded = new AspectList().add(Aspect.LIFE, BLOOD_SAMPLE_LIFE_COST);
|
||||
this.essentiaDemanded = new AspectList().add(Aspect.LIFE, 4);
|
||||
if (this.sample.getItem() == ThaumicHorizons.itemSyringeBloodSample && this.sample.hasTagCompound()
|
||||
&& this.sample.stackTagCompound.getCompoundTag("critter") != null
|
||||
&& this.sample.stackTagCompound.getCompoundTag("critter").getCompoundTag("ForgeData") != null) {
|
||||
@@ -415,7 +378,7 @@ public class TileVat extends TileThaumcraft implements IAspectContainer, IEssent
|
||||
}
|
||||
}
|
||||
}
|
||||
this.progress = BLOOD_SAMPLE_INITIAL_PROGRESS;
|
||||
this.progress = 40;
|
||||
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
this.markDirty();
|
||||
}
|
||||
@@ -452,7 +415,7 @@ public class TileVat extends TileThaumcraft implements IAspectContainer, IEssent
|
||||
if (this.nutrients.stackSize <= 0) {
|
||||
this.nutrients = null;
|
||||
}
|
||||
this.progress = CLONE_PROGRESS;
|
||||
this.progress = 800;
|
||||
this.essentiaDemanded = new AspectList();
|
||||
this.myEssentia = new AspectList();
|
||||
if (this.getEntityContained() == null) {
|
||||
@@ -474,7 +437,7 @@ public class TileVat extends TileThaumcraft implements IAspectContainer, IEssent
|
||||
if (this.checkSurroundings) {
|
||||
this.checkSurroundings = false;
|
||||
this.getSurroundings();
|
||||
} else if (this.count % COUNT_DELAY == 0) {
|
||||
} else if (this.count % this.countDelay == 0) {
|
||||
this.craftCycle();
|
||||
this.markDirty();
|
||||
}
|
||||
@@ -500,7 +463,7 @@ public class TileVat extends TileThaumcraft implements IAspectContainer, IEssent
|
||||
Thaumcraft.proxy.blockSparkle(this.worldObj, this.xCoord, this.yCoord - 2, this.zCoord, 16720418, 20);
|
||||
Thaumcraft.proxy.blockSparkle(this.worldObj, this.xCoord, this.yCoord - 1, this.zCoord, 16720418, 20);
|
||||
this.mode = 4;
|
||||
this.selfInfusionHealth = SELF_INFUSION_INITIAL_HEALTH;
|
||||
this.selfInfusionHealth = 20.0f;
|
||||
this.sample = null;
|
||||
this.essentiaDemanded = new AspectList();
|
||||
this.myEssentia = new AspectList();
|
||||
@@ -710,75 +673,78 @@ public class TileVat extends TileThaumcraft implements IAspectContainer, IEssent
|
||||
private void getSurroundings() {
|
||||
final ArrayList<ChunkCoordinates> stuff = new ArrayList<>();
|
||||
this.pedestals.clear();
|
||||
for (int xx = -PEDESTAL_SEARCH_HORIZONTAL; xx <= PEDESTAL_SEARCH_HORIZONTAL; ++xx) {
|
||||
for (int zz = -PEDESTAL_SEARCH_HORIZONTAL; zz <= PEDESTAL_SEARCH_HORIZONTAL; ++zz) {
|
||||
boolean skip = false;
|
||||
for (int yy = -PEDESTAL_SEARCH_Y_DOWN; yy <= PEDESTAL_SEARCH_Y_UP; ++yy) {
|
||||
if (xx != 0 || zz != 0) {
|
||||
final int x = this.xCoord + xx;
|
||||
final int y = this.yCoord - yy;
|
||||
final int z = this.zCoord + zz;
|
||||
final TileEntity te = this.worldObj.getTileEntity(x, y, z);
|
||||
if (!skip && yy > 0
|
||||
&& Math.abs(xx) <= PEDESTAL_SYMMETRY_RANGE
|
||||
&& Math.abs(zz) <= PEDESTAL_SYMMETRY_RANGE
|
||||
&& te instanceof TilePedestal) {
|
||||
this.pedestals.add(new ChunkCoordinates(x, y, z));
|
||||
skip = true;
|
||||
} else {
|
||||
final Block bi = this.worldObj.getBlock(x, y, z);
|
||||
if (bi == Blocks.skull || (bi instanceof IInfusionStabiliser
|
||||
&& ((IInfusionStabiliser) bi).canStabaliseInfusion(this.getWorldObj(), x, y, z))) {
|
||||
stuff.add(new ChunkCoordinates(x, y, z));
|
||||
try {
|
||||
for (int xx = -12; xx <= 12; ++xx) {
|
||||
for (int zz = -12; zz <= 12; ++zz) {
|
||||
boolean skip = false;
|
||||
for (int yy = -5; yy <= 10; ++yy) {
|
||||
if (xx != 0 || zz != 0) {
|
||||
final int x = this.xCoord + xx;
|
||||
final int y = this.yCoord - yy;
|
||||
final int z = this.zCoord + zz;
|
||||
final TileEntity te = this.worldObj.getTileEntity(x, y, z);
|
||||
if (!skip && yy > 0
|
||||
&& Math.abs(xx) <= 8
|
||||
&& Math.abs(zz) <= 8
|
||||
&& te instanceof TilePedestal) {
|
||||
this.pedestals.add(new ChunkCoordinates(x, y, z));
|
||||
skip = true;
|
||||
} else {
|
||||
final Block bi = this.worldObj.getBlock(x, y, z);
|
||||
if (bi == Blocks.skull
|
||||
|| (bi instanceof IInfusionStabiliser && ((IInfusionStabiliser) bi)
|
||||
.canStabaliseInfusion(this.getWorldObj(), x, y, z))) {
|
||||
stuff.add(new ChunkCoordinates(x, y, z));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.symmetry = 0;
|
||||
for (final ChunkCoordinates cc : this.pedestals) {
|
||||
boolean items = false;
|
||||
final int x2 = this.xCoord - cc.posX;
|
||||
final int z2 = this.zCoord - cc.posZ;
|
||||
TileEntity te2 = this.worldObj.getTileEntity(cc.posX, cc.posY, cc.posZ);
|
||||
if (te2 instanceof TilePedestal) {
|
||||
this.symmetry += 2;
|
||||
if (((TilePedestal) te2).getStackInSlot(0) != null) {
|
||||
++this.symmetry;
|
||||
items = true;
|
||||
this.symmetry = 0;
|
||||
for (final ChunkCoordinates cc : this.pedestals) {
|
||||
boolean items = false;
|
||||
final int x2 = this.xCoord - cc.posX;
|
||||
final int z2 = this.zCoord - cc.posZ;
|
||||
TileEntity te2 = this.worldObj.getTileEntity(cc.posX, cc.posY, cc.posZ);
|
||||
if (te2 instanceof TilePedestal) {
|
||||
this.symmetry += 2;
|
||||
if (((TilePedestal) te2).getStackInSlot(0) != null) {
|
||||
++this.symmetry;
|
||||
items = true;
|
||||
}
|
||||
}
|
||||
final int xx2 = this.xCoord + x2;
|
||||
final int zz2 = this.zCoord + z2;
|
||||
te2 = this.worldObj.getTileEntity(xx2, cc.posY, zz2);
|
||||
if (te2 instanceof TilePedestal) {
|
||||
this.symmetry -= 2;
|
||||
if (((TilePedestal) te2).getStackInSlot(0) == null || !items) {
|
||||
continue;
|
||||
}
|
||||
--this.symmetry;
|
||||
}
|
||||
}
|
||||
final int xx2 = this.xCoord + x2;
|
||||
final int zz2 = this.zCoord + z2;
|
||||
te2 = this.worldObj.getTileEntity(xx2, cc.posY, zz2);
|
||||
if (te2 instanceof TilePedestal) {
|
||||
this.symmetry -= 2;
|
||||
if (((TilePedestal) te2).getStackInSlot(0) == null || !items) {
|
||||
continue;
|
||||
float sym = 0.0f;
|
||||
for (final ChunkCoordinates cc2 : stuff) {
|
||||
final boolean items2 = false;
|
||||
final int x = this.xCoord - cc2.posX;
|
||||
final int z3 = this.zCoord - cc2.posZ;
|
||||
Block bi2 = this.worldObj.getBlock(cc2.posX, cc2.posY, cc2.posZ);
|
||||
if (bi2 == Blocks.skull || (bi2 instanceof IInfusionStabiliser && ((IInfusionStabiliser) bi2)
|
||||
.canStabaliseInfusion(this.getWorldObj(), cc2.posX, cc2.posY, cc2.posZ))) {
|
||||
sym += 0.1f;
|
||||
}
|
||||
final int xx3 = this.xCoord + x;
|
||||
final int zz3 = this.zCoord + z3;
|
||||
bi2 = this.worldObj.getBlock(xx3, cc2.posY, zz3);
|
||||
if (bi2 == Blocks.skull || (bi2 instanceof IInfusionStabiliser && ((IInfusionStabiliser) bi2)
|
||||
.canStabaliseInfusion(this.getWorldObj(), cc2.posX, cc2.posY, cc2.posZ))) {
|
||||
sym -= 0.2f;
|
||||
}
|
||||
--this.symmetry;
|
||||
}
|
||||
}
|
||||
float sym = 0.0f;
|
||||
for (final ChunkCoordinates cc2 : stuff) {
|
||||
final boolean items2 = false;
|
||||
final int x = this.xCoord - cc2.posX;
|
||||
final int z3 = this.zCoord - cc2.posZ;
|
||||
Block bi2 = this.worldObj.getBlock(cc2.posX, cc2.posY, cc2.posZ);
|
||||
if (bi2 == Blocks.skull || (bi2 instanceof IInfusionStabiliser && ((IInfusionStabiliser) bi2)
|
||||
.canStabaliseInfusion(this.getWorldObj(), cc2.posX, cc2.posY, cc2.posZ))) {
|
||||
sym += 0.1f;
|
||||
}
|
||||
final int xx3 = this.xCoord + x;
|
||||
final int zz3 = this.zCoord + z3;
|
||||
bi2 = this.worldObj.getBlock(xx3, cc2.posY, zz3);
|
||||
if (bi2 == Blocks.skull || (bi2 instanceof IInfusionStabiliser && ((IInfusionStabiliser) bi2)
|
||||
.canStabaliseInfusion(this.getWorldObj(), cc2.posX, cc2.posY, cc2.posZ))) {
|
||||
sym -= 0.2f;
|
||||
}
|
||||
}
|
||||
this.symmetry += (int) sym;
|
||||
this.symmetry += (int) sym;
|
||||
} catch (Exception ignored) {}
|
||||
}
|
||||
|
||||
private void doEffects() {
|
||||
@@ -786,7 +752,7 @@ public class TileVat extends TileThaumcraft implements IAspectContainer, IEssent
|
||||
if (this.craftCount == 0) {
|
||||
this.worldObj
|
||||
.playSound(this.xCoord, this.yCoord, this.zCoord, "thaumcraft:infuserstart", 0.5f, 1.0f, false);
|
||||
} else if (this.craftCount % INFUSER_SOUND_INTERVAL == 0) {
|
||||
} else if (this.craftCount % 65 == 0) {
|
||||
this.worldObj.playSound(this.xCoord, this.yCoord, this.zCoord, "thaumcraft:infuser", 0.5f, 1.0f, false);
|
||||
}
|
||||
++this.craftCount;
|
||||
@@ -798,15 +764,15 @@ public class TileVat extends TileThaumcraft implements IAspectContainer, IEssent
|
||||
0.5f + this.worldObj.rand.nextFloat() * 0.2f,
|
||||
0.1f,
|
||||
0.7f + this.worldObj.rand.nextFloat() * 0.3f,
|
||||
INFUSER_PARTICLE_COUNT,
|
||||
25,
|
||||
-0.03f);
|
||||
} else if (this.craftCount > 0) {
|
||||
this.craftCount -= 2;
|
||||
if (this.craftCount < 0) {
|
||||
this.craftCount = 0;
|
||||
}
|
||||
if (this.craftCount > CRAFTCOUNT_WIND_DOWN_MAX) {
|
||||
this.craftCount = CRAFTCOUNT_WIND_DOWN_MAX;
|
||||
if (this.craftCount > 50) {
|
||||
this.craftCount = 50;
|
||||
}
|
||||
}
|
||||
if (this.mode == 2 && this.startUp != 1.0f) {
|
||||
@@ -892,8 +858,7 @@ public class TileVat extends TileThaumcraft implements IAspectContainer, IEssent
|
||||
this.sourceFX.put(fxk, fx);
|
||||
}
|
||||
}
|
||||
if (this.mode == 2 && this.instability > 0
|
||||
&& this.worldObj.rand.nextInt(INSTABILITY_EFFECT_CHANCE) <= this.instability) {
|
||||
if (this.mode == 2 && this.instability > 0 && this.worldObj.rand.nextInt(200) <= this.instability) {
|
||||
Thaumcraft.proxy.nodeBolt(
|
||||
this.worldObj,
|
||||
this.xCoord + 0.5f,
|
||||
@@ -906,7 +871,7 @@ public class TileVat extends TileThaumcraft implements IAspectContainer, IEssent
|
||||
}
|
||||
|
||||
public void craftCycle() {
|
||||
if (this.instability > 0 && this.worldObj.rand.nextInt(INSTABILITY_CRAFT_CHANCE) <= this.instability) {
|
||||
if (this.instability > 0 && this.worldObj.rand.nextInt(500) <= this.instability) {
|
||||
switch (this.worldObj.rand.nextInt(21)) {
|
||||
case 0, 2, 10, 13 -> {
|
||||
this.inEvEjectItem(0);
|
||||
@@ -955,40 +920,24 @@ public class TileVat extends TileThaumcraft implements IAspectContainer, IEssent
|
||||
if (this.instability > 0 && this.entityContained != null) {
|
||||
float visDrawn = 999.0f;
|
||||
if (!this.worldObj.isRemote) {
|
||||
float temp = VisNetHandler.drainVis(
|
||||
this.worldObj,
|
||||
this.xCoord,
|
||||
this.yCoord + 1,
|
||||
this.zCoord,
|
||||
Aspect.EARTH,
|
||||
VIS_DRAIN_AMOUNT);
|
||||
float temp = VisNetHandler
|
||||
.drainVis(this.worldObj, this.xCoord, this.yCoord + 1, this.zCoord, Aspect.EARTH, 100);
|
||||
if (temp < visDrawn) {
|
||||
visDrawn = temp;
|
||||
}
|
||||
temp = VisNetHandler.drainVis(
|
||||
this.worldObj,
|
||||
this.xCoord,
|
||||
this.yCoord + 1,
|
||||
this.zCoord,
|
||||
Aspect.WATER,
|
||||
VIS_DRAIN_AMOUNT);
|
||||
temp = VisNetHandler
|
||||
.drainVis(this.worldObj, this.xCoord, this.yCoord + 1, this.zCoord, Aspect.WATER, 100);
|
||||
if (temp < visDrawn) {
|
||||
visDrawn = temp;
|
||||
}
|
||||
temp = VisNetHandler.drainVis(
|
||||
this.worldObj,
|
||||
this.xCoord,
|
||||
this.yCoord + 1,
|
||||
this.zCoord,
|
||||
Aspect.ORDER,
|
||||
VIS_DRAIN_AMOUNT);
|
||||
temp = VisNetHandler
|
||||
.drainVis(this.worldObj, this.xCoord, this.yCoord + 1, this.zCoord, Aspect.ORDER, 100);
|
||||
if (temp < visDrawn) {
|
||||
visDrawn = temp;
|
||||
}
|
||||
}
|
||||
this.getEntityContained().setHealth(
|
||||
this.getEntityContained().getHealth()
|
||||
- this.instability / INSTABILITY_DAMAGE_DIVISOR / (5.0f + visDrawn));
|
||||
this.getEntityContained()
|
||||
.setHealth(this.getEntityContained().getHealth() - this.instability / 10.0f / (5.0f + visDrawn));
|
||||
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
if (this.getEntityContained().getHealth() <= 0.0f) {
|
||||
this.killSubject();
|
||||
@@ -997,38 +946,23 @@ public class TileVat extends TileThaumcraft implements IAspectContainer, IEssent
|
||||
} else if (this.instability > 0) {
|
||||
float visDrawn = 999.0f;
|
||||
if (!this.worldObj.isRemote) {
|
||||
float temp = VisNetHandler.drainVis(
|
||||
this.worldObj,
|
||||
this.xCoord,
|
||||
this.yCoord + 1,
|
||||
this.zCoord,
|
||||
Aspect.EARTH,
|
||||
VIS_DRAIN_AMOUNT);
|
||||
float temp = VisNetHandler
|
||||
.drainVis(this.worldObj, this.xCoord, this.yCoord + 1, this.zCoord, Aspect.EARTH, 100);
|
||||
if (temp < visDrawn) {
|
||||
visDrawn = temp;
|
||||
}
|
||||
temp = VisNetHandler.drainVis(
|
||||
this.worldObj,
|
||||
this.xCoord,
|
||||
this.yCoord + 1,
|
||||
this.zCoord,
|
||||
Aspect.WATER,
|
||||
VIS_DRAIN_AMOUNT);
|
||||
temp = VisNetHandler
|
||||
.drainVis(this.worldObj, this.xCoord, this.yCoord + 1, this.zCoord, Aspect.WATER, 100);
|
||||
if (temp < visDrawn) {
|
||||
visDrawn = temp;
|
||||
}
|
||||
temp = VisNetHandler.drainVis(
|
||||
this.worldObj,
|
||||
this.xCoord,
|
||||
this.yCoord + 1,
|
||||
this.zCoord,
|
||||
Aspect.ORDER,
|
||||
VIS_DRAIN_AMOUNT);
|
||||
temp = VisNetHandler
|
||||
.drainVis(this.worldObj, this.xCoord, this.yCoord + 1, this.zCoord, Aspect.ORDER, 100);
|
||||
if (temp < visDrawn) {
|
||||
visDrawn = temp;
|
||||
}
|
||||
}
|
||||
this.selfInfusionHealth -= this.instability / INSTABILITY_DAMAGE_DIVISOR / (5.0f + visDrawn);
|
||||
this.selfInfusionHealth -= this.instability / 10.0f / (5.0f + visDrawn);
|
||||
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
if (this.selfInfusionHealth <= 0.0f) {
|
||||
this.killSubject();
|
||||
@@ -1048,12 +982,11 @@ public class TileVat extends TileThaumcraft implements IAspectContainer, IEssent
|
||||
this.markDirty();
|
||||
return;
|
||||
}
|
||||
if (this.worldObj.rand.nextInt(INSTABILITY_INCREASE_CHANCE_BASE - this.recipeInstability * 3)
|
||||
== 0) {
|
||||
if (this.worldObj.rand.nextInt(100 - this.recipeInstability * 3) == 0) {
|
||||
++this.instability;
|
||||
}
|
||||
if (this.instability > MAX_INSTABILITY) {
|
||||
this.instability = MAX_INSTABILITY;
|
||||
if (this.instability > 25) {
|
||||
this.instability = 25;
|
||||
}
|
||||
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
this.markDirty();
|
||||
@@ -1115,7 +1048,7 @@ public class TileVat extends TileThaumcraft implements IAspectContainer, IEssent
|
||||
}
|
||||
|
||||
private void inEvZap(final boolean all) {
|
||||
final List<EntityLivingBase> targets = this.worldObj.getEntitiesWithinAABB(
|
||||
final List<Entity> targets = (List<Entity>) this.worldObj.getEntitiesWithinAABB(
|
||||
EntityLivingBase.class,
|
||||
AxisAlignedBB.getBoundingBox(
|
||||
this.xCoord,
|
||||
@@ -1124,7 +1057,7 @@ public class TileVat extends TileThaumcraft implements IAspectContainer, IEssent
|
||||
this.xCoord + 1,
|
||||
this.yCoord + 1,
|
||||
this.zCoord + 1).expand(10.0, 10.0, 10.0));
|
||||
if (targets != null && !targets.isEmpty()) {
|
||||
if (targets != null && targets.size() > 0) {
|
||||
for (final Entity target : targets) {
|
||||
thaumcraft.common.lib.network.PacketHandler.INSTANCE.sendToAllAround(
|
||||
new PacketFXBlockZap(
|
||||
@@ -1421,7 +1354,7 @@ public class TileVat extends TileThaumcraft implements IAspectContainer, IEssent
|
||||
this.nutrients = ItemStack.loadItemStackFromNBT(nbttagcompound.getCompoundTag("nutrients"));
|
||||
this.selfInfusions = nbttagcompound.getIntArray("selfInfusions");
|
||||
if (this.selfInfusions.length == 0) {
|
||||
this.selfInfusions = new int[SELF_INFUSION_SLOTS];
|
||||
this.selfInfusions = new int[12];
|
||||
}
|
||||
this.selfInfusionHealth = nbttagcompound.getFloat("selfInfusionHealth");
|
||||
}
|
||||
@@ -1582,7 +1515,7 @@ public class TileVat extends TileThaumcraft implements IAspectContainer, IEssent
|
||||
}
|
||||
}
|
||||
}
|
||||
this.selfInfusions = new int[SELF_INFUSION_SLOTS];
|
||||
this.selfInfusions = new int[12];
|
||||
this.setEntityContained(null);
|
||||
this.mode = 0;
|
||||
this.currentlySucking = null;
|
||||
|
||||
@@ -18,8 +18,6 @@ import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
@@ -51,7 +49,7 @@ import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
public class TileVortex extends TileThaumcraft implements IWandable, IAspectContainer {
|
||||
|
||||
private static final int MAX_COUNT = 2400;
|
||||
final int MAX_COUNT = 2400;
|
||||
public int count;
|
||||
public int beams;
|
||||
public int dimensionID;
|
||||
@@ -64,10 +62,6 @@ public class TileVortex extends TileThaumcraft implements IWandable, IAspectCont
|
||||
public boolean cheat;
|
||||
public ArrayList<ItemStack> items;
|
||||
Thread ppThread;
|
||||
private boolean soundStarted = false;
|
||||
// true once the first S35 description packet has been received on the client
|
||||
public boolean clientSynced = false;
|
||||
private int lastSyncedBeams = -1;
|
||||
|
||||
public TileVortex() {
|
||||
this.aspects = new AspectList();
|
||||
@@ -83,18 +77,6 @@ public class TileVortex extends TileThaumcraft implements IWandable, IAspectCont
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
|
||||
// Send one packet per tick when beams changes, so same-tick re/deHungrify
|
||||
// pairs don't produce two packets with an intermediate wrong value.
|
||||
if (!this.worldObj.isRemote && this.beams != this.lastSyncedBeams) {
|
||||
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
this.lastSyncedBeams = this.beams;
|
||||
}
|
||||
|
||||
if (this.worldObj != null && this.worldObj.isRemote && !soundStarted) {
|
||||
ThaumicHorizons.proxy.playVortexSound(this);
|
||||
soundStarted = true;
|
||||
}
|
||||
|
||||
if (this.generating) {
|
||||
this.worldObj.createExplosion(
|
||||
null,
|
||||
@@ -161,7 +143,7 @@ public class TileVortex extends TileThaumcraft implements IWandable, IAspectCont
|
||||
this.handlePocketPlaneStuff();
|
||||
}
|
||||
if (!this.cheat) {
|
||||
this.count += Math.max(0, 6 - this.beams);
|
||||
this.count += 6 - this.beams;
|
||||
}
|
||||
if (this.count > MAX_COUNT && !this.cheat
|
||||
&& this.worldObj.provider.dimensionId != ThaumicHorizons.dimensionPocketId) {
|
||||
@@ -187,7 +169,7 @@ public class TileVortex extends TileThaumcraft implements IWandable, IAspectCont
|
||||
if (player.timeUntilPortal > 0) {
|
||||
player.timeUntilPortal = 10;
|
||||
} else if (player.dimension != ThaumicHorizons.dimensionPocketId) {
|
||||
player.timeUntilPortal = 200;
|
||||
player.timeUntilPortal = 10;
|
||||
player.mcServer.getConfigurationManager().transferPlayerToDimension(
|
||||
player,
|
||||
ThaumicHorizons.dimensionPocketId,
|
||||
@@ -195,7 +177,7 @@ public class TileVortex extends TileThaumcraft implements IWandable, IAspectCont
|
||||
mServer.worldServerForDimension(ThaumicHorizons.dimensionPocketId),
|
||||
this.dimensionID));
|
||||
} else {
|
||||
player.timeUntilPortal = 200;
|
||||
player.timeUntilPortal = 10;
|
||||
player.mcServer.getConfigurationManager().transferPlayerToDimension(
|
||||
player,
|
||||
this.returnID,
|
||||
@@ -250,15 +232,14 @@ public class TileVortex extends TileThaumcraft implements IWandable, IAspectCont
|
||||
} else
|
||||
if (item.getEntityItem().getItem() == ThaumicHorizons.itemCrystalWand) {
|
||||
final ItemStack theWand = new ItemStack(ThaumicHorizons.itemWandCastingDisposable);
|
||||
final ItemWandCasting wand = (ItemWandCasting) theWand.getItem();
|
||||
wand.setRod(theWand, ThaumicHorizons.ROD_CRYSTAL);
|
||||
wand.setCap(theWand, ThaumicHorizons.CAP_CRYSTAL);
|
||||
wand.storeVis(theWand, Aspect.EARTH, 25000);
|
||||
wand.storeVis(theWand, Aspect.AIR, 25000);
|
||||
wand.storeVis(theWand, Aspect.FIRE, 25000);
|
||||
wand.storeVis(theWand, Aspect.WATER, 25000);
|
||||
wand.storeVis(theWand, Aspect.ORDER, 25000);
|
||||
wand.storeVis(theWand, Aspect.ENTROPY, 25000);
|
||||
((ItemWandCasting) theWand.getItem()).setRod(theWand, ThaumicHorizons.ROD_CRYSTAL);
|
||||
((ItemWandCasting) theWand.getItem()).setCap(theWand, ThaumicHorizons.CAP_CRYSTAL);
|
||||
((ItemWandCasting) theWand.getItem()).storeVis(theWand, Aspect.EARTH, 25000);
|
||||
((ItemWandCasting) theWand.getItem()).storeVis(theWand, Aspect.AIR, 25000);
|
||||
((ItemWandCasting) theWand.getItem()).storeVis(theWand, Aspect.FIRE, 25000);
|
||||
((ItemWandCasting) theWand.getItem()).storeVis(theWand, Aspect.WATER, 25000);
|
||||
((ItemWandCasting) theWand.getItem()).storeVis(theWand, Aspect.ORDER, 25000);
|
||||
((ItemWandCasting) theWand.getItem()).storeVis(theWand, Aspect.ENTROPY, 25000);
|
||||
this.items.add(theWand);
|
||||
item.setDead();
|
||||
} else
|
||||
@@ -334,7 +315,7 @@ public class TileVortex extends TileThaumcraft implements IWandable, IAspectCont
|
||||
this.xCoord,
|
||||
this.yCoord,
|
||||
this.zCoord,
|
||||
this.returnID))).start();
|
||||
this.returnID))).run();
|
||||
}
|
||||
this.markDirty();
|
||||
}
|
||||
@@ -388,25 +369,24 @@ public class TileVortex extends TileThaumcraft implements IWandable, IAspectCont
|
||||
}
|
||||
}
|
||||
}
|
||||
final double dx = (this.xCoord + 0.5 - eo.posX) / 15.0;
|
||||
final double dy = (this.yCoord + 0.5 - eo.posY) / 15.0;
|
||||
final double dz = (this.zCoord + 0.5 - eo.posZ) / 15.0;
|
||||
final double dist = Math.sqrt(dx * dx + dy * dy + dz * dz);
|
||||
double var7 = 1.0 - dist;
|
||||
final double var3 = (this.xCoord + 0.5 - eo.posX) / 15.0;
|
||||
final double var4 = (this.yCoord + 0.5 - eo.posY) / 15.0;
|
||||
final double var5 = (this.zCoord + 0.5 - eo.posZ) / 15.0;
|
||||
final double var6 = Math.sqrt(var3 * var3 + var4 * var4 + var5 * var5);
|
||||
double var7 = 1.0 - var6;
|
||||
final double modifier = 2.0 - this.beams / 3.0;
|
||||
if (var7 <= 0.0) {
|
||||
continue;
|
||||
}
|
||||
var7 *= var7;
|
||||
eo.motionX += dx / dist * var7 * 0.15 * modifier;
|
||||
eo.motionY += dy / dist * var7 * 0.25 * modifier;
|
||||
eo.motionZ += dz / dist * var7 * 0.15 * modifier;
|
||||
eo.motionX += var3 / var6 * var7 * 0.15 * modifier;
|
||||
eo.motionY += var4 / var6 * var7 * 0.25 * modifier;
|
||||
eo.motionZ += var5 / var6 * var7 * 0.15 * modifier;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
if (!this.worldObj.isRemote
|
||||
&& (this.beams <= 0 || this.worldObj.rand.nextInt(Math.max(1, this.beams)) == 0)) {
|
||||
if (!this.worldObj.isRemote && (this.beams <= 0 || this.worldObj.rand.nextInt(this.beams) == 0)) {
|
||||
int tx2 = this.xCoord + this.worldObj.rand.nextInt(16) - this.worldObj.rand.nextInt(16);
|
||||
int ty2 = this.yCoord + this.worldObj.rand.nextInt(16) - this.worldObj.rand.nextInt(16);
|
||||
int tz2 = this.zCoord + this.worldObj.rand.nextInt(16) - this.worldObj.rand.nextInt(16);
|
||||
@@ -592,36 +572,4 @@ public class TileVortex extends TileThaumcraft implements IWandable, IAspectCont
|
||||
public int containerContains(final Aspect tag) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public net.minecraft.network.Packet getDescriptionPacket() {
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
this.writeCustomNBT(nbt);
|
||||
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, nbt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
|
||||
this.readCustomNBT(pkt.func_148857_g());
|
||||
this.clientSynced = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invalidate() {
|
||||
super.invalidate();
|
||||
stopSound();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChunkUnload() {
|
||||
super.onChunkUnload();
|
||||
stopSound();
|
||||
}
|
||||
|
||||
private void stopSound() {
|
||||
if (this.worldObj != null && this.worldObj.isRemote) {
|
||||
ThaumicHorizons.proxy.stopVortexSound(this);
|
||||
}
|
||||
soundStarted = false;
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,7 @@ public class TileVortexStabilizer extends TileThaumcraft implements IWandable {
|
||||
public boolean redstoned;
|
||||
public ForgeDirection dir;
|
||||
public Object theBeam;
|
||||
private Entity[] sonicFX;
|
||||
public Entity[] sonicFX;
|
||||
|
||||
public TileVortexStabilizer() {
|
||||
this.xTarget = Integer.MAX_VALUE;
|
||||
@@ -86,20 +86,20 @@ public class TileVortexStabilizer extends TileThaumcraft implements IWandable {
|
||||
if (this.hasTarget) {
|
||||
this.reHungrifyTarget();
|
||||
this.hasTarget = false;
|
||||
}
|
||||
// Separate if (not else if) so a new valid target is acquired in the same tick,
|
||||
// preventing a window where beams is decremented but not yet restored.
|
||||
final TileEntity newTE = this.worldObj.getTileEntity(mop.blockX, mop.blockY, mop.blockZ);
|
||||
if (newTE instanceof INode) {
|
||||
this.hasTarget = true;
|
||||
this.target = newTE;
|
||||
this.prevType = ((INode) newTE).getNodeType().ordinal();
|
||||
this.deHungrifyTarget();
|
||||
} else if (newTE instanceof TileVortex) {
|
||||
this.hasTarget = true;
|
||||
this.target = newTE;
|
||||
this.deHungrifyTarget();
|
||||
}
|
||||
} else if (!this.hasTarget
|
||||
&& this.worldObj.getTileEntity(mop.blockX, mop.blockY, mop.blockZ) instanceof INode) {
|
||||
this.hasTarget = true;
|
||||
this.target = this.worldObj.getTileEntity(mop.blockX, mop.blockY, mop.blockZ);
|
||||
this.prevType = ((INode) this.worldObj
|
||||
.getTileEntity(mop.blockX, mop.blockY, mop.blockZ)).getNodeType().ordinal();
|
||||
this.deHungrifyTarget();
|
||||
} else
|
||||
if (!this.hasTarget && this.worldObj
|
||||
.getTileEntity(mop.blockX, mop.blockY, mop.blockZ) instanceof TileVortex) {
|
||||
this.hasTarget = true;
|
||||
this.target = this.worldObj.getTileEntity(mop.blockX, mop.blockY, mop.blockZ);
|
||||
this.deHungrifyTarget();
|
||||
}
|
||||
this.xTarget = mop.blockX;
|
||||
this.yTarget = mop.blockY;
|
||||
this.zTarget = mop.blockZ;
|
||||
@@ -166,46 +166,25 @@ public class TileVortexStabilizer extends TileThaumcraft implements IWandable {
|
||||
|
||||
public void reHungrifyTarget() {
|
||||
if (this.target instanceof INode) {
|
||||
if (!isNodeTargetedByOtherStabilizer()) {
|
||||
((INode) this.target).setNodeType(NodeType.values()[this.prevType]);
|
||||
}
|
||||
} else if (this.target instanceof TileVortex) {
|
||||
--((TileVortex) this.target).beams;
|
||||
((INode) this.target).setNodeType(NodeType.values()[this.prevType]);
|
||||
} else if (this.target instanceof final TileVortex tileVortex) {
|
||||
--tileVortex.beams;
|
||||
}
|
||||
if (this.target != null) {
|
||||
this.target.markDirty();
|
||||
this.worldObj.markBlockForUpdate(this.target.xCoord, this.target.yCoord, this.target.zCoord);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isNodeTargetedByOtherStabilizer() {
|
||||
// A stabilizer can only reach a node from up to 10 blocks away in one of 6 directions,
|
||||
// so check those 60 positions instead of scanning all loaded tile entities.
|
||||
int tx = this.target.xCoord;
|
||||
int ty = this.target.yCoord;
|
||||
int tz = this.target.zCoord;
|
||||
for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS) {
|
||||
for (int dist = 1; dist <= 10; dist++) {
|
||||
TileEntity te = this.worldObj
|
||||
.getTileEntity(tx - d.offsetX * dist, ty - d.offsetY * dist, tz - d.offsetZ * dist);
|
||||
if (te instanceof TileVortexStabilizer && te != this) {
|
||||
TileVortexStabilizer other = (TileVortexStabilizer) te;
|
||||
if (other.hasTarget && other.target == this.target) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void deHungrifyTarget() {
|
||||
if (this.target instanceof INode) {
|
||||
((INode) this.target).setNodeType(NodeType.NORMAL);
|
||||
} else if (this.target instanceof TileVortex) {
|
||||
++((TileVortex) this.target).beams;
|
||||
} else if (this.target instanceof final TileVortex tileVortex) {
|
||||
++tileVortex.beams;
|
||||
}
|
||||
if (this.target != null) {
|
||||
this.target.markDirty();
|
||||
this.worldObj.markBlockForUpdate(this.target.xCoord, this.target.yCoord, this.target.zCoord);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -87,8 +87,6 @@ entity.ThaumicHorizons.VoltSlime.name=Volt Slime
|
||||
entity.ThaumicHorizons.MedSlime.name=Medslime
|
||||
entity.ThaumicHorizons.Sheeder.name=Sheeder
|
||||
entity.ThaumicHorizons.LostSoul.name=Lost Soul
|
||||
entity.ThaumicHorizons.GolemTH.name=%s Golem
|
||||
entity.ThaumicHorizons.GolemTH.voidling.name=Voidling Golem
|
||||
|
||||
###POTIONS###
|
||||
|
||||
@@ -187,12 +185,10 @@ tile.ThaumicHorizons_transductionAmplifier.name=Transduction Amplifier
|
||||
tile.ThaumicHorizons_recombinator.name=Teleological Recombinator
|
||||
tile.ThaumicHorizons_vortexStabilizer.name=Vortex Attenuator
|
||||
tile.ThaumicHorizons_light.name=Light Orb
|
||||
tile.ThaumicHorizons_vortex.name=Planar Vortex
|
||||
tile.ThaumicHorizons_vortex.0.name=Planar Vortex
|
||||
tile.ThaumicHorizons_vortex.1.name=Planar Vortex (Creative)
|
||||
tile.ThaumicHorizons_void.name=Planar Boundary
|
||||
tile.ThaumicHorizons_slot.name=Keystone Receptacle
|
||||
tile.ThaumicHorizons_cloud.name=Cloud
|
||||
tile.ThaumicHorizons_cloud.0.name=Cloud
|
||||
tile.ThaumicHorizons_cloud.1.name=Plasma Cloud
|
||||
tile.ThaumicHorizons_cloud.2.name=Thundercloud
|
||||
@@ -211,7 +207,6 @@ tile.ThaumicHorizons_bone.name=Bone
|
||||
tile.ThaumicHorizons_spike.name=Metal Spike
|
||||
tile.ThaumicHorizons_spikeWood.name=Wooden Spike
|
||||
tile.ThaumicHorizons_spikeTooth.name=Tooth
|
||||
tile.ThaumicHorizons_crystal.name=Crystal
|
||||
tile.ThaumicHorizons_crystal.0.name=White Crystal
|
||||
tile.ThaumicHorizons_crystal.1.name=Orange Crystal
|
||||
tile.ThaumicHorizons_crystal.2.name=Magenta Crystal
|
||||
@@ -231,8 +226,6 @@ tile.ThaumicHorizons_crystal.15.name=Black Crystal
|
||||
tile.ThaumicHorizons_deepcrystal.name=Deep Crystal
|
||||
tile.ThaumicHorizons_leviathan.name=Primordial Fossil
|
||||
tile.ThaumicHorizons_gateway.name=Planar Gateway
|
||||
tile.ThaumicHorizons_evanescent.name=Evanescent
|
||||
tile.ThaumicHorizons_vatInterior.name=Vat Interior
|
||||
|
||||
###RESEARCH###
|
||||
|
||||
@@ -298,7 +291,7 @@ healingVatContainment= §nContainment Focus Unlocked§r<IMG>thaumichorizons:
|
||||
tc.research_name.infusionVat=Creature Infusion
|
||||
tc.research_text.infusionVat=Harder, faster, stronger
|
||||
infusionVat1=To infuse a living creature would be an unprecedented feat: thaumaturgic texts are filled with cautionary tales of grotesque deformities as the creature's body rejects the foreign magic. Your curative vats may finally allow this procedure to succeed by suspending the organism's vital functions while the infusion is applied.<BR>You must first install a modified runic matrix atop the vat. This is more difficult than it sounds, as attempting to infuse a runic matrix produces considerable magical feedback between the two matrices. The prudent thaumaturge would ensure that her altar is well-prepared.
|
||||
infusionVat2=Once the infusion vat has been set up, its operation is almost identical to that of the standard infusion altar, although essentia must be piped in directly.<BR>The process is somewhat riskier than infusing inanimate matter, however. In addition to the usual effects, accumulated instability will damage the subject. Worse, the process cannot be aborted; it will end in either success or death.<BR>Less hardy creatures may not survive complex infusions without outside help. Your experiments have shown that providing a combination of §3Aqua§0, §7Ordo§0, and §2Terra§0 centivis can slow the rate of injury.
|
||||
infusionVat2=Once the infusion vat has been set up, its operation is almost identical to the standard infusion altar, although essentia must be piped in directly.<BR>The process is somewhat riskier than infusing inanimate matter, however. In addition to the usual effects, accumulated instability will damage the subject. Worse, the process cannot be aborted; it will end in either success or death.<BR>Less hardy creatures may not survive complex infusions without outside help. Your experiments have shown that providing a combination of §3Aqua§0, §7Ordo§0, and §2Terra§0 centivis can slow the rate of injury.
|
||||
infusionVat3=The infusion vat has a few limitations. Chief among them is the fact that humans (and other sentient beings) cannot be infused, as the human soul actively interferes with the addition of magical energy. Likewise, creatures of an already magical nature such as undead and golems will not be affected.<BR>Also, while a given creature can have any number of general infusions, it may possess only one species-specific infusion.<BR>Unfortunately, infused creatures do not pass on their infusions to offspring.
|
||||
infusionVatClone= §nIncarnation Unlocked§r<BR>Your incarnation procedure can clone infused creatures. This requires additional essentia; you will need to supply the sum of every aspect from each infusion that the creature was subjected to.<BR>Curiously, the blood sample provides such a complete pattern for the developing organism that no instability is generated and no physical objects are required, making cloning a very efficient way of propagating your creations.
|
||||
tc.research_name.generalInfusion=General Infusions
|
||||
@@ -485,15 +478,15 @@ tc.research_text.chameleonSkin=Now you see me...
|
||||
chameleonSkin1=Whether sneaking into a rival's laboratory or taking notes on the life cycle of the eldritch crab, there are times when you'd like to remain unobserved. Perhaps you can come up with a more permanent solution than chugging invisibility potions?<BR>The §5Chameleon Skin§0 infusion implants magical pigments and microscopic eyes into your skin, reflexively altering its color to match objects on the opposite side. The effect is much like constant invisibility, including its inability to hide armor.<BR>This effect can be toggled using the X key.
|
||||
tc.research_name.tumorOops=Eldritch Apotheosis
|
||||
tc.research_text.tumorOops=All is the Pattern
|
||||
tumorOops1=You believed you had mastered your world and everything upon it. You fool.<BR>It is finally clear. The Eldritch are not beings in the ordinary sense, not crude things of meat and blood and bone like yourself. They are a pattern written in the stars, in the currents and eddies of magic, encoded deep in the structure of life itself.<BR>But the Pattern is fragmented, sundered and spread throughout the cosmos by some primordial cataclysm which can only be guessed at. It has sought to reassemble itself since the dawn of time, and now you have played your role in its life cycle.
|
||||
tumorOops2=All of your studies, your creations, your journeys have served the Pattern. Learning the laws of magic invited it into your mind. Crafting forbidden artifacts allowed it to replicate itself into physical matter. And once you survived the trials of the Outer Lands, the Pattern judged you to have accumulated enough of itself.<BR>Enough to craft into a greater being. The next stage of its life cycle.<BR>But you still live. Perhaps it is not too late. Perhaps you can understand more of the Pattern - perhaps you can still stop it-<BR>Or incubate more. So many more.
|
||||
tumorOops1=You believed you had mastered your world and everything upon it. You fool.<BR>It is finally clear. The Eldritch are not beings in the ordinary sense, not crude things of meat and blood and bone like yourself. They are a pattern written in the stars, in the currents and eddies of magic, encoded deep in the structure of life itself.<BR>But the Pattern is fragmented, sundered and spread throughout the cosmos by some primordial catacylsm which can only be guessed at. It has sought to reassemble itself since the dawn of time, and now you have played your role in its life cycle.
|
||||
tumorOops2=All of your studies, your creations, your journeys have served the Pattern. Learning the laws of magic invited it into your mind. Crafting forbidden artifacts allowed it to replicate itself into physical matter. And once you survived the trials of the Outer Lands, the Pattern judged you to have accumulated enough of itself.<BR>Enough to craft into a greater being. The next stage of its life cycle.<BR>But you still live. Perhaps it is not too late. Perhaps you can understand more of the Pattern- perhaps you can still stop it-<BR>Or incubate more. So many more.
|
||||
tc.research_name.construction=Arcane Construction
|
||||
tc.research_text.construction=Don't tell the golems' union
|
||||
construction1=TODO
|
||||
tc.research_name.planarTheory=Planar Theory
|
||||
tc.research_text.planarTheory=Deeper and deeper
|
||||
planarTheory1=The cosmos is vaster and more varied than you could have imagined, but certain patterns are starting to emerge. Most importantly, you finally understand what lies between the planes.<BR>It is not a void in the traditional sense, for even the emptiest places are subject to the laws of space and time. Rather, the interplanar substance could be described as frozen possibility - infinite potential with nothing to act upon. Only when it leaks through an aura node in the form of vis, into a world with established natural law, can this potential be actualized.<BR>Such is the root of all magic.
|
||||
planarTheory2=Of course, understanding this from an academic perspective is very different from being able to put it into practice. So far, all of your attempts to develop synthetic aura nodes have met with failure. Something is still missing...<BR>One offshoot of this research may warrant further study, however. By shattering an ender pearl, filling the resulting tesseract with ethereal essence, and encasing the structure in voidmetal, you have created a remarkably stable device capable of manipulating rips in spacetime.<BR>Perhaps you will find some use for it.
|
||||
planarTheory2=Of course, understanding this from an academic perspective is very different from being able to put it into practice. So far, all of your attempts to develop synthetic aura nodes have met with failure. Something is still missing...<BR>One offshoot of this research may warrant further study, however. By shattering an ender pearl, filling the resulting tesseract with ethereal essence, and encasing the structure in voidmetal you have created a remarkably stable device capable of manipulating rips in spacetime.<BR>Perhaps you will find some use for it.
|
||||
tc.research_name.transductionAmplifier=Transduction Amplifier
|
||||
tc.research_text.transductionAmplifier=Full power!
|
||||
transductionAmplifier1=Without outside interference, an aura node accumulates vis in short spurts as its dimensional breach fluctuates in size. Your node transducers can hold a node open at its largest natural diameter, but actually expanding the breach was not possible until recent advances in planar theory.<BR>You have developed a device which creates spatial turbulence, allowing microscopic rips to merge with an existing energized node. Attaching a transduction amplifier to one's side and applying a redstone signal can increase its centivis output as though the original node had ten additional vis per aspect.
|
||||
@@ -517,7 +510,7 @@ planarRift2=This is unfortunate - an extremely high-vis node might have containe
|
||||
planarRift3=And what then? Passing matter into the void would immerse it in a sea of endless vis, without grinding it down to its base aspects like an ordinary hungry node. Who can imagine what staggering works of thaumaturgy could be accomplished with this resource at hand?<BR>You imagine there will be severe limitations - most materials will still not survive immersion - but you already understand the basic nature of the process. By right-clicking a rift with your wand, you can tug on ethereal currents and retrieve any surviving objects.<BR>It is now time to determine what can be crafted in this manner...
|
||||
tc.research_name.wispSpawn=Wisp Propagation
|
||||
tc.research_text.wispSpawn=Kicking the hornet's nest
|
||||
wispSpawn1=Casting a pile of salis mundus into a stabilized rift has a curious result: the salt grains absorb enough vis to resonate with one another and clump together into a quasi-living being.<BR>These artificially generated wisps are almost identical to the ones which naturally grow in magical environs. Note that the wisps' aspects will depend on which aspects were present in the parent node.<BR>The number of wisps generated is highly variable, and an incautious thaumaturge can find himself quickly overwhelmed.
|
||||
wispSpawn1=Casting a pile of salis mundus into a stabilized rift has a curious result: the salt grains absorb enough vis to resonate with one another and clump together into a quasi-living being.<BR>These artificially generated wisps are almost identical to the ones which naturally grow in magical environs. Note that the wisps' aspects will depend on which aspects were present in the parent node.<BR>The number of wisps generated is highly variable, and an incautious thamaturge can find himself quickly overwhelmed.
|
||||
tc.research_name.crystalWand=Crystalline Wand
|
||||
tc.research_text.crystalWand=Disposable magic
|
||||
crystalWand1=All advanced wands incorporate shards into their design, but only for the purpose of amplifying another material's ability to store vis. On their own, shards are wholly incapable of absorbing additional magic and so cannot drain an aura node - but what if you were to take them straight to the source?<BR>By constructing a wandlike arrangement of crystals and passing it into the void, you have created a curious device - a wand with tremendous vis capacity but no ability to ever recharge itself. Perhaps it could be used to craft objects unattainable with traditional wands.
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
|
||||
"vortex": {
|
||||
|
||||
"category": "ambient",
|
||||
|
||||
"sounds": [
|
||||
|
||||
{ "name": "thaumichorizons:vortex", "stream": true }
|
||||
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 731 B After Width: | Height: | Size: 788 B |
|
Before Width: | Height: | Size: 190 B After Width: | Height: | Size: 192 B |
|
Before Width: | Height: | Size: 286 B After Width: | Height: | Size: 296 B |
|
Before Width: | Height: | Size: 311 B After Width: | Height: | Size: 329 B |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 393 B After Width: | Height: | Size: 476 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 666 B After Width: | Height: | Size: 723 B |
|
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 307 B |
|
Before Width: | Height: | Size: 298 B After Width: | Height: | Size: 316 B |
|
Before Width: | Height: | Size: 298 B After Width: | Height: | Size: 316 B |
|
Before Width: | Height: | Size: 298 B After Width: | Height: | Size: 316 B |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 290 B After Width: | Height: | Size: 308 B |
|
Before Width: | Height: | Size: 298 B After Width: | Height: | Size: 316 B |
|
Before Width: | Height: | Size: 300 B After Width: | Height: | Size: 317 B |
|
Before Width: | Height: | Size: 289 B After Width: | Height: | Size: 306 B |
|
Before Width: | Height: | Size: 299 B After Width: | Height: | Size: 316 B |
|
Before Width: | Height: | Size: 300 B After Width: | Height: | Size: 317 B |
|
Before Width: | Height: | Size: 300 B After Width: | Height: | Size: 317 B |
|
Before Width: | Height: | Size: 296 B After Width: | Height: | Size: 319 B |
|
Before Width: | Height: | Size: 298 B After Width: | Height: | Size: 316 B |
|
Before Width: | Height: | Size: 297 B After Width: | Height: | Size: 315 B |
|
Before Width: | Height: | Size: 289 B After Width: | Height: | Size: 307 B |
|
Before Width: | Height: | Size: 298 B After Width: | Height: | Size: 316 B |
|
Before Width: | Height: | Size: 628 B After Width: | Height: | Size: 849 B |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 509 B After Width: | Height: | Size: 666 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 615 B After Width: | Height: | Size: 745 B |
|
Before Width: | Height: | Size: 462 B After Width: | Height: | Size: 469 B |
|
Before Width: | Height: | Size: 154 B After Width: | Height: | Size: 188 B |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 655 B After Width: | Height: | Size: 726 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 868 B After Width: | Height: | Size: 971 B |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.5 KiB |