Merge branch 'player_controller' of https://github.com/gnembon/fabric-carpet into player_controller
This commit is contained in:
commit
5ea299b7ef
6 files changed
+115
-3
No files matched your search
+2
-2
@@ -4,8 +4,8 @@ org.gradle.jvmargs=-Xmx1G
|
|||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://fabricmc.net/use
|
# check these on https://fabricmc.net/use
|
||||||
# or better: https://modmuss50.me/fabric.html
|
# or better: https://modmuss50.me/fabric.html
|
||||||
minecraft_version=1.14.4-pre4
|
minecraft_version=1.14.4-pre5
|
||||||
yarn_mappings=1.14.4-pre4+build.1
|
yarn_mappings=1.14.4-pre5+build.1
|
||||||
loader_version=0.4.8+build.155
|
loader_version=0.4.8+build.155
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package carpet.mixins;
|
||||||
|
|
||||||
|
import carpet.settings.CarpetSettings;
|
||||||
|
import net.minecraft.client.network.packet.EntityPositionS2CPacket;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.entity.mob.MobEntity;
|
||||||
|
import net.minecraft.server.world.ServerWorld;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
|
@Mixin(Entity.class)
|
||||||
|
public abstract class Entity_horseFixMixin
|
||||||
|
{
|
||||||
|
@Shadow private Entity vehicle;
|
||||||
|
|
||||||
|
@Shadow public abstract World getEntityWorld();
|
||||||
|
|
||||||
|
@Inject(method = "stopRiding", at = @At("HEAD"))
|
||||||
|
private void resetNavigation(CallbackInfo ci)
|
||||||
|
{
|
||||||
|
if (vehicle != null && vehicle instanceof MobEntity && CarpetSettings.horseWanderingFix)
|
||||||
|
{
|
||||||
|
((MobEntity) vehicle).getNavigation().stop();
|
||||||
|
if (!getEntityWorld().isClient)
|
||||||
|
{
|
||||||
|
((ServerWorld) getEntityWorld()).method_14178().sendToNearbyPlayers((Entity)(Object)this, new EntityPositionS2CPacket(vehicle));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -506,6 +506,14 @@ public class Expression implements Cloneable
|
|||||||
{
|
{
|
||||||
throw new ExpressionException(e, token, "Your math is wrong, "+exc.getMessage());
|
throw new ExpressionException(e, token, "Your math is wrong, "+exc.getMessage());
|
||||||
}
|
}
|
||||||
|
catch (ExitStatement exit)
|
||||||
|
{
|
||||||
|
throw exit;
|
||||||
|
}
|
||||||
|
catch (Exception exc)
|
||||||
|
{
|
||||||
|
throw new ExpressionException(e, token, "Error while evaluating expression: "+exc.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -532,6 +540,14 @@ public class Expression implements Cloneable
|
|||||||
{
|
{
|
||||||
throw new ExpressionException(e, t, "Your math is wrong, "+exc.getMessage());
|
throw new ExpressionException(e, t, "Your math is wrong, "+exc.getMessage());
|
||||||
}
|
}
|
||||||
|
catch (ExitStatement exit)
|
||||||
|
{
|
||||||
|
throw exit;
|
||||||
|
}
|
||||||
|
catch (Exception exc)
|
||||||
|
{
|
||||||
|
throw new ExpressionException(e, t, "Error while evaluating expression: "+exc.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -557,6 +573,14 @@ public class Expression implements Cloneable
|
|||||||
{
|
{
|
||||||
throw new ExpressionException(e, token, "Your math is wrong, "+exc.getMessage());
|
throw new ExpressionException(e, token, "Your math is wrong, "+exc.getMessage());
|
||||||
}
|
}
|
||||||
|
catch (ExitStatement exit)
|
||||||
|
{
|
||||||
|
throw exit;
|
||||||
|
}
|
||||||
|
catch (Exception exc)
|
||||||
|
{
|
||||||
|
throw new ExpressionException(e, token, "Error while evaluating expression: "+exc.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -663,6 +687,14 @@ public class Expression implements Cloneable
|
|||||||
{
|
{
|
||||||
throw new ExpressionException(e, t, "Your math is wrong, "+exc.getMessage());
|
throw new ExpressionException(e, t, "Your math is wrong, "+exc.getMessage());
|
||||||
}
|
}
|
||||||
|
catch (ExitStatement exit)
|
||||||
|
{
|
||||||
|
throw exit;
|
||||||
|
}
|
||||||
|
catch (Exception exc)
|
||||||
|
{
|
||||||
|
throw new ExpressionException(e, t, "Error while evaluating expression: "+exc.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -725,7 +757,7 @@ public class Expression implements Cloneable
|
|||||||
{
|
{
|
||||||
retVal = returnStatement.retval;
|
retVal = returnStatement.retval;
|
||||||
}
|
}
|
||||||
catch (ThrowStatement throwStatement)
|
catch (ThrowStatement throwStatement) // might not be really necessary
|
||||||
{
|
{
|
||||||
retVal = throwStatement.retval;
|
retVal = throwStatement.retval;
|
||||||
rethrow = true;
|
rethrow = true;
|
||||||
@@ -738,6 +770,14 @@ public class Expression implements Cloneable
|
|||||||
{
|
{
|
||||||
throw new ExpressionException(function_context, t, "Your math is wrong, "+exc.getMessage());
|
throw new ExpressionException(function_context, t, "Your math is wrong, "+exc.getMessage());
|
||||||
}
|
}
|
||||||
|
catch (ExitStatement exit)
|
||||||
|
{
|
||||||
|
throw exit;
|
||||||
|
}
|
||||||
|
catch (Exception exc)
|
||||||
|
{
|
||||||
|
throw new ExpressionException(e, t, "Error while evaluating expression: "+exc.getMessage());
|
||||||
|
}
|
||||||
for (String global: globals)
|
for (String global: globals)
|
||||||
{
|
{
|
||||||
LazyValue lv = newFrame.getVariable(global);
|
LazyValue lv = newFrame.getVariable(global);
|
||||||
|
|||||||
@@ -108,6 +108,18 @@ public abstract class Fluff
|
|||||||
{
|
{
|
||||||
throw new ExpressionException(e, t, exc.getMessage());
|
throw new ExpressionException(e, t, exc.getMessage());
|
||||||
}
|
}
|
||||||
|
catch (ArithmeticException exc)
|
||||||
|
{
|
||||||
|
throw new ExpressionException(e, t, "Your math is wrong, "+exc.getMessage());
|
||||||
|
}
|
||||||
|
catch (Expression.ExitStatement exit)
|
||||||
|
{
|
||||||
|
throw exit;
|
||||||
|
}
|
||||||
|
catch (Exception exc)
|
||||||
|
{
|
||||||
|
throw new ExpressionException(e, t, "Error while evaluating expression: "+exc.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -154,6 +166,14 @@ public abstract class Fluff
|
|||||||
{
|
{
|
||||||
throw new ExpressionException(e, t, "Your math is wrong, "+exc.getMessage());
|
throw new ExpressionException(e, t, "Your math is wrong, "+exc.getMessage());
|
||||||
}
|
}
|
||||||
|
catch (Expression.ExitStatement exit)
|
||||||
|
{
|
||||||
|
throw exit;
|
||||||
|
}
|
||||||
|
catch (Exception exc)
|
||||||
|
{
|
||||||
|
throw new ExpressionException(e, t, "Error while evaluating expression: "+exc.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -182,6 +202,14 @@ public abstract class Fluff
|
|||||||
{
|
{
|
||||||
throw new ExpressionException(e, t, "Your math is wrong, "+exc.getMessage());
|
throw new ExpressionException(e, t, "Your math is wrong, "+exc.getMessage());
|
||||||
}
|
}
|
||||||
|
catch (Expression.ExitStatement exit)
|
||||||
|
{
|
||||||
|
throw exit;
|
||||||
|
}
|
||||||
|
catch (Exception exc)
|
||||||
|
{
|
||||||
|
throw new ExpressionException(e, t, "Error while evaluating expression: "+exc.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -401,4 +401,11 @@ public class CarpetSettings
|
|||||||
|
|
||||||
@Rule(desc = "Spawning requires much less CPU and Memory", category = OPTIMIZATION)
|
@Rule(desc = "Spawning requires much less CPU and Memory", category = OPTIMIZATION)
|
||||||
public static boolean lagFreeSpawning = false;
|
public static boolean lagFreeSpawning = false;
|
||||||
|
|
||||||
|
@Rule(
|
||||||
|
desc = "Prevents horses and other mobs to wander into the distance after dismounting",
|
||||||
|
extra = "Fixes issues with various Joergens wandering off and disappearing client-side",
|
||||||
|
category = BUGFIX
|
||||||
|
)
|
||||||
|
public static boolean horseWanderingFix = false;
|
||||||
}
|
}
|
||||||
@@ -81,6 +81,8 @@
|
|||||||
"Entity_portalSuffocationMixin",
|
"Entity_portalSuffocationMixin",
|
||||||
"PortalForcer_portalSuffocationMixin",
|
"PortalForcer_portalSuffocationMixin",
|
||||||
|
|
||||||
|
"Entity_horseFixMixin",
|
||||||
|
|
||||||
"HopperBlockEntityMixin",
|
"HopperBlockEntityMixin",
|
||||||
"ContainerMixin",
|
"ContainerMixin",
|
||||||
"ClientConnectionMixin",
|
"ClientConnectionMixin",
|
||||||
|
|||||||
Reference in new issue
Block a user