pneumonia

This commit is contained in:
Bob 2025-10-21 21:55:14 +02:00
parent bbe41c02a7
commit 3bf9ab1570
10 changed files with 54 additions and 25 deletions

View File

@ -10,6 +10,10 @@
* Despite this, sneaking allows the AoE to be disabled
* Unlike pickaxes, shows a preview for what area is to be mined
* Due to not being considered a tool like a vanilla one, it's not affected by dig speed penalties from fatigue, being underwater or on a ladder
* Pipe anchor
* Works like a electricity connector but for fluids
* Range of 10 blocks
* Can be connected using a pipe wrench
## Changed
* Updated russian and chinese localization
@ -53,6 +57,7 @@
* Gerald is now way more expensive
* PWR parts are now subject to expensive mode
* Fluid container items now keep their custom name when filling or emptying
* Pneumatic tube endpoints now have a GUI that allows filters to be defined
## Fixed
* Fixed the T-51b set not having radiation resistance

View File

@ -96,6 +96,9 @@ public class PneumoTube extends BlockContainer implements IToolable, ITooltipPro
if(tube.isCompressor()) {
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
return true;
} else if(tube.isEndpoint()) {
FMLNetworkHandler.openGui(player, MainRegistry.instance, 1, world, x, y, z);
return true;
}
}
return false;

View File

@ -153,6 +153,9 @@ public class PneumoTubePaintableBlock extends BlockContainer implements IToolabl
if (tube.isCompressor()) {
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
return true;
} else if(tube.isEndpoint()) {
FMLNetworkHandler.openGui(player, MainRegistry.instance, 1, world, x, y, z);
return true;
}
}
}

View File

@ -25,11 +25,14 @@ import net.minecraft.util.ResourceLocation;
public class GUIPneumoTube extends GuiInfoContainer {
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/storage/gui_pneumatic_pipe.png");
private static ResourceLocation texture_endpoint = new ResourceLocation(RefStrings.MODID + ":textures/gui/storage/gui_pneumatic_endpoint.png");
public TileEntityPneumoTube tube;
public boolean endpointOnly;
public GUIPneumoTube(InventoryPlayer invPlayer, TileEntityPneumoTube tedf) {
public GUIPneumoTube(InventoryPlayer invPlayer, TileEntityPneumoTube tedf, boolean endpointOnly) {
super(new ContainerPneumoTube(invPlayer, tedf));
this.tube = tedf;
this.endpointOnly = endpointOnly;
this.xSize = 176;
this.ySize = 185;
@ -39,6 +42,7 @@ public class GUIPneumoTube extends GuiInfoContainer {
public void drawScreen(int x, int y, float interp) {
super.drawScreen(x, y, interp);
if(!endpointOnly) {
tube.compair.renderTankInfo(this, x, y, guiLeft + 7, guiTop + 16, 18, 18);
this.drawCustomInfoStat(x, y, guiLeft + 7, guiTop + 52, 18, 18, x, y, (tube.redstone ? (EnumChatFormatting.GREEN + "ON ") : (EnumChatFormatting.RED + "OFF ")) + EnumChatFormatting.RESET + "with Redstone");
@ -46,7 +50,7 @@ public class GUIPneumoTube extends GuiInfoContainer {
this.drawCustomInfoStat(x, y, guiLeft + 151, guiTop + 16, 18, 18, x, y, EnumChatFormatting.YELLOW + "Receiver order:", tube.receiveOrder == PneumaticNetwork.RECEIVE_ROBIN ? "Round robin" : "Random");
this.drawCustomInfoStat(x, y, guiLeft + 151, guiTop + 52, 18, 18, x, y, EnumChatFormatting.YELLOW + "Provider slot order:", tube.sendOrder == PneumaticNetwork.SEND_FIRST ? "First to last" : tube.sendOrder == PneumaticNetwork.SEND_LAST ? "Last to first" : "Random");
}
if(this.mc.thePlayer.inventory.getItemStack() == null) {
for(int i = 0; i < 15; ++i) {
@ -63,13 +67,16 @@ public class GUIPneumoTube extends GuiInfoContainer {
protected void mouseClicked(int x, int y, int i) {
super.mouseClicked(x, y, i);
if(!endpointOnly) {
click(x, y, 7, 52, 18, 18, "redstone");
click(x, y, 6, 36, 20, 8, "pressure");
click(x, y, 128, 30, 14, 26, "whitelist");
click(x, y, 151, 16, 18, 18, "receive");
click(x, y, 151, 52, 18, 18, "send");
}
click(x, y, 128, 30, 14, 26, "whitelist");
}
public void click(int x, int y, int left, int top, int sizeX, int sizeY, String name) {
if(checkClick(x, y, left, top, sizeX, sizeY)) {
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
@ -90,17 +97,17 @@ public class GUIPneumoTube extends GuiInfoContainer {
@Override
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
Minecraft.getMinecraft().getTextureManager().bindTexture(endpointOnly ? texture_endpoint : texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
if(tube.redstone) drawTexturedModalRect(guiLeft + 7, guiTop + 52, 179, 0, 18, 18);
if(tube.whitelist) {
drawTexturedModalRect(guiLeft + 139, guiTop + 33, 176, 0, 3, 6);
} else {
drawTexturedModalRect(guiLeft + 139, guiTop + 47, 176, 0, 3, 6);
}
if(!endpointOnly) {
if(tube.redstone) drawTexturedModalRect(guiLeft + 7, guiTop + 52, 179, 0, 18, 18);
drawTexturedModalRect(guiLeft + 151, guiTop + 16, 197, 18 * tube.receiveOrder, 18, 18);
drawTexturedModalRect(guiLeft + 151, guiTop + 52, 215, 18 * tube.sendOrder, 18, 18);
@ -108,3 +115,4 @@ public class GUIPneumoTube extends GuiInfoContainer {
GaugeUtil.drawSmoothGauge(guiLeft + 16, guiTop + 25, this.zLevel, (double) tube.compair.getFill() / (double) tube.compair.getMaxFill(), 5, 2, 1, 0xCA6C43, 0xAB4223);
}
}
}

View File

@ -162,7 +162,7 @@ public class XWeaponModManager {
new WeaponModDefinition(EnumModSpecial.ENGINE_DIESEL).addMod(new Item[] {ModItems.gun_drill}, new WeaponModEngine(ID_ENGINE_DIESEL).mag(WeaponModEngine.ENGINE_DIESEL).delay(15));
new WeaponModDefinition(EnumModSpecial.ENGINE_AVIATION).addMod(new Item[] {ModItems.gun_drill}, new WeaponModEngine(ID_ENGINE_AVIATION).mag(WeaponModEngine.ENGINE_AVIATION).delay(10));
new WeaponModDefinition(EnumModSpecial.ENGINE_ELECTRIC).addMod(new Item[] {ModItems.gun_drill}, new WeaponModEngine(ID_ENGINE_ELECTRIC).mag(WeaponModEngine.ENGINE_ELECTRIC).delay(15));
new WeaponModDefinition(EnumModSpecial.ENGINE_TURBO).addMod(new Item[] {ModItems.gun_drill}, new WeaponModEngine(ID_ENGINE_TURBO).mag(WeaponModEngine.ENGINE_TURBO).delay(2));
new WeaponModDefinition(EnumModSpecial.ENGINE_TURBO).addMod(new Item[] {ModItems.gun_drill}, new WeaponModEngine(ID_ENGINE_TURBO).mag(WeaponModEngine.ENGINE_TURBO).delay(5));
new WeaponModDefinition(EnumModSpecial.MAGNET).addMod(new Item[] {ModItems.gun_drill}, new WeaponModDrillFortune(230, "MAGNET", 2));
new WeaponModDefinition(EnumModSpecial.SIFTER).addMod(new Item[] {ModItems.gun_drill}, new WeaponModDrillFortune(231, "SIFTER", 1));
new WeaponModDefinition(EnumModSpecial.CANISTERS).addMod(new Item[] {ModItems.gun_drill}, new WeaponModCanisters(232));

View File

@ -613,6 +613,7 @@ public class CraftingManager {
addRecipeAuto(new ItemStack(ModBlocks.pneumatic_tube, 8), new Object[] { "CRC", 'C', CU.plateCast(), 'R', ANY_RUBBER.ingot() });
addRecipeAuto(new ItemStack(ModBlocks.pneumatic_tube, 24), new Object[] { "CRC", 'C', CU.plateWelded(), 'R', ANY_RUBBER.ingot() });
addRecipeAuto(new ItemStack(ModBlocks.pneumatic_tube_paintable, 4), new Object[] { "SAS", "A A", "SAS", 'S', STEEL.plate(), 'A', ModBlocks.pneumatic_tube});
addRecipeAuto(new ItemStack(ModBlocks.pipe_anchor, 2), new Object[] { "P", "P", "S", 'P', STEEL.pipe(), 'S', STEEL.ingot() });
addRecipeAuto(new ItemStack(ModItems.template_folder, 1), new Object[] { "LPL", "BPB", "LPL", 'P', Items.paper, 'L', "dye", 'B', "dye" });
addRecipeAuto(new ItemStack(ModItems.pellet_antimatter, 1), new Object[] { "###", "###", "###", '#', ModItems.cell_antimatter });

View File

@ -257,7 +257,7 @@ public class TileEntityPneumoTube extends TileEntityMachineBase implements IGUIP
@Override
@SideOnly(Side.CLIENT)
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
return new GUIPneumoTube(player.inventory, this);
return new GUIPneumoTube(player.inventory, this, ID == 1);
}
@Override

View File

@ -84,6 +84,7 @@ public class PneumaticNetwork extends NodeNet {
if(chosenReceiverEntry == null) return false;
IInventory dest = chosenReceiverEntry.getKey();
TileEntityPneumoTube endpointTile = chosenReceiverEntry.getValue().getZ();
ISidedInventory sidedDest = dest instanceof ISidedInventory ? (ISidedInventory) dest : null;
ISidedInventory sidedSource = source instanceof ISidedInventory ? (ISidedInventory) source : null;
@ -108,8 +109,14 @@ public class PneumaticNetwork extends NodeNet {
ItemStack sourceStack = source.getStackInSlot(sourceIndex);
if(sourceStack == null) continue;
if(sidedSource != null && !sidedSource.canExtractItem(sourceIndex, sourceStack, sourceSide)) continue;
// filter of the source
boolean match = tube.matchesFilter(sourceStack);
if((match && !tube.whitelist) || (!match && tube.whitelist)) continue;
// filter of the receiver, only if the sender and receiver aren't the same block
if(endpointTile != null && endpointTile != tube) {
match = endpointTile.matchesFilter(sourceStack);
if((match && !endpointTile.whitelist) || (!match && endpointTile.whitelist)) continue;
}
// the "mass" of an item. something that only stacks to 4 has a "mass" of 16. max transfer mass is 64, i.e. one standard stack, or one single unstackable item
int proportionalValue = MathHelper.clamp_int(64 / sourceStack.getMaxStackSize(), 1, 64);

View File

@ -4699,6 +4699,7 @@ tile.pink_log.name=Pinkes Holz
tile.pink_planks.name=Pinke Holzbretter
tile.pink_slab.name=Pinke Holzstufe
tile.pink_stairs.name=Pinke Holztreppen
tile.pipe_anchor.name=Rohr-Anker
tile.piston_inserter.name=Einsetzer-Kolben
tile.piston_inserter.desc=Kann ein Item halten$Wenn mit Redstone aktiviert, setzt das Item in gebohrten Graphit ein$Alle Items in gebohrten Graphitblöcken in der Linie werden einen Block verschoben$Benötigt einen Luftblock zwischen sich selbst und dem Graphit
tile.plant_dead.name=Tote Pflanze
@ -4960,7 +4961,7 @@ tile.vent_chlorine.name=Chlorgas-Auslass
tile.vent_chlorine_seal.name=Chlorgassiegel
tile.vent_cloud.name=Wolken-Auslass
tile.vent_pink_cloud.name=Pinker Wolken-Auslass
tile.vine_phosphor.large.name=Phosphorranken
tile.vine_phosphor.name=Phosphorranken
tile.vinyl_tile.large.name=Große Vinylfliesen
tile.vinyl_tile.small.name=Kleine Vinylfliesen
tile.vitrified_barrel.name=Fass voll vitrifiziertem Atommüll

View File

@ -5976,6 +5976,7 @@ tile.pink_log.name=Pink Log
tile.pink_planks.name=Pink Wood Planks
tile.pink_slab.name=Pink Wood Slab
tile.pink_stairs.name=Pink Wood Stairs
tile.pipe_anchor.name=Pipe Anchor
tile.piston_inserter.name=Inserter
tile.piston_inserter.desc=Can receive one item using automation$Using redstone, it will insert the item into drilled graphite$All drilled graphite in the chain will have their items pushed by one block$Needs one block of air between the graphite
tile.plant_dead.name=Dead Plant
@ -6294,7 +6295,7 @@ tile.vent_chlorine.name=Chlorine Vent
tile.vent_chlorine_seal.name=Chlorine Seal
tile.vent_cloud.name=Cloud Vent
tile.vent_pink_cloud.name=Pink Cloud Vent
tile.vine_phosphor.large.name=Phosphor Vines
tile.vine_phosphor.name=Phosphor Vines
tile.vinyl_tile.large.name=Large Vinyl Tile
tile.vinyl_tile.small.name=Small Vinyl Tiles
tile.vitrified_barrel.name=Vitrified Nuclear Waste Drum