This commit is contained in:
gnembon committed 2020-10-01 14:14:01 -03:00
1 parent 5adc3ae3f9
commit 8a2ddcbf2a
14 files changed
+26 -24

No files matched your search

+1 -1
View File
@@ -35,7 +35,7 @@ import static carpet.settings.RuleCategory.CLIENT;
@SuppressWarnings("CanBeFinal")
public class CarpetSettings
{
public static final String carpetVersion = "1.4.11+v200910";
public static final String carpetVersion = "1.4.12+v201001";
public static final Logger LOG = LogManager.getLogger();
public static boolean skipGenerationChecks = false;
public static boolean impendingFillSkipUpdates = false;
@@ -31,7 +31,7 @@ import java.lang.Math;
import static net.minecraft.server.command.CommandManager.argument;
import static net.minecraft.server.command.CommandManager.literal;
import static net.minecraft.server.command.CommandSource.suggestMatching;
import static net.minecraft.command.CommandSource.suggestMatching;
public class DrawCommand
{
@@ -20,7 +20,7 @@ import java.util.List;
import java.util.Map;
import static com.mojang.brigadier.arguments.StringArgumentType.getString;
import static net.minecraft.server.command.CommandSource.suggestMatching;
import static net.minecraft.command.CommandSource.suggestMatching;
public class LogCommand
{
@@ -12,7 +12,7 @@ import net.minecraft.util.registry.Registry;
import static net.minecraft.server.command.CommandManager.argument;
import static net.minecraft.server.command.CommandManager.literal;
import static net.minecraft.server.command.CommandSource.suggestMatching;
import static net.minecraft.command.CommandSource.suggestMatching;
public class MobAICommand
{
@@ -37,7 +37,7 @@ import java.util.function.Consumer;
import static net.minecraft.server.command.CommandManager.argument;
import static net.minecraft.server.command.CommandManager.literal;
import static net.minecraft.server.command.CommandSource.suggestMatching;
import static net.minecraft.command.CommandSource.suggestMatching;
public class PlayerCommand
{
@@ -48,12 +48,12 @@ import java.util.stream.Collectors;
import static net.minecraft.server.command.CommandManager.argument;
import static net.minecraft.server.command.CommandManager.literal;
import static net.minecraft.server.command.CommandSource.suggestMatching;
import static net.minecraft.command.CommandSource.suggestMatching;
public class ScriptCommand
{
private static TreeSet<String> scarpetFunctions;
private static TreeSet<String> APIFunctions;
private static final TreeSet<String> scarpetFunctions;
private static final TreeSet<String> APIFunctions;
static
{
Set<String> allFunctions = (new CarpetExpression(null, "null", null, null)).getExpr().getFunctionNames();
@@ -30,7 +30,7 @@ import static com.mojang.brigadier.arguments.StringArgumentType.string;
import static com.mojang.brigadier.arguments.StringArgumentType.word;
import static net.minecraft.server.command.CommandManager.argument;
import static net.minecraft.server.command.CommandManager.literal;
import static net.minecraft.server.command.CommandSource.suggestMatching;
import static net.minecraft.command.CommandSource.suggestMatching;
public class SpawnCommand
@@ -20,7 +20,7 @@ import static com.mojang.brigadier.arguments.StringArgumentType.getString;
import static com.mojang.brigadier.arguments.StringArgumentType.greedyString;
import static net.minecraft.server.command.CommandManager.argument;
import static net.minecraft.server.command.CommandManager.literal;
import static net.minecraft.server.command.CommandSource.suggestMatching;
import static net.minecraft.command.CommandSource.suggestMatching;
public class TickCommand
{
@@ -10,7 +10,7 @@ import net.minecraft.entity.ai.brain.Activity;
import net.minecraft.entity.ai.brain.Memory;
import net.minecraft.entity.ai.brain.MemoryModuleType;
import net.minecraft.entity.ai.pathing.Path;
import net.minecraft.entity.passive.AbstractTraderEntity;
import net.minecraft.entity.passive.MerchantEntity;
import net.minecraft.entity.passive.VillagerEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.BedItem;
@@ -39,7 +39,7 @@ import java.util.Optional;
import java.util.stream.Collectors;
@Mixin(VillagerEntity.class)
public abstract class VillagerEntity_aiMixin extends AbstractTraderEntity
public abstract class VillagerEntity_aiMixin extends MerchantEntity
{
@Shadow protected abstract void sayNo();
@@ -51,6 +51,11 @@ public abstract class VillagerEntity_aiMixin extends AbstractTraderEntity
boolean hasBed;
int displayAge;
public VillagerEntity_aiMixin(EntityType<? extends MerchantEntity> entityType_1, World world_1)
{
super(entityType_1, world_1);
}
@Inject(method = "tick", at = @At("HEAD"))
private void ontick(CallbackInfo ci)
{
@@ -182,8 +187,5 @@ public abstract class VillagerEntity_aiMixin extends AbstractTraderEntity
}
}
public VillagerEntity_aiMixin(EntityType<? extends AbstractTraderEntity> entityType_1, World world_1)
{
super(entityType_1, world_1);
}
}
@@ -48,7 +48,7 @@ public class EntityPlayerMPFake extends ServerPlayerEntity
instance.setHealth(20.0F);
instance.removed = false;
instance.stepHeight = 0.6F;
interactionManagerIn.method_30118(gamemode); // setGameMode
interactionManagerIn.setGameMode(gamemode);
server.getPlayerManager().sendToDimension(new EntitySetHeadYawS2CPacket(instance, (byte) (instance.headYaw * 256 / 360)), dimensionId);//instance.dimension);
server.getPlayerManager().sendToDimension(new EntityPositionS2CPacket(instance), dimensionId);//instance.dimension);
instance.getServerWorld().getChunkManager().updateCameraPosition(instance);
@@ -68,7 +68,7 @@ public class EntityPlayerMPFake extends ServerPlayerEntity
playerShadow.setHealth(player.getHealth());
playerShadow.networkHandler.requestTeleport(player.getX(), player.getY(), player.getZ(), player.yaw, player.pitch);
interactionManagerIn.method_30118(player.interactionManager.getGameMode()); // setGameMode
interactionManagerIn.setGameMode(player.interactionManager.getGameMode());
((ServerPlayerEntityInterface) playerShadow).getActionPack().copyFrom(((ServerPlayerEntityInterface) player).getActionPack());
playerShadow.stepHeight = 0.6F;
playerShadow.dataTracker.set(PLAYER_MODEL_PARTS, player.getDataTracker().get(PLAYER_MODEL_PARTS));
@@ -43,9 +43,9 @@ import java.util.TreeMap;
import java.util.stream.Collectors;
import static carpet.utils.Translations.tr;
import static net.minecraft.command.CommandSource.suggestMatching;
import static net.minecraft.server.command.CommandManager.argument;
import static net.minecraft.server.command.CommandManager.literal;
import static net.minecraft.server.command.CommandSource.suggestMatching;
public class SettingsManager
{