mirror of
https://github.com/FabricMC/fabric.git
synced 2024-11-14 19:25:23 -05:00
update to 1.14pre3
This commit is contained in:
parent
93f49a4824
commit
619f251fa5
11 changed files with 21 additions and 26 deletions
|
@ -8,7 +8,7 @@ buildscript {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dependencies {
|
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"
|
archivesBaseName = "fabric"
|
||||||
|
|
||||||
def baseVersion = "0.2.7"
|
def baseVersion = "0.2.7"
|
||||||
def mcVersion = "1.14 Pre-Release 1"
|
def mcVersion = "1.14 Pre-Release 3"
|
||||||
|
|
||||||
def ENV = System.getenv()
|
def ENV = System.getenv()
|
||||||
version = baseVersion + "+" + (ENV.BUILD_NUMBER ? ("build." + ENV.BUILD_NUMBER) : "local")
|
version = baseVersion + "+" + (ENV.BUILD_NUMBER ? ("build." + ENV.BUILD_NUMBER) : "local")
|
||||||
|
@ -38,8 +38,8 @@ minecraft {
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
minecraft "com.mojang:minecraft:$mcVersion"
|
minecraft "com.mojang:minecraft:$mcVersion"
|
||||||
mappings "net.fabricmc:yarn:$mcVersion+build.3"
|
mappings "net.fabricmc:yarn:$mcVersion+build.1"
|
||||||
modCompile "net.fabricmc:fabric-loader:0.4.0+build.116"
|
modCompile "net.fabricmc:fabric-loader:0.4.1+build.125"
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class ClientSidePacketRegistryImpl extends PacketRegistryImpl implements
|
||||||
// stay closer to the vanilla codepath
|
// stay closer to the vanilla codepath
|
||||||
handler.sendPacket(packet);
|
handler.sendPacket(packet);
|
||||||
} else {
|
} else {
|
||||||
handler.getClientConnection().sendPacket(packet, completionListener);
|
handler.getClientConnection().send(packet, completionListener);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// TODO: log warning
|
// TODO: log warning
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
package net.fabricmc.fabric.impl.registry;
|
package net.fabricmc.fabric.impl.registry;
|
||||||
|
|
||||||
import net.minecraft.item.Item;
|
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.Identifier;
|
||||||
import net.minecraft.util.registry.Registry;
|
import net.minecraft.util.registry.Registry;
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ public final class ModResourcePackUtil {
|
||||||
|
|
||||||
public static void appendModResourcePacks(List<ResourcePack> packList, ResourceType type) {
|
public static void appendModResourcePacks(List<ResourcePack> packList, ResourceType type) {
|
||||||
for (ModContainer container : FabricLoader.getInstance().getAllMods()) {
|
for (ModContainer container : FabricLoader.getInstance().getAllMods()) {
|
||||||
Path path = container.getRoot();
|
Path path = container.getRootPath();
|
||||||
ResourcePack pack = new ModNioResourcePack(container.getMetadata(), path, null);
|
ResourcePack pack = new ModNioResourcePack(container.getMetadata(), path, null);
|
||||||
if (!pack.getNamespaces(type).isEmpty()) {
|
if (!pack.getNamespaces(type).isEmpty()) {
|
||||||
packList.add(pack);
|
packList.add(pack);
|
||||||
|
|
|
@ -24,7 +24,7 @@ import com.mojang.datafixers.DataFixer;
|
||||||
import net.fabricmc.fabric.api.registry.CommandRegistry;
|
import net.fabricmc.fabric.api.registry.CommandRegistry;
|
||||||
import net.minecraft.server.MinecraftServer;
|
import net.minecraft.server.MinecraftServer;
|
||||||
import net.minecraft.server.WorldGenerationProgressListenerFactory;
|
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.command.ServerCommandSource;
|
||||||
import net.minecraft.server.dedicated.MinecraftDedicatedServer;
|
import net.minecraft.server.dedicated.MinecraftDedicatedServer;
|
||||||
import net.minecraft.util.UserCache;
|
import net.minecraft.util.UserCache;
|
||||||
|
@ -40,18 +40,13 @@ import java.util.function.Consumer;
|
||||||
@Mixin(MinecraftDedicatedServer.class)
|
@Mixin(MinecraftDedicatedServer.class)
|
||||||
public abstract class MixinMinecraftDedicatedServer extends MinecraftServer {
|
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);
|
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"))
|
@Inject(method = "setupServer", at = @At("HEAD"))
|
||||||
private void setupServer(CallbackInfoReturnable<Boolean> info){
|
private void setupServer(CallbackInfoReturnable<Boolean> info){
|
||||||
//Load none dedicated only commands and dedicated only commands
|
CommandRegistry.INSTANCE.entries(false).forEach((e) -> e.accept(getCommandManager().getDispatcher()));
|
||||||
for(Consumer<CommandDispatcher<ServerCommandSource>> entry : CommandRegistry.INSTANCE.entries(false)){
|
CommandRegistry.INSTANCE.entries(true).forEach((e) -> e.accept(getCommandManager().getDispatcher()));
|
||||||
entry.accept(getCommandManager().getDispatcher());
|
|
||||||
}
|
|
||||||
for(Consumer<CommandDispatcher<ServerCommandSource>> entry : CommandRegistry.INSTANCE.entries(true)){
|
|
||||||
entry.accept(getCommandManager().getDispatcher());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ package net.fabricmc.fabric.mixin.commands;
|
||||||
|
|
||||||
import com.mojang.brigadier.CommandDispatcher;
|
import com.mojang.brigadier.CommandDispatcher;
|
||||||
import net.fabricmc.fabric.api.registry.CommandRegistry;
|
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 net.minecraft.server.command.ServerCommandSource;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
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.Inject;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
@Mixin(ServerCommandManager.class)
|
@Mixin(CommandManager.class)
|
||||||
public class MixinServerCommandManager {
|
public class MixinServerCommandManager {
|
||||||
@Shadow
|
@Shadow
|
||||||
private static Logger LOGGER;
|
private static Logger LOGGER;
|
||||||
|
|
|
@ -80,7 +80,7 @@ public abstract class MixinMinecraftClient {
|
||||||
|
|
||||||
if (client.player.abilities.creativeMode) {
|
if (client.player.abilities.creativeMode) {
|
||||||
playerInventory.addPickBlock(stack);
|
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 {
|
} else {
|
||||||
int slot = playerInventory.getSlotWithStack(stack);
|
int slot = playerInventory.getSlotWithStack(stack);
|
||||||
if (slot >= 0) {
|
if (slot >= 0) {
|
||||||
|
|
|
@ -30,8 +30,8 @@ import java.util.function.BooleanSupplier;
|
||||||
@Mixin(World.class)
|
@Mixin(World.class)
|
||||||
public class MixinWorld {
|
public class MixinWorld {
|
||||||
// TODO split into ClientWorld/ServerWorld ticks? mmm need more mappings
|
// TODO split into ClientWorld/ServerWorld ticks? mmm need more mappings
|
||||||
@Inject(at = @At("RETURN"), method = "method_18471")
|
@Inject(at = @At("RETURN"), method = "tickBlockEntities")
|
||||||
public void method_18471(CallbackInfo info) {
|
public void tickBlockEntitiesAfter(CallbackInfo info) {
|
||||||
WorldTickCallback.EVENT.invoker().tick((World) (Object) this);
|
WorldTickCallback.EVENT.invoker().tick((World) (Object) this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,8 +34,8 @@ public class MixinMinecraftClient {
|
||||||
private static Logger LOGGER;
|
private static Logger LOGGER;
|
||||||
|
|
||||||
// Unmap the registry before loading a new SP/MP setup.
|
// Unmap the registry before loading a new SP/MP setup.
|
||||||
@Inject(at = @At("RETURN"), method = "method_18096")
|
@Inject(at = @At("RETURN"), method = "disconnect(Lnet/minecraft/client/gui/Screen;)V")
|
||||||
public void method_18096(Screen screen_1, CallbackInfo info) {
|
public void disconnectAfter(Screen screen_1, CallbackInfo info) {
|
||||||
ClientSidePacketRegistryImpl.invalidateRegisteredIdList();
|
ClientSidePacketRegistryImpl.invalidateRegisteredIdList();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -23,7 +23,7 @@ import net.minecraft.container.Container;
|
||||||
import net.minecraft.container.Slot;
|
import net.minecraft.container.Slot;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.entity.player.PlayerInventory;
|
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.Identifier;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ public class ContainerMod implements ModInitializer {
|
||||||
public void onInitialize() {
|
public void onInitialize() {
|
||||||
//Registers a basic server side command that shows that the openContainer works from the server side.
|
//Registers a basic server side command that shows that the openContainer works from the server side.
|
||||||
CommandRegistry.INSTANCE.register(false, serverCommandSourceCommandDispatcher ->
|
CommandRegistry.INSTANCE.register(false, serverCommandSourceCommandDispatcher ->
|
||||||
serverCommandSourceCommandDispatcher.register(ServerCommandManager
|
serverCommandSourceCommandDispatcher.register(CommandManager
|
||||||
.literal("container")
|
.literal("container")
|
||||||
.executes(context -> {
|
.executes(context -> {
|
||||||
BlockPos pos = new BlockPos(context.getSource().getEntity());
|
BlockPos pos = new BlockPos(context.getSource().getEntity());
|
||||||
|
|
|
@ -68,7 +68,7 @@ public class ModelModClient implements ClientModInitializer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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! ---");
|
System.out.println("--- Model baked! ---");
|
||||||
|
|
||||||
return bakedModel = new BakedModel() {
|
return bakedModel = new BakedModel() {
|
||||||
|
|
Loading…
Reference in a new issue