Compare commits

...
23 Commits
Author SHA1 Message Date
DreamMasterXXL ff25437d14 bump version 2021-06-15 21:54:07 +02:00
Léa Gris 69b43d2874 Merge pull request #22 from GTNewHorizons/fix_CASING_BLOCKS
fix(textures): deprecated use of CASING_BLOCKS
2021-05-22 23:45:02 +02:00
Léa Gris aae438a098 fix(textures): deprecated use of CASING_BLOCKS 2021-05-22 21:49:01 +02:00
DreamMasterXXL 97dcff302c bump version 2021-02-26 07:23:40 +01:00
KiloJoel 57b7e8e841 fixed gens outputting their amps up to 6 times (#20)
* fixed gens outputting their amps up to 6 times

* change according to review
2021-02-12 17:58:07 +01:00
Martin Robertz e4df980eac Merge pull request #19 from GTNewHorizons/essentiaGenFix
Essentia gen fixes
2021-01-10 15:17:56 +01:00
KiloJoel 632f0fb2f7 fixed essentia gens accepting essentia when full 2021-01-10 08:16:36 +00:00
KiloJoel dfb6ca1735 fixed other server-client problems 2021-01-10 07:44:38 +00:00
KiloJoel 77dc95d4d5 fixed log spam from essentia gens 2021-01-10 07:33:58 +00:00
KiloJoel f3ef2a4244 updated gradle wrapper 2021-01-10 07:27:39 +00:00
DreamMasterXXL a332cabdf7 bump version 2020-12-15 23:43:44 +01:00
Martin Robertz 69b64368f8 Merge pull request #18 from KiloJoel/wingsCancelFeature
Wings cancel feature
2020-12-08 15:39:34 +01:00
KiloJoel ccfc699180 mirrored change for infused chestplate 2020-12-08 11:07:46 +00:00
KiloJoel 6c5443c859 wings don't boost if you sneak 2020-12-08 10:44:45 +00:00
Martin Robertz b4c34554c2 Merge pull request #16 from draknyte1/patch-1
Update ItemOneRing.java
2020-10-21 16:30:23 +02:00
Alkalus 1f1795e635 Update ItemOneRing.java
Removed use of Section symbol, adjusted to EnumChatFormatting.
2020-10-20 23:39:56 +01:00
Alkalus 9bf423b0da Update ItemOneRing.java
Adds a better tooltip.
2020-10-20 18:07:10 +01:00
Martin Robertz e97b70cab5 Merge pull request #15 from Prometheus0000/master
fix name
2020-10-13 09:53:38 +02:00
Prometheus0000 b6a965af46 Change name 2020-10-12 18:59:18 -04:00
Prometheus0000 584f5bd4f6 Merge pull request #1 from GTNewHorizons/master
update
2020-10-12 18:57:35 -04:00
DreamMasterXXL eea1549684 fix(EMT)derp 2020-10-12 19:55:00 +02:00
DreamMasterXXL 8246b036f3 Merge branch 'Ring-Change' 2020-10-12 18:38:26 +02:00
Prometheus0000 228508a755 Makes the One Ring add warp to the player as well 2020-10-12 11:09:19 -04:00
15 changed files with 109 additions and 56 deletions

No files matched your search

+1 -1
View File
@@ -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.2
mod_name=ElectroMagicTools
Binary file not shown.
+2 -2
View File
@@ -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
Vendored Regular → Executable
View File
File mode changed.
Binary file not shown.
@@ -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;
@@ -68,9 +68,9 @@ public class EMT_Large_Essentia_Gen extends GT_MetaTileEntity_MultiBlockBase {
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[CASING_INDEX], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER)};
return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_INDEX), new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER)};
}
return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[CASING_INDEX]};
return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_INDEX)};
}
@Override
+25 -2
View File
@@ -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