Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
MehVahdJukaar committed Jun 1, 2024
1 parent 17a16a3 commit aa0f65c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
4 changes: 2 additions & 2 deletions build.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#Fri May 31 19:23:58 UTC 2024
#Sat Jun 01 11:22:14 UTC 2024
mapping_version=1.20.1
version=4.0
mod_name=Quark
mc_version=1.20.1
mapping_channel=official
mod_id=quark
build_number=451
build_number=452
dir_output=../Build Output/Quark/
12 changes: 8 additions & 4 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
- fixed pathfinder quill duplicating when used in offhand
- fixed magnets only pushing armor items
- fixed magnets pushing players regardless of whether they have armor or not
- Rune colors are now extensible. Custom ones can be added by mods
- Fixed pathfinder quill duplicating when used in offhand
- Fixed magnets only pushing armor items
- Fixed magnets pushing players regardless of whether they have armor or not
- Rune colors are now extensible. Custom ones can be added by mods
- Variant selector and rotation lock HUD overlays can now render similar to crosshair, Improving visibility in bright environments
- You can now middle click a block to select it with variant selector, either when you have a variant block or a hammer in hand
- Variant selector wheel wont appear anymore for blocks with no variants
- Hammer won't play swing animation when it didn't change a variant
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import java.util.List;

import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.world.item.ArmorItem;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.block.entity.BlockEntity;
import org.jetbrains.annotations.Nullable;
import org.violetmoon.quark.addons.oddities.block.be.MagnetBlockEntity;
Expand Down Expand Up @@ -116,13 +116,14 @@ else if(frontState.getPistonPushReaction() == PushReaction.DESTROY)
}

public static boolean isItemMagnetic(Item item) {
if(item == Items.AIR)return false;
return magnetizableItems.contains(item);
}

// Just checks if its magnetic. Not if it can be moved
public static boolean isBlockMagnetic(BlockState state) {
Block block = state.getBlock();
if (block == MagnetsModule.magnet) return false;
if (block == MagnetsModule.magnet || state.isAir()) return false;
return (magnetizableBlocks.contains(block) || BLOCK_MOVE_ACTIONS.containsKey(block));
}

Expand All @@ -133,7 +134,7 @@ public static boolean canBlockBeMagneticallyMoved(BlockState state, BlockPos pos
if (state.getValue(PistonBaseBlock.EXTENDED))
return false;
}
if (block == MagnetsModule.magnet) return false;
if (block == MagnetsModule.magnet || state.isAir()) return false;

IMagnetMoveAction action = getMoveAction(block);
if (action != null) return action.canMagnetMove(level, pos, moveDir, state, magnet);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ public static Block getVariantBlockFromOriginal(Block original, @NotNull String
@Nullable
public static Block getVariantBlockFromAny(Block block, @NotNull String variant) {
Block originalBlock = variants.getOriginalBlock(block);
Block variantBlock = getVariantBlockFromOriginal(originalBlock, variant);
Block variantBlock = variant.isEmpty() ? originalBlock :
getVariantBlockFromOriginal(originalBlock, variant);
if(variantBlock != block)return variantBlock;
return null;
}
Expand Down

0 comments on commit aa0f65c

Please sign in to comment.