Skip to content

Commit

Permalink
missed files from last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
desht committed Apr 20, 2024
1 parent 3694795 commit ab0ebd8
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
import me.desht.pneumaticcraft.lib.PneumaticValues;
import me.desht.pneumaticcraft.mixin.accessors.EntityAccess;
import net.minecraft.ChatFormatting;
import net.minecraft.Util;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.particles.BlockParticleOption;
Expand Down Expand Up @@ -606,7 +605,7 @@ private void handleFluidDisplacement() {
@Override
public void setPos(double x, double y, double z) {
super.setPos(x, y, z);
if (!level.isClientSide && prevChunkPos != null && !chunkPosition().equals(prevChunkPos)) {
if (!level().isClientSide && prevChunkPos != null && !chunkPosition().equals(prevChunkPos)) {
prevChunkPos = chunkPosition();
handleDynamicChunkloading(prevChunkPos);
}
Expand All @@ -624,7 +623,7 @@ private void handleDynamicChunkloading(ChunkPos newPos) {
while (iter.hasNext()) {
ChunkPos cp = iter.next();
boolean load = shouldLoadChunk(cp);
ForgeChunkManager.forceChunk((ServerLevel) level, Names.MOD_ID, this, cp.x, cp.z, load, true);
ForgeChunkManager.forceChunk((ServerLevel) level(), Names.MOD_ID, this, cp.x, cp.z, load, true);
if (!load) {
iter.remove();
}
Expand Down Expand Up @@ -933,8 +932,8 @@ public void die(DamageSource damageSource) {

restoreFluidBlocks(false);

if (!level.isClientSide) {
loadedChunks.forEach(cp -> ForgeChunkManager.forceChunk((ServerLevel) level, Names.MOD_ID, this, cp.x, cp.z, false, true));
if (!level().isClientSide) {
loadedChunks.forEach(cp -> ForgeChunkManager.forceChunk((ServerLevel) level(), Names.MOD_ID, this, cp.x, cp.z, false, true));
}

if (shouldDropAsItem()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public enum BuiltinUpgrade {
GILDED("gilded"),
ENDER_VISOR("ender_visor"),
STOMP("stomp"),
ELYTRA("elytra");
ELYTRA("elytra"),
CHUNKLOADER("chunkloader");

private final String name;
private final int maxTier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class ModUpgrades {
public static final Supplier<PNCUpgrade> ENDER_VISOR = () -> BUILTIN_MAP.get(BuiltinUpgrade.ENDER_VISOR);
public static final Supplier<PNCUpgrade> STOMP = () -> BUILTIN_MAP.get(BuiltinUpgrade.STOMP);
public static final Supplier<PNCUpgrade> ELYTRA = () -> BUILTIN_MAP.get(BuiltinUpgrade.ELYTRA);
public static final Supplier<PNCUpgrade> CHUNKLOADER = () -> BUILTIN_MAP.get(BuiltinUpgrade.CHUNKLOADER);

public static PNCUpgrade registerBuiltin(BuiltinUpgrade bu, PNCUpgrade pncUpgrade) {
BUILTIN_MAP.put(bu, pncUpgrade);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1041,6 +1041,13 @@ protected void buildRecipes(Consumer<FinishedRecipe> consumer) {
'N', StrictNBTIngredient.of(nightVisionPotion)
).save(consumer);

shaped(ModUpgrades.CHUNKLOADER.get().getItem(), ModItems.DRONE.get(),
"LCL/ECE/LCL",
'L', PneumaticCraftTags.Items.UPGRADE_COMPONENTS,
'E', Items.ENDER_EYE,
'C', ModItems.PRINTED_CIRCUIT_BOARD.get()
).save(consumer);

shaped(ModUpgrades.SCUBA.get().getItem(), ModItems.PNEUMATIC_HELMET.get(),
"LTL/PRP/LPL",
'L', PneumaticCraftTags.Items.UPGRADE_COMPONENTS,
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/pneumaticcraft/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -1431,8 +1431,8 @@
"pneumaticcraft.gui.tab.info.item.collector_drone.rangeUpgrade" : "§0Increases the collection range of the the Drone by one block per upgrade.",
"pneumaticcraft.gui.tab.info.item.drone" : "§0Here you can insert upgrades into the Drone. Open up other tabs to see which enhancements can be done.",
"pneumaticcraft.gui.tab.info.item.drone.armorUpgrade" : "§0Armor Upgrades give the drone a little protection, reducing incoming physical damage. Each upgrade is worth one point of armor (so 15 upgrades is equivalent to a full suit of Iron armor).\nNote that equipping more than 6 Armor Upgrades does carry a small movement penalty for the drone, so you need to balance protection vs. speed.",
"pneumaticcraft.gui.tab.info.item.drone.creativeUpgrade" : "§0A Creative Supply Upgrade negates all air usage, and all ammunition usage if a Minigun Upgrade is installed (note that an ammo box must still be carried by the Drone).",
"pneumaticcraft.gui.tab.info.item.drone.chunkloaderUpgrade" : "§0With one Chunkloader Upgrade inserted, the Drone keeps the chunk it's in loaded. With two, the Drone loads 5 chunks, in the shape of a cross in the cardinal directions. With three, the Drone loads 9 chunks in a 3x3 area.${br}Note that this won't allow Drones to teleport to any unloaded chunk. If you want this, see 'allow_navigate_to_unloaded_chunks' in the config.",
"pneumaticcraft.gui.tab.info.item.drone.creativeUpgrade" : "§0A Creative Supply Upgrade negates all air usage, and all ammunition usage if a Minigun Upgrade is installed (note that an ammo box must still be carried by the Drone).",
"pneumaticcraft.gui.tab.info.item.drone.inventoryUpgrade" : "§0By default the Drone can carry one stack of items. For every Inventory Upgrade inserted, the Drone gains an additional slot in its internal storage.\n\nIt will also increase the internal liquid tank by 16000mB per upgrade, and 100000RF storage per upgrade (if installed). It also increases the rate at which the Drone can transfer RF (transfer = max storage / 100).",
"pneumaticcraft.gui.tab.info.item.drone.item_lifeUpgrade" : "§0With Item Life Upgrades inserted, the Drone will be able to auto-repair, at a small air cost. The more upgrades you insert, the faster the repair and the higher the air cost.",
"pneumaticcraft.gui.tab.info.item.drone.magnetUpgrade" : "§0With the Magnet Upgrade inserted, the Drone will automatically pick up nearby items, if it has free inventory space. The base range is 2 blocks, increasing by 1 block per inserted upgrade.",
Expand Down

0 comments on commit ab0ebd8

Please sign in to comment.