Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-27 08:30:09 +01:00
Ursprung
e70f230f39
Commit
b4f8024eef
@ -23,7 +23,7 @@ import com.viaversion.viaversion.api.minecraft.entities.Entity1_16_2Types;
|
||||
import com.viaversion.viaversion.api.minecraft.entities.EntityType;
|
||||
import com.viaversion.viaversion.api.minecraft.item.Item;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.types.MetaType1_14;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.types.MetaType1_16;
|
||||
import com.viaversion.viaversion.api.type.types.Particle;
|
||||
import com.viaversion.viaversion.protocols.protocol1_16_2to1_16_1.Protocol1_16_2To1_16_1;
|
||||
import com.viaversion.viaversion.rewriter.EntityRewriter;
|
||||
@ -39,12 +39,12 @@ public class MetadataRewriter1_16_2To1_16_1 extends EntityRewriter<Protocol1_16_
|
||||
|
||||
@Override
|
||||
public void handleMetadata(int entityId, EntityType type, Metadata metadata, List<Metadata> metadatas, UserConnection connection) throws Exception {
|
||||
if (metadata.metaType() == MetaType1_14.Slot) {
|
||||
if (metadata.metaType() == MetaType1_16.ITEM) {
|
||||
protocol.getItemRewriter().handleItemToClient((Item) metadata.getValue());
|
||||
} else if (metadata.metaType() == MetaType1_14.BlockID) {
|
||||
} else if (metadata.metaType() == MetaType1_16.BLOCK_STATE) {
|
||||
int data = (int) metadata.getValue();
|
||||
metadata.setValue(protocol.getMappingData().getNewBlockStateId(data));
|
||||
} else if (metadata.metaType() == MetaType1_14.PARTICLE) {
|
||||
} else if (metadata.metaType() == MetaType1_16.PARTICLE) {
|
||||
rewriteParticle((Particle) metadata.getValue());
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ import com.viaversion.viaversion.api.minecraft.entities.Entity1_16Types;
|
||||
import com.viaversion.viaversion.api.minecraft.entities.EntityType;
|
||||
import com.viaversion.viaversion.api.minecraft.item.Item;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.types.MetaType1_14;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.types.MetaType1_16;
|
||||
import com.viaversion.viaversion.api.type.types.Particle;
|
||||
import com.viaversion.viaversion.protocols.protocol1_16to1_15_2.Protocol1_16To1_15_2;
|
||||
import com.viaversion.viaversion.rewriter.EntityRewriter;
|
||||
@ -40,12 +40,13 @@ public class MetadataRewriter1_16To1_15_2 extends EntityRewriter<Protocol1_16To1
|
||||
|
||||
@Override
|
||||
public void handleMetadata(int entityId, EntityType type, Metadata metadata, List<Metadata> metadatas, UserConnection connection) throws Exception {
|
||||
if (metadata.metaType() == MetaType1_14.Slot) {
|
||||
metadata.setMetaType(MetaType1_16.byId(metadata.metaType().typeId()));
|
||||
if (metadata.metaType() == MetaType1_16.ITEM) {
|
||||
protocol.getItemRewriter().handleItemToClient((Item) metadata.getValue());
|
||||
} else if (metadata.metaType() == MetaType1_14.BlockID) {
|
||||
} else if (metadata.metaType() == MetaType1_16.BLOCK_STATE) {
|
||||
int data = (int) metadata.getValue();
|
||||
metadata.setValue(protocol.getMappingData().getNewBlockStateId(data));
|
||||
} else if (metadata.metaType() == MetaType1_14.PARTICLE) {
|
||||
} else if (metadata.metaType() == MetaType1_16.PARTICLE) {
|
||||
rewriteParticle((Particle) metadata.getValue());
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren