This commit is contained in:
Boblet 2025-10-27 16:58:21 +01:00
parent 9e5c4e4a8e
commit 02ee44e1ce
7 changed files with 47 additions and 20 deletions

View File

@ -1,3 +1,7 @@
## Added
* Boxcables
* Like boxducts, but for power
## Changed
* Updated meteors
* Meteors will now punch through weak blocks like leaves instead of getting stuck on trees
@ -5,6 +9,9 @@
* Falling meteors will produce a sound instead of stealthily blowing people up
* Fallen meteors will now be placed deeper into the actual crater instead of hovering awkwardly over the hole
* Addd QMAW pages for the particle accelerator parts along with a PA overview page and a simple step by step construction tutorial
* Increased the acidizer partitioner's input limit from 9 to 45 slots
## Fixed
* Fixed arc furnace only allowing electrodes to be inserted when the lid is down instead of up
* Fixed arc furnace only allowing electrodes to be inserted when the lid is down instead of up
* Fixed issue where the `amounts` tracker wasn't being used correctly when using a custom acidizer config, preventing the acidizer partitioner from working
* Fixed multi fluid ID search potentially not working on systems with a non-latin locale

View File

@ -79,7 +79,7 @@ public class TritiumLamp extends Block implements ISpotlight {
private void updateBeam(World world, int x, int y, int z) {
if(!isOn) return;
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) Spotlight.propagateBeam(world, x, y, z, dir, getBeamLength());
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) Spotlight.propagateBeam(world, x, y, z, dir, getBeamLength(), getMeta());
}
@Override
@ -98,6 +98,12 @@ public class TritiumLamp extends Block implements ISpotlight {
return new ItemStack(getOff());
}
protected int getMeta() {
if(this == ModBlocks.lamp_tritium_green_off || this == ModBlocks.lamp_tritium_green_on) return Spotlight.META_GREEN;
if(this == ModBlocks.lamp_tritium_blue_off || this == ModBlocks.lamp_tritium_blue_on) return Spotlight.META_BLUE;
return Spotlight.META_YELLOW;
}
protected Block getOff() {
if(this == ModBlocks.lamp_tritium_green_on) return ModBlocks.lamp_tritium_green_off;
if(this == ModBlocks.lamp_tritium_blue_on) return ModBlocks.lamp_tritium_blue_off;

View File

@ -28,6 +28,10 @@ import net.minecraftforge.common.util.ForgeDirection;
public class Spotlight extends Block implements ISpotlight, INBTBlockTransformable {
public static final int META_YELLOW = 0;
public static final int META_GREEN = 1;
public static final int META_BLUE = 2;
public static boolean disableOnGeneration = true;
// I'd be extending the ReinforcedLamp class if it wasn't for the inverted behaviour of these specific lights
@ -223,7 +227,7 @@ public class Spotlight extends Block implements ISpotlight, INBTBlockTransformab
if(!isOn) return;
ForgeDirection dir = getDirection(world, x, y, z);
propagateBeam(world, x, y, z, dir, beamLength);
propagateBeam(world, x, y, z, dir, beamLength, META_YELLOW);
}
public ForgeDirection getDirection(IBlockAccess world, int x, int y, int z) {
@ -281,7 +285,7 @@ public class Spotlight extends Block implements ISpotlight, INBTBlockTransformab
}
// Recursively add beam blocks, updating any that already exist with new incoming light directions
public static void propagateBeam(World world, int x, int y, int z, ForgeDirection dir, int distance) {
public static void propagateBeam(World world, int x, int y, int z, ForgeDirection dir, int distance, int meta) {
distance--;
if(distance <= 0)
return;
@ -295,7 +299,7 @@ public class Spotlight extends Block implements ISpotlight, INBTBlockTransformab
return;
if(!(block instanceof SpotlightBeam)) {
world.setBlock(x, y, z, ModBlocks.spotlight_beam);
world.setBlock(x, y, z, ModBlocks.spotlight_beam, meta, 3);
}
// If we encounter an existing beam, add a new INCOMING direction to the
@ -303,7 +307,7 @@ public class Spotlight extends Block implements ISpotlight, INBTBlockTransformab
if (SpotlightBeam.setDirection(world, x, y, z, dir, true) == 0)
return;
propagateBeam(world, x, y, z, dir, distance);
propagateBeam(world, x, y, z, dir, distance, meta);
}
// Recursively delete beam blocks, if they aren't still illuminated from a different direction
@ -326,7 +330,7 @@ public class Spotlight extends Block implements ISpotlight, INBTBlockTransformab
}
// Travels back through a beam to the source, and if found, repropagates the beam
public static void backPropagate(World world, int x, int y, int z, ForgeDirection dir) {
public static void backPropagate(World world, int x, int y, int z, ForgeDirection dir, int meta) {
x -= dir.offsetX;
y -= dir.offsetY;
z -= dir.offsetZ;
@ -334,12 +338,12 @@ public class Spotlight extends Block implements ISpotlight, INBTBlockTransformab
Block block = world.getBlock(x, y, z);
if(block instanceof ISpotlight) {
ISpotlight spot = (ISpotlight) block;
propagateBeam(world, x, y, z, dir, spot.getBeamLength());
propagateBeam(world, x, y, z, dir, spot.getBeamLength(), meta);
} else if(!(block instanceof SpotlightBeam)) {
return;
}
backPropagate(world, x, y, z, dir);
backPropagate(world, x, y, z, dir, meta);
}
protected Block getOff() {

View File

@ -29,8 +29,8 @@ public class SpotlightBeam extends BlockBeamBase {
if (world.isRemote) return;
if (neighborBlock instanceof SpotlightBeam) return;
for (ForgeDirection dir : getDirections(world, x, y, z)) {
Spotlight.backPropagate(world, x, y, z, dir);
for(ForgeDirection dir : getDirections(world, x, y, z)) {
Spotlight.backPropagate(world, x, y, z, dir, world.getBlockMetadata(x, y, z));
}
}

View File

@ -139,8 +139,10 @@ public class CranePartitioner extends BlockContainer implements IConveyorBelt, I
public static class TileEntityCranePartitioner extends TileEntityMachineBase {
public static final int SLOT_COUNT = 45;
public TileEntityCranePartitioner() {
super(18);
super(SLOT_COUNT * 2);
}
@Override public String getName() { return "container.partitioner"; }
@ -151,7 +153,7 @@ public class CranePartitioner extends BlockContainer implements IConveyorBelt, I
if(!worldObj.isRemote) {
List<ItemStack> stacks = new ArrayList();
for(int i = 0; i < 9; i++) if(slots[i] != null) stacks.add(slots[i]);
for(int i = 0; i < SLOT_COUNT; i++) if(slots[i] != null) stacks.add(slots[i]);
stacks.sort(stackSizeComparator);
boolean markDirty = false;
@ -168,7 +170,7 @@ public class CranePartitioner extends BlockContainer implements IConveyorBelt, I
}
}
for(int i = 0; i < 9; i++) if(slots[i] != null && slots[i].stackSize <= 0) slots[i] = null;
for(int i = 0; i < SLOT_COUNT; i++) if(slots[i] != null && slots[i].stackSize <= 0) slots[i] = null;
if(markDirty) this.markDirty();
}
}
@ -183,17 +185,25 @@ public class CranePartitioner extends BlockContainer implements IConveyorBelt, I
@Override
public boolean canExtractItem(int slot, ItemStack stack, int side) {
return slot >= 9;
return slot >= SLOT_COUNT;
}
@Override
public boolean isItemValidForSlot(int i, ItemStack stack) {
return i <= 8 && CrystallizerRecipes.getAmount(stack) >= 1;
return i <= (SLOT_COUNT - 1) && CrystallizerRecipes.getAmount(stack) >= 1;
}
protected int[] access;
@Override
public int[] getAccessibleSlotsFromSide(int side) {
return new int[] { 0, 1, 2, 3, 4, 5, 6 ,7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 };
if(access == null) {
access = new int[SLOT_COUNT]; // writing this by hand is for chumps
for(int i = 0; i < SLOT_COUNT; i++) access[i] = i;
}
return access;
}
}

View File

@ -175,7 +175,7 @@ public class GUIScreenFluid extends GuiScreen {
String subs = this.search.getText().toLowerCase(Locale.US);
for(FluidType type : Fluids.getInNiceOrder()) {
String name = type.getLocalizedName().toLowerCase();
String name = type.getLocalizedName().toLowerCase(Locale.US);
if(name.contains(subs) && !type.hasNoID()) {
this.searchArray[next] = type;

View File

@ -383,9 +383,9 @@ public class CrystallizerRecipes extends SerializableRecipe {
input.stacksize = 1;
cRecipe.acidAmount = fluid.fill;
if(input instanceof ComparableStack) {
recipes.put(new Pair(((ComparableStack) input), fluid.type), cRecipe);
this.registerRecipe(input, cRecipe, fluid);
} else if(input instanceof OreDictStack) {
recipes.put(new Pair(((OreDictStack) input).name, fluid.type), cRecipe);
this.registerRecipe(input, cRecipe, fluid);
}
if(obj.has("productivity")) cRecipe.prod(obj.get("productivity").getAsFloat());
}