Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-28 00:50:13 +01:00
Send impact_projectiles enttiy tag
Dieser Commit ist enthalten in:
Ursprung
b0fe7d9c6d
Commit
f391cc6185
@ -17,7 +17,8 @@ public class TagRewriter {
|
||||
private final IdRewriteFunction entityRewriter;
|
||||
private final List<TagData> newBlockTags = new ArrayList<>();
|
||||
private final List<TagData> newItemTags = new ArrayList<>();
|
||||
// add fluid or entity tag lists if needed at some point
|
||||
private final List<TagData> newEntityTags = new ArrayList<>();
|
||||
// add fluid tag list if needed at some point
|
||||
|
||||
public TagRewriter(Protocol protocol, IdRewriteFunction blockRewriter, IdRewriteFunction itemRewriter, IdRewriteFunction entityRewriter) {
|
||||
this.protocol = protocol;
|
||||
@ -51,7 +52,7 @@ public class TagRewriter {
|
||||
handle(wrapper, blockRewriter, newBlockTags);
|
||||
handle(wrapper, itemRewriter, newItemTags);
|
||||
|
||||
if (entityRewriter == null) return;
|
||||
if (entityRewriter == null && newEntityTags.isEmpty()) return;
|
||||
|
||||
int fluidTagsSize = wrapper.passthrough(Type.VAR_INT);
|
||||
for (int i = 0; i < fluidTagsSize; i++) {
|
||||
@ -59,7 +60,7 @@ public class TagRewriter {
|
||||
wrapper.passthrough(Type.VAR_INT_ARRAY_PRIMITIVE);
|
||||
}
|
||||
|
||||
handle(wrapper, entityRewriter, null);
|
||||
handle(wrapper, entityRewriter, newEntityTags);
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -95,6 +96,7 @@ public class TagRewriter {
|
||||
case ITEM:
|
||||
return newItemTags;
|
||||
case ENTITY:
|
||||
return newEntityTags;
|
||||
case FLUID:
|
||||
default:
|
||||
return null;
|
||||
|
@ -172,6 +172,8 @@ public class Protocol1_16To1_15_2 extends Protocol<ClientboundPackets1_15, Clien
|
||||
tagRewriter.addTag(TagType.BLOCK, "minecraft:wooden_trapdoors", 193, 194, 195, 196, 197, 198);
|
||||
tagRewriter.addTag(TagType.ITEM, "minecraft:wooden_trapdoors", 215, 216, 217, 218, 219, 220);
|
||||
tagRewriter.addTag(TagType.ITEM, "minecraft:beacon_payment_items", 529, 530, 531, 760);
|
||||
tagRewriter.addTag(TagType.ENTITY, "minecraft:impact_projectiles", 2, 72, 71, 37, 69, 79, 83, 15, 93);
|
||||
|
||||
// The client crashes if we don't send all tags it may use
|
||||
tagRewriter.addEmptyTag(TagType.BLOCK, "minecraft:guarded_by_piglins");
|
||||
tagRewriter.addEmptyTag(TagType.BLOCK, "minecraft:soul_speed_blocks");
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren