mirror of
https://github.com/FabricMC/fabric.git
synced 2025-07-28 15:09:35 -04:00
1.14.3-pre2
This commit is contained in:
parent
10d8dc0969
commit
f0d568005e
4 changed files with 13 additions and 12 deletions
build.gradle
fabric-item-groups-v0/src/main/java/net/fabricmc/fabric/mixin/itemgroup/client
fabric-loot-tables-v1/src/main/java/net/fabricmc/fabric/mixin/loot
fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/impl/registry
|
@ -12,8 +12,8 @@ plugins {
|
|||
def ENV = System.getenv()
|
||||
|
||||
def baseVersion = "0.3.0"
|
||||
def mcVersion = "1.14.3-pre1"
|
||||
def yarnVersion = "+build.1"
|
||||
def mcVersion = "1.14.3-pre2"
|
||||
def yarnVersion = "+build.2"
|
||||
|
||||
def getSubprojectVersion(project, version) {
|
||||
if (grgit == null) {
|
||||
|
|
|
@ -23,7 +23,7 @@ import net.minecraft.client.gui.screen.ingame.CreativeInventoryScreen;
|
|||
import net.minecraft.container.Container;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.text.Text;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
|
@ -34,7 +34,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|||
@Mixin(CreativeInventoryScreen.class)
|
||||
public abstract class MixinCreativePlayerInventoryGui extends AbstractInventoryScreen implements CreativeGuiExtensions {
|
||||
|
||||
public MixinCreativePlayerInventoryGui(Container container_1, PlayerInventory playerInventory_1, Component textComponent_1) {
|
||||
public MixinCreativePlayerInventoryGui(Container container_1, PlayerInventory playerInventory_1, Text textComponent_1) {
|
||||
super(container_1, playerInventory_1, textComponent_1);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,10 +16,13 @@
|
|||
|
||||
package net.fabricmc.fabric.mixin.loot;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.gson.JsonObject;
|
||||
import net.fabricmc.fabric.api.loot.v1.event.LootTableLoadingCallback;
|
||||
import net.fabricmc.fabric.api.loot.v1.FabricLootSupplierBuilder;
|
||||
import net.minecraft.resource.ResourceManager;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.profiler.Profiler;
|
||||
import net.minecraft.world.loot.LootManager;
|
||||
import net.minecraft.world.loot.LootSupplier;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
|
@ -34,10 +37,10 @@ import java.util.Map;
|
|||
|
||||
@Mixin(LootManager.class)
|
||||
public class MixinLootManager {
|
||||
@Shadow @Final private Map<Identifier, LootSupplier> suppliers;
|
||||
@Shadow private Map<Identifier, LootSupplier> suppliers;
|
||||
|
||||
@Inject(method = "apply", at = @At("RETURN"))
|
||||
private void apply(ResourceManager manager, CallbackInfo info) {
|
||||
@Inject(method = "method_20712", at = @At("RETURN"))
|
||||
private void apply(Map<Identifier, JsonObject> objectMap, ResourceManager manager, Profiler profiler, CallbackInfo info) {
|
||||
Map<Identifier, LootSupplier> newSuppliers = new HashMap<>();
|
||||
|
||||
suppliers.forEach((id, supplier) -> {
|
||||
|
@ -51,8 +54,6 @@ public class MixinLootManager {
|
|||
newSuppliers.computeIfAbsent(id, (i) -> builder.create());
|
||||
});
|
||||
|
||||
for (Identifier id : newSuppliers.keySet()) {
|
||||
suppliers.put(id, newSuppliers.get(id));
|
||||
}
|
||||
suppliers = ImmutableMap.copyOf(newSuppliers);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ import net.fabricmc.api.ClientModInitializer;
|
|||
import net.fabricmc.fabric.api.network.ClientSidePacketRegistry;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.network.ClientPlayerEntity;
|
||||
import net.minecraft.network.chat.TextComponent;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
@ -35,7 +35,7 @@ public class FabricRegistryClientInit implements ClientModInitializer {
|
|||
LOGGER.error("Registry remapping failed!", e);
|
||||
MinecraftClient.getInstance().execute(() -> {
|
||||
((ClientPlayerEntity) ctx.getPlayer()).networkHandler.getClientConnection().disconnect(
|
||||
new TextComponent("Registry remapping failed: " + e.getMessage())
|
||||
new LiteralText("Registry remapping failed: " + e.getMessage())
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue