generated from FabricMC/fabric-example-mod
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[v2.2.0+1.18] sync with v2.2.0+1.19 (#48)
* version 2.0.1 support for Minecraft 1.19-rc2 (#35) * chore: bump deps versions * fix: remove integrations * fix: fix types * chore: mod version 2.0.1+1.19-rc2 * docs: update README.md * bump version from 2.0.1+1.19-rc2 to 2.0.2+1.19 (#36) * chore: bump deps versions * feat: add integrations * chore: bump version from 2.0.1+1.19-rc2 to 2.0.2+1.19 * bump version from 2.0.2+1.19 to 2.0.3+1.19 (#37) * chore: bump deps versions * chore: bump version from 2.0.2+1.19 to 2.0.3+1.19 * bump version from 2.0.3+1.19 to 2.0.4+1.19 (#39) * chore: bump deps versions * feat: add client sprite registry callback * chore: rename yml to yaml * docs: fix badge link * chore: bump version from 2.0.3+1.19 to 2.0.4+1.19 * fix: fix indent * bump version from 2.0.4+1.19 to 2.1.0+1.19 (#40) * chore: bump deps versions * chore: add Override deco * chore: bump deps versions * refactor: block entity accessor * chore: add tag trigger * docs: add config section * chore: bump version from 2.0.4+1.19 to 2.1.0+1.19 * fix: fix image * bump version from 2.1.0+1.19 to 2.1.1+1.19 (#41) * chore: bump deps versions * chore: leave out branch trigger * chore: bump version from 2.1.0+1.19 to 2.1.1+1.19 * [v2.2.0+1.19] add some features (#47) * bump deps * add modmenu entrypoint * add newline * refactor onBreak * add portable container tags * fix quickshulker deprecated warning * bump version * fix chests deps * organize imports * bump version
- Loading branch information
Showing
24 changed files
with
176 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
plugins { | ||
id 'fabric-loom' version '0.12-SNAPSHOT' | ||
id 'fabric-loom' version '1.0-SNAPSHOT' | ||
id 'maven-publish' | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/main/java/atonkish/reinfshulker/mixin/ItemStackAccessor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package atonkish.reinfshulker.mixin; | ||
|
||
import net.minecraft.item.Item; | ||
import net.minecraft.item.ItemStack; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Mutable; | ||
import org.spongepowered.asm.mixin.gen.Accessor; | ||
|
||
@Mixin(ItemStack.class) | ||
public interface ItemStackAccessor { | ||
@Mutable | ||
@Accessor("item") | ||
public void setItem(Item item); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 12 additions & 14 deletions
26
src/main/java/atonkish/reinfshulker/mixin/ShulkerBoxBlockMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,32 @@ | ||
package atonkish.reinfshulker.mixin; | ||
|
||
import net.minecraft.block.AbstractBlock; | ||
import net.minecraft.block.Block; | ||
import net.minecraft.block.BlockState; | ||
import net.minecraft.block.ShulkerBoxBlock; | ||
import net.minecraft.block.entity.BlockEntity; | ||
import net.minecraft.block.entity.ShulkerBoxBlockEntity; | ||
import net.minecraft.entity.player.PlayerEntity; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.World; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
import org.spongepowered.asm.mixin.injection.callback.LocalCapture; | ||
|
||
import atonkish.reinfshulker.block.ReinforcedShulkerBoxBlock; | ||
import atonkish.reinfshulker.block.entity.ReinforcedShulkerBoxBlockEntity; | ||
|
||
@Mixin(ShulkerBoxBlock.class) | ||
public class ShulkerBoxBlockMixin extends Block { | ||
// Dummy | ||
private ShulkerBoxBlockMixin(AbstractBlock.Settings settings) { | ||
super(settings); | ||
} | ||
|
||
@Inject(at = @At("HEAD"), method = "onBreak", cancellable = true) | ||
public void onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player, CallbackInfo info) { | ||
BlockEntity blockEntity = world.getBlockEntity(pos); | ||
public class ShulkerBoxBlockMixin { | ||
@Inject(method = "onBreak", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/entity/BlockEntity;setStackNbt(Lnet/minecraft/item/ItemStack;)V"), locals = LocalCapture.CAPTURE_FAILHARD) | ||
public void onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player, CallbackInfo info, | ||
BlockEntity blockEntity, ShulkerBoxBlockEntity shulkerBoxBlockEntity, ItemStack itemStack) { | ||
if (blockEntity instanceof ReinforcedShulkerBoxBlockEntity) { | ||
super.onBreak(world, pos, state, player); | ||
info.cancel(); | ||
ReinforcedShulkerBoxBlockEntity entity = (ReinforcedShulkerBoxBlockEntity) blockEntity; | ||
((ItemStackAccessor) (Object) itemStack) | ||
.setItem(ReinforcedShulkerBoxBlock.get(entity.getMaterial(), entity.getColor()).asItem()); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/main/java/atonkish/reinfshulker/util/ReinforcingMaterialSettings.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/main/resources/data/enchantedshulkers/tags/items/portable_container.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"#reinfshulker:copper_shulker_boxes", | ||
"#reinfshulker:iron_shulker_boxes", | ||
"#reinfshulker:gold_shulker_boxes", | ||
"#reinfshulker:diamond_shulker_boxes", | ||
"#reinfshulker:netherite_shulker_boxes" | ||
] | ||
} |
22 changes: 22 additions & 0 deletions
22
src/main/resources/data/reinfshulker/tags/items/copper_shulker_boxes.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"reinfshulker:copper_shulker_box", | ||
"reinfshulker:black_copper_shulker_box", | ||
"reinfshulker:blue_copper_shulker_box", | ||
"reinfshulker:brown_copper_shulker_box", | ||
"reinfshulker:cyan_copper_shulker_box", | ||
"reinfshulker:gray_copper_shulker_box", | ||
"reinfshulker:green_copper_shulker_box", | ||
"reinfshulker:light_blue_copper_shulker_box", | ||
"reinfshulker:light_gray_copper_shulker_box", | ||
"reinfshulker:lime_copper_shulker_box", | ||
"reinfshulker:magenta_copper_shulker_box", | ||
"reinfshulker:orange_copper_shulker_box", | ||
"reinfshulker:pink_copper_shulker_box", | ||
"reinfshulker:purple_copper_shulker_box", | ||
"reinfshulker:red_copper_shulker_box", | ||
"reinfshulker:white_copper_shulker_box", | ||
"reinfshulker:yellow_copper_shulker_box" | ||
] | ||
} |
22 changes: 22 additions & 0 deletions
22
src/main/resources/data/reinfshulker/tags/items/diamond_shulker_boxes.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"reinfshulker:diamond_shulker_box", | ||
"reinfshulker:black_diamond_shulker_box", | ||
"reinfshulker:blue_diamond_shulker_box", | ||
"reinfshulker:brown_diamond_shulker_box", | ||
"reinfshulker:cyan_diamond_shulker_box", | ||
"reinfshulker:gray_diamond_shulker_box", | ||
"reinfshulker:green_diamond_shulker_box", | ||
"reinfshulker:light_blue_diamond_shulker_box", | ||
"reinfshulker:light_gray_diamond_shulker_box", | ||
"reinfshulker:lime_diamond_shulker_box", | ||
"reinfshulker:magenta_diamond_shulker_box", | ||
"reinfshulker:orange_diamond_shulker_box", | ||
"reinfshulker:pink_diamond_shulker_box", | ||
"reinfshulker:purple_diamond_shulker_box", | ||
"reinfshulker:red_diamond_shulker_box", | ||
"reinfshulker:white_diamond_shulker_box", | ||
"reinfshulker:yellow_diamond_shulker_box" | ||
] | ||
} |
22 changes: 22 additions & 0 deletions
22
src/main/resources/data/reinfshulker/tags/items/gold_shulker_boxes.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"reinfshulker:gold_shulker_box", | ||
"reinfshulker:black_gold_shulker_box", | ||
"reinfshulker:blue_gold_shulker_box", | ||
"reinfshulker:brown_gold_shulker_box", | ||
"reinfshulker:cyan_gold_shulker_box", | ||
"reinfshulker:gray_gold_shulker_box", | ||
"reinfshulker:green_gold_shulker_box", | ||
"reinfshulker:light_blue_gold_shulker_box", | ||
"reinfshulker:light_gray_gold_shulker_box", | ||
"reinfshulker:lime_gold_shulker_box", | ||
"reinfshulker:magenta_gold_shulker_box", | ||
"reinfshulker:orange_gold_shulker_box", | ||
"reinfshulker:pink_gold_shulker_box", | ||
"reinfshulker:purple_gold_shulker_box", | ||
"reinfshulker:red_gold_shulker_box", | ||
"reinfshulker:white_gold_shulker_box", | ||
"reinfshulker:yellow_gold_shulker_box" | ||
] | ||
} |
22 changes: 22 additions & 0 deletions
22
src/main/resources/data/reinfshulker/tags/items/iron_shulker_boxes.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"reinfshulker:iron_shulker_box", | ||
"reinfshulker:black_iron_shulker_box", | ||
"reinfshulker:blue_iron_shulker_box", | ||
"reinfshulker:brown_iron_shulker_box", | ||
"reinfshulker:cyan_iron_shulker_box", | ||
"reinfshulker:gray_iron_shulker_box", | ||
"reinfshulker:green_iron_shulker_box", | ||
"reinfshulker:light_blue_iron_shulker_box", | ||
"reinfshulker:light_gray_iron_shulker_box", | ||
"reinfshulker:lime_iron_shulker_box", | ||
"reinfshulker:magenta_iron_shulker_box", | ||
"reinfshulker:orange_iron_shulker_box", | ||
"reinfshulker:pink_iron_shulker_box", | ||
"reinfshulker:purple_iron_shulker_box", | ||
"reinfshulker:red_iron_shulker_box", | ||
"reinfshulker:white_iron_shulker_box", | ||
"reinfshulker:yellow_iron_shulker_box" | ||
] | ||
} |
22 changes: 22 additions & 0 deletions
22
src/main/resources/data/reinfshulker/tags/items/netherite_shulker_boxes.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"reinfshulker:netherite_shulker_box", | ||
"reinfshulker:black_netherite_shulker_box", | ||
"reinfshulker:blue_netherite_shulker_box", | ||
"reinfshulker:brown_netherite_shulker_box", | ||
"reinfshulker:cyan_netherite_shulker_box", | ||
"reinfshulker:gray_netherite_shulker_box", | ||
"reinfshulker:green_netherite_shulker_box", | ||
"reinfshulker:light_blue_netherite_shulker_box", | ||
"reinfshulker:light_gray_netherite_shulker_box", | ||
"reinfshulker:lime_netherite_shulker_box", | ||
"reinfshulker:magenta_netherite_shulker_box", | ||
"reinfshulker:orange_netherite_shulker_box", | ||
"reinfshulker:pink_netherite_shulker_box", | ||
"reinfshulker:purple_netherite_shulker_box", | ||
"reinfshulker:red_netherite_shulker_box", | ||
"reinfshulker:white_netherite_shulker_box", | ||
"reinfshulker:yellow_netherite_shulker_box" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters