Fixes for 1.19-pre1

This commit is contained in:
Frank 2022-05-19 21:13:50 +02:00
parent d201a67f74
commit ed6263b886
17 changed files with 726 additions and 734 deletions

1
.gitignore vendored
View file

@ -28,6 +28,7 @@ bin/
run/
run-client/
run-server/
output/
*.getBlock("log")
Convert.class

View file

@ -41,18 +41,18 @@ dependencies {
// useApi "vazkii.patchouli:Patchouli:1.17-${project.patchouli_version}"
println "Using local BCLib: ${local_bclib}"
if (local_bclib){
implementation( project(path:":BCLib", configuration: 'dev') )
if (local_bclib) {
implementation(project(path: ":BCLib", configuration: 'dev'))
} else {
modImplementation "com.github.paulevsGitch:BCLib:${project.bclib_version}"
}
//useOptional "me.shedaniel:RoughlyEnoughItems-fabric:${project.rei_version}"
//useOptional "me.shedaniel:RoughlyEnoughItems-api-fabric:${project.rei_version}"
useOptional "me.shedaniel:RoughlyEnoughItems-fabric:${project.rei_version}"
useOptional "me.shedaniel:RoughlyEnoughItems-api-fabric:${project.rei_version}"
}
def useOptional(String dep) {
dependencies.modRuntime(dep) {
dependencies.modRuntimeOnly(dep) {
exclude group: 'net.fabricmc.fabric-api'
exclude group: 'net.fabricmc'
if (!dep.contains("me.shedaniel")) {

View file

@ -3,9 +3,9 @@ org.gradle.jvmargs=-Xmx2G
# Fabric Properties
# check these on https://fabricmc.net/versions.html
minecraft_version= 22w18a
loader_version= 0.14.3
fabric_version = 0.52.1+1.19
minecraft_version= 1.19-pre1
loader_version= 0.14.5
fabric_version = 0.52.4+1.19
#Loom
loom_version=0.11-SNAPSHOT
@ -20,5 +20,4 @@ archives_base_name=better-end
patchouli_version = 55-FABRIC-SNAPSHOT
bclib_version = 2.0.0
rei_version = 8.0.442
canvas_version = 1.0.+
rei_version = 9.0.458

View file

@ -1,6 +1,9 @@
package org.betterx.betterend.integration.rei;
/*
import net.minecraft.client.gui.GuiComponent;
import net.minecraft.network.chat.Component;
import com.google.common.collect.Lists;
import com.mojang.blaze3d.vertex.PoseStack;
import it.unimi.dsi.fastutil.ints.IntList;
@ -12,14 +15,11 @@ import me.shedaniel.rei.api.client.registry.display.DisplayCategory;
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
import me.shedaniel.rei.api.common.entry.EntryIngredient;
import me.shedaniel.rei.api.common.entry.EntryStack;
import net.minecraft.client.gui.GuiComponent;
import net.minecraft.network.chat.Component;
import org.jetbrains.annotations.NotNull;
import ru.betterend.registry.EndBlocks;
import org.betterx.betterend.registry.EndBlocks;
import java.text.DecimalFormat;
import java.util.List;
import org.jetbrains.annotations.NotNull;
public class REIAlloyingCategory implements DisplayCategory<REIAlloyingDisplay> {
private final EntryStack ICON;
@ -70,8 +70,7 @@ public class REIAlloyingCategory implements DisplayCategory<REIAlloyingDisplay>
widgets.add(Widgets.createSlot(new Point(startPoint.x + 1, startPoint.y + 1))
.entries(inputEntries.get(1))
.markInput());
}
else {
} else {
widgets.add(Widgets.createSlot(new Point(startPoint.x + 1, startPoint.y + 1))
.entries(Lists.newArrayList())
.markInput());
@ -85,7 +84,11 @@ public class REIAlloyingCategory implements DisplayCategory<REIAlloyingDisplay>
//TODO: 1.18 REI find replacement
//@Override
public void renderRedSlots(PoseStack matrices, List<Widget> widgets, Rectangle bounds, REIAlloyingDisplay display, IntList redSlots) {
public void renderRedSlots(PoseStack matrices,
List<Widget> widgets,
Rectangle bounds,
REIAlloyingDisplay display,
IntList redSlots) {
Point startPoint = new Point(bounds.getCenterX() - 41, bounds.getCenterY() - 27);
matrices.pushPose();
matrices.translate(0, 0, 400);
@ -115,4 +118,3 @@ public class REIAlloyingCategory implements DisplayCategory<REIAlloyingDisplay>
return 49;
}
}
*/

View file

@ -1,25 +1,25 @@
package org.betterx.betterend.integration.rei;
/*
import net.minecraft.ChatFormatting;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.crafting.Recipe;
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
import me.shedaniel.rei.api.common.display.SimpleGridMenuDisplay;
import me.shedaniel.rei.api.common.display.basic.BasicDisplay;
import me.shedaniel.rei.api.common.entry.EntryStack;
import me.shedaniel.rei.api.common.util.EntryIngredients;
import me.shedaniel.rei.api.common.util.EntryStacks;
import net.minecraft.ChatFormatting;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.crafting.Recipe;
import org.jetbrains.annotations.NotNull;
import ru.betterend.blocks.entities.EndStoneSmelterBlockEntity;
import ru.betterend.recipe.builders.AlloyingRecipe;
import org.betterx.betterend.blocks.entities.EndStoneSmelterBlockEntity;
import org.betterx.betterend.recipe.builders.AlloyingRecipe;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import org.jetbrains.annotations.NotNull;
public class REIAlloyingDisplay extends BasicDisplay implements SimpleGridMenuDisplay {
@ -105,4 +105,3 @@ public class REIAlloyingDisplay extends BasicDisplay implements SimpleGridMenuDi
.collect(Collectors.toList());
}
}
*/

View file

@ -1,5 +1,9 @@
package org.betterx.betterend.integration.rei;
/*
import net.minecraft.client.Minecraft;
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.Items;
import com.google.common.collect.Lists;
import com.mojang.blaze3d.vertex.PoseStack;
import me.shedaniel.math.Point;
@ -13,15 +17,11 @@ import me.shedaniel.rei.api.client.registry.display.DisplayCategory;
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
import me.shedaniel.rei.api.common.entry.EntryStack;
import me.shedaniel.rei.api.common.util.EntryStacks;
import net.minecraft.client.Minecraft;
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.Items;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.text.DecimalFormat;
import java.util.List;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class REIAlloyingFuelCategory implements DisplayCategory<REIAlloyingFuelDisplay> {
private static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat("#.##");
@ -72,7 +72,7 @@ public class REIAlloyingFuelCategory implements DisplayCategory<REIAlloyingFuelD
.disableHighlight();
String burnItems = DECIMAL_FORMAT.format(recipe.getFuelTime() / 200d);
return new DisplayRenderer() {
private TranslatableComponent text = Component.translatable(
private Component text = Component.translatable(
"category.rei.fuel.time_short.items",
burnItems
);
@ -105,4 +105,3 @@ public class REIAlloyingFuelCategory implements DisplayCategory<REIAlloyingFuelD
};
}
}
*/

View file

@ -1,9 +1,10 @@
package org.betterx.betterend.integration.rei;
/*
import net.minecraft.nbt.CompoundTag;
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
import me.shedaniel.rei.api.common.display.basic.BasicDisplay;
import me.shedaniel.rei.api.common.entry.EntryIngredient;
import net.minecraft.nbt.CompoundTag;
import java.util.Collections;
import java.util.List;
@ -34,5 +35,3 @@ public class REIAlloyingFuelDisplay extends BasicDisplay {
}
}
*/

View file

@ -1,5 +1,12 @@
package org.betterx.betterend.integration.rei;
/*
import net.minecraft.client.gui.GuiComponent;
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import com.google.common.collect.Lists;
import com.mojang.blaze3d.vertex.PoseStack;
import it.unimi.dsi.fastutil.ints.IntList;
@ -11,19 +18,12 @@ import me.shedaniel.rei.api.client.registry.display.DisplayCategory;
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
import me.shedaniel.rei.api.common.entry.EntryIngredient;
import me.shedaniel.rei.api.common.entry.EntryStack;
import net.minecraft.client.gui.GuiComponent;
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import org.jetbrains.annotations.NotNull;
import ru.betterend.blocks.basis.EndAnvilBlock;
import org.betterx.betterend.blocks.basis.EndAnvilBlock;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import org.jetbrains.annotations.NotNull;
public class REIAnvilCategory implements DisplayCategory<REIAnvilDisplay> {
private final EntryStack<?>[] ANVILS;
@ -88,7 +88,11 @@ public class REIAnvilCategory implements DisplayCategory<REIAnvilDisplay> {
//TODO: 1.18 REI, find replacement
//@Override
public void renderRedSlots(PoseStack matrices, List<Widget> widgets, Rectangle bounds, REIAnvilDisplay display, IntList redSlots) {
public void renderRedSlots(PoseStack matrices,
List<Widget> widgets,
Rectangle bounds,
REIAnvilDisplay display,
IntList redSlots) {
Point startPoint = new Point(bounds.getCenterX() - 41, bounds.getCenterY() - 27);
matrices.pushPose();
matrices.translate(0, 0, 400);
@ -119,4 +123,3 @@ public class REIAnvilCategory implements DisplayCategory<REIAnvilDisplay> {
}
}
*/

View file

@ -1,17 +1,18 @@
package org.betterx.betterend.integration.rei;
/*
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.crafting.Recipe;
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
import me.shedaniel.rei.api.common.display.SimpleGridMenuDisplay;
import me.shedaniel.rei.api.common.display.basic.BasicDisplay;
import me.shedaniel.rei.api.common.util.EntryIngredients;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.crafting.Recipe;
import org.jetbrains.annotations.NotNull;
import org.betterx.bclib.recipes.AnvilRecipe;
import java.util.Collections;
import java.util.Optional;
import org.jetbrains.annotations.NotNull;
public class REIAnvilDisplay extends BasicDisplay implements SimpleGridMenuDisplay {
@ -59,5 +60,4 @@ public class REIAnvilDisplay extends BasicDisplay implements SimpleGridMenuDispl
return 1;
}
}
*/

View file

@ -1,5 +1,5 @@
package org.betterx.betterend.integration.rei;
/*
import net.minecraft.world.item.crafting.BlastingRecipe;
public class REIBlastingDisplay extends REIAlloyingDisplay {
@ -7,4 +7,3 @@ public class REIBlastingDisplay extends REIAlloyingDisplay {
super(recipe, recipe.getExperience(), recipe.getCookingTime());
}
}
*/

View file

@ -1,9 +0,0 @@
package org.betterx.betterend.integration.rei;
public class REIContainer implements Runnable {
@Override
public void run() {
//ContainerInfoHandler.registerContainerInfo(AlloyingRecipe.ID, CraftingContainerInfoWrapper.create(EndStoneSmelterScreenHandler.class));
}
}

View file

@ -1,5 +1,8 @@
package org.betterx.betterend.integration.rei;
/*
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import com.google.common.collect.Lists;
import me.shedaniel.math.Point;
import me.shedaniel.math.Rectangle;
@ -9,15 +12,12 @@ import me.shedaniel.rei.api.client.registry.display.DisplayCategory;
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
import me.shedaniel.rei.api.common.entry.EntryIngredient;
import me.shedaniel.rei.api.common.entry.EntryStack;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import org.jetbrains.annotations.NotNull;
import org.betterx.betterend.BetterEnd;
import ru.betterend.registry.EndBlocks;
import org.betterx.betterend.registry.EndBlocks;
import java.util.ArrayList;
import java.util.List;
import org.jetbrains.annotations.NotNull;
public class REIInfusionCategory implements DisplayCategory<REIInfusionDisplay> {
@ -108,4 +108,4 @@ public class REIInfusionCategory implements DisplayCategory<REIInfusionDisplay>
return 104;
}
}
*/

View file

@ -1,16 +1,17 @@
package org.betterx.betterend.integration.rei;
/*
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.crafting.Recipe;
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
import me.shedaniel.rei.api.common.display.SimpleGridMenuDisplay;
import me.shedaniel.rei.api.common.display.basic.BasicDisplay;
import me.shedaniel.rei.api.common.util.EntryIngredients;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.crafting.Recipe;
import org.jetbrains.annotations.NotNull;
import ru.betterend.recipe.builders.InfusionRecipe;
import org.betterx.betterend.recipe.builders.InfusionRecipe;
import java.util.Collections;
import java.util.Optional;
import org.jetbrains.annotations.NotNull;
public class REIInfusionDisplay extends BasicDisplay implements SimpleGridMenuDisplay {
@ -60,4 +61,3 @@ public class REIInfusionDisplay extends BasicDisplay implements SimpleGridMenuDi
// return this.input;
//}
}
*/

View file

@ -1,5 +1,11 @@
package org.betterx.betterend.integration.rei;
/*
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.crafting.BlastingRecipe;
import net.minecraft.world.item.crafting.RecipeType;
import net.minecraft.world.level.block.Blocks;
import com.google.common.collect.Lists;
import me.shedaniel.rei.api.client.plugins.REIClientPlugin;
import me.shedaniel.rei.api.client.registry.category.CategoryRegistry;
@ -8,19 +14,14 @@ import me.shedaniel.rei.api.common.category.CategoryIdentifier;
import me.shedaniel.rei.api.common.entry.EntryStack;
import me.shedaniel.rei.api.common.util.EntryIngredients;
import me.shedaniel.rei.api.common.util.EntryStacks;
import me.shedaniel.rei.plugin.common.DefaultPlugin;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.crafting.BlastingRecipe;
import net.minecraft.world.item.crafting.RecipeType;
import net.minecraft.world.level.block.Blocks;
import me.shedaniel.rei.plugin.common.BuiltinPlugin;
import org.betterx.bclib.blocks.BaseFurnaceBlock;
import org.betterx.bclib.recipes.AnvilRecipe;
import org.betterx.betterend.BetterEnd;
import ru.betterend.blocks.basis.EndAnvilBlock;
import ru.betterend.recipe.builders.AlloyingRecipe;
import ru.betterend.recipe.builders.InfusionRecipe;
import ru.betterend.registry.EndBlocks;
import org.betterx.betterend.blocks.basis.EndAnvilBlock;
import org.betterx.betterend.recipe.builders.AlloyingRecipe;
import org.betterx.betterend.recipe.builders.InfusionRecipe;
import org.betterx.betterend.registry.EndBlocks;
import java.util.List;
import java.util.stream.Collectors;
@ -92,8 +93,7 @@ public class REIPlugin implements REIClientPlugin {
registry.removePlusButton(ALLOYING_FUEL);
registry.removePlusButton(SMITHING);
registry.addWorkstations(DefaultPlugin.SMELTING, ITEM_FURNACESArray);
registry.addWorkstations(DefaultPlugin.FUEL, ITEM_FURNACESArray);
registry.addWorkstations(BuiltinPlugin.SMELTING, ITEM_FURNACESArray);
registry.addWorkstations(BuiltinPlugin.FUEL, ITEM_FURNACESArray);
}
}
*/

View file

@ -94,7 +94,7 @@ public abstract class ServerPlayerMixin extends Player implements TeleportingEnt
LevelData worldProperties = destination.getLevelData();
ServerPlayer player = ServerPlayer.class.cast(this);
connection.send(new ClientboundRespawnPacket(
new Holder.Direct(destination.dimensionType()),
destination.dimensionTypeId(),
destination.dimension(),
BiomeManager.obfuscateSeed(destination.getSeed()),
gameMode.getGameModeForPlayer(),

View file

@ -65,7 +65,7 @@ public class EndBiomes {
CAVE_BIOMES = new BiomePicker(registry);
registry.stream()
.filter(biome -> registry.getResourceKey(biome).isPresent())
.map(biome -> registry.getOrCreateHolder(registry.getResourceKey(biome).get()))
.map(biome -> registry.getOrCreateHolderOrThrow(registry.getResourceKey(biome).get()))
.map(biome -> biome.unwrapKey().orElseThrow().location())
.filter(id -> BiomeAPI.wasRegisteredAs(id, END_CAVE))
.map(id -> BiomeAPI.getBiome(id))

View file

@ -43,9 +43,9 @@
],
"depends": {
"fabricloader": ">=0.14.3",
"fabric": ">=0.52.1",
"minecraft": "1.19-alpha.22.18.a",
"fabricloader": ">=0.14.5",
"fabric": ">=0.52.4",
"minecraft": "1.19-beta.1",
"bclib": "2.0.x"
},
"suggests": {