Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-26 16:12:42 +01:00
Merge remote-tracking branch 'upstream/master' into abstraction
# Conflicts: # bukkit/src/main/java/us/myles/ViaVersion/bukkit/platform/BukkitViaConfig.java # bungee/src/main/java/us/myles/ViaVersion/bungee/platform/BungeeViaConfig.java # common/src/main/java/us/myles/ViaVersion/api/ViaVersionConfig.java # common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/packets/InventoryPackets.java # common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14_1to1_14/Protocol1_14_1To1_14.java # common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14_1to1_14/packets/EntityPackets.java # common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/MetadataRewriter.java # common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/data/MappingData.java # common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/EntityPackets.java # common/src/main/resources/assets/viaversion/config.yml # velocity/src/main/java/us/myles/ViaVersion/velocity/platform/VelocityViaConfig.java
Dieser Commit ist enthalten in:
Commit
bbeabd20b8
@ -329,6 +329,15 @@ public interface ViaVersionConfig {
|
||||
*/
|
||||
boolean isNonFullBlockLightFix();
|
||||
|
||||
boolean is1_14HealthNaNFix();
|
||||
|
||||
/**
|
||||
* Fixes non full blocks having 0 light for 1.14+ clients on sub 1.14 servers.
|
||||
*
|
||||
* @return True if enabled
|
||||
*/
|
||||
boolean isNonFullBlockLightFix();
|
||||
|
||||
/**
|
||||
* Should 1.15 clients respawn instantly / without showing the death screen
|
||||
*
|
||||
|
@ -350,34 +350,33 @@ public class Protocol1_11To1_10 extends Protocol {
|
||||
});
|
||||
}
|
||||
|
||||
private int getNewSoundId(int id) { //TODO Make it better, suggestions are welcome. It's ugly and hardcoded now.
|
||||
private int getNewSoundId(int id) {
|
||||
if (id == 196) // Experience orb sound got removed
|
||||
return -1;
|
||||
|
||||
int newId = id;
|
||||
if (id >= 85) // Hello shulker boxes
|
||||
newId += 2;
|
||||
if (id >= 174) // Hello Guardian flop
|
||||
newId += 1;
|
||||
if (id >= 194) // Hello evocation things
|
||||
newId += 8;
|
||||
if (id >= 85) // Shulker boxes
|
||||
id += 2;
|
||||
if (id >= 176) // Guardian flop
|
||||
id += 1;
|
||||
if (id >= 197) // evocation things
|
||||
id += 8;
|
||||
if (id >= 196) // Rip the Experience orb touch sound :'(
|
||||
newId -= 1;
|
||||
if (id >= 269) // Hello Liama's
|
||||
newId += 9;
|
||||
if (id >= 277) // Hello Mule chest
|
||||
newId += 1;
|
||||
if (id >= 370) // Hello Vex
|
||||
newId += 4;
|
||||
if (id >= 376) // Hello vindication
|
||||
newId += 3;
|
||||
if (id >= 423) // Equip Elytra
|
||||
newId += 1;
|
||||
if (id >= 427) // Hello empty bottle
|
||||
newId += 1;
|
||||
if (id >= 441) // Hello item totem use
|
||||
newId += 1;
|
||||
return newId;
|
||||
id -= 1;
|
||||
if (id >= 279) // Liama's
|
||||
id += 9;
|
||||
if (id >= 296) // Mule chest
|
||||
id += 1;
|
||||
if (id >= 390) // Vex
|
||||
id += 4;
|
||||
if (id >= 400) // vindication
|
||||
id += 3;
|
||||
if (id >= 450) // Elytra
|
||||
id += 1;
|
||||
if (id >= 455) // Empty bottle
|
||||
id += 1;
|
||||
if (id >= 470) // Totem use
|
||||
id += 1;
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
|
@ -119,7 +119,7 @@ public class InventoryPackets {
|
||||
if (!Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) {
|
||||
Via.getPlatform().getLogger().info("Could not handle unknown sound source " + originalSource + " falling back to default: master");
|
||||
}
|
||||
finalSource = java.util.Optional.of(SoundSource.MASTER);
|
||||
finalSource = Optional.of(SoundSource.MASTER);
|
||||
|
||||
}
|
||||
|
||||
|
@ -51,6 +51,22 @@ public class EntityPackets {
|
||||
}
|
||||
});
|
||||
|
||||
// Destroy entities
|
||||
protocol.registerOutgoing(State.PLAY, 0x37, 0x37, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.VAR_INT_ARRAY); // 0 - Entity ids
|
||||
handler(new PacketHandler() {
|
||||
@Override
|
||||
public void handle(PacketWrapper wrapper) throws Exception {
|
||||
for (int entity : wrapper.get(Type.VAR_INT_ARRAY, 0)) {
|
||||
wrapper.user().get(EntityTracker.class).removeEntity(entity);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Spawn Player
|
||||
protocol.registerOutgoing(State.PLAY, 0x05, 0x05, new PacketRemapper() {
|
||||
@Override
|
||||
|
@ -141,7 +141,7 @@ public class EntityPackets {
|
||||
@Override
|
||||
public Integer transform(PacketWrapper wrapper, Short slot) throws Exception {
|
||||
int entityId = wrapper.get(Type.VAR_INT, 0);
|
||||
int receiverId = wrapper.user().get(EntityTracker1_9.class).getClientEntityId();
|
||||
int receiverId = wrapper.user().get(EntityTracker.class).getEntityID();
|
||||
// Normally, 0 = hand and 1-4 = armor
|
||||
// ... but if the sent id is equal to the receiver's id, 0-3 will instead mark the armor slots
|
||||
// (In 1.9+, every client treats the received the same: 0=hand, 1=offhand, 2-5=armor)
|
||||
|
@ -15,7 +15,7 @@ public enum SoundEffect {
|
||||
DIG_GRAVEL("dig.gravel", "block.gravel.place", SoundCategory.BLOCK),
|
||||
RANDOM_BOWHIT("random.bowhit", "block.tripwire.detach", SoundCategory.NEUTRAL),
|
||||
DIG_GLASS("dig.glass", "block.glass.break", SoundCategory.BLOCK),
|
||||
MOB_ZOMBIE_SAY("mob.zombie.say", "entity.zombie_villager.ambient", SoundCategory.HOSTILE),
|
||||
MOB_ZOMBIE_SAY("mob.zombie.say", "entity.zombie.ambient", SoundCategory.HOSTILE),
|
||||
MOB_PIG_DEATH("mob.pig.death", "entity.pig.death", SoundCategory.NEUTRAL),
|
||||
MOB_HORSE_DONKEY_HIT("mob.horse.donkey.hit", "entity.donkey.hurt", SoundCategory.NEUTRAL),
|
||||
GAME_NEUTRAL_SWIM("game.neutral.swim", "entity.player.swim", SoundCategory.NEUTRAL),
|
||||
@ -207,7 +207,7 @@ public enum SoundEffect {
|
||||
MOB_MAGMACUBE_SMALL("mob.magmacube.small", "entity.small_magmacube.squish", SoundCategory.HOSTILE),
|
||||
FIRE_IGNITE("fire.ignite", "item.flintandsteel.use", SoundCategory.BLOCK, true),
|
||||
MOB_ENDERDRAGON_HIT("mob.enderdragon.hit", "entity.enderdragon.hurt", SoundCategory.HOSTILE),
|
||||
MOB_ZOMBIE_HURT("mob.zombie.hurt", "entity.zombie_villager.hurt", SoundCategory.HOSTILE),
|
||||
MOB_ZOMBIE_HURT("mob.zombie.hurt", "entity.zombie.hurt", SoundCategory.HOSTILE),
|
||||
RANDOM_EXPLODE("random.explode", "block.end_gateway.spawn", SoundCategory.BLOCK),
|
||||
MOB_SLIME_ATTACK("mob.slime.attack", "entity.slime.attack", SoundCategory.HOSTILE),
|
||||
MOB_MAGMACUBE_JUMP("mob.magmacube.jump", "entity.magmacube.jump", SoundCategory.HOSTILE),
|
||||
|
@ -128,6 +128,10 @@ change-1_9-hitbox: false
|
||||
change-1_14-hitbox: false
|
||||
# Fixes 1.14+ clients on sub 1.14 servers having a light value of 0 for non full blocks.
|
||||
fix-non-full-blocklight: true
|
||||
# Fixes walk animation not shown when health is set to Float.NaN
|
||||
fix-1_14-health-nan: true
|
||||
# Fixes 1.14+ clients on sub 1.14 servers having a light value of 0 for non full blocks.
|
||||
fix-non-full-blocklight: true
|
||||
# Should 1.15+ clients respawn instantly / without showing a death screen?
|
||||
use-1_15-instant-respawn: false
|
||||
#
|
||||
|
@ -59,4 +59,14 @@ public class SpongeViaConfig extends AbstractViaConfig {
|
||||
public boolean is1_14HitboxFix() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isNonFullBlockLightFix() {
|
||||
return getBoolean("fix-non-full-blocklight", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean is1_14HealthNaNFix() {
|
||||
return getBoolean("fix-1_14-health-nan", true);
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren