Skip to content

Commit

Permalink
Dev-6 fr
Browse files Browse the repository at this point in the history
  • Loading branch information
strubium committed Jun 6, 2024
1 parent 7b9c704 commit 6776a84
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
modname=TheOneSmeagle
version=1.12-Dev-5
version=1.12-Dev-6
curse_type=release
projectId=245211
github_project=strubium/TheOneSmeagle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

import static mcjty.theoneprobe.config.ConfigSetup.*;

@SideOnly(Side.CLIENT)
public class ClientForgeEventHandlers {

public static boolean ignoreNextGuiClose = false;
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/mcjty/theoneprobe/ForgeEventHandlers.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
import net.minecraftforge.event.entity.player.PlayerEvent;
import net.minecraftforge.fml.client.event.ConfigChangedEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;


public class ForgeEventHandlers {

Expand All @@ -36,6 +39,7 @@ public void onEntityConstructing(AttachCapabilitiesEvent<Entity> event){
}
}

@SideOnly(Side.SERVER)
@SubscribeEvent
public void onPlayerCloned(PlayerEvent.Clone event) {
if (event.isWasDeath()) {
Expand All @@ -49,6 +53,7 @@ public void onPlayerCloned(PlayerEvent.Clone event) {
}
}

@SideOnly(Side.SERVER)
@SubscribeEvent
public void onPlayerLoggedIn(net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent event) {
if (ConfigSetup.spawnNote) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import net.minecraft.entity.EntityAgeable;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.passive.EntityWaterMob;
import net.minecraft.world.World;

import static mcjty.theoneprobe.api.TextStyleClass.INFO;
Expand Down Expand Up @@ -50,6 +51,13 @@ public void addProbeEntityInfo(ProbeMode mode, IProbeInfo probeInfo, EntityPlaye
vertical
.text(LABEL + "Growing Age: " + INFO + growingAge);
}
if (entity instanceof EntityWaterMob) {

EntityWaterMob entityWaterMob = (EntityWaterMob) entity;
boolean canBreatheUnderwater = entityWaterMob.canBreatheUnderwater();
vertical
.text(LABEL + "Can Breath Underwater: " + INFO + canBreatheUnderwater);
}
}
}
}

0 comments on commit 6776a84

Please sign in to comment.