Skip to content

Commit

Permalink
[1.1.3] Fixed a bug in MC1.17 that a Searchlight Block doesn't drop i…
Browse files Browse the repository at this point in the history
…tself as an item and takes too long to break.
  • Loading branch information
Lizard-Of-Oz committed Aug 16, 2021
1 parent 66ae72a commit acef86f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder;
import net.fabricmc.fabric.api.client.rendereregistry.v1.BlockEntityRendererRegistry;
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricMaterialBuilder;
import net.fabricmc.fabric.api.object.builder.v1.block.entity.FabricBlockEntityTypeBuilder;
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.block.*;
import net.minecraft.item.BlockItem;
Expand Down Expand Up @@ -48,10 +50,11 @@ public void onInitialize()
private void registerSearchlightBlock()
{
searchlightBlock = new SearchlightBlock(
AbstractBlock.Settings.of(Material.METAL)
FabricBlockSettings.of(Material.METAL, MapColor.CLEAR)
.sounds(BlockSoundGroup.METAL)
.breakByTool(FabricToolTags.PICKAXES, 2)
.requiresTool()
.strength(5)
.strength(4)
.nonOpaque());
searchlightItem = new BlockItem(searchlightBlock, new FabricItemSettings().group(creativeItemGroup));
searchlightBlockEntityType = FabricBlockEntityTypeBuilder.create(SearchlightBlockEntityFabric::create, searchlightBlock).build(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,9 @@ public ItemStack createIcon() {
private void registerSearchlightBlock()
{
searchlightBlock = new SearchlightBlock(
AbstractBlock.Settings.of(Material.METAL)
AbstractBlock.Settings.of(Material.METAL, MapColor.CLEAR)
.sounds(BlockSoundGroup.METAL)
.requiresTool()
.strength(5)
.strength(1)
.nonOpaque());
searchlightItem = new BlockItem(searchlightBlock, new Item.Settings().group(creativeItemGroup));
searchlightBlockEntityType = BlockEntityType.Builder
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ github=https://github.com/Lizard-Of-Oz/Searchlight

minecraft_version=1.17.1
archives_base_name=searchlight
mod_version=1.1.2
mod_version=1.1.3
fabric_loader_version=0.11.3
forge_version=37.0.19
yarn_mappings=1.17.1+build.13
Expand Down

0 comments on commit acef86f

Please sign in to comment.