fix commit

This commit is contained in:
sainagh
2026-07-25 16:20:42 -05:00
parent 9396611ce0
commit c6df59caf7
3226 changed files with 209810 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
#modloaded gendustry
#loader mixin
import native.net.bdew.gendustry.machines.apiary.BlockApiary;
import native.net.bdew.gendustry.machines.apiary.TileApiary;
import native.forestry.api.apiculture.IBeekeepingLogic;
import native.net.minecraft.entity.player.EntityPlayer;
import native.net.minecraft.item.ItemStack;
import native.net.minecraft.util.EnumHand;
import native.net.minecraft.util.text.TextComponentString;
import native.net.minecraft.util.math.BlockPos;
import native.net.minecraft.world.World;
// I hate Scala jars
#mixin {targets: "net.bdew.gendustry.machines.apiary.BlockApiary$"}
zenClass ApiaryBonkMixin {
// SRG HEAD: Block#onBlockClicked -> func_180649_a (not mixin, as inherited)
function func_180649_a(worldIn as World, pos as BlockPos, playerIn as EntityPlayer) as void {
val heldItem as ItemStack = playerIn.getHeldItem(EnumHand.MAIN_HAND);
if (!worldIn.isRemote && heldItem.getItem().getRegistryName().toString() == "minecraft:stick") {
// Bonk action: refresh apiary
val tile as TileApiary = worldIn.getTileEntity(pos) as TileApiary;
val logic as IBeekeepingLogic = tile.getBeekeepingLogic();
logic.clearCachedValues();
// Chat message
val message as TextComponentString = TextComponentString("§aBonk! Apiary flowers refreshed.");
playerIn.sendStatusMessage(message, true);
}
}
}