update to 1.14pre3

This commit is contained in:
asie 2019-04-16 18:07:53 +02:00
parent 93f49a4824
commit 619f251fa5
11 changed files with 21 additions and 26 deletions

View file

@ -8,7 +8,7 @@ buildscript {
}
}
dependencies {
classpath "net.fabricmc:fabric-loom:0.2.0-SNAPSHOT"
classpath "net.fabricmc:fabric-loom:0.2.1-SNAPSHOT"
}
}
@ -27,7 +27,7 @@ targetCompatibility = 1.8
archivesBaseName = "fabric"
def baseVersion = "0.2.7"
def mcVersion = "1.14 Pre-Release 1"
def mcVersion = "1.14 Pre-Release 3"
def ENV = System.getenv()
version = baseVersion + "+" + (ENV.BUILD_NUMBER ? ("build." + ENV.BUILD_NUMBER) : "local")
@ -38,8 +38,8 @@ minecraft {
dependencies {
minecraft "com.mojang:minecraft:$mcVersion"
mappings "net.fabricmc:yarn:$mcVersion+build.3"
modCompile "net.fabricmc:fabric-loader:0.4.0+build.116"
mappings "net.fabricmc:yarn:$mcVersion+build.1"
modCompile "net.fabricmc:fabric-loader:0.4.1+build.125"
}
processResources {

View file

@ -54,7 +54,7 @@ public class ClientSidePacketRegistryImpl extends PacketRegistryImpl implements
// stay closer to the vanilla codepath
handler.sendPacket(packet);
} else {
handler.getClientConnection().sendPacket(packet, completionListener);
handler.getClientConnection().send(packet, completionListener);
}
} else {
// TODO: log warning

View file

@ -17,7 +17,7 @@
package net.fabricmc.fabric.impl.registry;
import net.minecraft.item.Item;
import net.minecraft.item.block.BlockItem;
import net.minecraft.item.BlockItem;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;

View file

@ -45,7 +45,7 @@ public final class ModResourcePackUtil {
public static void appendModResourcePacks(List<ResourcePack> packList, ResourceType type) {
for (ModContainer container : FabricLoader.getInstance().getAllMods()) {
Path path = container.getRoot();
Path path = container.getRootPath();
ResourcePack pack = new ModNioResourcePack(container.getMetadata(), path, null);
if (!pack.getNamespaces(type).isEmpty()) {
packList.add(pack);

View file

@ -24,7 +24,7 @@ import com.mojang.datafixers.DataFixer;
import net.fabricmc.fabric.api.registry.CommandRegistry;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.WorldGenerationProgressListenerFactory;
import net.minecraft.server.command.ServerCommandManager;
import net.minecraft.server.command.CommandManager;
import net.minecraft.server.command.ServerCommandSource;
import net.minecraft.server.dedicated.MinecraftDedicatedServer;
import net.minecraft.util.UserCache;
@ -40,18 +40,13 @@ import java.util.function.Consumer;
@Mixin(MinecraftDedicatedServer.class)
public abstract class MixinMinecraftDedicatedServer extends MinecraftServer {
public MixinMinecraftDedicatedServer(File file_1, Proxy proxy_1, DataFixer dataFixer_1, ServerCommandManager serverCommandManager_1, YggdrasilAuthenticationService yggdrasilAuthenticationService_1, MinecraftSessionService minecraftSessionService_1, GameProfileRepository gameProfileRepository_1, UserCache userCache_1, WorldGenerationProgressListenerFactory worldGenerationProgressListenerFactory_1, String string_1) {
public MixinMinecraftDedicatedServer(File file_1, Proxy proxy_1, DataFixer dataFixer_1, CommandManager serverCommandManager_1, YggdrasilAuthenticationService yggdrasilAuthenticationService_1, MinecraftSessionService minecraftSessionService_1, GameProfileRepository gameProfileRepository_1, UserCache userCache_1, WorldGenerationProgressListenerFactory worldGenerationProgressListenerFactory_1, String string_1) {
super(file_1, proxy_1, dataFixer_1, serverCommandManager_1, yggdrasilAuthenticationService_1, minecraftSessionService_1, gameProfileRepository_1, userCache_1, worldGenerationProgressListenerFactory_1, string_1);
}
@Inject(method = "setupServer", at = @At("HEAD"))
private void setupServer(CallbackInfoReturnable<Boolean> info){
//Load none dedicated only commands and dedicated only commands
for(Consumer<CommandDispatcher<ServerCommandSource>> entry : CommandRegistry.INSTANCE.entries(false)){
entry.accept(getCommandManager().getDispatcher());
}
for(Consumer<CommandDispatcher<ServerCommandSource>> entry : CommandRegistry.INSTANCE.entries(true)){
entry.accept(getCommandManager().getDispatcher());
}
CommandRegistry.INSTANCE.entries(false).forEach((e) -> e.accept(getCommandManager().getDispatcher()));
CommandRegistry.INSTANCE.entries(true).forEach((e) -> e.accept(getCommandManager().getDispatcher()));
}
}

View file

@ -18,7 +18,7 @@ package net.fabricmc.fabric.mixin.commands;
import com.mojang.brigadier.CommandDispatcher;
import net.fabricmc.fabric.api.registry.CommandRegistry;
import net.minecraft.server.command.ServerCommandManager;
import net.minecraft.server.command.CommandManager;
import net.minecraft.server.command.ServerCommandSource;
import org.apache.logging.log4j.Logger;
import org.spongepowered.asm.mixin.Mixin;
@ -27,7 +27,7 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(ServerCommandManager.class)
@Mixin(CommandManager.class)
public class MixinServerCommandManager {
@Shadow
private static Logger LOGGER;

View file

@ -80,7 +80,7 @@ public abstract class MixinMinecraftClient {
if (client.player.abilities.creativeMode) {
playerInventory.addPickBlock(stack);
client.interactionManager.method_2909(client.player.getStackInHand(Hand.MAIN), 36 + playerInventory.selectedSlot);
client.interactionManager.clickCreativeStack(client.player.getStackInHand(Hand.MAIN), 36 + playerInventory.selectedSlot);
} else {
int slot = playerInventory.getSlotWithStack(stack);
if (slot >= 0) {

View file

@ -30,8 +30,8 @@ import java.util.function.BooleanSupplier;
@Mixin(World.class)
public class MixinWorld {
// TODO split into ClientWorld/ServerWorld ticks? mmm need more mappings
@Inject(at = @At("RETURN"), method = "method_18471")
public void method_18471(CallbackInfo info) {
@Inject(at = @At("RETURN"), method = "tickBlockEntities")
public void tickBlockEntitiesAfter(CallbackInfo info) {
WorldTickCallback.EVENT.invoker().tick((World) (Object) this);
}
}

View file

@ -34,8 +34,8 @@ public class MixinMinecraftClient {
private static Logger LOGGER;
// Unmap the registry before loading a new SP/MP setup.
@Inject(at = @At("RETURN"), method = "method_18096")
public void method_18096(Screen screen_1, CallbackInfo info) {
@Inject(at = @At("RETURN"), method = "disconnect(Lnet/minecraft/client/gui/Screen;)V")
public void disconnectAfter(Screen screen_1, CallbackInfo info) {
ClientSidePacketRegistryImpl.invalidateRegisteredIdList();
try {

View file

@ -23,7 +23,7 @@ import net.minecraft.container.Container;
import net.minecraft.container.Slot;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.server.command.ServerCommandManager;
import net.minecraft.server.command.CommandManager;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.BlockPos;
@ -37,7 +37,7 @@ public class ContainerMod implements ModInitializer {
public void onInitialize() {
//Registers a basic server side command that shows that the openContainer works from the server side.
CommandRegistry.INSTANCE.register(false, serverCommandSourceCommandDispatcher ->
serverCommandSourceCommandDispatcher.register(ServerCommandManager
serverCommandSourceCommandDispatcher.register(CommandManager
.literal("container")
.executes(context -> {
BlockPos pos = new BlockPos(context.getSource().getEntity());

View file

@ -68,7 +68,7 @@ public class ModelModClient implements ClientModInitializer {
}
@Override
public BakedModel bake(ModelLoader var1, Function<Identifier, Sprite> var2, ModelRotationContainer var3) {
public BakedModel bake(ModelLoader var1, Function<Identifier, Sprite> var2, ModelBakeSettings var3) {
System.out.println("--- Model baked! ---");
return bakedModel = new BakedModel() {