Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions gradle/gradle-daemon-jvm.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#This file is generated by updateDaemonJvm
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/df211d3c3eefdc408b462041881bc575/redirect
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/b41931cf1e70bc8e08d7dd19c343ef00/redirect
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/df211d3c3eefdc408b462041881bc575/redirect
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/b41931cf1e70bc8e08d7dd19c343ef00/redirect
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/46949723aaa20c7b64d7ecfed7207034/redirect
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/d6690dfd71c4c91e08577437b5b2beb0/redirect
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/df211d3c3eefdc408b462041881bc575/redirect
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/b41931cf1e70bc8e08d7dd19c343ef00/redirect
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/3cd7045fca9a72cd9bc7d14a385e594c/redirect
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/552c7bffe0370c66410a51c55985b511/redirect
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1630f7ebef05444cb27a2709ea0249b3/redirect
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/5ee463876563a46fff651cce1bc53a4c/redirect
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1630f7ebef05444cb27a2709ea0249b3/redirect
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/5ee463876563a46fff651cce1bc53a4c/redirect
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/d4fd992c9557644e637ebe98263e0ae7/redirect
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/faa12903720d410b387cc69ccafb1a74/redirect
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1630f7ebef05444cb27a2709ea0249b3/redirect
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/cd495626d2ee49a75447e3fdc6afb287/redirect
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/a4c09dd2e2d7079373d30e524bbc2829/redirect
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/8e1d9ee5d0f13e442218f6884a306da1/redirect
toolchainVersion=25
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pluginManagement {
}

plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.23'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.24'
}


Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import vazkii.botania.api.subtile.SubTileGenerating;
import vazkii.botania.common.Botania;
import vazkii.botania.common.lexicon.LexiconData;
import ic2.core.block.EntityIC2Explosive;

public class SubTileEntropinnyum extends SubTileGenerating {

Expand All @@ -36,29 +37,79 @@ public SubTileEntropinnyum() {
private static final int RANGE = 12;

@Override
public void onUpdate() {
super.onUpdate();

if(mana == 0) {
List<EntityTNTPrimed> tnts = supertile.getWorldObj().getEntitiesWithinAABB(EntityTNTPrimed.class, AxisAlignedBB.getBoundingBox(supertile.xCoord - RANGE, supertile.yCoord - RANGE, supertile.zCoord - RANGE, supertile.xCoord + RANGE + 1, supertile.yCoord + RANGE + 1, supertile.zCoord + RANGE + 1));
for(EntityTNTPrimed tnt : tnts) {
if(tnt.fuse == 1 && !tnt.isDead && !supertile.getWorldObj().getBlock(MathHelper.floor_double(tnt.posX), MathHelper.floor_double(tnt.posY), MathHelper.floor_double(tnt.posZ)).getMaterial().isLiquid()) {
if(!supertile.getWorldObj().isRemote) {
tnt.setDead();
mana += getMaxMana();
supertile.getWorldObj().playSoundEffect(tnt.posX, tnt.posY, tnt.posZ, "random.explode", 0.2F, (1F + (supertile.getWorldObj().rand.nextFloat() - supertile.getWorldObj().rand.nextFloat()) * 0.2F) * 0.7F);
sync();
}

for(int i = 0; i < 50; i++)
Botania.proxy.sparkleFX(tnt.worldObj, tnt.posX + Math.random() * 4 - 2, tnt.posY + Math.random() * 4 - 2, tnt.posZ + Math.random() * 4 - 2, 1F, (float) Math.random() * 0.25F, (float) Math.random() * 0.25F, (float) (Math.random() * 0.65F + 1.25F), 12);

supertile.getWorldObj().spawnParticle("hugeexplosion", tnt.posX, tnt.posY, tnt.posZ, 1D, 0D, 0D);
return;
}
}
}
}
public void onUpdate() {
super.onUpdate();
if(mana == 0) {
AxisAlignedBB box = AxisAlignedBB.getBoundingBox(
supertile.xCoord - RANGE,
supertile.yCoord - RANGE,
supertile.zCoord - RANGE,
supertile.xCoord + RANGE + 1,
supertile.yCoord + RANGE + 1,
supertile.zCoord + RANGE + 1);
if (!processVanillaTNT(box)) processIC2Explosive(box);
}
}

private boolean processVanillaTNT(AxisAlignedBB box){
List<EntityTNTPrimed> tntList = supertile.getWorldObj()
.getEntitiesWithinAABB(EntityTNTPrimed.class, box);
for (EntityTNTPrimed tnt : tntList) {
if (tnt.fuse == 1 && !tnt.isDead && validLocation(tnt)) {
handleExplosion(tnt);
return true;
}
} return false;
}

// can't unify with vanilla because EntityIC2Explosive directly inherits Entity
private boolean processIC2Explosive(AxisAlignedBB box) {
// for iTNT and nukes lul
List<EntityIC2Explosive> tntList = supertile.getWorldObj()
.getEntitiesWithinAABB(EntityIC2Explosive.class, box);
for (EntityIC2Explosive tnt : tntList) {
if (tnt.fuse == 1 && !tnt.isDead && validLocation(tnt)) {
handleExplosion(tnt);
return true;
}
} return false;
}

private boolean validLocation(Entity tnt) {
return !supertile.getWorldObj().getBlock(
MathHelper.floor_double(tnt.posX),
MathHelper.floor_double(tnt.posY),
MathHelper.floor_double(tnt.posZ)).getMaterial().isLiquid();
}

protected void handleExplosion(Entity tnt) {
if (!supertile.getWorldObj().isRemote) {
tnt.setDead();
mana += getMaxMana();
supertile.getWorldObj().playSoundEffect(
tnt.posX, tnt.posY, tnt.posZ,
"random.explode",
0.2F,
(1F + (supertile.getWorldObj().rand.nextFloat() - supertile.getWorldObj().rand.nextFloat()) * 0.2F) * 0.7F);
sync();
}
for (int i = 0; i < 50; i++){
Botania.proxy.sparkleFX(
tnt.worldObj,
tnt.posX + Math.random() * 4 - 2,
tnt.posY + Math.random() * 4 - 2,
tnt.posZ + Math.random() * 4 - 2,
1F,
(float) Math.random() * 0.25F,
(float) Math.random() * 0.25F,
(float) (Math.random() * 0.65F + 1.25F),
12);
}
supertile.getWorldObj().spawnParticle(
"hugeexplosion",
tnt.posX, tnt.posY, tnt.posZ,
1D, 0D, 0D);
}

@Override
public int getColor() {
Expand Down Expand Up @@ -102,6 +153,9 @@ private boolean processExplosion(World world, Entity explosionSource, double pos
return false;
}

// ic2 reactor explosion will not be eaten
if (explosionSource == null) return false;

explosionSource.setDead();
mana += getMaxMana();
supertile.getWorldObj().playSoundEffect(posX, posY, posZ, "random.explode", 0.2F, (1F + (supertile.getWorldObj().rand.nextFloat() - supertile.getWorldObj().rand.nextFloat()) * 0.2F) * 0.7F);
Expand Down
Loading