Skip to content

Commit

Permalink
Fix invalid field access after module merge
Browse files Browse the repository at this point in the history
  • Loading branch information
KnightMiner committed Nov 7, 2022
1 parent 7899bae commit bd98cb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
@@ -1,12 +1,13 @@
package knightminer.inspirations.common.network;

import knightminer.inspirations.common.CommonsEvents;
import net.minecraft.client.Minecraft;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.world.entity.Entity;
import net.minecraftforge.network.NetworkEvent;
import slimeknights.mantle.network.packet.IThreadsafePacket;

import static knightminer.inspirations.tweaks.TweaksEvents.TAG_MILKCOOLDOWN;

@SuppressWarnings("WeakerAccess")
public class MilkablePacket implements IThreadsafePacket {

Expand Down Expand Up @@ -46,7 +47,7 @@ private static void handle(MilkablePacket packet) {
}

// value for not milkable does not matter as long as its greater than 0
entity.getPersistentData().putShort(CommonsEvents.TAG_MILKCOOLDOWN, (short)(packet.milkable ? 0 : 100));
entity.getPersistentData().putShort(TAG_MILKCOOLDOWN, (short)(packet.milkable ? 0 : 100));
}
}
}
Expand Up @@ -44,7 +44,7 @@
@SuppressWarnings({"unused"})
@EventBusSubscriber(modid = Inspirations.modID, bus = Bus.FORGE)
public class TweaksEvents {
private static final String TAG_MILKCOOLDOWN = "milk_cooldown";
public static final String TAG_MILKCOOLDOWN = "milk_cooldown";

@SubscribeEvent
static void unsaddlePig(EntityInteract event) {
Expand Down

0 comments on commit bd98cb5

Please sign in to comment.