mirror of
https://github.com/GTNewHorizons/ThaumicTinkerer.git
synced 2026-11-28 16:06:07 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b388b5cba | ||
|
|
3cc1026704 | ||
|
|
2a548be7d8 | ||
|
|
dce00bbc74 | ||
|
|
63bf13c964 | ||
|
|
2151886e83 | ||
|
|
aeb6392d52 | ||
|
|
c221b7b03b | ||
|
|
bf664d00c8 | ||
|
|
7f7c4083cc | ||
|
|
d3f9b102d6 | ||
|
|
0f74be83ac | ||
|
|
a61d4b6d9f | ||
|
|
e4d716addb | ||
|
|
393eec213c | ||
|
|
40ce1b4c61 | ||
|
|
292be28f00 | ||
|
|
3809971825 | ||
|
|
db796ae830 | ||
|
|
d92266f5e3 | ||
|
|
304fed71dd | ||
|
|
bd2506a479 | ||
|
|
62a9677326 | ||
|
|
b259785bbc | ||
|
|
d4191557af | ||
|
|
6670fcdb5f | ||
|
|
2058c309d4 | ||
|
|
2633f752f3 | ||
|
|
8ce7293034 | ||
|
|
0432ff0d30 |
No files matched your search
@@ -30,3 +30,4 @@ src/main/resources/mixins.*([!.]).json
|
||||
*.bat
|
||||
*.DS_Store
|
||||
!gradlew.bat
|
||||
layout.json
|
||||
+18
-16
@@ -1,23 +1,25 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
api('com.github.GTNewHorizons:Baubles:1.0.4:dev')
|
||||
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-348-GTNH:api')
|
||||
|
||||
api('com.github.GTNewHorizons:Baubles-Expanded:2.1.8-GTNH:dev')
|
||||
api('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
|
||||
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-629-GTNH:api')
|
||||
|
||||
compileOnly('com.github.GTNewHorizons:Botania:1.10.12-GTNH:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:EnderCore:0.4.6:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:EnderIO:2.7.1:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:EnderStorage:1.5.0:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:waila:1.7.2:api') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:TinkersConstruct:1.11.14-GTNH:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:ForgeMultipart:1.4.8:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:CodeChickenLib:1.2.1:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:OpenComputers:1.10.9-GTNH:api') {transitive=false}
|
||||
|
||||
compileOnly('curse.maven:computercraft-67504:2269339')
|
||||
compileOnly('curse.maven:cofh-lib-220333:2388748')
|
||||
compileOnly('curse.maven:cofh-core-69162:2388751')
|
||||
compileOnly('com.github.GTNewHorizons:Botania:1.12.10-GTNH:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:EnderCore:0.4.8:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:EnderIO:2.9.16:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:EnderStorage:1.7.2:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:waila:1.8.7:api') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:TinkersConstruct:1.13.33-GTNH:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:ForgeMultipart:1.6.4:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:CodeChickenCore:1.4.3:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:OpenComputers:1.11.16-GTNH:api') {transitive=false}
|
||||
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:api') {transitive=false}
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.336:dev") {transitive=false}
|
||||
compileOnly('curse.maven:computercraft-67504:2269339')
|
||||
compileOnly('curse.maven:cofh-core-69162:2388751')
|
||||
|
||||
runtimeOnly('com.github.GTNewHorizons:TCNEIAdditions:1.5.0:dev') {
|
||||
exclude module: 'Baubles'
|
||||
}
|
||||
}
|
||||
+16
-5
@@ -14,7 +14,7 @@ modId = ThaumicTinkerer
|
||||
modGroup = thaumic.tinkerer
|
||||
|
||||
# Whether to use modGroup as the maven publishing group.
|
||||
# Due to a history of using JitPack, the default is com.github.GTNewHorizons for all mods.
|
||||
# When false, com.github.GTNewHorizons is used.
|
||||
useModGroupForPublishing = false
|
||||
|
||||
# Updates your build.gradle and settings.gradle automatically whenever an update is available.
|
||||
@@ -50,10 +50,10 @@ 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.
|
||||
# If gradleTokenVersion is empty or missing, the field will not be present in the class.
|
||||
generateGradleTokenClass =
|
||||
generateGradleTokenClass = thaumic.tinkerer.Tags
|
||||
|
||||
# Name of the token containing the project's current version to generate/replace.
|
||||
gradleTokenVersion = GRADLETOKEN_VERSION
|
||||
gradleTokenVersion = VERSION
|
||||
|
||||
# [DEPRECATED] Mod ID replacement token.
|
||||
gradleTokenModId =
|
||||
@@ -70,7 +70,7 @@ gradleTokenGroupName =
|
||||
# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's
|
||||
# version in @Mod([...], version = VERSION, [...]).
|
||||
# Leave these properties empty to skip individual token replacements.
|
||||
replaceGradleTokenInFile = LibMisc.java
|
||||
replaceGradleTokenInFile =
|
||||
|
||||
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
|
||||
# leave this property empty.
|
||||
@@ -85,6 +85,11 @@ accessTransformersFile = ThaumicTinkerer_at.cfg
|
||||
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
|
||||
usesMixins = true
|
||||
|
||||
# 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 = true
|
||||
|
||||
@@ -117,9 +122,15 @@ minimizeShadowedDependencies = true
|
||||
# If disabled, won't rename the shadowed classes.
|
||||
relocateShadowedDependencies = true
|
||||
|
||||
# Adds the GTNH maven, CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
|
||||
# Adds 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.
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
@@ -55,7 +57,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
@@ -84,7 +86,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 "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
@@ -203,7 +205,7 @@ fi
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# * DEFAULT_JVM_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.
|
||||
|
||||
Vendored
+2
@@ -13,6 +13,8 @@
|
||||
@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 ##########################################################################
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.21'
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.38'
|
||||
}
|
||||
|
||||
|
||||
@@ -30,10 +30,8 @@ public class GuiButtonWG extends GuiButton {
|
||||
|
||||
@Override
|
||||
public void drawButton(Minecraft par1Minecraft, int par2, int par3) {
|
||||
if (enabled) {
|
||||
par1Minecraft.renderEngine.bindTexture(gui);
|
||||
int y = !enabled ? 13 : 0;
|
||||
drawTexturedModalRect(xPosition, yPosition, 176, y, width, height);
|
||||
}
|
||||
par1Minecraft.renderEngine.bindTexture(gui);
|
||||
int y = !enabled ? 13 : 0;
|
||||
drawTexturedModalRect(xPosition, yPosition, 176, y, width, height);
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,8 @@
|
||||
*/
|
||||
package thaumic.tinkerer.client.render.tile;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -20,6 +22,7 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import thaumcraft.client.renderers.block.BlockJarRenderer;
|
||||
import thaumcraft.client.renderers.tile.ItemJarFilledRenderer;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumic.tinkerer.common.block.tile.TileFunnel;
|
||||
|
||||
public class RenderTileFunnel extends TileEntitySpecialRenderer {
|
||||
@@ -34,12 +37,12 @@ public class RenderTileFunnel extends TileEntitySpecialRenderer {
|
||||
if (stack != null) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(d0 + 0.5, d1 + 0.365, d2 + 0.5);
|
||||
// if(Block.getBlockFromItem(stack.getItem())== ConfigBlocks.blockJar) {
|
||||
// GL11.glTranslatef(0F, 0.25F, 0F);
|
||||
// jarRenderer.renderInventoryBlock(ConfigBlocks.blockJar, 0, 0, new RenderBlocks());
|
||||
// }
|
||||
// else
|
||||
jarRenderer1.renderItem(IItemRenderer.ItemRenderType.ENTITY, stack, (Object[]) null);
|
||||
if (Block.getBlockFromItem(stack.getItem()) == ConfigBlocks.blockJar) {
|
||||
GL11.glTranslatef(0F, 0.25F, 0F);
|
||||
jarRenderer.renderInventoryBlock(ConfigBlocks.blockJar, stack.getItemDamage(), 0, new RenderBlocks());
|
||||
} else {
|
||||
jarRenderer1.renderItem(IItemRenderer.ItemRenderType.ENTITY, stack, (Object[]) null);
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,17 +130,16 @@ public class BlockBedrockPortal extends BlockMod {
|
||||
(EntityPlayerMP) entity,
|
||||
ConfigHandler.bedrockDimensionID,
|
||||
new TeleporterBedrock((WorldServer) par1World));
|
||||
if (entity.worldObj.getBlock(par2, 250, par4) == Blocks.bedrock) {
|
||||
entity.worldObj.setBlock(par2, 250, par4, Blocks.air);
|
||||
if (entity.worldObj.isAirBlock(par2, 249, par4)) {
|
||||
entity.worldObj.setBlock(par2, 249, par4, Blocks.stone);
|
||||
}
|
||||
if (entity.worldObj.getBlock(par2, 251, par4) == Blocks.bedrock) {
|
||||
entity.worldObj.setBlock(par2, 251, par4, Blocks.air);
|
||||
}
|
||||
if (entity.worldObj.getBlock(par2, 252, par4) == Blocks.bedrock) {
|
||||
entity.worldObj.setBlock(par2, 252, par4, Blocks.air);
|
||||
}
|
||||
if (entity.worldObj.getBlock(par2, 253, par4) == Blocks.bedrock) {
|
||||
entity.worldObj.setBlock(par2, 253, par4, Blocks.air);
|
||||
for (int i = 250; i < 254; i++) {
|
||||
Block block = entity.worldObj.getBlock(par2, i, par4);
|
||||
// something seems to be turning our bedrock to plain stone
|
||||
// let's also check that
|
||||
if (block == Blocks.stone || block == Blocks.bedrock) {
|
||||
entity.worldObj.setBlockToAir(par2, i, par4);
|
||||
}
|
||||
}
|
||||
if (entity.worldObj.getBlock(par2, 254, par4) == Blocks.bedrock) {
|
||||
entity.worldObj.setBlock(par2, 254, par4, this);
|
||||
|
||||
@@ -37,7 +37,8 @@ import thaumcraft.common.lib.crafting.ThaumcraftCraftingManager;
|
||||
import thaumic.tinkerer.common.lib.LibBlockNames;
|
||||
|
||||
@Optional.InterfaceList({ @Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers"),
|
||||
@Optional.Interface(iface = "dan200.computercraft.api.peripheral.IPeripheral", modid = "ComputerCraft") })
|
||||
@Optional.Interface(iface = "dan200.computercraft.api.peripheral.IPeripheral", modid = "ComputerCraft"),
|
||||
@Optional.Interface(iface = "appeng.api.movable.IMovableTile", modid = "appliedenergistics2") })
|
||||
public class TileAspectAnalyzer extends TileEntity implements IInventory, SimpleComponent, IPeripheral, IMovableTile {
|
||||
|
||||
ItemStack[] inventorySlots = new ItemStack[1];
|
||||
@@ -230,11 +231,13 @@ public class TileAspectAnalyzer extends TileEntity implements IInventory, Simple
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "appliedenergistics2")
|
||||
public boolean prepareToMove() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "appliedenergistics2")
|
||||
public void doneMoving() {}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,7 +18,9 @@ import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import appeng.api.movable.IMovableTile;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
|
||||
@Optional.Interface(iface = "appeng.api.movable.IMovableTile", modid = "appliedenergistics2")
|
||||
public class TileCamo extends TileEntity implements IMovableTile {
|
||||
|
||||
private static final String TAG_CAMO = "camo";
|
||||
@@ -73,10 +75,12 @@ public class TileCamo extends TileEntity implements IMovableTile {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "appliedenergistics2")
|
||||
public boolean prepareToMove() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "appliedenergistics2")
|
||||
public void doneMoving() {}
|
||||
}
|
||||
@@ -30,6 +30,7 @@ import org.apache.commons.lang3.ArrayUtils;
|
||||
|
||||
import appeng.api.movable.IMovableTile;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
@@ -41,6 +42,7 @@ import thaumic.tinkerer.common.enchantment.core.EnchantmentManager;
|
||||
import thaumic.tinkerer.common.lib.LibBlockNames;
|
||||
import thaumic.tinkerer.common.lib.LibFeatures;
|
||||
|
||||
@Optional.Interface(iface = "appeng.api.movable.IMovableTile", modid = "appliedenergistics2")
|
||||
public class TileEnchanter extends TileEntity implements ISidedInventory, IMovableTile {
|
||||
|
||||
private static final String TAG_ENCHANTS = "enchantsIntArray";
|
||||
@@ -494,10 +496,12 @@ public class TileEnchanter extends TileEntity implements ISidedInventory, IMovab
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "appliedenergistics2")
|
||||
public boolean prepareToMove() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "appliedenergistics2")
|
||||
public void doneMoving() {}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.IAppEngApi;
|
||||
import appeng.api.movable.IMovableTile;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import thaumic.tinkerer.common.ThaumicTinkerer;
|
||||
import thaumic.tinkerer.common.block.mobilizer.BlockMobilizer;
|
||||
|
||||
@@ -117,16 +117,13 @@ public class TileEntityMobilizer extends TileEntity {
|
||||
if (!worldObj.isRemote) {
|
||||
|
||||
TileEntity passenger = worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
|
||||
IAppEngApi api = AEApi.instance();
|
||||
|
||||
// Prevent the passenger from popping off. Not sent to clients.
|
||||
worldObj.setBlock(targetX, yCoord, targetZ, Block.getBlockFromName("stone"), 0, 0);
|
||||
// Move non-TE blocks
|
||||
Block passengerId = worldObj.getBlock(xCoord, yCoord + 1, zCoord);
|
||||
|
||||
if (worldObj.isAirBlock(xCoord, yCoord + 1, zCoord)
|
||||
|| passengerId.canPlaceBlockAt(worldObj, targetX, yCoord + 1, targetZ)) {
|
||||
|
||||
if (passenger == null) {
|
||||
if (passengerId != Block.getBlockFromName("bedrock")
|
||||
&& passengerId != Block.getBlockFromName("")) {
|
||||
@@ -143,7 +140,8 @@ public class TileEntityMobilizer extends TileEntity {
|
||||
}
|
||||
}
|
||||
// If AE is installed, use its handler
|
||||
} else if (api != null) {
|
||||
} else if (Loader.isModLoaded("appliedenergistics2")) {
|
||||
IAppEngApi api = AEApi.instance();
|
||||
if (api.registries().movable().askToMove(passenger)) {
|
||||
worldObj.setBlock(
|
||||
targetX,
|
||||
@@ -159,34 +157,29 @@ public class TileEntityMobilizer extends TileEntity {
|
||||
api.registries().movable().doneMoving(passenger);
|
||||
passenger.validate();
|
||||
}
|
||||
|
||||
// Handler IMovableTiles and vanilla TEs without AE
|
||||
} else if (passenger instanceof IMovableTile
|
||||
|| passenger.getClass().getName().startsWith("net.minecraft.tileentity")) {
|
||||
boolean imovable = passenger instanceof IMovableTile;
|
||||
if (imovable) ((IMovableTile) passenger).prepareToMove();
|
||||
worldObj.setBlock(
|
||||
targetX,
|
||||
yCoord + 1,
|
||||
targetZ,
|
||||
worldObj.getBlock(xCoord, yCoord + 1, zCoord),
|
||||
worldObj.getBlockMetadata(xCoord, yCoord + 1, zCoord),
|
||||
3);
|
||||
passenger.invalidate();
|
||||
worldObj.setBlockToAir(xCoord, yCoord + 1, zCoord);
|
||||
} else if (passenger.getClass().getName().startsWith("net.minecraft.tileentity")) {
|
||||
worldObj.setBlock(
|
||||
targetX,
|
||||
yCoord + 1,
|
||||
targetZ,
|
||||
worldObj.getBlock(xCoord, yCoord + 1, zCoord),
|
||||
worldObj.getBlockMetadata(xCoord, yCoord + 1, zCoord),
|
||||
3);
|
||||
passenger.invalidate();
|
||||
worldObj.setBlockToAir(xCoord, yCoord + 1, zCoord);
|
||||
|
||||
// IMovableHandler default code
|
||||
Chunk c = worldObj.getChunkFromBlockCoords(targetX, targetZ);
|
||||
// IMovableHandler default code
|
||||
Chunk c = worldObj.getChunkFromBlockCoords(targetX, targetZ);
|
||||
|
||||
c.func_150812_a(targetX & 0xF, yCoord + 1, targetZ & 0xF, passenger);
|
||||
c.func_150812_a(targetX & 0xF, yCoord + 1, targetZ & 0xF, passenger);
|
||||
|
||||
if (c.isChunkLoaded) {
|
||||
worldObj.addTileEntity(passenger);
|
||||
worldObj.markBlockForUpdate(targetX, yCoord + 1, targetZ);
|
||||
}
|
||||
if (imovable) ((IMovableTile) passenger).doneMoving();
|
||||
passenger.validate();
|
||||
}
|
||||
if (c.isChunkLoaded) {
|
||||
worldObj.addTileEntity(passenger);
|
||||
worldObj.markBlockForUpdate(targetX, yCoord + 1, targetZ);
|
||||
}
|
||||
passenger.validate();
|
||||
}
|
||||
}
|
||||
// Move self
|
||||
this.invalidate();
|
||||
|
||||
@@ -5,8 +5,10 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import appeng.api.movable.IMovableTile;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import thaumic.tinkerer.common.ThaumicTinkerer;
|
||||
|
||||
@Optional.Interface(iface = "appeng.api.movable.IMovableTile", modid = "appliedenergistics2")
|
||||
public class TileEntityRelay extends TileEntity implements IMovableTile {
|
||||
|
||||
public boolean hasPartner;
|
||||
@@ -137,10 +139,12 @@ public class TileEntityRelay extends TileEntity implements IMovableTile {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "appliedenergistics2")
|
||||
public boolean prepareToMove() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "appliedenergistics2")
|
||||
public void doneMoving() {}
|
||||
}
|
||||
@@ -26,15 +26,18 @@ import net.minecraftforge.common.util.Constants;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import appeng.api.movable.IMovableTile;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.aspects.IAspectContainer;
|
||||
import thaumcraft.api.aspects.IEssentiaContainerItem;
|
||||
import thaumcraft.common.blocks.ItemJarFilled;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.tiles.TileJarFillable;
|
||||
import thaumcraft.common.tiles.TileJarFillableVoid;
|
||||
import thaumic.tinkerer.common.lib.LibBlockNames;
|
||||
|
||||
@Optional.Interface(iface = "appeng.api.movable.IMovableTile", modid = "appliedenergistics2")
|
||||
public class TileFunnel extends TileEntity implements ISidedInventory, IAspectContainer, IMovableTile {
|
||||
|
||||
ItemStack[] inventorySlots = new ItemStack[1];
|
||||
@@ -51,7 +54,7 @@ public class TileFunnel extends TileEntity implements ISidedInventory, IAspectCo
|
||||
Aspect aspect = aspectList.getAspects()[0];
|
||||
|
||||
TileEntity tile = worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
|
||||
if (tile != null && tile instanceof TileEntityHopper) {
|
||||
if (tile instanceof TileEntityHopper) {
|
||||
TileEntity tile1 = getHopperFacing(
|
||||
tile.xCoord,
|
||||
tile.yCoord,
|
||||
@@ -69,6 +72,18 @@ public class TileFunnel extends TileEntity implements ISidedInventory, IAspectCo
|
||||
jar1.addToContainer(aspect, 1);
|
||||
item.setAspects(jar, aspectList.remove(aspect, 1));
|
||||
}
|
||||
// "AspectFilter" is used for the jar label
|
||||
if (aspectList.getAmount(aspectList.getAspects()[0]) == 0
|
||||
&& !jar.stackTagCompound.hasKey("AspectFilter")) {
|
||||
String itemName = jar.getUnlocalizedName();
|
||||
if (itemName.equals("item.BlockJarFilledItem")) {
|
||||
setInventorySlotContents(0, new ItemStack(ConfigBlocks.blockJar));
|
||||
} else if (itemName.equals("item.BlockJarFilledItem.void")) {
|
||||
setInventorySlotContents(0, new ItemStack(ConfigBlocks.blockJar));
|
||||
getStackInSlot(0).setItemDamage(3);
|
||||
}
|
||||
this.markDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -277,10 +292,12 @@ public class TileFunnel extends TileEntity implements ISidedInventory, IAspectCo
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "appliedenergistics2")
|
||||
public boolean prepareToMove() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "appliedenergistics2")
|
||||
public void doneMoving() {}
|
||||
}
|
||||
@@ -34,7 +34,8 @@ import thaumic.tinkerer.common.ThaumicTinkerer;
|
||||
import thaumic.tinkerer.common.core.helper.MiscHelper;
|
||||
|
||||
@Optional.InterfaceList({ @Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers"),
|
||||
@Optional.Interface(iface = "dan200.computercraft.api.peripheral.IPeripheral", modid = "ComputerCraft") })
|
||||
@Optional.Interface(iface = "dan200.computercraft.api.peripheral.IPeripheral", modid = "ComputerCraft"),
|
||||
@Optional.Interface(iface = "appeng.api.movable.IMovableTile", modid = "appliedenergistics2") })
|
||||
public class TileMagnet extends TileEntity implements IPeripheral, IMovableTile, SimpleComponent {
|
||||
|
||||
@Override
|
||||
@@ -146,11 +147,13 @@ public class TileMagnet extends TileEntity implements IPeripheral, IMovableTile,
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "appliedenergistics2")
|
||||
public boolean prepareToMove() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "appliedenergistics2")
|
||||
public void doneMoving() {}
|
||||
|
||||
@Callback(doc = "function():boolean -- Returns Whether magnet is pushing or pulling")
|
||||
|
||||
@@ -34,6 +34,7 @@ import li.cil.oc.api.machine.Context;
|
||||
import thaumic.tinkerer.common.item.ItemSoulMould;
|
||||
import thaumic.tinkerer.common.lib.LibBlockNames;
|
||||
|
||||
@Optional.Interface(iface = "appeng.api.movable.IMovableTile", modid = "appliedenergistics2")
|
||||
public class TileMobMagnet extends TileMagnet implements IInventory, IMovableTile {
|
||||
|
||||
private static final String TAG_ADULT = "adultCheck";
|
||||
@@ -230,10 +231,12 @@ public class TileMobMagnet extends TileMagnet implements IInventory, IMovableTil
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "appliedenergistics2")
|
||||
public boolean prepareToMove() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "appliedenergistics2")
|
||||
public void doneMoving() {}
|
||||
}
|
||||
@@ -27,6 +27,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import appeng.api.movable.IMovableTile;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import thaumcraft.api.ThaumcraftApiHelper;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
@@ -38,7 +39,7 @@ import thaumic.tinkerer.common.core.handler.ConfigHandler;
|
||||
import thaumic.tinkerer.common.lib.LibBlockNames;
|
||||
|
||||
/* import thaumic.tinkerer.common.compat.TinkersConstructCompat; */
|
||||
|
||||
@Optional.Interface(iface = "appeng.api.movable.IMovableTile", modid = "appliedenergistics2")
|
||||
public class TileRepairer extends TileEntity
|
||||
implements ISidedInventory, IAspectContainer, IEssentiaTransport, IMovableTile {
|
||||
|
||||
@@ -376,10 +377,12 @@ public class TileRepairer extends TileEntity
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "appliedenergistics2")
|
||||
public boolean prepareToMove() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "appliedenergistics2")
|
||||
public void doneMoving() {}
|
||||
}
|
||||
+2
-4
@@ -29,13 +29,11 @@ public class ContainerIchorPouch extends ContainerPlayerInv {
|
||||
ItemStack pouch;
|
||||
int blockSlot;
|
||||
|
||||
public ContainerIchorPouch(EntityPlayer player) {
|
||||
public ContainerIchorPouch(EntityPlayer player, ItemStack bag) {
|
||||
super(player.inventory);
|
||||
|
||||
pouch = bag;
|
||||
this.player = player;
|
||||
pouch = player.getCurrentEquippedItem();
|
||||
blockSlot = player.inventory.currentItem + 27 + 13 * 9;
|
||||
|
||||
for (int y = 0; y < 9; y++) for (int x = 0; x < 13; x++)
|
||||
addSlotToContainer(new SlotNoPouches(inv, y * 13 + x, 12 + x * 18, 8 + y * 18));
|
||||
initPlayerInv();
|
||||
|
||||
@@ -55,7 +55,8 @@ import thaumic.tinkerer.common.block.BlockAnimationTablet;
|
||||
import thaumic.tinkerer.common.lib.LibBlockNames;
|
||||
|
||||
@Optional.InterfaceList({ @Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers"),
|
||||
@Optional.Interface(iface = "dan200.computercraft.api.peripheral.IPeripheral", modid = "ComputerCraft") })
|
||||
@Optional.Interface(iface = "dan200.computercraft.api.peripheral.IPeripheral", modid = "ComputerCraft"),
|
||||
@Optional.Interface(iface = "appeng.api.movable.IMovableTile", modid = "appliedenergistics2") })
|
||||
public class TileAnimationTablet extends TileEntity implements IInventory, IMovableTile, IPeripheral, SimpleComponent {
|
||||
|
||||
private static final String TAG_LEFT_CLICK = "leftClick";
|
||||
@@ -633,12 +634,14 @@ public class TileAnimationTablet extends TileEntity implements IInventory, IMova
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "appliedenergistics2")
|
||||
public boolean prepareToMove() {
|
||||
stopBreaking();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "appliedenergistics2")
|
||||
public void doneMoving() {}
|
||||
|
||||
@Override
|
||||
|
||||
+5
-5
@@ -257,35 +257,35 @@ public class TileTransvectorInterface extends TileTransvector
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "CoFHLib")
|
||||
@Optional.Method(modid = "CoFHCore")
|
||||
public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate) {
|
||||
TileEntity tile = getTile();
|
||||
return tile instanceof IEnergyHandler ? ((IEnergyHandler) tile).receiveEnergy(from, maxReceive, simulate) : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "CoFHLib")
|
||||
@Optional.Method(modid = "CoFHCore")
|
||||
public int extractEnergy(ForgeDirection from, int maxExtract, boolean simulate) {
|
||||
TileEntity tile = getTile();
|
||||
return tile instanceof IEnergyHandler ? ((IEnergyHandler) tile).extractEnergy(from, maxExtract, simulate) : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "CoFHLib")
|
||||
@Optional.Method(modid = "CoFHCore")
|
||||
public int getEnergyStored(ForgeDirection from) {
|
||||
TileEntity tile = getTile();
|
||||
return tile instanceof IEnergyHandler ? ((IEnergyHandler) tile).getEnergyStored(from) : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "CoFHLib")
|
||||
@Optional.Method(modid = "CoFHCore")
|
||||
public int getMaxEnergyStored(ForgeDirection from) {
|
||||
TileEntity tile = getTile();
|
||||
return tile instanceof IEnergyHandler ? ((IEnergyHandler) tile).getMaxEnergyStored(from) : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "CoFHLib")
|
||||
@Optional.Method(modid = "CoFHCore")
|
||||
public boolean canConnectEnergy(ForgeDirection from) {
|
||||
TileEntity tile = getTile();
|
||||
return tile instanceof IEnergyHandler ? ((IEnergyHandler) tile).canConnectEnergy(from) : false;
|
||||
|
||||
@@ -47,6 +47,8 @@ public final class ConfigHandler {
|
||||
public static int netherDimensionID;
|
||||
public static int endDimensionID;
|
||||
public static int bedrockDimensionID = 19;
|
||||
public static boolean shouldKamiLegsDoLightFeature = false;
|
||||
public static boolean shouldKamiBootsDoGrass = true;
|
||||
|
||||
public static int soulHeartHeight;
|
||||
|
||||
@@ -228,6 +230,16 @@ public final class ConfigHandler {
|
||||
-1023,
|
||||
1023,
|
||||
"The Dimension ID for the End, leave at 1 if you don't modify it with another mod/plugin.");
|
||||
shouldKamiLegsDoLightFeature = config.getBoolean(
|
||||
"Kami Leggings Light Placing Feature Enabled",
|
||||
"general.kami",
|
||||
shouldKamiLegsDoLightFeature,
|
||||
"Sets if Legs of the Burning Mantle (Awakened Kami leggings) will do the effect where it places lights near you.");
|
||||
shouldKamiBootsDoGrass = config.getBoolean(
|
||||
"Kami Boots Dirt into Grass Feature Enabled",
|
||||
"general.kami",
|
||||
shouldKamiBootsDoGrass,
|
||||
"Sets if Boots of the Horizontal Shield (Awakened Kami Boots) will do the effect where dirt under you turns into grass.");
|
||||
}
|
||||
|
||||
LibEnchantIDs.idAscentBoost = loadEnchant(LibEnchantNames.ASCENT_BOOST, LibEnchantIDs.idAscentBoost);
|
||||
|
||||
@@ -208,7 +208,13 @@ public class AspectCropLootManager {
|
||||
|
||||
addAspectLoot(Aspect.ENERGY, new ItemStack(ConfigItems.itemResource, 12));
|
||||
|
||||
addAspectLoot(Aspect.MAGIC, "shard");
|
||||
addAspectLoot(Aspect.MAGIC, new ItemStack(ConfigItems.itemShard, 1, 0));
|
||||
addAspectLoot(Aspect.MAGIC, new ItemStack(ConfigItems.itemShard, 1, 1));
|
||||
addAspectLoot(Aspect.MAGIC, new ItemStack(ConfigItems.itemShard, 1, 2));
|
||||
addAspectLoot(Aspect.MAGIC, new ItemStack(ConfigItems.itemShard, 1, 3));
|
||||
addAspectLoot(Aspect.MAGIC, new ItemStack(ConfigItems.itemShard, 1, 4));
|
||||
addAspectLoot(Aspect.MAGIC, new ItemStack(ConfigItems.itemShard, 1, 5));
|
||||
addAspectLoot(Aspect.MAGIC, new ItemStack(ConfigItems.itemShard, 1, 6));
|
||||
|
||||
addAspectLoot(Aspect.HEAL, new ItemStack(Items.golden_apple));
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package thaumic.tinkerer.common.item;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -17,9 +16,12 @@ import net.minecraftforge.common.util.Constants;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.research.ResearchPage;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
import thaumcraft.common.lib.research.PlayerKnowledge;
|
||||
import thaumcraft.common.lib.research.ResearchManager;
|
||||
import thaumic.tinkerer.common.ThaumicTinkerer;
|
||||
import thaumic.tinkerer.common.core.handler.ConfigHandler;
|
||||
@@ -36,7 +38,9 @@ import thaumic.tinkerer.common.research.TTResearchItem;
|
||||
public class ItemShareBook extends ItemBase {
|
||||
|
||||
private static final String TAG_PLAYER = "player";
|
||||
private static final String NON_ASIGNED = "[none]";
|
||||
private static final String TAG_RESEARCH = "research";
|
||||
private static final String TAG_ASPECTS = "aspects";
|
||||
private static final String NON_ASSIGNED = "[none]";
|
||||
|
||||
public ItemShareBook() {
|
||||
super();
|
||||
@@ -83,44 +87,57 @@ public class ItemShareBook extends ItemBase {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
String name = getPlayerName(par1ItemStack);
|
||||
if (name.endsWith(NON_ASIGNED)) {
|
||||
setPlayerName(par1ItemStack, par3EntityPlayer.getGameProfile().getName());
|
||||
setPlayerResearch(par1ItemStack, par3EntityPlayer.getGameProfile().getName());
|
||||
if (!par2World.isRemote)
|
||||
par3EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.shareTome.write"));
|
||||
} else sync: {
|
||||
List<String> researchesDone = ResearchManager.getResearchForPlayer(name);
|
||||
|
||||
if (researchesDone == null) {
|
||||
if (par2World.isRemote) researchesDone = getPlayerResearch(par1ItemStack);
|
||||
else {
|
||||
par3EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.shareTome.sync"));
|
||||
break sync;
|
||||
}
|
||||
public ItemStack onItemRightClick(ItemStack bookStack, World world, EntityPlayer player) {
|
||||
String name = getPlayerName(bookStack);
|
||||
if (name.endsWith(NON_ASSIGNED)) {
|
||||
setPlayerName(bookStack, player.getGameProfile().getName());
|
||||
savePlayerResearch(ItemNBTHelper.getNBT(bookStack), player.getGameProfile().getName());
|
||||
if (!world.isRemote) {
|
||||
player.addChatMessage(new ChatComponentTranslation("ttmisc.shareTome.write"));
|
||||
}
|
||||
} else {
|
||||
// Try to load latest research for the saved player, fall back to the stored NBT if it fails.
|
||||
final NBTTagCompound researchSource;
|
||||
if (ResearchManager.getResearchForPlayer(name) != null) {
|
||||
researchSource = new NBTTagCompound();
|
||||
savePlayerResearch(researchSource, name);
|
||||
} else {
|
||||
researchSource = ItemNBTHelper.getNBT(bookStack);
|
||||
}
|
||||
|
||||
for (String key : researchesDone)
|
||||
ThaumicTinkerer.tcProxy.getResearchManager().completeResearch(par3EntityPlayer, key);
|
||||
loadPlayerResearch(researchSource, player);
|
||||
|
||||
if (!par2World.isRemote)
|
||||
par3EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.shareTome.sync"));
|
||||
if (!world.isRemote) {
|
||||
player.addChatMessage(new ChatComponentTranslation("ttmisc.shareTome.sync"));
|
||||
}
|
||||
}
|
||||
|
||||
return par1ItemStack;
|
||||
return bookStack;
|
||||
}
|
||||
|
||||
private List<String> getPlayerResearch(ItemStack par1ItemStack) {
|
||||
List<String> retVals = new ArrayList<>();
|
||||
NBTTagCompound cmp = ItemNBTHelper.getNBT(par1ItemStack);
|
||||
if (!cmp.hasKey("research")) return retVals;
|
||||
NBTTagList list = cmp.getTagList("research", Constants.NBT.TAG_STRING);
|
||||
for (int i = 0; i < list.tagCount(); i++) {
|
||||
|
||||
retVals.add(list.getStringTagAt(i));
|
||||
private void loadPlayerResearch(NBTTagCompound cmp, EntityPlayer player) {
|
||||
// Ensure full TC player data gets loaded
|
||||
final String playerName = player.getGameProfile().getName();
|
||||
ResearchManager.getResearchForPlayer(playerName);
|
||||
if (cmp.hasKey(TAG_RESEARCH)) {
|
||||
final NBTTagList list = cmp.getTagList(TAG_RESEARCH, Constants.NBT.TAG_STRING);
|
||||
for (int i = 0; i < list.tagCount(); i++) {
|
||||
final String research = list.getStringTagAt(i);
|
||||
ThaumicTinkerer.tcProxy.getResearchManager().completeResearch(player, research);
|
||||
}
|
||||
}
|
||||
if (cmp.hasKey(TAG_ASPECTS)) {
|
||||
final PlayerKnowledge pk = ThaumicTinkerer.tcProxy.getPlayerKnowledge();
|
||||
final NBTTagList list = cmp.getTagList(TAG_ASPECTS, Constants.NBT.TAG_STRING);
|
||||
for (int i = 0; i < list.tagCount(); i++) {
|
||||
final String aspectTag = list.getStringTagAt(i);
|
||||
final Aspect aspect = Aspect.getAspect(aspectTag);
|
||||
if (aspect != null) {
|
||||
pk.addDiscoveredAspect(playerName, aspect);
|
||||
}
|
||||
}
|
||||
ResearchManager.scheduleSave(player);
|
||||
}
|
||||
return retVals;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -134,7 +151,7 @@ public class ItemShareBook extends ItemBase {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
String name = getPlayerName(par1ItemStack);
|
||||
par3List.add(
|
||||
name.equals(NON_ASIGNED) ? StatCollector.translateToLocal("ttmisc.shareTome.noAssign")
|
||||
name.equals(NON_ASSIGNED) ? StatCollector.translateToLocal("ttmisc.shareTome.noAssign")
|
||||
: String.format(StatCollector.translateToLocal("ttmisc.shareTome.playerName"), name));
|
||||
}
|
||||
|
||||
@@ -144,21 +161,32 @@ public class ItemShareBook extends ItemBase {
|
||||
}
|
||||
|
||||
private String getPlayerName(ItemStack stack) {
|
||||
return ItemNBTHelper.getString(stack, TAG_PLAYER, NON_ASIGNED);
|
||||
return ItemNBTHelper.getString(stack, TAG_PLAYER, NON_ASSIGNED);
|
||||
}
|
||||
|
||||
private void setPlayerName(ItemStack stack, String playerName) {
|
||||
ItemNBTHelper.setString(stack, TAG_PLAYER, playerName);
|
||||
}
|
||||
|
||||
private void setPlayerResearch(ItemStack stack, String playername) {
|
||||
List<String> researchesDone = ResearchManager.getResearchForPlayer(playername);
|
||||
NBTTagCompound cmp = ItemNBTHelper.getNBT(stack);
|
||||
NBTTagList list = new NBTTagList();
|
||||
for (String tag : researchesDone) {
|
||||
list.appendTag(new NBTTagString(tag));
|
||||
private void savePlayerResearch(NBTTagCompound target, String playername) {
|
||||
// also loads the aspect list
|
||||
final List<String> researchesDone = ResearchManager.getResearchForPlayer(playername);
|
||||
// Save all unlocked research notes.
|
||||
final NBTTagList researchList = new NBTTagList();
|
||||
for (final String tag : researchesDone) {
|
||||
researchList.appendTag(new NBTTagString(tag));
|
||||
}
|
||||
cmp.setTag("research", list);
|
||||
target.setTag(TAG_RESEARCH, researchList);
|
||||
// Save all discovered aspect types.
|
||||
final PlayerKnowledge pk = Thaumcraft.proxy.getPlayerKnowledge();
|
||||
final NBTTagList aspectsToSave = new NBTTagList();
|
||||
final AspectList aspectsDiscovered = pk.getAspectsDiscovered(playername);
|
||||
if (aspectsDiscovered == null) {
|
||||
return;
|
||||
}
|
||||
aspectsDiscovered.aspects.keySet().stream().map(Aspect::getTag).sorted().map(NBTTagString::new)
|
||||
.forEach(aspectsToSave::appendTag);
|
||||
target.setTag(TAG_ASPECTS, aspectsToSave);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -43,6 +43,7 @@ import thaumic.tinkerer.common.research.IRegisterableResearch;
|
||||
import thaumic.tinkerer.common.research.ResearchHelper;
|
||||
import thaumic.tinkerer.common.research.TTResearchItem;
|
||||
import vazkii.botania.api.internal.IManaBurst;
|
||||
import vazkii.botania.common.entity.EntityMagicMissile;
|
||||
|
||||
public class ItemFocusDeflect extends ItemModFocus {
|
||||
|
||||
@@ -87,6 +88,15 @@ public class ItemFocusDeflect extends ItemModFocus {
|
||||
e.posX += motionVec.x;
|
||||
e.posY += motionVec.y;
|
||||
e.posZ += motionVec.z;
|
||||
|
||||
checkBotaniaMagicMissile(e);
|
||||
}
|
||||
}
|
||||
|
||||
private static void checkBotaniaMagicMissile(Entity e) {
|
||||
if (!Loader.isModLoaded("Botania")) return;
|
||||
if (e instanceof EntityMagicMissile) {
|
||||
e.setDead();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ public class ItemFocusDislocation extends ItemModFocus {
|
||||
stack.getItemDamage(),
|
||||
1 | 2);
|
||||
((ItemBlock) stack.getItem()).field_150939_a
|
||||
.onBlockPlacedBy(world, mop.blockX, mop.blockY, mop.blockZ, player, itemstack);
|
||||
.onBlockPlacedBy(world, mop.blockX, mop.blockY, mop.blockZ, player, stack);
|
||||
NBTTagCompound tileCmp = getStackTileEntity(itemstack);
|
||||
if (tileCmp != null && !tileCmp.hasNoTags()) {
|
||||
TileEntity tile1 = TileEntity.createAndLoadEntity(tileCmp);
|
||||
|
||||
@@ -75,7 +75,8 @@ public class ItemIchorPouch extends ItemFocusPouch implements IBauble, ITTinkere
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
par3EntityPlayer.openGui(ThaumicTinkerer.instance, LibGuiIDs.GUI_ID_ICHOR_POUCH, par2World, 0, 0, 0);
|
||||
if (!par2World.isRemote)
|
||||
par3EntityPlayer.openGui(ThaumicTinkerer.instance, LibGuiIDs.GUI_ID_ICHOR_POUCH, par2World, 0, 0, 0);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
||||
@@ -67,11 +67,13 @@ public class ItemGemBoots extends ItemIchorclothArmorAdv {
|
||||
player.jumpMovementFactor = player.isSprinting() ? 0.05F : 0.04F;
|
||||
player.fallDistance = 0F;
|
||||
|
||||
int x = (int) player.posX;
|
||||
int y = (int) player.posY - 1;
|
||||
int z = (int) player.posZ;
|
||||
if (player.worldObj.getBlock(x, y, z) == Blocks.dirt && player.worldObj.getBlockMetadata(x, y, z) == 0)
|
||||
player.worldObj.setBlock(x, y, z, Blocks.grass, 0, 2);
|
||||
if (ConfigHandler.shouldKamiBootsDoGrass) {
|
||||
int x = (int) player.posX;
|
||||
int y = (int) player.posY - 1;
|
||||
int z = (int) player.posZ;
|
||||
if (player.worldObj.getBlock(x, y, z) == Blocks.dirt && player.worldObj.getBlockMetadata(x, y, z) == 0)
|
||||
player.worldObj.setBlock(x, y, z, Blocks.grass, 0, 2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -85,7 +85,9 @@ public class ItemGemLegs extends ItemIchorclothArmorAdv {
|
||||
|
||||
if (player.isBurning()) player.heal(0.5F);
|
||||
addPotionEffect(player, Potion.fireResistance, 119, -1);
|
||||
setNearBrightNitor(player);
|
||||
if (ConfigHandler.shouldKamiLegsDoLightFeature) {
|
||||
setNearBrightNitor(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,14 +22,18 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import gregtech.api.hazards.Hazard;
|
||||
import gregtech.api.hazards.IHazardProtector;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumic.tinkerer.client.core.handler.kami.ToolModeHUDHandler;
|
||||
import thaumic.tinkerer.client.lib.LibResources;
|
||||
import thaumic.tinkerer.common.registry.ThaumicTinkererRecipe;
|
||||
import thaumic.tinkerer.common.research.IRegisterableResearch;
|
||||
|
||||
public abstract class ItemIchorclothArmorAdv extends ItemIchorclothArmor {
|
||||
@Optional.InterfaceList({ @Optional.Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech_nh") })
|
||||
public abstract class ItemIchorclothArmorAdv extends ItemIchorclothArmor implements IHazardProtector {
|
||||
|
||||
public ItemIchorclothArmorAdv(int par2) {
|
||||
super(par2);
|
||||
@@ -108,4 +112,11 @@ public abstract class ItemIchorclothArmorAdv extends ItemIchorclothArmor {
|
||||
public ThaumicTinkererRecipe getRecipeItem() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// GT5 Hazmat protection
|
||||
@Optional.Method(modid = "gregtech_nh")
|
||||
@Override
|
||||
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -11,11 +11,13 @@
|
||||
*/
|
||||
package thaumic.tinkerer.common.lib;
|
||||
|
||||
import thaumic.tinkerer.Tags;
|
||||
|
||||
public final class LibMisc {
|
||||
|
||||
public static final String MOD_ID = "ThaumicTinkerer";
|
||||
public static final String MOD_NAME = "Thaumic Tinkerer";
|
||||
public static final String VERSION = "GRADLETOKEN_VERSION";
|
||||
public static final String VERSION = Tags.VERSION;
|
||||
|
||||
public static final String NETWORK_CHANNEL = MOD_ID;
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ public class GuiHandler implements IGuiHandler {
|
||||
|
||||
case LibGuiIDs.GUI_ID_ICHOR_POUCH:
|
||||
if (!isDimensionAllowed(player)) return null;
|
||||
return new ContainerIchorPouch(player);
|
||||
return new ContainerIchorPouch(player, player.getCurrentEquippedItem());
|
||||
|
||||
case LibGuiIDs.GUI_ID_WARP_GATE:
|
||||
return new ContainerWarpGate((TileWarpGate) tile, player.inventory);
|
||||
@@ -87,8 +87,8 @@ public class GuiHandler implements IGuiHandler {
|
||||
return new GuiAspectAnalyzer((TileAspectAnalyzer) tile, player.inventory);
|
||||
|
||||
case LibGuiIDs.GUI_ID_ICHOR_POUCH:
|
||||
if (!isDimensionAllowed(player)) return null;
|
||||
return new GuiIchorPouch(new ContainerIchorPouch(player));
|
||||
if ((!isDimensionAllowed(player))) return null;
|
||||
return new GuiIchorPouch(new ContainerIchorPouch(player, player.getCurrentEquippedItem()));
|
||||
|
||||
case LibGuiIDs.GUI_ID_WARP_GATE:
|
||||
return new GuiWarpGate((TileWarpGate) tile, player.inventory);
|
||||
|
||||
@@ -101,6 +101,7 @@ item.mobAspect.name=Soul Aspect
|
||||
item.mobAspect.condensed.name=Condensed Soul Aspect
|
||||
item.mobAspect.infused.name=Infused Soul Aspect
|
||||
item.infusedSeeds.name=Infused Seeds
|
||||
item.infusedPotion.name=Potion
|
||||
item.infusedPotion.Aer.name=Potion of Aer
|
||||
item.infusedPotion.Ignis.name=Potion of Ignis
|
||||
item.infusedPotion.Terra.name=Potion of Terra
|
||||
@@ -152,7 +153,12 @@ tile.travelSlab.name=Paving Slab of Travel
|
||||
tile.travelSlabFull.name=Paving Slab of Travel
|
||||
tile.travelStairs.name=Paving Stair of Travel
|
||||
tile.wardSlab.name=Paving Slab of Warding
|
||||
tile.wardSlabFull.name=Paving Slab of Warding
|
||||
tile.infusedFarmland.name=Infused Farmland
|
||||
tile.gaseousLight.name=Gaseous Light
|
||||
tile.gaseousShadow.name=Gaseous Shadow
|
||||
tile.infusedGrainBlock.name=Imbued Grain
|
||||
tile.nitorGas.name=Nitor Gas
|
||||
|
||||
# Fire
|
||||
tile.fireWater.name=Aqua Imbued Fire
|
||||
|
||||
@@ -411,7 +411,7 @@ ttresearch.lore.FOCUS_HEAL=Pansements etc.
|
||||
ttresearch.page.FOCUS_HEAL.0=You know Pech carry powerful foci that can induce diseases, with that, you devised a way to use them to your benefits.<BR><BR>This focus will slowly mend the caster's wounds as they're using it, using vis from the wand in the process.
|
||||
|
||||
# -- WAND FOCUS: ENDER RIFT
|
||||
ttresearch.name.FOCUS_ENDER_Foci de baguette: Crevasse du Néant
|
||||
ttresearch.name.FOCUS_ENDER_CHEST=Foci de baguette: Crevasse du Néant
|
||||
ttresearch.lore.FOCUS_ENDER_CHEST=Une poche de la quatrième dimension
|
||||
ttresearch.page.FOCUS_ENDER_CHEST.0=By combining a Hand Mirror with a portable hole, you managed to construct a focus that tears a rift in the ender, allowing you to access the contents of your Ender Chest remotely.
|
||||
ttresearch.page.FOCUS_ENDER_CHEST.ES=By combining a Hand Mirror with a portable hole, you managed to construct a focus that tears a rift in the ender, allowing you to access the contents of your Ender Chests remotely. <BR> Shift right click on an ender chest to set the focus to that colour, or shift right click on a block of obsidian to set the focus to the vanilla ender storage.
|
||||
|
||||
Reference in new issue
Block a user