Move patches around

This commit is contained in:
MiniDigger | Martin
2021-06-11 14:02:28 +02:00
parent 9f5325207d
commit 95d25d98e8
1079 changed files with 126318 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Tue, 20 Apr 2021 01:15:04 +0100
Subject: [PATCH] don't throw when loading invalid TEs
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
@@ -0,0 +0,0 @@ package net.minecraft.world.level.block.entity;
import javax.annotation.Nullable;
import net.minecraft.CrashReportCategory;
+import net.minecraft.ResourceLocationException;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Registry;
import net.minecraft.nbt.CompoundTag;
@@ -0,0 +0,0 @@ public abstract class BlockEntity implements net.minecraft.server.KeyedObject {
public static BlockEntity loadStatic(BlockState state, CompoundTag tag) {
String s = tag.getString("id");
- return (BlockEntity) Registry.BLOCK_ENTITY_TYPE.getOptional(new ResourceLocation(s)).map((tileentitytypes) -> {
+ // Paper
+ ResourceLocation minecraftKey = null;
+ try {
+ minecraftKey = new ResourceLocation(s);
+ } catch (ResourceLocationException ex) {}
+ // Paper end
+ return (BlockEntity) Registry.BLOCK_ENTITY_TYPE.getOptional(minecraftKey).map((tileentitytypes) -> {
try {
return tileentitytypes.create();
} catch (Throwable throwable) {