fixed snapshot-7
This commit is contained in:
@@ -17,4 +17,4 @@ maven_group=de.jottyfan.minecraft
|
|||||||
archives_base_name=quickly
|
archives_base_name=quickly
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
fabric_api_version=0.143.3+26.1
|
fabric_api_version=0.143.4+26.1
|
||||||
@@ -92,7 +92,7 @@ public class BlockDrill extends FallingBlock implements EntityBlock {
|
|||||||
loadings.put(QuicklyItems.CANOLABOTTLESTACK, 72);
|
loadings.put(QuicklyItems.CANOLABOTTLESTACK, 72);
|
||||||
Item item = itemStack.getItem();
|
Item item = itemStack.getItem();
|
||||||
if (QuicklyItems.MAGNIFIER.equals(item)) {
|
if (QuicklyItems.MAGNIFIER.equals(item)) {
|
||||||
if (!level.isClientSide() && player instanceof ServerPlayer serverPlayer) {
|
if (!level.isClientSide() && player instanceof ServerPlayer serverPlayer && player != null) {
|
||||||
serverPlayer.connection.player.sendSystemMessage(Component.translatable("info.block.drillfuel", state.getValue(FUEL)), true);
|
serverPlayer.connection.player.sendSystemMessage(Component.translatable("info.block.drillfuel", state.getValue(FUEL)), true);
|
||||||
}
|
}
|
||||||
} else if (loadings.containsKey(item)) {
|
} else if (loadings.containsKey(item)) {
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public class Itemhoarder extends Block implements EntityBlock {
|
|||||||
@Override
|
@Override
|
||||||
protected InteractionResult useItemOn(ItemStack itemStack, BlockState state, Level level, BlockPos pos, Player player,
|
protected InteractionResult useItemOn(ItemStack itemStack, BlockState state, Level level, BlockPos pos, Player player,
|
||||||
InteractionHand hand, BlockHitResult hitResult) {
|
InteractionHand hand, BlockHitResult hitResult) {
|
||||||
if (player instanceof ServerPlayer serverPlayer) {
|
if (player instanceof ServerPlayer serverPlayer && player != null) {
|
||||||
if (QuicklyItems.MAGNIFIER.equals(itemStack.getItem())) {
|
if (QuicklyItems.MAGNIFIER.equals(itemStack.getItem())) {
|
||||||
MutableComponent message = Component.empty();
|
MutableComponent message = Component.empty();
|
||||||
BlockEntity blockEntity = level.getBlockEntity(pos);
|
BlockEntity blockEntity = level.getBlockEntity(pos);
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ public class Monsterhoarder extends Block {
|
|||||||
int suckRadius = state.getValue(SUCKRADIUS);
|
int suckRadius = state.getValue(SUCKRADIUS);
|
||||||
int burnTicks = state.getValue(BURNTICKS);
|
int burnTicks = state.getValue(BURNTICKS);
|
||||||
Component message = Component.translatable("info.block.monsterhoarder", suckRadius, burnTicks);
|
Component message = Component.translatable("info.block.monsterhoarder", suckRadius, burnTicks);
|
||||||
if (player instanceof ServerPlayer serverPlayer) {
|
if (player instanceof ServerPlayer serverPlayer && player != null) {
|
||||||
serverPlayer.connection.player.sendSystemMessage(message, true);
|
serverPlayer.connection.player.sendSystemMessage(message, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
package de.jottyfan.minecraft.mixin;
|
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import org.spongepowered.asm.mixin.Final;
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|
||||||
|
|
||||||
import de.jottyfan.minecraft.block.QuicklyBlocks;
|
|
||||||
import net.minecraft.client.renderer.ItemBlockRenderTypes;
|
|
||||||
import net.minecraft.client.renderer.chunk.ChunkSectionLayer;
|
|
||||||
import net.minecraft.world.level.block.Block;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Mixin(ItemBlockRenderTypes.class)
|
|
||||||
public class QuicklyMixin {
|
|
||||||
@Shadow
|
|
||||||
@Final
|
|
||||||
private static Map<Block, ChunkSectionLayer> TYPE_BY_BLOCK;
|
|
||||||
|
|
||||||
@Inject(method = "<clinit>", at = @At("RETURN"))
|
|
||||||
private static void onStaticInit(CallbackInfo info) {
|
|
||||||
ChunkSectionLayer cutout = ChunkSectionLayer.CUTOUT;
|
|
||||||
TYPE_BY_BLOCK.put(QuicklyBlocks.CANOLAPLANT, cutout);
|
|
||||||
TYPE_BY_BLOCK.put(QuicklyBlocks.COTTONPLANT, cutout);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -22,9 +22,6 @@
|
|||||||
"de.jottyfan.minecraft.QuicklyClient"
|
"de.jottyfan.minecraft.QuicklyClient"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"mixins": [
|
|
||||||
"quickly.mixins.json"
|
|
||||||
],
|
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabricloader": ">=0.18.4",
|
"fabricloader": ">=0.18.4",
|
||||||
"minecraft": "~26.1-",
|
"minecraft": "~26.1-",
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
"required": true,
|
|
||||||
"package": "de.jottyfan.minecraft.mixin",
|
|
||||||
"compatibilityLevel": "JAVA_25",
|
|
||||||
"mixins": [
|
|
||||||
"QuicklyMixin"
|
|
||||||
],
|
|
||||||
"injectors": {
|
|
||||||
"defaultRequire": 1
|
|
||||||
},
|
|
||||||
"overwrites": {
|
|
||||||
"requireAnnotations": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user