mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-11-09 18:03:08 +00:00
Update to Minecraft 1.21
API Changes: - Minecraft had updated ModelResourceLocation to no longer inherit from ResourceLocation. To allow referencing both already baked models (ModelResourceLocation) and loading new models (via ResourceLocation) in turtle model loadders, we add a new "ModelLocation" class, that acts as a union between the two. I'm not entirely convinced by the design here, so might end up changing again before a stable release.o - Merge IMedia.getAudioTitle and IMedia.getAudio into a single IMedia.getAudio method, which now returns a JukeboxSong rather than a SoundEvent. Other update notes: - Minecraft had rewritten how buffers are managed again. This is a fairly minor change for us (vertex -> addVertex, normal -> setNormal, etc...), with the exception that you can no longer use MultiBufferSource.immediate with the tesselator. I've replaced this with GuiGraphics.bufferSource, which appears to be fine, but worth keeping an eye on in case there's any odd render state issues. - Crafting now uses a CraftingInput (a list of items) rather than a CraftingContainer, which allows us to simplify turtle crafting code.
This commit is contained in:
@@ -30,11 +30,11 @@ import net.minecraft.world.MenuProvider;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.inventory.AbstractContainerMenu;
|
||||
import net.minecraft.world.inventory.CraftingContainer;
|
||||
import net.minecraft.world.inventory.MenuType;
|
||||
import net.minecraft.world.item.CreativeModeTab;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.crafting.CraftingInput;
|
||||
import net.minecraft.world.item.crafting.Recipe;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
@@ -156,12 +156,12 @@ public class TestPlatformHelper extends AbstractComputerCraftAPI implements Plat
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getRecipeRemainingItems(ServerPlayer player, Recipe<CraftingContainer> recipe, CraftingContainer container) {
|
||||
public List<ItemStack> getRecipeRemainingItems(ServerPlayer player, Recipe<CraftingInput> recipe, CraftingInput container) {
|
||||
throw new UnsupportedOperationException("Cannot query recipes inside tests");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemCrafted(ServerPlayer player, CraftingContainer container, ItemStack stack) {
|
||||
public void onItemCrafted(ServerPlayer player, CraftingInput container, ItemStack stack) {
|
||||
throw new UnsupportedOperationException("Cannot interact with the world inside tests");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user