This commit is contained in:
Boblet 2024-06-19 15:58:12 +02:00
parent a016dd906a
commit 79cfe0b6c4
55 changed files with 21 additions and 19 deletions

View File

@ -1,10 +1,8 @@
## Changed ## Changed
* Changed PRISM's resistance function to work more like armor resistance instead of a straight divider * Updated boxducts
* Capped PRISM's resistance value per block to 100 (bit over concrete) * All boxducts are now way cleaner, only having bolts on intersections, with straight parts only having very light seams
* Removed the unused rare metal ores, freeing up 5 block IDs * Intersections now have unique textures for each size
* Changed the .75 bolt recipes * Copper boxducts now have a much nicer color gradient
* Exhaust pipes now have a more rusted appearance
## Fixed ## Fixed crash caused by PRISM updating unloaded worlds
* Fixed PRISM crashing instantly
* Fixed PRISM's resistance check being on backwards
* Fixed PRISM's resistance check omitting the wrong layers

View File

@ -35,7 +35,7 @@ public class FluidDuctBox extends FluidDuctBase implements IBlockMulti, ILookOve
@SideOnly(Side.CLIENT) public IIcon[] iconCurveTR; @SideOnly(Side.CLIENT) public IIcon[] iconCurveTR;
@SideOnly(Side.CLIENT) public IIcon[] iconCurveBL; @SideOnly(Side.CLIENT) public IIcon[] iconCurveBL;
@SideOnly(Side.CLIENT) public IIcon[] iconCurveBR; @SideOnly(Side.CLIENT) public IIcon[] iconCurveBR;
@SideOnly(Side.CLIENT) public IIcon[] iconJunction; @SideOnly(Side.CLIENT) public IIcon[][] iconJunction;
private static final String[] materials = new String[] { "silver", "copper", "white" }; private static final String[] materials = new String[] { "silver", "copper", "white" };
@ -55,7 +55,7 @@ public class FluidDuctBox extends FluidDuctBase implements IBlockMulti, ILookOve
iconCurveTR = new IIcon[count]; iconCurveTR = new IIcon[count];
iconCurveBL = new IIcon[count]; iconCurveBL = new IIcon[count];
iconCurveBR = new IIcon[count]; iconCurveBR = new IIcon[count];
iconJunction = new IIcon[count]; iconJunction = new IIcon[count][5];
for(int i = 0; i < count; i++) { for(int i = 0; i < count; i++) {
iconStraight[i] = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_" + materials[i] + "_straight"); iconStraight[i] = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_" + materials[i] + "_straight");
@ -64,7 +64,7 @@ public class FluidDuctBox extends FluidDuctBase implements IBlockMulti, ILookOve
iconCurveTR[i] = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_" + materials[i] + "_curve_tr"); iconCurveTR[i] = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_" + materials[i] + "_curve_tr");
iconCurveBL[i] = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_" + materials[i] + "_curve_bl"); iconCurveBL[i] = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_" + materials[i] + "_curve_bl");
iconCurveBR[i] = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_" + materials[i] + "_curve_br"); iconCurveBR[i] = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_" + materials[i] + "_curve_br");
iconJunction[i] = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_" + materials[i] + "_junction"); for(int j = 0; j < 5; j++) iconJunction[i][j] = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_" + materials[i] + "_junction_" + j);
} }
} }
@ -83,7 +83,8 @@ public class FluidDuctBox extends FluidDuctBase implements IBlockMulti, ILookOve
int mask = 0 + (pX ? 32 : 0) + (nX ? 16 : 0) + (pY ? 8 : 0) + (nY ? 4 : 0) + (pZ ? 2 : 0) + (nZ ? 1 : 0); int mask = 0 + (pX ? 32 : 0) + (nX ? 16 : 0) + (pY ? 8 : 0) + (nY ? 4 : 0) + (pZ ? 2 : 0) + (nZ ? 1 : 0);
int count = 0 + (pX ? 1 : 0) + (nX ? 1 : 0) + (pY ? 1 : 0) + (nY ? 1 : 0) + (pZ ? 1 : 0) + (nZ ? 1 : 0); int count = 0 + (pX ? 1 : 0) + (nX ? 1 : 0) + (pY ? 1 : 0) + (nY ? 1 : 0) + (pZ ? 1 : 0) + (nZ ? 1 : 0);
int m = rectify(world.getBlockMetadata(x, y, z)); int meta = world.getBlockMetadata(x, y, z);
int m = rectify(meta);
if((mask & 0b001111) == 0 && mask > 0) { if((mask & 0b001111) == 0 && mask > 0) {
return (side == 4 || side == 5) ? iconEnd[m] : iconStraight[m]; return (side == 4 || side == 5) ? iconEnd[m] : iconStraight[m];
@ -112,10 +113,10 @@ public class FluidDuctBox extends FluidDuctBase implements IBlockMulti, ILookOve
if(nX && nZ) return side == 0 ? iconCurveTL[m] : iconCurveTL[m]; if(nX && nZ) return side == 0 ? iconCurveTL[m] : iconCurveTL[m];
if(nX && pZ) return side == 0 ? iconCurveBL[m] : iconCurveBL[m]; if(nX && pZ) return side == 0 ? iconCurveBL[m] : iconCurveBL[m];
return iconJunction[m]; return iconJunction[m][meta / 3];
} }
return iconJunction[m]; return iconJunction[m][meta / 3];
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)

View File

@ -46,7 +46,7 @@ public class FluidDuctBoxExhaust extends FluidDuctBox {
iconCurveTR = new IIcon[1]; iconCurveTR = new IIcon[1];
iconCurveBL = new IIcon[1]; iconCurveBL = new IIcon[1];
iconCurveBR = new IIcon[1]; iconCurveBR = new IIcon[1];
iconJunction = new IIcon[1]; iconJunction = new IIcon[1][5];
iconStraight[0] = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_exhaust_straight"); iconStraight[0] = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_exhaust_straight");
iconEnd[0] = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_exhaust_end"); iconEnd[0] = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_exhaust_end");
@ -54,7 +54,7 @@ public class FluidDuctBoxExhaust extends FluidDuctBox {
iconCurveTR[0] = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_exhaust_curve_tr"); iconCurveTR[0] = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_exhaust_curve_tr");
iconCurveBL[0] = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_exhaust_curve_bl"); iconCurveBL[0] = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_exhaust_curve_bl");
iconCurveBR[0] = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_exhaust_curve_br"); iconCurveBR[0] = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_exhaust_curve_br");
iconJunction[0] = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_exhaust_junction"); for(int i = 0; i < 5; i++) iconJunction[0][i] = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_exhaust_junction_" + i);
} }
public boolean canConnectTo(IBlockAccess world, int x, int y, int z, ForgeDirection dir, TileEntity tile) { public boolean canConnectTo(IBlockAccess world, int x, int y, int z, ForgeDirection dir, TileEntity tile) {

View File

@ -11,8 +11,10 @@ import net.minecraft.block.material.Material;
import net.minecraft.util.MathHelper; import net.minecraft.util.MathHelper;
import net.minecraft.world.ChunkCoordIntPair; import net.minecraft.world.ChunkCoordIntPair;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
import net.minecraft.world.chunk.Chunk; import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.chunk.storage.ExtendedBlockStorage; import net.minecraft.world.chunk.storage.ExtendedBlockStorage;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.event.world.ChunkDataEvent; import net.minecraftforge.event.world.ChunkDataEvent;
import net.minecraftforge.event.world.ChunkEvent; import net.minecraftforge.event.world.ChunkEvent;
@ -176,9 +178,10 @@ public class ChunkRadiationHandlerPRISM extends ChunkRadiationHandler {
cycles++; cycles++;
for(Entry<World, RadPerWorld> entries : perWorld.entrySet()) { for(WorldServer world : DimensionManager.getWorlds()) { //only updates loaded worlds
World world = entries.getKey();
RadPerWorld system = entries.getValue(); RadPerWorld system = perWorld.get(world);
if(system == null) continue;
int rebuildAllowance = 25; int rebuildAllowance = 25;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 462 B

After

Width:  |  Height:  |  Size: 389 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 438 B

After

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 414 B

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 480 B

After

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 615 B

After

Width:  |  Height:  |  Size: 535 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 511 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 350 B

After

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 395 B

After

Width:  |  Height:  |  Size: 459 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 389 B

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 362 B

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 423 B

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 517 B

After

Width:  |  Height:  |  Size: 689 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 598 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 463 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 309 B

After

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 380 B

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 372 B

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 355 B

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 395 B

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 495 B

After

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 293 B

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 377 B

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 364 B

After

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 347 B

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 395 B

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 489 B

After

Width:  |  Height:  |  Size: 466 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 294 B

After

Width:  |  Height:  |  Size: 191 B