hotfix4
This commit is contained in:
@@ -1,36 +0,0 @@
|
||||
#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.isEmpty()) {
|
||||
// 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("§a铛!蜂箱鲜花已更新。");
|
||||
playerIn.sendStatusMessage(message, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
#modloaded gendustry crafttweaker
|
||||
#loader crafttweaker
|
||||
|
||||
// we were supposed to use mixin List getTooltip(ItemStack, World, ITooltipFlag), but Scala is just cursed
|
||||
<item:gendustry:industrial_apiary>.addTooltip("§3空手敲击蜂箱来更新鲜花!");
|
||||
Reference in New Issue
Block a user