mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-25 22:34:31 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6d8ec1365a | ||
|
|
732ccd3b45 | ||
|
|
b16109fd9d | ||
|
|
1087b3dda0 | ||
|
|
9f6aac9db0 | ||
|
|
b4f208eca7 | ||
|
|
f26bd2c290 | ||
|
|
6fea13084d | ||
|
|
5074d8ba1d | ||
|
|
74d1aced60 |
No files matched your search
+6
-2
@@ -1,9 +1,13 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
compileOnly 'com.github.GTNewHorizons:GT5-Unofficial:5.09.45.130:dev'
|
||||
compileOnly 'com.github.GTNewHorizons:GT5-Unofficial:5.09.49.42:dev'
|
||||
api 'com.github.GTNewHorizons:Baubles:1.0.4:dev'
|
||||
api 'com.github.GTNewHorizons:ModularUI:1.1.42:dev'
|
||||
api 'com.github.GTNewHorizons:ModularUI:1.2.0:dev'
|
||||
api ('com.github.GTNewHorizons:ThaumicBoots:1.3.7:dev'){
|
||||
exclude group: 'com.github.GTNewHorizons', module: 'Electro-Magic-Tools'
|
||||
}
|
||||
|
||||
|
||||
api 'net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev'
|
||||
api 'thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev'
|
||||
|
||||
+12
-1
@@ -85,6 +85,11 @@ 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
|
||||
|
||||
@@ -117,9 +122,15 @@ minimizeShadowedDependencies = true
|
||||
# If disabled, won't rename the shadowed classes.
|
||||
relocateShadowedDependencies = true
|
||||
|
||||
# Adds the GTNH maven, CurseMaven, IC2/Player maven, 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.6-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-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,8 @@ 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
|
||||
' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
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.19'
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.25'
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
@@ -65,12 +66,18 @@ public class EMT {
|
||||
@Mod.Instance("EMT")
|
||||
public static EMT instance;
|
||||
|
||||
public static boolean isBootsActive = false;
|
||||
public static final String BOOTS = "thaumicboots";
|
||||
|
||||
public boolean isSimulating() {
|
||||
return !FMLCommonHandler.instance().getEffectiveSide().isClient();
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
if (Loader.isModLoaded(BOOTS)) {
|
||||
isBootsActive = true;
|
||||
}
|
||||
EMTConfigHandler.init(event.getSuggestedConfigurationFile());
|
||||
FMLCommonHandler.instance().bus().register(new EMTEventHandler());
|
||||
if (FMLCommonHandler.instance().getSide().isClient()) {
|
||||
|
||||
@@ -12,6 +12,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ModelSpecialArmor extends ModelBiped {
|
||||
|
||||
private static ModelSpecialArmor instance;
|
||||
|
||||
public ModelRenderer rightWing;
|
||||
public ModelRenderer leftWing;
|
||||
public ModelRenderer center;
|
||||
@@ -30,41 +32,43 @@ public class ModelSpecialArmor extends ModelBiped {
|
||||
public ModelSpecialArmor(float scale, float offset, int type) {
|
||||
super(scale, offset, type == 1 ? 128 : 64, type == 0 ? 32 : type == 1 ? 96 : 64);
|
||||
this.type = type;
|
||||
switch (this.type) {
|
||||
case 1:
|
||||
this.textureWidth = 128;
|
||||
this.textureHeight = 96;
|
||||
this.jetpack = new ModelRenderer(this, 16, 69);
|
||||
this.jetpack.setTextureSize(64, 48);
|
||||
this.jetpack.addBox(-4.0F, -12.0F, -2.0F, 8, 12 * 2, 4, scale * 2);
|
||||
this.jetpack.setRotationPoint(0.0F, 0.0F + offset, 0.0F);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
this.textureWidth = 64;
|
||||
this.textureHeight = 64;
|
||||
rightWing = new ModelRenderer(this, 24, 0 + 32);
|
||||
rightWing.addBox(-11F, -1F, 0F, 11, 13, 1);
|
||||
rightWing.setRotationPoint(-2F, 0F, 3F);
|
||||
rightWing.setTextureSize(64, 32);
|
||||
rightWing.mirror = false;
|
||||
setRotation(rightWing, 0F, 0.1570796F, 0F);
|
||||
this.textureWidth = 128;
|
||||
this.textureHeight = 96;
|
||||
this.jetpack = new ModelRenderer(this, 16, 69);
|
||||
this.jetpack.setTextureSize(64, 48);
|
||||
this.jetpack.addBox(-4.0F, -12.0F, -2.0F, 8, 12 * 2, 4, scale * 2);
|
||||
this.jetpack.setRotationPoint(0.0F, 0.0F + offset, 0.0F);
|
||||
|
||||
leftWing = new ModelRenderer(this, 0, 0 + 32);
|
||||
leftWing.addBox(0F, -1F, 0F, 11, 13, 1);
|
||||
leftWing.setRotationPoint(2F, 0F, 3F);
|
||||
leftWing.setTextureSize(64, 32);
|
||||
leftWing.mirror = true;
|
||||
setRotation(leftWing, 0F, -0.1570796F, 0F);
|
||||
this.textureWidth = 64;
|
||||
this.textureHeight = 64;
|
||||
rightWing = new ModelRenderer(this, 24, 0 + 32);
|
||||
rightWing.addBox(-11F, -1F, 0F, 11, 13, 1);
|
||||
rightWing.setRotationPoint(-2F, 0F, 3F);
|
||||
rightWing.setTextureSize(64, 32);
|
||||
rightWing.mirror = false;
|
||||
setRotation(rightWing, 0F, 0.1570796F, 0F);
|
||||
|
||||
center = new ModelRenderer(this, 0, 14 + 32);
|
||||
center.addBox(0F, 0F, 1F, 8, 14, 1);
|
||||
center.setRotationPoint(-4F, 0F, 3F);
|
||||
center.setTextureSize(64, 32);
|
||||
center.mirror = true;
|
||||
setRotation(center, 0F, 0F, 0F);
|
||||
break;
|
||||
}
|
||||
leftWing = new ModelRenderer(this, 0, 0 + 32);
|
||||
leftWing.addBox(0F, -1F, 0F, 11, 13, 1);
|
||||
leftWing.setRotationPoint(2F, 0F, 3F);
|
||||
leftWing.setTextureSize(64, 32);
|
||||
leftWing.mirror = true;
|
||||
setRotation(leftWing, 0F, -0.1570796F, 0F);
|
||||
|
||||
center = new ModelRenderer(this, 0, 14 + 32);
|
||||
center.addBox(0F, 0F, 1F, 8, 14, 1);
|
||||
center.setRotationPoint(-4F, 0F, 3F);
|
||||
center.setTextureSize(64, 32);
|
||||
center.mirror = true;
|
||||
setRotation(center, 0F, 0F, 0F);
|
||||
|
||||
}
|
||||
|
||||
public static ModelSpecialArmor getInstance() {
|
||||
if (instance == null) instance = new ModelSpecialArmor();
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
@@ -96,6 +100,7 @@ public class ModelSpecialArmor extends ModelBiped {
|
||||
this.center.render(scale);
|
||||
this.leftWing.render(scale);
|
||||
this.rightWing.render(scale);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,6 +110,9 @@ public class ModelSpecialArmor extends ModelBiped {
|
||||
if (this.isJumping) {
|
||||
this.rightWing.rotateAngleY = 0.5f;
|
||||
this.leftWing.rotateAngleY = -0.5f;
|
||||
} else {
|
||||
this.rightWing.rotateAngleY = 0.1570796F;
|
||||
this.leftWing.rotateAngleY = -0.1570796F;
|
||||
}
|
||||
|
||||
if (this.isSneak) {
|
||||
@@ -113,14 +121,22 @@ public class ModelSpecialArmor extends ModelBiped {
|
||||
this.jetpack.rotateAngleX = 0.5F;
|
||||
break;
|
||||
case 2:
|
||||
this.center.offsetY -= 0.1;
|
||||
this.rightWing.offsetY -= 0.1;
|
||||
this.leftWing.offsetY -= 0.1;
|
||||
this.center.rotateAngleX = 0.5F;
|
||||
this.rightWing.rotateAngleX = 0.5F;
|
||||
this.leftWing.rotateAngleX = 0.5F;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch (this.type) {
|
||||
case 1:
|
||||
this.jetpack.rotateAngleX = 0F;
|
||||
break;
|
||||
case 2:
|
||||
this.center.rotateAngleX = 0F;
|
||||
this.rightWing.rotateAngleX = 0F;
|
||||
this.leftWing.rotateAngleX = 0F;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,8 +4,14 @@ import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ModelWings extends ModelBiped {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static ModelWings instance = null;
|
||||
|
||||
public boolean isJumping = false;
|
||||
ModelRenderer rightWing;
|
||||
ModelRenderer leftWing;
|
||||
@@ -41,6 +47,12 @@ public class ModelWings extends ModelBiped {
|
||||
this.bipedBody.addChild(center);
|
||||
}
|
||||
|
||||
public static ModelWings getInstance() {
|
||||
if (instance == null) instance = new ModelWings();
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
@@ -55,20 +67,25 @@ public class ModelWings extends ModelBiped {
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
public void setRotationAngles(float f, float f1, float pt, float f3, float f4, float f5, Entity entity) {
|
||||
public void setRotationAngles(float limbSwing, float limbSwingAmount, float playerTicksExisted,
|
||||
float playerRotationYawHead, float playerRotationPitch, float f5, Entity entity) {
|
||||
|
||||
if (isJumping) {
|
||||
this.rightWing.rotateAngleY = 0.5f;
|
||||
this.leftWing.rotateAngleY = -0.5f;
|
||||
} else {
|
||||
this.rightWing.rotateAngleY = 0.1570796F;
|
||||
this.leftWing.rotateAngleY = -0.1570796F;
|
||||
}
|
||||
|
||||
if (entity.isSneaking()) {
|
||||
this.center.offsetY -= 0.1;
|
||||
this.rightWing.offsetY -= 0.1;
|
||||
this.leftWing.offsetY -= 0.1;
|
||||
this.center.rotateAngleX = 0.5F;
|
||||
this.rightWing.rotateAngleX = 0.5F;
|
||||
this.leftWing.rotateAngleX = 0.5F;
|
||||
} else {
|
||||
this.center.rotateAngleX = 0.0F;
|
||||
this.rightWing.rotateAngleX = 0;
|
||||
this.leftWing.rotateAngleX = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,9 +9,10 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import emt.tile.GT_MetaTileEntity_ResearchCompleter;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import gregtech.api.enums.GT_Values;
|
||||
import gregtech.api.enums.ItemList;
|
||||
import gregtech.api.enums.Materials;
|
||||
import gregtech.api.enums.MetaTileEntityIDs;
|
||||
import gregtech.api.enums.OrePrefixes;
|
||||
import gregtech.api.enums.TierEU;
|
||||
import gregtech.api.util.GT_OreDictUnificator;
|
||||
@@ -19,13 +20,12 @@ import thaumcraft.common.config.ConfigItems;
|
||||
|
||||
public class EMT_GT_Loader {
|
||||
|
||||
public static ItemStack ResearchMultiblock;
|
||||
|
||||
public static void run() {
|
||||
ResearchMultiblock = new GT_MetaTileEntity_ResearchCompleter(
|
||||
EMTConfigHandler.aIDoffset + GT_Values.VN.length + 2,
|
||||
"Research Completer",
|
||||
"Research Completer").getStackForm(1L);
|
||||
ItemList.ResearchCompleter.set(
|
||||
new GT_MetaTileEntity_ResearchCompleter(
|
||||
MetaTileEntityIDs.ResearchCompleter.ID,
|
||||
"Research Completer",
|
||||
"Research Completer").getStackForm(1L));
|
||||
}
|
||||
|
||||
public static void runlate() {
|
||||
|
||||
@@ -18,6 +18,8 @@ import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingFallEvent;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.common.Optional.Interface;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -33,9 +35,11 @@ import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.items.armor.Hover;
|
||||
import thaumicboots.api.IBoots;
|
||||
|
||||
@Interface(iface = "thaumicboots.api.IBoots", modid = "thaumicboots")
|
||||
public class ItemElectricBootsTraveller extends ItemArmor
|
||||
implements IRunicArmor, IElectricItem, IVisDiscountGear, IMetalArmor, ISpecialArmor {
|
||||
implements IRunicArmor, IElectricItem, IVisDiscountGear, IMetalArmor, ISpecialArmor, IBoots {
|
||||
|
||||
public int maxCharge = 100000;
|
||||
public int energyPerDamage = 1000;
|
||||
@@ -121,15 +125,29 @@ public class ItemElectricBootsTraveller extends ItemArmor
|
||||
|
||||
@Override
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
|
||||
if (!player.capabilities.isFlying && (player.moveForward != 0.0F || player.moveStrafing != 0.0F)) {
|
||||
if (getIntertialState(itemStack) && player.moveForward == 0
|
||||
&& player.moveStrafing == 0
|
||||
&& player.capabilities.isFlying) {
|
||||
player.motionX *= 0.5;
|
||||
player.motionZ *= 0.5;
|
||||
}
|
||||
boolean omniMode = false;
|
||||
if (EMT.isBootsActive) {
|
||||
omniMode = isOmniEnabled(itemStack);
|
||||
if ((player.moveForward == 0F && player.moveStrafing == 0F && omniMode)
|
||||
|| (player.moveForward <= 0F && !omniMode)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (player.moveForward != 0.0F || player.moveStrafing != 0.0F) {
|
||||
if (player.worldObj.isRemote && !player.isSneaking()) {
|
||||
if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(player.getEntityId())) {
|
||||
Thaumcraft.instance.entityEventHandler.prevStep.put(player.getEntityId(), player.stepHeight);
|
||||
}
|
||||
player.stepHeight = 1.0F;
|
||||
}
|
||||
|
||||
if (player.onGround) {
|
||||
float speedMod = (float) getSpeedModifier(itemStack);
|
||||
if (player.onGround || player.isOnLadder() || player.capabilities.isFlying) {
|
||||
float bonus = speedBonus;
|
||||
if (player.isInWater()) {
|
||||
bonus /= 4.0F;
|
||||
@@ -138,29 +156,46 @@ public class ItemElectricBootsTraveller extends ItemArmor
|
||||
if (player.isSneaking()) {
|
||||
bonus /= 2.0F;
|
||||
}
|
||||
|
||||
player.moveFlying(player.moveStrafing, player.moveForward, bonus);
|
||||
bonus *= speedMod;
|
||||
if (EMT.isBootsActive) {
|
||||
applyOmniState(player, bonus, itemStack);
|
||||
} else if (player.moveForward > 0.0) {
|
||||
player.moveFlying(0.0F, player.moveForward, bonus);
|
||||
}
|
||||
} else if (Hover.getHover(player.getEntityId())) {
|
||||
// Base ItemBootsTraveller jumpBonus equals to jumpBonus of Electric Boots,
|
||||
// so any other boots factor can be calculated via proportion method
|
||||
player.jumpMovementFactor = 0.03F
|
||||
/ ((ItemElectricBootsTraveller) EMTItems.electricBootsTraveller).jumpBonus
|
||||
* jumpBonus;
|
||||
* jumpBonus
|
||||
* speedMod;
|
||||
} else {
|
||||
player.jumpMovementFactor = 0.05F
|
||||
/ ((ItemElectricBootsTraveller) EMTItems.electricBootsTraveller).jumpBonus
|
||||
* jumpBonus;
|
||||
* jumpBonus
|
||||
* speedMod;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "thaumicboots")
|
||||
public void applyOmniState(EntityPlayer player, float bonus, ItemStack itemStack) {
|
||||
if (player.moveForward != 0.0) {
|
||||
player.moveFlying(0.0F, player.moveForward, bonus);
|
||||
}
|
||||
if (player.moveStrafing != 0.0 && getOmniState(itemStack)) {
|
||||
player.moveFlying(player.moveStrafing, 0.0F, bonus);
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPlayerJump(LivingEvent.LivingJumpEvent event) {
|
||||
if (event.entityLiving instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) event.entityLiving;
|
||||
boolean hasArmor = player.getCurrentArmor(0) != null && player.getCurrentArmor(0).getItem() == this;
|
||||
ItemStack boots = player.getCurrentArmor(0);
|
||||
boolean hasArmor = boots != null && boots.getItem() == this;
|
||||
|
||||
if (hasArmor) player.motionY += jumpBonus;
|
||||
if (hasArmor) player.motionY += jumpBonus * (float) getJumpModifier(boots);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,4 +311,34 @@ public class ItemElectricBootsTraveller extends ItemArmor
|
||||
public int getRunicCharge(ItemStack itemStack) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Avoid NSM Exception when ThaumicBoots is not present.
|
||||
public double getSpeedModifier(ItemStack stack) {
|
||||
if (stack.stackTagCompound != null) {
|
||||
return stack.stackTagCompound.getDouble("speed");
|
||||
}
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
public double getJumpModifier(ItemStack stack) {
|
||||
if (stack.stackTagCompound != null) {
|
||||
return stack.stackTagCompound.getDouble("jump");
|
||||
}
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
public boolean getOmniState(ItemStack stack) {
|
||||
if (stack.stackTagCompound != null) {
|
||||
return stack.stackTagCompound.getBoolean("omni");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean getIntertialState(ItemStack stack) {
|
||||
if (stack.stackTagCompound != null) {
|
||||
return stack.stackTagCompound.getBoolean("inertiacanceling");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -390,22 +390,23 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelBiped getArmorModel(EntityLivingBase entity, ItemStack stack, int armorSlot) {
|
||||
try {
|
||||
if (entity instanceof EntityPlayer) {
|
||||
byte wing = stack.stackTagCompound.getByte("wing");
|
||||
if (wing == JETPACK) {
|
||||
ModelSpecialArmor mbm = new ModelSpecialArmor(1, 1);
|
||||
return mbm;
|
||||
} else if (wing != 0) {
|
||||
ModelSpecialArmor mbm = new ModelSpecialArmor(1, 2);
|
||||
mbm.isJumping = stack.stackTagCompound.getBoolean("isJumping");
|
||||
return mbm;
|
||||
if (entity instanceof EntityPlayer && stack != null && stack.stackTagCompound != null) {
|
||||
byte wing = stack.stackTagCompound.getByte("wing");
|
||||
if (wing == JETPACK) {
|
||||
ModelSpecialArmor.getInstance().type = 1;
|
||||
} else if (wing != 0) {
|
||||
ModelSpecialArmor.getInstance().type = 2;
|
||||
if (stack.stackTagCompound.hasKey("isJumping")) {
|
||||
ModelSpecialArmor.getInstance().isJumping = stack.stackTagCompound.getBoolean("isJumping");
|
||||
}
|
||||
} else {
|
||||
ModelSpecialArmor.getInstance().type = 0;
|
||||
}
|
||||
} catch (NullPointerException e) {
|
||||
new ModelSpecialArmor(1, 0);
|
||||
} else {
|
||||
ModelSpecialArmor.getInstance().type = 0;
|
||||
}
|
||||
return new ModelSpecialArmor(1, 0);
|
||||
|
||||
return ModelSpecialArmor.getInstance();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
||||
@@ -51,16 +51,13 @@ public class ItemFeatherWing extends ItemArmor implements IRunicArmor {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelBiped getArmorModel(EntityLivingBase entity, ItemStack stack, int armorSlot) {
|
||||
try {
|
||||
if (entity instanceof EntityPlayer) {
|
||||
ModelWings mw = new ModelWings();
|
||||
mw.isJumping = stack.stackTagCompound.getBoolean("isJumping");
|
||||
return mw;
|
||||
}
|
||||
} catch (NullPointerException e) {
|
||||
return new ModelWings();
|
||||
if (entity instanceof EntityPlayer && stack != null
|
||||
&& stack.stackTagCompound != null
|
||||
&& stack.stackTagCompound.hasKey("isJumping")) {
|
||||
ModelWings.getInstance().isJumping = stack.stackTagCompound.getBoolean("isJumping");
|
||||
}
|
||||
return new ModelWings();
|
||||
|
||||
return ModelWings.getInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -72,12 +69,12 @@ public class ItemFeatherWing extends ItemArmor implements IRunicArmor {
|
||||
int amount) {
|
||||
NBTTagCompound nbtData = StackUtil.getOrCreateNbtData(stack);
|
||||
|
||||
boolean isJmuping = nbtData.getBoolean("isJumping");
|
||||
boolean isJumping = nbtData.getBoolean("isJumping");
|
||||
boolean isHolding = nbtData.getBoolean("isHolding");
|
||||
|
||||
nbtData.setBoolean("isJumping", IC2.keyboard.isJumpKeyDown(player));
|
||||
|
||||
if (isJmuping) {
|
||||
if (isJumping) {
|
||||
byte f = nbtData.getByte("f");
|
||||
nbtData.setBoolean("isHolding", true);
|
||||
if (IC2.keyboard.isSneakKeyDown(player)) nbtData.setByte("f", (byte) (0));
|
||||
@@ -108,7 +105,7 @@ public class ItemFeatherWing extends ItemArmor implements IRunicArmor {
|
||||
nbtData.setByte("f", (byte) 0);
|
||||
}
|
||||
|
||||
if (isJmuping && !player.onGround && player.motionY < 0) {
|
||||
if (isJumping && !player.onGround && player.motionY < 0) {
|
||||
player.motionY *= f1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,20 +1,16 @@
|
||||
package emt.item.focus;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.ItemFocusBasic;
|
||||
|
||||
@@ -103,17 +99,4 @@ public abstract class ItemBaseFocus extends ItemFocusBasic {
|
||||
return 5;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, @SuppressWarnings("rawtypes") List list,
|
||||
boolean par4) {
|
||||
AspectList cost = getVisCost(stack);
|
||||
if (cost != null && cost.size() > 0) {
|
||||
list.add(StatCollector.translateToLocal(isVisCostPerTick() ? "item.Focus.cost2" : "item.Focus.cost1"));
|
||||
for (Aspect aspect : cost.getAspectsSorted()) {
|
||||
float amount = cost.getAmount(aspect) / 100.0F;
|
||||
list.add(" " + '\u00a7' + aspect.getChatcolor() + aspect.getName() + '\u00a7' + "r x " + amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user