Fluid tank branch (Third time's the charm??) #121

Merged
albinaask merged 5 commits from fluid-tank-branch into dev/1.19.4 2023-06-24 00:44:33 +00:00
albinaask commented 2023-04-02 21:20:13 +00:00 (Migrated from github.com)

Hopefully this is the last time I'll have to create a new PR for this. Like in #113 & #111

Checklist:

  • My code follows the style guidelines of this project (.editorconfig, most IDEs will use this for you)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
Hopefully this is the last time I'll have to create a new PR for this. Like in #113 & #111 # Checklist: - [x] My code follows the style guidelines of this project (.editorconfig, most IDEs will use this for you) - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have made corresponding changes to the documentation
justliliandev (Migrated from github.com) requested changes 2023-04-22 13:14:19 +00:00
@ -0,0 +1,251 @@
package com.enderio.machines.common.io.fluid;
justliliandev (Migrated from github.com) commented 2023-04-22 12:57:28 +00:00

this is the deafult implementation, remove it

this is the deafult implementation, remove it
justliliandev (Migrated from github.com) commented 2023-04-22 12:59:35 +00:00

those can be simplified, as getAmount will return 0 in that case, so the 2 branches are identical. just use the bottom one.

those can be simplified, as getAmount will return 0 in that case, so the 2 branches are identical. just use the bottom one.
@ -0,0 +125,4 @@
//Same as parent behavior with the addition of this class capabilities, see method 'fill' above for details.
public int fill(int desiredAmount, FluidAction action, boolean force) {
if (fluid.isEmpty()) {
EnderIO.LOGGER.error("No fluid in tank, can't contain an amount of unspecified fluid other than 0");
justliliandev (Migrated from github.com) commented 2023-04-22 13:05:27 +00:00

also return here

also return here
@ -26,4 +55,67 @@ public class FluidTankItem extends BlockItem {
}
justliliandev (Migrated from github.com) commented 2023-04-22 13:13:02 +00:00
                CompoundTag blockEntityTag = tagCompound.getCompound(BLOCK_ENTITY_TAG);
                if (blockEntityTag.contains(FluidTankBlockEntity.FLUID_TAG_KEY))
                    blockEntityTag.remove(FluidTankBlockEntity.FLUID_TAG_KEY);

non constant variables don't start with a capital letter

```suggestion CompoundTag blockEntityTag = tagCompound.getCompound(BLOCK_ENTITY_TAG); if (blockEntityTag.contains(FluidTankBlockEntity.FLUID_TAG_KEY)) blockEntityTag.remove(FluidTankBlockEntity.FLUID_TAG_KEY); ``` non constant variables don't start with a capital letter
@ -1,9 +1,15 @@
package com.enderio.base.common.blockentity;
import com.enderio.api.UseOnly;
import net.minecraft.world.InteractionResult;
justliliandev (Migrated from github.com) commented 2023-04-22 13:13:34 +00:00

remove comment, add annotation

remove comment, add annotation
@ -48,6 +48,8 @@ public class EIOLang {
public static final Component REDSTONE_ACTIVE_WITHOUT_SIGNAL = REGISTRATE.addLang("gui", EnderIO.loc("redstone.active_without_signal"), "Active without signal");
public static final Component REDSTONE_NEVER_ACTIVE = REGISTRATE.addLang("gui", EnderIO.loc("redstone.never_active"), "Never active");
justliliandev (Migrated from github.com) commented 2023-04-22 13:14:06 +00:00
    public static final MutableComponent FLUID_TANK_TOOLTIP = REGISTRATE.addLang("tooltip", EnderIO.loc("fluid_tank.tank_tooltip"), "%d/%d mb of %s");//[amount]/[capacity] mb of [FluidName]
```suggestion public static final MutableComponent FLUID_TANK_TOOLTIP = REGISTRATE.addLang("tooltip", EnderIO.loc("fluid_tank.tank_tooltip"), "%d/%d mb of %s");//[amount]/[capacity] mb of [FluidName] ```
Rover656 commented 2023-06-24 00:29:41 +00:00 (Migrated from github.com)

Going to update to 1.19.4 and resolve comments above :)

Going to update to 1.19.4 and resolve comments above :)
albinaask commented 2023-07-02 16:07:04 +00:00 (Migrated from github.com)

Thank you!!

Thank you!!
Sign in to join this conversation.
No reviewers
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Team-EnderIO/EnderIO#121
No description provided.