fixed snapshot-7

This commit is contained in:
Jottyfan
2026-02-12 16:06:19 +01:00
parent ea72b9c7f0
commit 8dc3145493
7 changed files with 4 additions and 55 deletions

View File

@@ -17,4 +17,4 @@ maven_group=de.jottyfan.minecraft
archives_base_name=quickly
# Dependencies
fabric_api_version=0.143.3+26.1
fabric_api_version=0.143.4+26.1

View File

@@ -92,7 +92,7 @@ public class BlockDrill extends FallingBlock implements EntityBlock {
loadings.put(QuicklyItems.CANOLABOTTLESTACK, 72);
Item item = itemStack.getItem();
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);
}
} else if (loadings.containsKey(item)) {

View File

@@ -56,7 +56,7 @@ public class Itemhoarder extends Block implements EntityBlock {
@Override
protected InteractionResult useItemOn(ItemStack itemStack, BlockState state, Level level, BlockPos pos, Player player,
InteractionHand hand, BlockHitResult hitResult) {
if (player instanceof ServerPlayer serverPlayer) {
if (player instanceof ServerPlayer serverPlayer && player != null) {
if (QuicklyItems.MAGNIFIER.equals(itemStack.getItem())) {
MutableComponent message = Component.empty();
BlockEntity blockEntity = level.getBlockEntity(pos);

View File

@@ -73,7 +73,7 @@ public class Monsterhoarder extends Block {
int suckRadius = state.getValue(SUCKRADIUS);
int burnTicks = state.getValue(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);
}
}

View File

@@ -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);
}
}

View File

@@ -22,9 +22,6 @@
"de.jottyfan.minecraft.QuicklyClient"
]
},
"mixins": [
"quickly.mixins.json"
],
"depends": {
"fabricloader": ">=0.18.4",
"minecraft": "~26.1-",

View File

@@ -1,14 +0,0 @@
{
"required": true,
"package": "de.jottyfan.minecraft.mixin",
"compatibilityLevel": "JAVA_25",
"mixins": [
"QuicklyMixin"
],
"injectors": {
"defaultRequire": 1
},
"overwrites": {
"requireAnnotations": true
}
}