Update version to 3.2.1, fixed FreecamModule in single-player

This commit is contained in:
noil 2023-03-31 18:32:15 -04:00
parent 3992120726
commit f692b7f753
3 changed files with 10 additions and 4 deletions

View File

@ -18,7 +18,7 @@ apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: "com.github.johnrengelman.shadow"
version = "3.2.0"
version = "3.2.1"
group = "me.rigamortis"
archivesBaseName = "seppuku"
def buildmode = "IDE"

View File

@ -12,7 +12,7 @@ import net.minecraftforge.fml.common.event.FMLInitializationEvent;
@Mod(modid = "seppukumod", name = "Seppuku", version = SeppukuMod.VERSION)
public final class SeppukuMod {
public static final String VERSION = "3.2.0";
public static final String VERSION = "3.2.1";
/**
* Our mods entry point

View File

@ -23,8 +23,8 @@ import net.minecraft.util.math.Vec3d;
import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
/**
* Author Seth
* 4/24/2019 @ 7:45 PM.
* @author Seth
* @author noil
*/
public final class FreeCamModule extends Module {
@ -134,6 +134,9 @@ public final class FreeCamModule extends Module {
@Listener
public void sendPacket(EventSendPacket event) {
if (event.getStage() == EventStageable.EventStage.PRE) {
if (!Minecraft.getMinecraft().isSingleplayer()) // don't mess up single-player
return;
if (Minecraft.getMinecraft().world != null) {
if (!this.allowDismount.getValue()) {
if (event.getPacket() instanceof CPacketInput) {
@ -163,6 +166,9 @@ public final class FreeCamModule extends Module {
@Listener
public void receivePacket(EventReceivePacket event) {
if (event.getStage() == EventStageable.EventStage.PRE) {
if (!Minecraft.getMinecraft().isSingleplayer()) // don't mess up single-player
return;
if (event.getPacket() instanceof SPacketSetPassengers) {
final SPacketSetPassengers packet = (SPacketSetPassengers) event.getPacket();
final Entity riding = Minecraft.getMinecraft().world.getEntityByID(packet.getEntityId());