resolved some TODOs

This commit is contained in:
Ell 2023-07-08 10:38:52 +02:00
parent c8c0db6aa9
commit 6cb3e6e57e
3 changed files with 4 additions and 6 deletions

View file

@ -10,7 +10,6 @@ import java.util.function.Supplier;
public class ItemEquality { public class ItemEquality {
public static final ItemEquality DAMAGE = new ItemEquality((stack, filter) -> stack.getDamageValue() == filter.getDamageValue(), false, Type.DAMAGE); public static final ItemEquality DAMAGE = new ItemEquality((stack, filter) -> stack.getDamageValue() == filter.getDamageValue(), false, Type.DAMAGE);
// TODO see if this tagMatches replacement is good enough?
public static final ItemEquality NBT = new ItemEquality(ItemStack::areShareTagsEqual, false, Type.NBT); public static final ItemEquality NBT = new ItemEquality(ItemStack::areShareTagsEqual, false, Type.NBT);
public static final ItemEquality MOD = new ItemEquality((stack, filter) -> stack.getItem().getCreatorModId(stack).equals(filter.getItem().getCreatorModId(filter)), true, Type.MOD); public static final ItemEquality MOD = new ItemEquality((stack, filter) -> stack.getItem().getCreatorModId(stack).equals(filter.getItem().getCreatorModId(filter)), true, Type.MOD);

View file

@ -39,8 +39,6 @@ public class ItemTerminalWidget extends AbstractWidget {
@Override @Override
protected void renderWidget(GuiGraphics graphics, int p_268034_, int p_268009_, float p_268085_) { protected void renderWidget(GuiGraphics graphics, int p_268034_, int p_268009_, float p_268085_) {
var mc = this.screen.getMinecraft(); var mc = this.screen.getMinecraft();
var renderer = mc.getItemRenderer();
// TODO test this new blit offset replacement?
graphics.pose().translate(0, 0, 100); graphics.pose().translate(0, 0, 100);
if (this.selected) if (this.selected)
graphics.fill(this.getX(), this.getY(), this.getX() + 16, this.getY() + 16, -2130706433); graphics.fill(this.getX(), this.getY(), this.getX() + 16, this.getY() + 16, -2130706433);

View file

@ -28,6 +28,7 @@ import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.level.block.state.properties.EnumProperty;
import net.minecraft.world.level.material.FluidState; import net.minecraft.world.level.material.FluidState;
import net.minecraft.world.level.material.Fluids; import net.minecraft.world.level.material.Fluids;
import net.minecraft.world.level.material.MapColor;
import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.shapes.BooleanOp; import net.minecraft.world.phys.shapes.BooleanOp;
import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.CollisionContext;
@ -224,9 +225,9 @@ public class PipeBlock extends BaseEntityBlock {
protected static boolean hasLegsTo(Level world, BlockState state, BlockPos pos, Direction direction) { protected static boolean hasLegsTo(Level world, BlockState state, BlockPos pos, Direction direction) {
if (state.getBlock() instanceof WallBlock || state.getBlock() instanceof FenceBlock) if (state.getBlock() instanceof WallBlock || state.getBlock() instanceof FenceBlock)
return direction == Direction.DOWN; return direction == Direction.DOWN;
// TODO figure out new condition for legs now that materials are gone var mapColor = state.getMapColor(world,pos);
/* if (state.getMaterial() == Material.STONE || state.getMaterial() == Material.METAL) if (mapColor == MapColor.STONE || mapColor == MapColor.METAL)
return Block.canSupportCenter(world, pos, direction.getOpposite());*/ return Block.canSupportCenter(world, pos, direction.getOpposite());
return false; return false;
} }