Skip to content

Commit b0fc03c

Browse files
committed
Fix tank comparator output.
1 parent b9f1015 commit b0fc03c

File tree

5 files changed

+9
-11
lines changed

5 files changed

+9
-11
lines changed

src/main/java/codechicken/enderstorage/block/BlockEnderChest.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,6 @@ public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos,
7777
return shape;
7878
}
7979

80-
@Override
81-
public boolean hasAnalogOutputSignal(BlockState state) {
82-
return true;
83-
}
84-
8580
@Nullable
8681
@Override
8782
public BlockEntity newBlockEntity(BlockPos pos, BlockState state) {

src/main/java/codechicken/enderstorage/block/BlockEnderStorage.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,12 @@ public boolean canConnectRedstone(BlockState state, BlockGetter world, BlockPos
170170
@Override
171171
public int getAnalogOutputSignal(BlockState state, Level world, BlockPos pos) {
172172
BlockEntity tile = world.getBlockEntity(pos);
173-
return tile instanceof TileFrequencyOwner ? ((TileFrequencyOwner) tile).comparatorInput() : 0;
173+
return tile instanceof TileFrequencyOwner ? ((TileFrequencyOwner) tile).comparatorOutput() : 0;
174+
}
175+
176+
@Override
177+
public boolean hasAnalogOutputSignal(BlockState state) {
178+
return true;
174179
}
175180

176181
@Override

src/main/java/codechicken/enderstorage/tile/TileEnderChest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public boolean rotate() {
138138
}
139139

140140
@Override
141-
public int comparatorInput() {
141+
public int comparatorOutput() {
142142
return ItemHandlerHelper.calcRedstoneFromInventory(getItemHandler());
143143
}
144144

src/main/java/codechicken/enderstorage/tile/TileEnderTank.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public boolean rotate() {
177177
}
178178

179179
@Override
180-
public int comparatorInput() {
180+
public int comparatorOutput() {
181181
IFluidTank tank = getStorage();
182182
FluidStack fluid = tank.getFluid();
183183
return fluid.getAmount() * 14 / tank.getCapacity() + (fluid.getAmount() > 0 ? 1 : 0);

src/main/java/codechicken/enderstorage/tile/TileFrequencyOwner.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
import codechicken.lib.vec.Cuboid6;
1010
import net.minecraft.core.BlockPos;
1111
import net.minecraft.nbt.CompoundTag;
12-
import net.minecraft.network.Connection;
13-
import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket;
1412
import net.minecraft.world.InteractionHand;
1513
import net.minecraft.world.entity.LivingEntity;
1614
import net.minecraft.world.entity.player.Player;
@@ -123,7 +121,7 @@ public boolean redstoneInteraction() {
123121
return false;
124122
}
125123

126-
public int comparatorInput() {
124+
public int comparatorOutput() {
127125
return 0;
128126
}
129127

0 commit comments

Comments
 (0)