protocolsupport.protocol.utils.ProtocolVersionsHelper Java Examples

The following examples show how to use protocolsupport.protocol.utils.ProtocolVersionsHelper. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CreeperEntityMetadataRemapper.java    From ProtocolSupport with GNU Affero General Public License v3.0 6 votes vote down vote up
protected CreeperEntityMetadataRemapper() {
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Creeper.STATE, 15), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Creeper.STATE, 14), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Creeper.STATE, 12), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Creeper.STATE, 11), ProtocolVersionsHelper.ALL_1_9);
	addRemap(new IndexValueRemapperNumberToByte(NetworkEntityMetadataObjectIndex.Creeper.STATE, 16), ProtocolVersionsHelper.DOWN_1_8);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Creeper.POWERED, 16), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Creeper.POWERED, 15), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Creeper.POWERED, 13), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Creeper.POWERED, 12), ProtocolVersionsHelper.ALL_1_9);
	addRemap(new IndexValueRemapperBooleanToByte(NetworkEntityMetadataObjectIndex.Creeper.POWERED, 17), ProtocolVersionsHelper.DOWN_1_8);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Creeper.IGNITED, 17), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Creeper.IGNITED, 16), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Creeper.IGNITED, 14), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Creeper.IGNITED, 13), ProtocolVersionsHelper.ALL_1_9);
	addRemap(new IndexValueRemapperBooleanToByte(NetworkEntityMetadataObjectIndex.Creeper.IGNITED, 18), ProtocolVersionsHelper.DOWN_1_8);
}
 
Example #2
Source File: ShulkerEntityMetadataRemapper.java    From ProtocolSupport with GNU Affero General Public License v3.0 6 votes vote down vote up
protected ShulkerEntityMetadataRemapper() {
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Shulker.DIRECTION, 15), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Shulker.DIRECTION, 14), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Shulker.DIRECTION, 12), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Shulker.DIRECTION, 11), ProtocolVersionsHelper.ALL_1_9);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Shulker.ATTACHMENT_POS, 16), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Shulker.ATTACHMENT_POS, 15), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Shulker.ATTACHMENT_POS, 13), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Shulker.ATTACHMENT_POS, 12), ProtocolVersionsHelper.ALL_1_9);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Shulker.SHIELD_HEIGHT, 17), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Shulker.SHIELD_HEIGHT, 16), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Shulker.SHIELD_HEIGHT, 14), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Shulker.SHIELD_HEIGHT, 13), ProtocolVersionsHelper.ALL_1_9);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Shulker.COLOR, 18), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Shulker.COLOR, 17), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Shulker.COLOR, 15), ProtocolVersionsHelper.RANGE__1_11__1_13_2);
}
 
Example #3
Source File: AreaEffectCloudEntityMetadataRemapper.java    From ProtocolSupport with GNU Affero General Public License v3.0 6 votes vote down vote up
protected AreaEffectCloudEntityMetadataRemapper() {
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.AreaEffectCloud.RADIUS, 7), ProtocolVersionsHelper.UP_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.AreaEffectCloud.RADIUS, 6), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.AreaEffectCloud.RADIUS, 5), ProtocolVersionsHelper.ALL_1_9);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.AreaEffectCloud.COLOR, 8), ProtocolVersionsHelper.UP_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.AreaEffectCloud.COLOR, 7), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.AreaEffectCloud.COLOR, 6), ProtocolVersionsHelper.ALL_1_9);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.AreaEffectCloud.SINGLE_POINT, 9), ProtocolVersionsHelper.UP_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.AreaEffectCloud.SINGLE_POINT, 8), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.AreaEffectCloud.SINGLE_POINT, 7), ProtocolVersionsHelper.ALL_1_9);

	addRemapPerVersion(version -> new AreaEffectCloudModernParticleObjectMetadataRemapper(10, ParticleRemapper.REGISTRY.getTable(version)), ProtocolVersionsHelper.UP_1_14);
	addRemapPerVersion(version -> new AreaEffectCloudModernParticleObjectMetadataRemapper(9, ParticleRemapper.REGISTRY.getTable(version)), ProtocolVersionsHelper.ALL_1_13);
	addRemapPerVersion(version -> new AreaEffectCloudLegacyParticleObjectMetadataRemapper(9, ParticleRemapper.REGISTRY.getTable(version)), ProtocolVersionsHelper.RANGE__1_10__1_12_2);
	addRemapPerVersion(version -> new AreaEffectCloudLegacyParticleObjectMetadataRemapper(8, ParticleRemapper.REGISTRY.getTable(version)), ProtocolVersionsHelper.ALL_1_9);
}
 
Example #4
Source File: TurtleEntityMetadataRemapper.java    From ProtocolSupport with GNU Affero General Public License v3.0 6 votes vote down vote up
protected TurtleEntityMetadataRemapper() {
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Turtle.HOME_POS, 16), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Turtle.HOME_POS, 15), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Turtle.HOME_POS, 13), ProtocolVersionsHelper.ALL_1_13);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Turtle.HAS_EGG, 17), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Turtle.HAS_EGG, 16), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Turtle.HAS_EGG, 14), ProtocolVersionsHelper.ALL_1_13);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Turtle.LAYING_EGG, 18), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Turtle.LAYING_EGG, 17), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Turtle.LAYING_EGG, 15), ProtocolVersionsHelper.ALL_1_13);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Turtle.TRAVEL_POS, 19), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Turtle.TRAVEL_POS, 18), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Turtle.TRAVEL_POS, 16), ProtocolVersionsHelper.ALL_1_13);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Turtle.GOING_HOME, 20), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Turtle.GOING_HOME, 19), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Turtle.GOING_HOME, 17), ProtocolVersionsHelper.ALL_1_13);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Turtle.TRAVELING, 21), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Turtle.TRAVELING, 20), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Turtle.TRAVELING, 18), ProtocolVersionsHelper.ALL_1_13);
}
 
Example #5
Source File: PandaEntityMetadataRemapper.java    From ProtocolSupport with GNU Affero General Public License v3.0 6 votes vote down vote up
protected PandaEntityMetadataRemapper() {
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Panda.BREED_TIMER, 16), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Panda.BREED_TIMER, 15), ProtocolVersionsHelper.ALL_1_14);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Panda.SNEEZE_TIMER, 17), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Panda.SNEEZE_TIMER, 16), ProtocolVersionsHelper.ALL_1_14);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Panda.EAT_TIMER, 18), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Panda.EAT_TIMER, 17), ProtocolVersionsHelper.ALL_1_14);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Panda.GENE_MAIN, 19), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Panda.GENE_MAIN, 18), ProtocolVersionsHelper.ALL_1_14);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Panda.GENE_HIDDEN, 20), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Panda.GENE_HIDDEN, 19), ProtocolVersionsHelper.ALL_1_14);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Panda.PANDA_FLAGS, 21), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Panda.PANDA_FLAGS, 20), ProtocolVersionsHelper.ALL_1_14);
}
 
Example #6
Source File: ParticleDataSerializer.java    From ProtocolSupport with GNU Affero General Public License v3.0 6 votes vote down vote up
protected ParticleDataSerializer() {
	register(Particle.class, (to, particle) -> {}, ProtocolVersionsHelper.UP_1_13);
	register(ParticleDust.class, (to, particle) -> {
		to.writeFloat(particle.getRed());
		to.writeFloat(particle.getGreen());
		to.writeFloat(particle.getBlue());
		to.writeFloat(particle.getScale());
	}, ProtocolVersionsHelper.UP_1_13);
	Arrays.stream(ProtocolVersionsHelper.UP_1_13)
	.forEach(version -> {
		FlatteningBlockDataTable flatteningBlockDataTable = FlatteningBlockData.REGISTRY.getTable(version);
		register(ParticleBlock.class, (to, particle) -> VarNumberSerializer.writeVarInt(to, flatteningBlockDataTable.getBlockDataRemap(particle.getBlockData())), version);
		register(ParticleFallingDust.class, (to, particle) -> VarNumberSerializer.writeFixedSizeVarInt(to, flatteningBlockDataTable.getBlockDataRemap(particle.getBlockData())), version);
		register(ParticleItem.class, (to, particle) -> ItemStackSerializer.writeItemStack(to, version, particle.getItemStack()), version);
	});
}
 
Example #7
Source File: WitherEntityMetadataRemapper.java    From ProtocolSupport with GNU Affero General Public License v3.0 6 votes vote down vote up
protected WitherEntityMetadataRemapper() {
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Wither.TARGET1, 15), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Wither.TARGET1, 14), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Wither.TARGET1, 12), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Wither.TARGET1, 11), ProtocolVersionsHelper.ALL_1_9);
	addRemap(new IndexValueRemapperNumberToInt(NetworkEntityMetadataObjectIndex.Wither.TARGET1, 17), ProtocolVersionsHelper.DOWN_1_8);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Wither.TARGET2, 16), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Wither.TARGET2, 15), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Wither.TARGET2, 13), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Wither.TARGET2, 12), ProtocolVersionsHelper.ALL_1_9);
	addRemap(new IndexValueRemapperNumberToInt(NetworkEntityMetadataObjectIndex.Wither.TARGET2, 18), ProtocolVersionsHelper.DOWN_1_8);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Wither.TARGET3, 17), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Wither.TARGET3, 16), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Wither.TARGET3, 14), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Wither.TARGET3, 13), ProtocolVersionsHelper.ALL_1_9);
	addRemap(new IndexValueRemapperNumberToInt(NetworkEntityMetadataObjectIndex.Wither.TARGET3, 19), ProtocolVersionsHelper.DOWN_1_8);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Wither.INVULNERABLE_TIME, 18), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Wither.INVULNERABLE_TIME, 17), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Wither.INVULNERABLE_TIME, 15), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Wither.INVULNERABLE_TIME, 14), ProtocolVersionsHelper.ALL_1_9);
	addRemap(new IndexValueRemapperNumberToInt(NetworkEntityMetadataObjectIndex.Wither.INVULNERABLE_TIME, 20), ProtocolVersionsHelper.DOWN_1_8);
}
 
Example #8
Source File: FishingFloatEntityMetadataRemapper.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
protected FishingFloatEntityMetadataRemapper() {
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.FishingFloat.HOOKED_ENTITY, 7), ProtocolVersionsHelper.UP_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.FishingFloat.HOOKED_ENTITY, 6), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.FishingFloat.HOOKED_ENTITY, 5), ProtocolVersionsHelper.ALL_1_9);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.FishingFloat.CATCHABLE, 8), ProtocolVersionsHelper.UP_1_16);
}
 
Example #9
Source File: BatEntityMetadataRemapper.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
protected BatEntityMetadataRemapper() {
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Bat.HANGING, 15), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Bat.HANGING, 14), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Bat.HANGING, 12), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Bat.HANGING, 11), ProtocolVersionsHelper.ALL_1_9);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Bat.HANGING, 16), ProtocolVersionsHelper.DOWN_1_8);
}
 
Example #10
Source File: ArrowEntityMetadataRemapper.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
protected ArrowEntityMetadataRemapper() {
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Arrow.CIRTICAL, 7), ProtocolVersionsHelper.UP_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Arrow.CIRTICAL, 6), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Arrow.CIRTICAL, 5), ProtocolVersionsHelper.ALL_1_9);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Arrow.CIRTICAL, 15), ProtocolVersionsHelper.DOWN_1_8);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Arrow.PIERCING_LEVEL, 8), ProtocolVersionsHelper.UP_1_16);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Arrow.PIERCING_LEVEL, 9), ProtocolVersionsHelper.RANGE__1_14__1_15_2);
}
 
Example #11
Source File: ResourcePackSerializer.java    From ProtocolSupportPocketStuff with GNU Affero General Public License v3.0 5 votes vote down vote up
public static void writePackInfo(ByteBuf serializer, ResourcePack pack) {
	StringSerializer.writeString(serializer, ProtocolVersionsHelper.LATEST_PE, pack.getPackId());
	StringSerializer.writeString(serializer, ProtocolVersionsHelper.LATEST_PE, pack.getPackVersion());
	serializer.writeLongLE(pack.getPackSize());
	StringSerializer.writeString(serializer, ProtocolVersionsHelper.LATEST_PE, ""); // ???
	StringSerializer.writeString(serializer, ProtocolVersionsHelper.LATEST_PE, ""); // ???
}
 
Example #12
Source File: EnderCrystalEntityMetadataRemapper.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
protected EnderCrystalEntityMetadataRemapper() {
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.EnderCrystal.TARGET, 7), ProtocolVersionsHelper.UP_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.EnderCrystal.TARGET, 6), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.EnderCrystal.TARGET, 5), ProtocolVersionsHelper.ALL_1_9);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.EnderCrystal.SHOW_BOTTOM, 8), ProtocolVersionsHelper.UP_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.EnderCrystal.SHOW_BOTTOM, 7), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.EnderCrystal.SHOW_BOTTOM, 6), ProtocolVersionsHelper.ALL_1_9);
}
 
Example #13
Source File: BoatEntityMetadataRemapper.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
protected BoatEntityMetadataRemapper() {
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Boat.TIME_SINCE_LAST_HIT, 7), ProtocolVersionsHelper.UP_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Boat.TIME_SINCE_LAST_HIT, 6), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Boat.TIME_SINCE_LAST_HIT, 5), ProtocolVersionsHelper.ALL_1_9);
	addRemap(new IndexValueRemapperNumberToInt(NetworkEntityMetadataObjectIndex.Boat.TIME_SINCE_LAST_HIT, 17), ProtocolVersionsHelper.DOWN_1_8);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Boat.FORWARD_DIRECTION, 8), ProtocolVersionsHelper.UP_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Boat.FORWARD_DIRECTION, 7), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Boat.FORWARD_DIRECTION, 6), ProtocolVersionsHelper.ALL_1_9);
	addRemap(new IndexValueRemapperNumberToInt(NetworkEntityMetadataObjectIndex.Boat.FORWARD_DIRECTION, 18), ProtocolVersionsHelper.DOWN_1_8);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Boat.DAMAGE_TAKEN, 9), ProtocolVersionsHelper.UP_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Boat.DAMAGE_TAKEN, 8), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Boat.DAMAGE_TAKEN, 7), ProtocolVersionsHelper.ALL_1_9);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Boat.DAMAGE_TAKEN, 19), ProtocolVersion.getAllBetween(ProtocolVersion.MINECRAFT_1_8, ProtocolVersion.MINECRAFT_1_6_1));
	addRemap(new IndexValueRemapperNumberToInt(NetworkEntityMetadataObjectIndex.Boat.DAMAGE_TAKEN, 19), ProtocolVersionsHelper.DOWN_1_5_2);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Boat.VARIANT, 10), ProtocolVersionsHelper.UP_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Boat.VARIANT, 9), ProtocolVersionsHelper.RANGE__1_10__1_13_2);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Boat.LEFT_PADDLE, 11), ProtocolVersionsHelper.UP_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Boat.LEFT_PADDLE, 10), ProtocolVersionsHelper.RANGE__1_10__1_13_2);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Boat.RIGHT_PADDLE, 12), ProtocolVersionsHelper.UP_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Boat.RIGHT_PADDLE, 11), ProtocolVersionsHelper.RANGE__1_10__1_13_2);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Boat.SPLASH_TIMER, 13), ProtocolVersionsHelper.UP_1_13);
}
 
Example #14
Source File: IronGolemEntityMetadataRemapper.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
protected IronGolemEntityMetadataRemapper() {
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.IronGolem.PLAYER_CREATED, 15), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.IronGolem.PLAYER_CREATED, 14), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.IronGolem.PLAYER_CREATED, 12), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.IronGolem.PLAYER_CREATED, 11), ProtocolVersionsHelper.ALL_1_9);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.IronGolem.PLAYER_CREATED, 16), ProtocolVersionsHelper.DOWN_1_8);
}
 
Example #15
Source File: MinecartCommandEntityMetadataRemapper.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
protected MinecartCommandEntityMetadataRemapper() {
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.MinecartCommand.COMMAND, 13), ProtocolVersionsHelper.UP_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.MinecartCommand.COMMAND, 12), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.MinecartCommand.COMMAND, 11), ProtocolVersionsHelper.ALL_1_9);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.MinecartCommand.COMMAND, 23), ProtocolVersion.getAllBetween(ProtocolVersion.MINECRAFT_1_7_5, ProtocolVersion.MINECRAFT_1_8));

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.MinecartCommand.LAST_OUTPUT, 14), ProtocolVersionsHelper.UP_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.MinecartCommand.LAST_OUTPUT, 13), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.MinecartCommand.LAST_OUTPUT, 12), ProtocolVersionsHelper.ALL_1_9);
	addRemap(new IndexValueRemapperChatToString(NetworkEntityMetadataObjectIndex.MinecartCommand.LAST_OUTPUT, 24, 64), ProtocolVersion.getAllBetween(ProtocolVersion.MINECRAFT_1_7_5, ProtocolVersion.MINECRAFT_1_8));
}
 
Example #16
Source File: ArmorStandEntityMetadataRemapper.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
protected ArmorStandEntityMetadataRemapper() {
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.ArmorStand.ARMORSTAND_FLAGS, 14), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.ArmorStand.ARMORSTAND_FLAGS, 13), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.ArmorStand.ARMORSTAND_FLAGS, 11), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.ArmorStand.ARMORSTAND_FLAGS, 10), ProtocolVersionsHelper.RANGE__1_8__1_9);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.ArmorStand.HEAD_ROT, 15), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.ArmorStand.HEAD_ROT, 14), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.ArmorStand.HEAD_ROT, 12), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.ArmorStand.HEAD_ROT, 11), ProtocolVersionsHelper.RANGE__1_8__1_9);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.ArmorStand.BODY_ROT, 16), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.ArmorStand.BODY_ROT, 15), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.ArmorStand.BODY_ROT, 13), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.ArmorStand.BODY_ROT, 12), ProtocolVersionsHelper.RANGE__1_8__1_9);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.ArmorStand.LEFT_ARM_ROT, 17), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.ArmorStand.LEFT_ARM_ROT, 16), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.ArmorStand.LEFT_ARM_ROT, 14), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.ArmorStand.LEFT_ARM_ROT, 13), ProtocolVersionsHelper.RANGE__1_8__1_9);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.ArmorStand.RIGHT_ARM_ROT, 18), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.ArmorStand.RIGHT_ARM_ROT, 17), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.ArmorStand.RIGHT_ARM_ROT, 15), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.ArmorStand.RIGHT_ARM_ROT, 14), ProtocolVersionsHelper.RANGE__1_8__1_9);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.ArmorStand.LEFT_LEG_ROT, 19), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.ArmorStand.LEFT_LEG_ROT, 18), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.ArmorStand.LEFT_LEG_ROT, 16), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.ArmorStand.LEFT_LEG_ROT, 15), ProtocolVersionsHelper.RANGE__1_8__1_9);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.ArmorStand.RIGHT_LEG_ROT, 20), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.ArmorStand.RIGHT_LEG_ROT, 19), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.ArmorStand.RIGHT_LEG_ROT, 17), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.ArmorStand.RIGHT_LEG_ROT, 16), ProtocolVersionsHelper.RANGE__1_8__1_9);
}
 
Example #17
Source File: LegacyAbstractFromClientPacketDecoder.java    From ProtocolSupportBungee with GNU Affero General Public License v3.0 5 votes vote down vote up
public LegacyAbstractFromClientPacketDecoder(Connection connection, NetworkDataCache cache) {
	super(Protocol.HANDSHAKE, true, ProtocolVersionsHelper.LATEST_PC.getId());
	this.connection = connection;
	this.cache = cache;
	registry.setCallBack(transformer -> {
		transformer.setConnection(this.connection);
		transformer.setSharedStorage(this.cache);
	});
}
 
Example #18
Source File: Ping.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
protected void writeToServer() {
	ServerBoundPacketData setprotocol = ServerBoundPacketData.create(PacketType.SERVERBOUND_HANDSHAKE_START);
	VarNumberSerializer.writeVarInt(setprotocol, ProtocolVersionsHelper.LATEST_PC.getId());
	StringSerializer.writeVarIntUTF8String(setprotocol, "");
	setprotocol.writeShort(Bukkit.getPort());
	VarNumberSerializer.writeVarInt(setprotocol, 1);
	codec.read(setprotocol);

	codec.read(ServerBoundPacketData.create(PacketType.SERVERBOUND_STATUS_REQUEST));
}
 
Example #19
Source File: IllagerEntityMetadataRemapper.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
protected IllagerEntityMetadataRemapper() {
	addRemap(
		new IndexValueRemapper<NetworkEntityMetadataObjectByte>(NetworkEntityMetadataObjectIndex.Insentient.INS_FLAGS, 12) {
			@Override
			public NetworkEntityMetadataObject<?> remapValue(NetworkEntityMetadataObjectByte object) {
				return new NetworkEntityMetadataObjectByte((byte) (BitUtils.isIBitSet(object.getValue(), NetworkEntityMetadataObjectIndex.Insentient.INS_FLAGS_BIT_ATTACKING) ? 1 : 0));
			}
		},
		ProtocolVersionsHelper.RANGE__1_11__1_13_2
	);
}
 
Example #20
Source File: SpiderEntityMetadataRemapper.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
protected SpiderEntityMetadataRemapper() {
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Spider.CLIMBING, 15), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Spider.CLIMBING, 14), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Spider.CLIMBING, 12), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Spider.CLIMBING, 11), ProtocolVersionsHelper.ALL_1_9);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Spider.CLIMBING, 16), ProtocolVersionsHelper.DOWN_1_8);
}
 
Example #21
Source File: SlimeEntityMetadataRemapper.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
protected SlimeEntityMetadataRemapper() {
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Slime.SIZE, 15), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Slime.SIZE, 14), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Slime.SIZE, 12), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Slime.SIZE, 11), ProtocolVersionsHelper.ALL_1_9);
	addRemap(new IndexValueRemapperNumberToByte(NetworkEntityMetadataObjectIndex.Slime.SIZE, 16), ProtocolVersionsHelper.DOWN_1_8);
}
 
Example #22
Source File: TridentEntityMetadataRemapper.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
protected TridentEntityMetadataRemapper() {
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Trident.LOYALTY, 9), ProtocolVersionsHelper.UP_1_16);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Trident.LOYALTY, 10), ProtocolVersionsHelper.RANGE__1_14__1_15_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Trident.LOYALTY, 8), ProtocolVersionsHelper.ALL_1_13);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Trident.HAS_GLINT, 10), ProtocolVersionsHelper.UP_1_16);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Trident.HAS_GLINT, 11), ProtocolVersionsHelper.ALL_1_15);
}
 
Example #23
Source File: CatEntityMetadataRemapper.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
protected CatEntityMetadataRemapper() {
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Cat.VARIANT, 18), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Cat.VARIANT, 17), ProtocolVersionsHelper.ALL_1_14);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Cat.UNKNOWN_1, 19), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Cat.UNKNOWN_1, 18), ProtocolVersionsHelper.ALL_1_14);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Cat.UNKNOWN_2, 20), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Cat.UNKNOWN_2, 19), ProtocolVersionsHelper.ALL_1_14);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Cat.COLLAR_COLOR, 21), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Cat.COLLAR_COLOR, 20), ProtocolVersionsHelper.ALL_1_14);
}
 
Example #24
Source File: BlazeEntityMetadataRemapper.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
protected BlazeEntityMetadataRemapper() {
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Blaze.ON_FIRE, 15), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Blaze.ON_FIRE, 14), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Blaze.ON_FIRE, 12), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Blaze.ON_FIRE, 11), ProtocolVersionsHelper.ALL_1_9);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Blaze.ON_FIRE, 16), ProtocolVersionsHelper.DOWN_1_8);
}
 
Example #25
Source File: WitchEntityMetadataRemapper.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
protected WitchEntityMetadataRemapper() {
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Witch.DRINKING_POTION, 15), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Witch.DRINKING_POTION, 14), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Witch.DRINKING_POTION, 12), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Witch.DRINKING_POTION, 11), ProtocolVersionsHelper.ALL_1_9);
	addRemap(new IndexValueRemapperBooleanToByte(NetworkEntityMetadataObjectIndex.Witch.DRINKING_POTION, 16), ProtocolVersionsHelper.DOWN_1_8);
}
 
Example #26
Source File: VillagerEntityMetadataRemapper.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
protected VillagerEntityMetadataRemapper() {
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Villager.VDATA, 17), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Villager.VDATA, 16), ProtocolVersionsHelper.RANGE__1_14_1__1_14_4);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Villager.VDATA, 15), ProtocolVersion.MINECRAFT_1_14);
	addRemap(new IndexValueRemapperVillagerDataToVarInt(NetworkEntityMetadataObjectIndex.Villager.VDATA, 13), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperVillagerDataToVarInt(NetworkEntityMetadataObjectIndex.Villager.VDATA, 12), ProtocolVersionsHelper.ALL_1_9);
	addRemap(new IndexValueRemapper<NetworkEntityMetadataObjectVillagerData>(NetworkEntityMetadataObjectIndex.Villager.VDATA, 16) {
		@Override
		public NetworkEntityMetadataObject<?> remapValue(NetworkEntityMetadataObjectVillagerData object) {
			return new NetworkEntityMetadataObjectInt(object.getValue().getProfession());
		}
	}, ProtocolVersionsHelper.DOWN_1_8);
}
 
Example #27
Source File: RabbitEntityMetadataRemapper.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
protected RabbitEntityMetadataRemapper() {
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Rabbit.VARIANT, 16), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Rabbit.VARIANT, 15), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Rabbit.VARIANT, 13), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Rabbit.VARIANT, 12), ProtocolVersionsHelper.ALL_1_9);
	addRemap(new IndexValueRemapperNumberToByte(NetworkEntityMetadataObjectIndex.Rabbit.VARIANT, 18), ProtocolVersionsHelper.DOWN_1_8);
}
 
Example #28
Source File: FoxEntityMetadataRemapper.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
protected FoxEntityMetadataRemapper() {
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Fox.VARIANT, 16), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Fox.VARIANT, 15), ProtocolVersionsHelper.ALL_1_14);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Fox.FOX_FLAGS, 17), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Fox.FOX_FLAGS, 16), ProtocolVersionsHelper.ALL_1_14);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Fox.UNKNOWN_1, 18), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Fox.UNKNOWN_1, 17), ProtocolVersionsHelper.ALL_1_14);

	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Fox.UNKNOWN_2, 19), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Fox.UNKNOWN_2, 18), ProtocolVersionsHelper.ALL_1_14);
}
 
Example #29
Source File: SheepEntityMetadataRemapper.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
protected SheepEntityMetadataRemapper() {
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Sheep.SHEEP_FLAGS, 16), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Sheep.SHEEP_FLAGS, 15), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Sheep.SHEEP_FLAGS, 13), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Sheep.SHEEP_FLAGS, 12), ProtocolVersionsHelper.ALL_1_9);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Sheep.SHEEP_FLAGS, 16), ProtocolVersionsHelper.DOWN_1_8);
}
 
Example #30
Source File: GhastEntityMetadataRemapper.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
protected GhastEntityMetadataRemapper() {
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Ghast.ATTACKING, 15), ProtocolVersionsHelper.UP_1_15);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Ghast.ATTACKING, 14), ProtocolVersionsHelper.ALL_1_14);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Ghast.ATTACKING, 12), ProtocolVersionsHelper.RANGE__1_10__1_13_2);
	addRemap(new IndexValueRemapperNoOp(NetworkEntityMetadataObjectIndex.Ghast.ATTACKING, 11), ProtocolVersionsHelper.ALL_1_9);
	addRemap(new IndexValueRemapperBooleanToByte(NetworkEntityMetadataObjectIndex.Ghast.ATTACKING, 16), ProtocolVersionsHelper.DOWN_1_8);
}