diff --git a/src/main/java/mod/acgaming/universaltweaks/bugfixes/entities/disconnectdupe/UTDisconnectDupe.java b/src/main/java/mod/acgaming/universaltweaks/bugfixes/entities/disconnectdupe/UTDisconnectDupe.java index 2ee2547e..ac9c64ee 100644 --- a/src/main/java/mod/acgaming/universaltweaks/bugfixes/entities/disconnectdupe/UTDisconnectDupe.java +++ b/src/main/java/mod/acgaming/universaltweaks/bugfixes/entities/disconnectdupe/UTDisconnectDupe.java @@ -1,6 +1,7 @@ package mod.acgaming.universaltweaks.bugfixes.entities.disconnectdupe; import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraftforge.common.util.FakePlayer; import net.minecraftforge.event.entity.item.ItemTossEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; @@ -19,7 +20,7 @@ public static void utDisconnectDupe(ItemTossEvent event) { if (!UTConfigBugfixes.ENTITIES.utDisconnectDupeToggle || event.getPlayer().world.isRemote) return; EntityPlayerMP player = (EntityPlayerMP) event.getPlayer(); - if (!player.connection.getNetworkManager().channel().isOpen()) + if (!(player instanceof FakePlayer) && player.connection != null && !player.connection.getNetworkManager().channel().isOpen()) { if (UTConfigGeneral.DEBUG.utDebugToggle) UniversalTweaks.LOGGER.debug("UTDisconnectDupe ::: Player dropped item but is disconnected! Ignoring drop."); event.setCanceled(true); diff --git a/src/main/java/mod/acgaming/universaltweaks/core/UTLoadingPlugin.java b/src/main/java/mod/acgaming/universaltweaks/core/UTLoadingPlugin.java index d2380df1..653842ad 100644 --- a/src/main/java/mod/acgaming/universaltweaks/core/UTLoadingPlugin.java +++ b/src/main/java/mod/acgaming/universaltweaks/core/UTLoadingPlugin.java @@ -81,7 +81,6 @@ public class UTLoadingPlugin implements IFMLLoadingPlugin, IEarlyMixinLoader put("mixins.tweaks.blocks.falling.json", () -> UTConfigTweaks.BLOCKS.utFallingBlockLifespan != 600); put("mixins.tweaks.blocks.golemstructure.json", () -> UTConfigTweaks.ENTITIES.utGolemPlacement); put("mixins.tweaks.blocks.growthsize.json", () -> UTConfigTweaks.BLOCKS.utCactusSize != 3 && UTConfigTweaks.BLOCKS.utSugarCaneSize != 3 && UTConfigTweaks.BLOCKS.utVineSize != 0); - put("mixins.tweaks.blocks.hitdelay.json", () -> UTConfigTweaks.BLOCKS.utBlockHitDelay != 5); put("mixins.tweaks.blocks.leafdecay.json", () -> UTConfigTweaks.BLOCKS.utLeafDecayToggle); put("mixins.tweaks.blocks.lenientpaths.json", () -> UTConfigTweaks.BLOCKS.utLenientPathsToggle); put("mixins.tweaks.blocks.observer.json", () -> UTConfigTweaks.BLOCKS.utPreventObserverActivatesOnPlacement); @@ -101,7 +100,6 @@ public class UTLoadingPlugin implements IFMLLoadingPlugin, IEarlyMixinLoader put("mixins.tweaks.entities.despawning.json", () -> UTConfigTweaks.ENTITIES.utMobDespawnToggle); put("mixins.tweaks.entities.loot.json", () -> UTConfigTweaks.ENTITIES.utCreeperMusicDiscsToggle); put("mixins.tweaks.entities.minecart.json", () -> UTConfigTweaks.ENTITIES.utMinecartDropsType); - put("mixins.tweaks.entities.playerdismount.json", () -> UTConfigTweaks.MISC.utUseSeparateDismountKey); put("mixins.tweaks.entities.saturation.json", () -> UTConfigTweaks.ENTITIES.utRidingExhaustion != 0.0D); put("mixins.tweaks.entities.spawning.caps.json", () -> UTConfigTweaks.ENTITIES.SPAWN_CAPS.utSpawnCapsToggle); put("mixins.tweaks.entities.spawning.creeper.confetti.json", () -> UTConfigTweaks.ENTITIES.CREEPER_CONFETTI.utCreeperConfettiChance != 0.0D); @@ -174,8 +172,10 @@ public class UTLoadingPlugin implements IFMLLoadingPlugin, IEarlyMixinLoader put("mixins.bugfixes.misc.startup.json", () -> UTConfigTweaks.PERFORMANCE.utFasterBackgroundStartupToggle); put("mixins.bugfixes.world.frustumculling.json", () -> UTConfigBugfixes.WORLD.utFrustumCullingToggle); put("mixins.tweaks.blocks.betterplacement.json", () -> UTConfigTweaks.BLOCKS.BETTER_PLACEMENT.utBetterPlacementToggle); + put("mixins.tweaks.blocks.hitdelay.json", () -> UTConfigTweaks.BLOCKS.utBlockHitDelay != 5); put("mixins.tweaks.entities.autojump.json", () -> UTConfigTweaks.ENTITIES.utAutoJumpToggle); put("mixins.tweaks.entities.burning.player.json", () -> UTConfigTweaks.ENTITIES.utFirstPersonBurningOverlay != -0.3D); + put("mixins.tweaks.entities.playerdismount.json", () -> UTConfigTweaks.MISC.utUseSeparateDismountKey); put("mixins.tweaks.entities.playerf5.json", () -> UTConfigTweaks.ENTITIES.utThirdPersonIgnoresNonSolidBlocks); put("mixins.tweaks.items.attackcooldown.client.json", () -> UTConfigTweaks.ITEMS.ATTACK_COOLDOWN.utAttackCooldownToggle); put("mixins.tweaks.items.itementities.client.json", () -> UTConfigTweaks.ITEMS.ITEM_ENTITIES.utItemEntitiesToggle); diff --git a/src/main/resources/mixins.tweaks.blocks.hitdelay.json b/src/main/resources/mixins.tweaks.blocks.hitdelay.json index 1b7c71c5..2cdce826 100644 --- a/src/main/resources/mixins.tweaks.blocks.hitdelay.json +++ b/src/main/resources/mixins.tweaks.blocks.hitdelay.json @@ -3,5 +3,5 @@ "refmap": "universaltweaks.refmap.json", "minVersion": "0.8", "compatibilityLevel": "JAVA_8", - "mixins": ["UTBlockHitDelayMixin"] + "client": ["UTBlockHitDelayMixin"] } \ No newline at end of file diff --git a/src/main/resources/mixins.tweaks.entities.playerdismount.json b/src/main/resources/mixins.tweaks.entities.playerdismount.json index 550afbac..e3c96545 100644 --- a/src/main/resources/mixins.tweaks.entities.playerdismount.json +++ b/src/main/resources/mixins.tweaks.entities.playerdismount.json @@ -3,5 +3,5 @@ "refmap": "universaltweaks.refmap.json", "minVersion": "0.8", "compatibilityLevel": "JAVA_8", - "mixins": ["UTEntityPlayerSPMixin", "UTKeyBindingMixin", "UTNetHandlerPlayClientMixin"] + "client": ["UTEntityPlayerSPMixin", "UTKeyBindingMixin", "UTNetHandlerPlayClientMixin"] } \ No newline at end of file