Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-28 00:50:13 +01:00
Handle item/block/particle metadata
Dieser Commit ist enthalten in:
Ursprung
1376312449
Commit
d74f91d606
@ -148,6 +148,8 @@ public final class EntityPackets extends EntityRewriter<ClientboundPackets1_19_3
|
|||||||
}
|
}
|
||||||
meta.setMetaType(Types1_19_4.META_TYPES.byId(id));
|
meta.setMetaType(Types1_19_4.META_TYPES.byId(id));
|
||||||
});
|
});
|
||||||
|
registerMetaTypeHandler(Types1_19_4.META_TYPES.itemType, Types1_19_4.META_TYPES.blockStateType, Types1_19_4.META_TYPES.particleType);
|
||||||
|
|
||||||
filter().filterFamily(Entity1_19_4Types.ABSTRACT_HORSE).removeIndex(18); // Owner UUID
|
filter().filterFamily(Entity1_19_4Types.ABSTRACT_HORSE).removeIndex(18); // Owner UUID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ public class RecipeRewriter<C extends ClientboundPacketType> {
|
|||||||
|
|
||||||
// Added in 1.19.4
|
// Added in 1.19.4
|
||||||
recipeHandlers.put("smithing_transform", this::handleSmithingTransform);
|
recipeHandlers.put("smithing_transform", this::handleSmithingTransform);
|
||||||
recipeHandlers.put("smithing_trim", this::handleSmithingTransform);
|
recipeHandlers.put("smithing_trim", this::handleSmithingTrim);
|
||||||
recipeHandlers.put("crafting_decorated_pot", this::handleSimpleRecipe);
|
recipeHandlers.put("crafting_decorated_pot", this::handleSimpleRecipe);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,6 +121,12 @@ public class RecipeRewriter<C extends ClientboundPacketType> {
|
|||||||
rewrite(wrapper.passthrough(Type.FLAT_VAR_INT_ITEM)); // Result
|
rewrite(wrapper.passthrough(Type.FLAT_VAR_INT_ITEM)); // Result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void handleSmithingTrim(final PacketWrapper wrapper) throws Exception {
|
||||||
|
handleIngredient(wrapper); // Template
|
||||||
|
handleIngredient(wrapper); // Base
|
||||||
|
handleIngredient(wrapper); // Additions
|
||||||
|
}
|
||||||
|
|
||||||
protected void rewrite(@Nullable Item item) {
|
protected void rewrite(@Nullable Item item) {
|
||||||
if (protocol.getItemRewriter() != null) {
|
if (protocol.getItemRewriter() != null) {
|
||||||
protocol.getItemRewriter().handleItemToClient(item);
|
protocol.getItemRewriter().handleItemToClient(item);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren