mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-26 06:43:01 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
97dcff302c | ||
|
|
57b7e8e841 | ||
|
|
e4df980eac | ||
|
|
632f0fb2f7 | ||
|
|
dfb6ca1735 | ||
|
|
77dc95d4d5 | ||
|
|
f3ef2a4244 | ||
|
|
a332cabdf7 | ||
|
|
69b64368f8 | ||
|
|
ccfc699180 | ||
|
|
6c5443c859 | ||
|
|
b4c34554c2 | ||
|
|
1f1795e635 | ||
|
|
9bf423b0da | ||
|
|
e97b70cab5 | ||
|
|
b6a965af46 | ||
|
|
584f5bd4f6 | ||
|
|
eea1549684 | ||
|
|
8246b036f3 | ||
|
|
228508a755 |
No files matched your search
+1
-1
@@ -1,5 +1,5 @@
|
||||
package_group=emt
|
||||
mc_version=1.7.10
|
||||
forge_version=10.13.4.1614
|
||||
mod_version=1.2.7.9
|
||||
mod_version=1.2.8.1
|
||||
mod_name=ElectroMagicTools
|
||||
Vendored
BIN
Binary file not shown.
+2
-2
@@ -1,6 +1,6 @@
|
||||
#Fri Nov 27 18:08:08 MSK 2015
|
||||
#Sat Jan 04 01:56:22 CET 2020
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip
|
||||
@@ -52,6 +52,8 @@ public class ConainerGenerator
|
||||
if (i == 0) {
|
||||
this.tileentity.generating = (((int) j) * 400);
|
||||
} else if (i == 1) {
|
||||
if (j == 0 || this.tileentity.fuel != j)
|
||||
this.tileentity.tick = 0;
|
||||
this.tileentity.fuel = ((byte) j);
|
||||
} else if (i == 2) {
|
||||
this.tileentity.mpshownstroage = (short) j;
|
||||
|
||||
@@ -16,7 +16,9 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import thaumcraft.api.ThaumcraftApiHelper;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
|
||||
@@ -56,6 +58,14 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
|
||||
return "item." + EMT.MOD_ID + ".bauble." + name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemStack, EntityPlayer player, List list, boolean par4) {
|
||||
String colourCode = ""+ EnumChatFormatting.DARK_RED;
|
||||
list.add(colourCode+"The Ring whispers to you, promising power. But at what cost? Long-term usage is NOT advised.");
|
||||
list.add(colourCode+"Can RUIN your game if you don't understand what this does. READ THE QUEST!!");
|
||||
super.addInformation(itemStack, player, list, par4);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ri) {
|
||||
this.icon[0] = ri.registerIcon(EMT.TEXTURE_PATH + ":onering");
|
||||
@@ -164,11 +174,24 @@ public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRun
|
||||
player.addPotionEffect(new PotionEffect(Potion.wither.id, 100, 4, false));
|
||||
}
|
||||
|
||||
if (corruption >= 300) {
|
||||
if (random.nextInt(100) == 0) {
|
||||
if (corruption >= 300) { //worn more than 5 minutes
|
||||
if (random.nextInt(100) == 0) { //every 100 seconds
|
||||
getItemWarpLevel(stack, true);
|
||||
((EntityPlayer) player).addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "The Ring suddenly starts to glow purple"));
|
||||
}
|
||||
if (random.nextInt(300) == 0) { //randomly every 5 minutes
|
||||
ThaumcraftApiHelper.addWarpToPlayer((EntityPlayer) player, 1, false); //adds 1 perm warp
|
||||
ThaumcraftApiHelper.addStickyWarpToPlayer((EntityPlayer) player, random.nextInt(1)); //adds 0-1 sticky warp
|
||||
((EntityPlayer) player).addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "Your body suddenly starts to glow purple"));
|
||||
}
|
||||
if (corruption >= 3600) { //if you wear it for more than an hour total
|
||||
if (random.nextInt(300) == 0) {
|
||||
ThaumcraftApiHelper.addWarpToPlayer((EntityPlayer) player, 5 + random.nextInt(5), false); //adds 5-10 perm warp
|
||||
ThaumcraftApiHelper.addStickyWarpToPlayer((EntityPlayer) player, 5 + random.nextInt(5)); //adds 5-10 sticky warp
|
||||
ThaumcraftApiHelper.addWarpToPlayer((EntityPlayer) player, 10 + random.nextInt(40), true); //adds 10-50 temp warp, but this is ultra easy to remove
|
||||
((EntityPlayer) player).addChatMessage(new ChatComponentText(EMTTextHelper.PURPLE + "Your body resonates with the Ring and suddenly starts to glow purple ominously"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
forgeTag.setInteger(NBT_TAG_MIND_CORRUPTION, ++corruption);
|
||||
|
||||
@@ -475,7 +475,10 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
||||
byte f = nbt.getByte("f");
|
||||
|
||||
nbt.setBoolean("isHolding", true);
|
||||
nbt.setByte("f", (byte) (f + 1));
|
||||
if (IC2.keyboard.isSneakKeyDown(player))
|
||||
nbt.setByte("f", (byte) (0));
|
||||
else
|
||||
nbt.setByte("f", (byte) (f + 1));
|
||||
|
||||
if (f > 7) {
|
||||
nbt.setByte("f", (byte) 7);
|
||||
@@ -483,21 +486,23 @@ public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements I
|
||||
} else if (nbt.getBoolean("isHolding")) {
|
||||
byte f = nbt.getByte("f");
|
||||
nbt.setBoolean("isHolding", false);
|
||||
player.motionY = motionY * f;
|
||||
if (!IC2.keyboard.isSneakKeyDown(player)) {
|
||||
player.motionY = motionY * f;
|
||||
|
||||
if (isElectric) {
|
||||
ElectricItem.manager.use(stack, ((motionY * f) * 10) * amount, player);
|
||||
}
|
||||
if (isElectric) {
|
||||
ElectricItem.manager.use(stack, ((motionY * f) * 10) * amount, player);
|
||||
}
|
||||
|
||||
if (player.motionX < 0.5 && player.motionZ < 0.5 && player.motionX > -0.5 && player.motionZ > -0.5) {
|
||||
player.motionX /= motionXZ;
|
||||
player.motionZ /= motionXZ;
|
||||
}
|
||||
if (player.motionX < 0.5 && player.motionZ < 0.5 && player.motionX > -0.5 && player.motionZ > -0.5) {
|
||||
player.motionX /= motionXZ;
|
||||
player.motionZ /= motionXZ;
|
||||
}
|
||||
|
||||
world.playSoundEffect(player.posX, player.posY, player.posZ, "mob.ghast.fireball", 1, 1);
|
||||
world.playSoundEffect(player.posX, player.posY, player.posZ, "mob.ghast.fireball", 1, 1);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
world.spawnParticle("cloud", player.posX - 1 + (world.rand.nextInt(100) / 50d), player.posY - 1, player.posZ - 1 + (world.rand.nextInt(100) / 50d), 0, -0.5, 0);
|
||||
for (int i = 0; i < 4; i++) {
|
||||
world.spawnParticle("cloud", player.posX - 1 + (world.rand.nextInt(100) / 50d), player.posY - 1, player.posZ - 1 + (world.rand.nextInt(100) / 50d), 0, -0.5, 0);
|
||||
}
|
||||
}
|
||||
|
||||
nbt.setByte("f", (byte) 0);
|
||||
|
||||
@@ -77,21 +77,26 @@ public class ItemFeatherWing extends ItemArmor implements IRunicArmor {
|
||||
if (isJmuping) {
|
||||
byte f = nbtData.getByte("f");
|
||||
nbtData.setBoolean("isHolding", true);
|
||||
nbtData.setByte("f", (byte) (f + 1));
|
||||
if (IC2.keyboard.isSneakKeyDown(player))
|
||||
nbtData.setByte("f", (byte) (0));
|
||||
else
|
||||
nbtData.setByte("f", (byte) (f + 1));
|
||||
if (f > 7)
|
||||
nbtData.setByte("f", (byte) 7);
|
||||
} else if (isHolding) {
|
||||
byte f = nbtData.getByte("f");
|
||||
nbtData.setBoolean("isHolding", false);
|
||||
player.motionY = motionY * f;
|
||||
ElectricItem.manager.use(stack, ((motionY * f) * 10) * amount, player);
|
||||
if (player.motionX < 0.5 && player.motionZ < 0.5 && player.motionX > -0.5 && player.motionZ > -0.5) {
|
||||
player.motionX /= motionXZ;
|
||||
player.motionZ /= motionXZ;
|
||||
}
|
||||
world.playSoundEffect(player.posX, player.posY, player.posZ, "mob.ghast.fireball", 1, 1);
|
||||
for (int i = 0; i < 4; i++) {
|
||||
world.spawnParticle("cloud", player.posX - 1 + (world.rand.nextInt(100) / 50d), player.posY - 1, player.posZ - 1 + (world.rand.nextInt(100) / 50d), 0, -0.5, 0);
|
||||
if (!IC2.keyboard.isSneakKeyDown(player)) {
|
||||
player.motionY = motionY * f;
|
||||
ElectricItem.manager.use(stack, ((motionY * f) * 10) * amount, player);
|
||||
if (player.motionX < 0.5 && player.motionZ < 0.5 && player.motionX > -0.5 && player.motionZ > -0.5) {
|
||||
player.motionX /= motionXZ;
|
||||
player.motionZ /= motionXZ;
|
||||
}
|
||||
world.playSoundEffect(player.posX, player.posY, player.posZ, "mob.ghast.fireball", 1, 1);
|
||||
for (int i = 0; i < 4; i++) {
|
||||
world.spawnParticle("cloud", player.posX - 1 + (world.rand.nextInt(100) / 50d), player.posY - 1, player.posZ - 1 + (world.rand.nextInt(100) / 50d), 0, -0.5, 0);
|
||||
}
|
||||
}
|
||||
nbtData.setByte("f", (byte) 0);
|
||||
}
|
||||
|
||||
@@ -96,6 +96,9 @@ public class TileEntityBaseGenerator
|
||||
|
||||
|
||||
public void storeFuel() {
|
||||
if (!side)
|
||||
return;
|
||||
|
||||
if (this.fuel < this.maxfuel) {
|
||||
for (int x = this.xCoord - 4; x < this.xCoord + 4; x++) {
|
||||
for (int y = this.yCoord - 4; y < this.yCoord + 4; y++) {
|
||||
@@ -116,6 +119,12 @@ public class TileEntityBaseGenerator
|
||||
}
|
||||
|
||||
public void fillfrompipe() {
|
||||
if (!side)
|
||||
return;
|
||||
|
||||
if (this.fuel == this.maxfuel)
|
||||
return;
|
||||
|
||||
TileEntity[] te = new TileEntity[ForgeDirection.VALID_DIRECTIONS.length];
|
||||
for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) {
|
||||
te[i] = ThaumcraftApiHelper.getConnectableTile(this.worldObj, this.xCoord, this.yCoord, this.zCoord, ForgeDirection.VALID_DIRECTIONS[i]);
|
||||
@@ -136,31 +145,24 @@ public class TileEntityBaseGenerator
|
||||
}
|
||||
|
||||
public void createEnergy() {
|
||||
if (!side) {
|
||||
if (this.isActive && this.tick < 400) {
|
||||
this.tick += 1;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.fuel > 0) {
|
||||
if (this.storage + this.generating / 20.0D / 20.0D < this.maxstorage) {
|
||||
this.isActive = true;
|
||||
if (side) {
|
||||
this.energySource.addEnergy(this.generating / 20.0D / 20.0D);
|
||||
this.storage = ((int) this.energySource.getEnergyStored());
|
||||
}
|
||||
this.tick += 1;
|
||||
if (this.tick == 400) {
|
||||
this.fuel -= 1;
|
||||
this.tick = 0;
|
||||
}
|
||||
} else if (this.storage == this.maxstorage) {
|
||||
this.isActive = false;
|
||||
} else if ((this.storage + this.generating / 20.0D / 20.0D > this.maxstorage)) {
|
||||
this.isActive = true;
|
||||
if (side) {
|
||||
this.energySource.setEnergyStored(this.maxstorage);
|
||||
this.storage = this.maxstorage;
|
||||
}
|
||||
this.energySource.addEnergy(this.generating / 20.0D / 20.0D);
|
||||
this.storage = ((int) this.energySource.getEnergyStored());
|
||||
this.tick += 1;
|
||||
if (this.tick == 400) {
|
||||
this.fuel -= 1;
|
||||
this.tick = 0;
|
||||
}
|
||||
} else {
|
||||
this.isActive = false;
|
||||
}
|
||||
} else {
|
||||
@@ -300,7 +302,7 @@ public class TileEntityBaseGenerator
|
||||
}
|
||||
|
||||
public int getSuctionAmount(ForgeDirection face) {
|
||||
return 128;
|
||||
return this.fuel == this.maxfuel ? 0 : 128;
|
||||
}
|
||||
|
||||
public int takeEssentia(Aspect aspect, int amount, ForgeDirection face) {
|
||||
@@ -331,14 +333,22 @@ public class TileEntityBaseGenerator
|
||||
}
|
||||
|
||||
public void inputintoGTnet() {
|
||||
if (!side)
|
||||
return;
|
||||
|
||||
if (checkForGtTile() && isUniversalEnergyStored(getOutputVoltage() * getOutputAmperage())) {
|
||||
long tEU = IEnergyConnected.Util.emitEnergyToNetwork(getOutputVoltage(), getOutputAmperage(), this);
|
||||
drainEnergyUnits((byte) 0, getOutputVoltage(), tEU);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean checkForGtTile() {
|
||||
for (byte i = 0; i < 6; i = (byte) (i + 1)) {
|
||||
if (getIGregTechTileEntityAtSide(i) != null) {
|
||||
if (isUniversalEnergyStored(getOutputVoltage() * getOutputAmperage())) {
|
||||
long tEU = IEnergyConnected.Util.emitEnergyToNetwork(getOutputVoltage(), getOutputAmperage(), this);
|
||||
drainEnergyUnits(i, getOutputVoltage(), tEU);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public byte getColorization() {
|
||||
|
||||
@@ -379,14 +379,22 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
public void inputintoGTnet() {
|
||||
if (!side)
|
||||
return;
|
||||
|
||||
if (checkForGtTile() && isUniversalEnergyStored(getOutputVoltage() * getOutputAmperage())) {
|
||||
long tEU = IEnergyConnected.Util.emitEnergyToNetwork(getOutputVoltage(), getOutputAmperage(), this);
|
||||
drainEnergyUnits((byte) 0, getOutputVoltage(), tEU);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean checkForGtTile() {
|
||||
for (byte i = 0; i < 6; i = (byte) (i + 1)) {
|
||||
if (getIGregTechTileEntityAtSide(i) != null) {
|
||||
if (isUniversalEnergyStored(getOutputVoltage() * getOutputAmperage())) {
|
||||
long tEU = IEnergyConnected.Util.emitEnergyToNetwork(getOutputVoltage(), getOutputAmperage(), this);
|
||||
drainEnergyUnits(i, getOutputVoltage(), tEU);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public byte getColorization() {
|
||||
|
||||
@@ -141,7 +141,7 @@ tile.EMT.solar2.tripleearth.name=Earth Infused Triple Compressed Solar Panel
|
||||
#===============Gregtech Compat===============
|
||||
EMT_GTBLOCK_CASEING.0.name=Magic Containing Casing
|
||||
EMT_GTBLOCK_CASEING.1.name=Essentia Diffusion Cell
|
||||
EMT_GTBLOCK_CASEING.2.name=Iridium Osmiridium Framebox
|
||||
EMT_GTBLOCK_CASEING.2.name=Iridium Ruridit Framebox
|
||||
EMT_GTBLOCK_CASEING.3.name=Indium Tungsten Framebox
|
||||
EMT_GTBLOCK_CASEING.4.name=Raw Magic Containing Casing
|
||||
EMT_GTBLOCK_CASEING.5.name=Raw Essentia Diffusion Cell
|
||||
|
||||
Reference in new issue
Block a user