mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-26 20:16:02 +01:00
@Override and protected
This commit is contained in:
parent
23b68a867c
commit
44183f19cd
@ -20,7 +20,8 @@ import java.util.Map;
|
||||
|
||||
public class MetadataRewriter1_11To1_10 extends MetadataRewriter<Entity1_11Types.EntityType> {
|
||||
|
||||
public void handleMetadata(int entityId, EntityType type, Metadata metadata, List<Metadata> metadatas, Map<Integer, Metadata> metadataMap, UserConnection connection) {
|
||||
@Override
|
||||
protected void handleMetadata(int entityId, EntityType type, Metadata metadata, List<Metadata> metadatas, Map<Integer, Metadata> metadataMap, UserConnection connection) {
|
||||
if (metadata.getValue() instanceof Item) {
|
||||
// Apply rewrite
|
||||
EntityIdRewriter.toClientItem((Item) metadata.getValue());
|
||||
|
@ -12,7 +12,8 @@ import java.util.List;
|
||||
|
||||
public class MetadataRewriter1_12To1_11_1 extends MetadataRewriter<Entity1_12Types.EntityType> {
|
||||
|
||||
public void handleMetadata(int entityId, EntityType type, Metadata metadata, List<Metadata> metadatas, UserConnection connection) {
|
||||
@Override
|
||||
protected void handleMetadata(int entityId, EntityType type, Metadata metadata, List<Metadata> metadatas, UserConnection connection) {
|
||||
if (metadata.getValue() instanceof Item) {
|
||||
// Apply rewrite
|
||||
BedRewriter.toClientItem((Item) metadata.getValue());
|
||||
|
@ -14,7 +14,8 @@ import java.util.List;
|
||||
|
||||
public class MetadataRewriter1_13_1To1_13 extends MetadataRewriter<Entity1_13Types.EntityType> {
|
||||
|
||||
public void handleMetadata(int entityId, EntityType type, Metadata metadata, List<Metadata> metadatas, UserConnection connection) {
|
||||
@Override
|
||||
protected void handleMetadata(int entityId, EntityType type, Metadata metadata, List<Metadata> metadatas, UserConnection connection) {
|
||||
// 1.13 changed item to flat item (no data)
|
||||
if (metadata.getMetaType() == MetaType1_13.Slot) {
|
||||
InventoryPackets.toClient((Item) metadata.getValue());
|
||||
|
@ -18,7 +18,8 @@ import java.util.Map;
|
||||
|
||||
public class MetadataRewriter1_13To1_12_2 extends MetadataRewriter<Entity1_13Types.EntityType> {
|
||||
|
||||
public void handleMetadata(int entityId, EntityType type, Metadata metadata, List<Metadata> metadatas, Map<Integer, Metadata> metadataMap, UserConnection connection) throws Exception {
|
||||
@Override
|
||||
protected void handleMetadata(int entityId, EntityType type, Metadata metadata, List<Metadata> metadatas, Map<Integer, Metadata> metadataMap, UserConnection connection) throws Exception {
|
||||
// Handle new MetaTypes
|
||||
if (metadata.getMetaType().getTypeID() > 4) {
|
||||
metadata.setMetaType(MetaType1_13.byId(metadata.getMetaType().getTypeID() + 1));
|
||||
|
@ -20,7 +20,7 @@ import java.util.List;
|
||||
public class MetadataRewriter1_14To1_13_2 extends MetadataRewriter<Entity1_14Types.EntityType> {
|
||||
|
||||
@Override
|
||||
public void handleMetadata(int entityId, EntityType type, Metadata metadata, List<Metadata> metadatas, UserConnection connection) throws Exception {
|
||||
protected void handleMetadata(int entityId, EntityType type, Metadata metadata, List<Metadata> metadatas, UserConnection connection) throws Exception {
|
||||
metadata.setMetaType(MetaType1_14.byId(metadata.getMetaType().getTypeID()));
|
||||
|
||||
EntityTracker1_14 tracker = connection.get(EntityTracker1_14.class);
|
||||
|
Loading…
Reference in New Issue
Block a user