chore: update auracore and fix some random shit

This commit is contained in:
LordMZTE 2023-05-25 22:16:12 +02:00
parent c9c4544429
commit 8da2d5551f
Signed by: LordMZTE
GPG Key ID: B64802DC33A64FF6
11 changed files with 37 additions and 51 deletions

View File

@ -38,7 +38,7 @@ repositories {
dependencies {
implementation "thaumcraft:Thaumcraft:1.7.10-4.2.3.5:deobf"
implementation "dev.tilera:auracore:1.8.9:deobf"
implementation "dev.tilera:auracore:1.9.0:deobf"
implementation "com.github.tox1cozZ:mixin-booter-legacy:1.1.2"
}

View File

@ -2,10 +2,10 @@ package net.anvilcraft.thaummach;
import dev.tilera.auracore.api.machine.IConnection;
import dev.tilera.auracore.aura.AuraManager;
import net.anvilcraft.thaummach.particles.FXWisp;
import net.minecraft.client.Minecraft;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import thaumcraft.client.fx.particles.FXWisp;
public class AuraUtils {
public static void taintExplosion(World w, int x, int y, int z) {

View File

@ -2,6 +2,7 @@ package net.anvilcraft.thaummach.blocks;
import java.util.Random;
import net.anvilcraft.thaummach.AuraUtils;
import net.anvilcraft.thaummach.GuiID;
import net.anvilcraft.thaummach.ITileGui;
import net.anvilcraft.thaummach.TMTab;
@ -124,6 +125,9 @@ public abstract class BlockApparatus extends BlockContainer {
}
}
}
AuraUtils.spillTaint(world, x, y, z);
super.breakBlock(world, x, y, z, block, meta);
}

View File

@ -388,17 +388,6 @@ public class BlockApparatusFragile extends BlockApparatus {
}
}
@Override
public void breakBlock(World world, int x, int y, int z, Block block, int meta_) {
// TODO: not sure if param 6 is meta
MetaVals meta = MetaVals.get(meta_);
if (meta != MetaVals.CONDUIT_PUMP) {
AuraUtils.spillTaint(world, x, y, z);
}
super.breakBlock(world, x, y, z, block, meta_);
}
@Override
public int getRenderType() {
return BlockApparatusRenderer.RI;

View File

@ -720,16 +720,12 @@ public class BlockApparatusMetal extends BlockApparatus {
@Override
public void breakBlock(World world, int i, int j, int k, Block block, int meta_) {
MetaVals meta = MetaVals.get(meta_);
if (meta.isCrucible() || meta == MetaVals.TANK) {
AuraUtils.spillTaint(world, i, j, k);
}
if (meta == MetaVals.VOID_INTERFACE) {
TileVoidInterface ts = (TileVoidInterface) world.getTileEntity(i, j, k);
if (ts != null) {
ts.invalidateLinks();
}
} else {
super.breakBlock(world, i, j, k, block, meta_);
}

View File

@ -28,8 +28,7 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class BlockApparatusWood extends BlockApparatus {
public IIcon iconCondenserPart1;
public IIcon iconCondenserPart2;
public IIcon iconCondenserPart;
public IIcon iconCondenserSide;
public IIcon iconCondenserSpeedUpgrade;
public IIcon iconCondenserTop;
@ -62,8 +61,7 @@ public class BlockApparatusWood extends BlockApparatus {
public void registerBlockIcons(IIconRegister register) {
Function<String, IIcon> reg = (s) -> register.registerIcon("thaummach:" + s);
this.iconCondenserPart1 = reg.apply("condenser_part_1");
this.iconCondenserPart2 = reg.apply("condenser_part_2");
this.iconCondenserPart = reg.apply("condenser_part");
this.iconCondenserSide = reg.apply("condenser_side");
this.iconCondenserSpeedUpgrade = reg.apply("condenser_speed_upgrade");
this.iconCondenserTop = reg.apply("condenser_top");

View File

@ -51,9 +51,9 @@ public class ItemCrystallineBell extends Item implements IRepairable {
ItemStack itemstack,
EntityPlayer player,
World world,
int i,
int j,
int k,
int x,
int y,
int z,
int l,
// useless parameters
float alec1,
@ -63,15 +63,16 @@ public class ItemCrystallineBell extends Item implements IRepairable {
if (itemstack.stackSize == 0)
return false;
int meta = world.getBlockMetadata(i, j, k);
TileEntity te = world.getTileEntity(i, j, k);
int meta = world.getBlockMetadata(x, y, z);
TileEntity te = world.getTileEntity(x, y, z);
if (te != null && te instanceof ICrystal) {
if (((ICrystal) te).getCrystalCount(meta) == 1)
if (!((ICrystal) te).canHarvest(player))
return false;
world.playSoundEffect(
(double) ((float) i + 0.5F),
(double) ((float) j + 0.5F),
(double) ((float) k + 0.5F),
(double) ((float) x + 0.5F),
(double) ((float) y + 0.5F),
(double) ((float) z + 0.5F),
"random.orb",
0.5F,
0.8F + (float) ((ICrystal) te).getCrystalCount(meta) * 0.1F
@ -80,10 +81,10 @@ public class ItemCrystallineBell extends Item implements IRepairable {
((ICrystal) te).harvestShard(player);
itemstack.damageItem(1, player);
world.markBlockForUpdate(i, j, k);
world.markBlockForUpdate(x, y, z);
return true;
}
return super.onItemUse(itemstack, player, world, i, j, k, l, alec1, alec2, alec3);
return super.onItemUse(itemstack, player, world, x, y, z, l, alec1, alec2, alec3);
}
// TODO: WTF

View File

@ -63,11 +63,11 @@ public class CondenserApparatusRenderer implements IApparatusRenderer {
rb.renderStandardBlock(block, i, j, k);
}
rb.overrideBlockTexture = block.iconCondenserPart1;
rb.overrideBlockTexture = block.iconCondenserPart;
rb.setRenderBounds(0.5F - w2, w2, 0.0F, 0.5F + w2, 1.0F - w2, 1.0F);
if (inv) {
ApparatusRenderingHelper.drawFaces(
rb, block, block.iconCondenserPart1, false
rb, block, block.iconCondenserPart, false
);
} else {
rb.renderStandardBlock(block, i, j, k);
@ -76,7 +76,7 @@ public class CondenserApparatusRenderer implements IApparatusRenderer {
rb.setRenderBounds(0.0F, w2, 0.5F - w2, 1.0F, 1.0F - w2, 0.5F + w2);
if (inv) {
ApparatusRenderingHelper.drawFaces(
rb, block, block.iconCondenserPart1, false
rb, block, block.iconCondenserPart, false
);
} else {
rb.renderStandardBlock(block, i, j, k);
@ -85,7 +85,7 @@ public class CondenserApparatusRenderer implements IApparatusRenderer {
rb.setRenderBounds(0.5F - w2, w2, 0.0F, 0.5F + w2, 1.0F - w2, 1.0F);
if (inv) {
ApparatusRenderingHelper.drawFaces(
rb, block, block.iconCondenserPart1, false
rb, block, block.iconCondenserPart, false
);
} else {
rb.renderStandardBlock(block, i, j, k);
@ -94,7 +94,7 @@ public class CondenserApparatusRenderer implements IApparatusRenderer {
rb.setRenderBounds(0.0F, w2, 0.5F - w2, 1.0F, 1.0F - w2, 0.5F + w2);
if (inv) {
ApparatusRenderingHelper.drawFaces(
rb, block, block.iconCondenserPart1, false
rb, block, block.iconCondenserPart, false
);
} else {
rb.renderStandardBlock(block, i, j, k);

View File

@ -87,20 +87,18 @@ public class TileCondenser
);
if (nodeID >= 0) {
AuraNode node = AuraManager.getNode(nodeID);
if (this.currentType != 9) {
if (node.level > 0) {
AuraManager.queueNodeChanges(
nodeID, -1, 0, false, null, 0, 0, 0
);
this.progress = 0.0f;
++this.currentVis;
} else if (this.hasUpgrade((byte) 3) && node.taint > 0) {
AuraManager.queueNodeChanges(
nodeID, 0, 0, -1, false, null, 0, 0, 0
);
this.progress = 0.0f;
++this.currentTaint;
}
if (this.currentType != 9 && node.level > 0) {
AuraManager.queueNodeChanges(
nodeID, -1, 0, false, null, 0, 0, 0
);
this.progress = 0.0f;
++this.currentVis;
} else if (this.hasUpgrade((byte) 3) && node.taint > 0) {
AuraManager.queueNodeChanges(
nodeID, 0, 0, -1, false, null, 0, 0, 0
);
this.progress = 0.0f;
++this.currentTaint;
}
this.worldObj.markBlockForUpdate(

Binary file not shown.

Before

Width:  |  Height:  |  Size: 421 B