Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-12-25 15:50:12 +01:00
Ursprung
cadab9e6bb
Commit
87aed8f3f2
@ -33,6 +33,7 @@ import com.viaversion.viaversion.api.platform.providers.Provider;
|
|||||||
import com.viaversion.viaversion.libs.opennbt.tag.builtin.CompoundTag;
|
import com.viaversion.viaversion.libs.opennbt.tag.builtin.CompoundTag;
|
||||||
import com.viaversion.viaversion.libs.opennbt.tag.builtin.IntTag;
|
import com.viaversion.viaversion.libs.opennbt.tag.builtin.IntTag;
|
||||||
import com.viaversion.viaversion.libs.opennbt.tag.builtin.StringTag;
|
import com.viaversion.viaversion.libs.opennbt.tag.builtin.StringTag;
|
||||||
|
import com.viaversion.viaversion.libs.opennbt.tag.builtin.Tag;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -67,7 +68,12 @@ public class BackwardsBlockEntityProvider implements Provider {
|
|||||||
* @param tag The block entity tag
|
* @param tag The block entity tag
|
||||||
*/
|
*/
|
||||||
public CompoundTag transform(UserConnection user, Position position, CompoundTag tag) throws Exception {
|
public CompoundTag transform(UserConnection user, Position position, CompoundTag tag) throws Exception {
|
||||||
String id = (String) tag.get("id").getValue();
|
final Tag idTag = tag.get("id");
|
||||||
|
if (!(idTag instanceof StringTag)) {
|
||||||
|
return tag;
|
||||||
|
}
|
||||||
|
|
||||||
|
String id = (String) idTag.getValue();
|
||||||
BackwardsBlockEntityHandler handler = handlers.get(id);
|
BackwardsBlockEntityHandler handler = handlers.get(id);
|
||||||
if (handler == null) {
|
if (handler == null) {
|
||||||
if (Via.getManager().isDebug()) {
|
if (Via.getManager().isDebug()) {
|
||||||
|
@ -372,7 +372,7 @@ public class EntityPackets1_14 extends LegacyEntityRewriter<Protocol1_13_2To1_14
|
|||||||
Item item = (Item) meta.getValue();
|
Item item = (Item) meta.getValue();
|
||||||
meta.setValue(protocol.getItemRewriter().handleItemToClient(item));
|
meta.setValue(protocol.getItemRewriter().handleItemToClient(item));
|
||||||
} else if (type == Types1_13_2.META_TYPES.blockStateType) {
|
} else if (type == Types1_13_2.META_TYPES.blockStateType) {
|
||||||
int blockstate = (Integer) meta.getValue();
|
int blockstate = meta.value();
|
||||||
meta.setValue(protocol.getMappingData().getNewBlockStateId(blockstate));
|
meta.setValue(protocol.getMappingData().getNewBlockStateId(blockstate));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren