Skip to content

Commit

Permalink
fix: liquid won't be broken into item by falling block now
Browse files Browse the repository at this point in the history
  • Loading branch information
smartcmd committed Jan 16, 2025
1 parent 7be51c4 commit f2d13aa
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ Unless otherwise specified, any version comparison below is the comparison of se
back teleport ack after server sends teleport packet to client.
- Fixed the bug that flint and steel durability reduced in creative mode.
- Fixed the network offset of item entity. Its visual position should now be normal.
- Liquid won't be broken into item by falling block now.

## [0.1.2](https://github.com/AllayMC/Allay/releases/tag/0.1.2) (API 0.3.0) - 2024-12-31

Expand Down
2 changes: 1 addition & 1 deletion data/resources/block_tags_custom.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"minecraft:seagrass",
"minecraft:soul_fire",
"minecraft:vine",
"minecraft:flowing_lava",
"minecraft:lava",
"minecraft:warped_roots",
"minecraft:deadbush",
Expand All @@ -19,7 +20,6 @@
"minecraft:short_grass",
"minecraft:air",
"minecraft:sculk_vein",
"minecraft:flowing_lava",
"minecraft:crimson_roots",
"minecraft:light_block_0",
"minecraft:light_block_1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
import org.allaymc.api.block.type.BlockState;
import org.allaymc.api.block.type.BlockType;
import org.allaymc.api.block.type.BlockTypes;
import org.allaymc.api.entity.Entity;
import org.allaymc.api.eventbus.event.block.LiquidDecayEvent;
import org.allaymc.api.eventbus.event.block.LiquidFlowEvent;
import org.allaymc.api.item.ItemStack;
import org.allaymc.api.math.MathUtils;
import org.allaymc.api.math.position.Position3i;
import org.allaymc.api.world.Dimension;
Expand All @@ -19,7 +21,9 @@
import org.joml.Vector3ic;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Set;

import static org.allaymc.api.block.component.BlockLiquidBaseComponent.*;

Expand All @@ -43,6 +47,11 @@ public boolean canCollideWithEntity() {
return true;
}

@Override
public Set<ItemStack> getDrops(BlockStateWithPos blockState, ItemStack usedItem, Entity entity) {
return Collections.emptySet();
}

@Override
public void onPlace(BlockStateWithPos currentBlockState, BlockState newBlockState, PlayerInteractInfo placementInfo) {
super.onPlace(currentBlockState, newBlockState, placementInfo);
Expand Down

0 comments on commit f2d13aa

Please sign in to comment.