3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-26 00:00:41 +01:00

Merge branch 'master' into feature/direct-block-mapping

Dieser Commit ist enthalten in:
RednedEpic 2020-02-05 18:59:20 -06:00
Commit 0cf574ddcb
156 geänderte Dateien mit 1109 neuen und 193 gelöschten Zeilen

Datei anzeigen

@ -1,6 +1,6 @@
The MIT License
Copyright (c) 2019 GeyserMC. http://geysermc.org
Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -103,7 +103,7 @@
<dependency>
<groupId>com.github.steveice10</groupId>
<artifactId>mcprotocollib</artifactId>
<version>1.15.1-1-SNAPSHOT</version>
<version>1.15.2-1-SNAPSHOT</version>
<scope>compile</scope>
<exclusions>
<exclusion>

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -191,7 +191,7 @@ public class Entity {
metadata.put(EntityData.NAMETAG, MessageUtils.getBedrockMessage(name));
break;
case 3: // is custom name visible
metadata.getFlags().setFlag(EntityFlag.ALWAYS_SHOW_NAME, (boolean) entityMetadata.getValue());
metadata.put(EntityData.ALWAYS_SHOW_NAMETAG, (byte) ((boolean) entityMetadata.getValue() ? 1 : 0));
break;
case 4: // silent
metadata.getFlags().setFlag(EntityFlag.SILENT, (boolean) entityMetadata.getValue());

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -30,8 +30,11 @@ import com.nukkitx.math.vector.Vector3f;
import com.nukkitx.protocol.bedrock.data.EntityData;
import com.nukkitx.protocol.bedrock.data.ItemData;
import com.nukkitx.protocol.bedrock.packet.MobArmorEquipmentPacket;
import com.nukkitx.protocol.bedrock.packet.MobEquipmentPacket;
import lombok.Getter;
import lombok.Setter;
import org.geysermc.connector.entity.type.EntityType;
import org.geysermc.connector.network.session.GeyserSession;
@ -77,6 +80,11 @@ public class LivingEntity extends Entity {
armorEquipmentPacket.setLeggings(leggings);
armorEquipmentPacket.setBoots(boots);
MobEquipmentPacket mobEquipmentPacket = new MobEquipmentPacket();
mobEquipmentPacket.setRuntimeEntityId(geyserId);
mobEquipmentPacket.setItem(hand);
session.getUpstream().sendPacket(armorEquipmentPacket);
session.getUpstream().sendPacket(mobEquipmentPacket);
}
}

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,12 +1,35 @@
/*
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* @author GeyserMC
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.connector.entity.living;
import com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata;
import com.github.steveice10.mc.protocol.data.game.entity.metadata.MetadataType;
import com.nukkitx.math.vector.Vector3f;
import com.nukkitx.protocol.bedrock.data.EntityData;
import com.nukkitx.protocol.bedrock.data.EntityFlag;
import org.geysermc.connector.entity.LivingEntity;
import org.geysermc.connector.entity.living.MonsterEntity;
import org.geysermc.connector.entity.type.EntityType;
import org.geysermc.connector.network.session.GeyserSession;

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,27 +0,0 @@
package org.geysermc.connector.entity.living;
import com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata;
import com.nukkitx.math.vector.Vector3f;
import com.nukkitx.protocol.bedrock.data.EntityData;
import com.nukkitx.protocol.bedrock.data.EntityFlag;
import org.geysermc.connector.entity.type.EntityType;
import org.geysermc.connector.network.session.GeyserSession;
public class RabbitEntity extends AnimalEntity {
public RabbitEntity(long entityId, long geyserId, EntityType entityType, Vector3f position, Vector3f motion, Vector3f rotation) {
super(entityId, geyserId, entityType, position, motion, rotation);
}
@Override
public void updateBedrockMetadata(EntityMetadata entityMetadata, GeyserSession session) {
super.updateBedrockMetadata(entityMetadata, session);
if (entityMetadata.getId() == 15) {
metadata.put(EntityData.SCALE, .55f);
boolean isBaby = (boolean) entityMetadata.getValue();
if(isBaby) {
metadata.put(EntityData.SCALE, .35f);
metadata.getFlags().setFlag(EntityFlag.BABY, true);
}
}
}
}

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -23,9 +23,10 @@
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.connector.entity.living;
package org.geysermc.connector.entity.living.animal;
import com.nukkitx.math.vector.Vector3f;
import org.geysermc.connector.entity.living.AgeableEntity;
import org.geysermc.connector.entity.type.EntityType;
public class AnimalEntity extends AgeableEntity {

Datei anzeigen

@ -0,0 +1,53 @@
/*
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* @author GeyserMC
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.connector.entity.living.animal;
import com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata;
import com.nukkitx.math.vector.Vector3f;
import com.nukkitx.protocol.bedrock.data.EntityData;
import com.nukkitx.protocol.bedrock.data.EntityFlag;
import org.geysermc.connector.entity.type.EntityType;
import org.geysermc.connector.network.session.GeyserSession;
public class RabbitEntity extends AnimalEntity {
public RabbitEntity(long entityId, long geyserId, EntityType entityType, Vector3f position, Vector3f motion, Vector3f rotation) {
super(entityId, geyserId, entityType, position, motion, rotation);
}
@Override
public void updateBedrockMetadata(EntityMetadata entityMetadata, GeyserSession session) {
super.updateBedrockMetadata(entityMetadata, session);
if (entityMetadata.getId() == 15) {
metadata.put(EntityData.SCALE, .55f);
boolean isBaby = (boolean) entityMetadata.getValue();
if(isBaby) {
metadata.put(EntityData.SCALE, .35f);
metadata.getFlags().setFlag(EntityFlag.BABY, true);
}
}
}
}

Datei anzeigen

@ -0,0 +1,51 @@
/*
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* @author GeyserMC
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.connector.entity.living.animal;
import com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata;
import com.nukkitx.math.vector.Vector3f;
import com.nukkitx.protocol.bedrock.data.EntityData;
import com.nukkitx.protocol.bedrock.data.EntityFlag;
import org.geysermc.connector.entity.type.EntityType;
import org.geysermc.connector.network.session.GeyserSession;
public class SheepEntity extends AnimalEntity {
public SheepEntity(long entityId, long geyserId, EntityType entityType, Vector3f position, Vector3f motion, Vector3f rotation) {
super(entityId, geyserId, entityType, position, motion, rotation);
}
@Override
public void updateBedrockMetadata(EntityMetadata entityMetadata, GeyserSession session) {
if (entityMetadata.getId() == 16) {
byte xd = (byte) entityMetadata.getValue();
metadata.getFlags().setFlag(EntityFlag.SHEARED, (xd & 0x10) == 0x10);
metadata.put(EntityData.COLOR, xd);
}
super.updateBedrockMetadata(entityMetadata, session);
}
}

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -23,9 +23,10 @@
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.connector.entity.living;
package org.geysermc.connector.entity.living.animal;
import com.nukkitx.math.vector.Vector3f;
import org.geysermc.connector.entity.living.animal.AnimalEntity;
import org.geysermc.connector.entity.type.EntityType;
public class TameableEntity extends AnimalEntity {

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -23,10 +23,11 @@
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.connector.entity.living;
package org.geysermc.connector.entity.living.animal.horse;
import com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata;
import com.nukkitx.math.vector.Vector3f;
import org.geysermc.connector.entity.living.animal.AnimalEntity;
import org.geysermc.connector.entity.type.EntityType;
import org.geysermc.connector.network.session.GeyserSession;

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -23,7 +23,7 @@
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.connector.entity.living;
package org.geysermc.connector.entity.living.animal.horse;
import com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata;
import com.nukkitx.math.vector.Vector3f;

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -23,12 +23,11 @@
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.connector.entity.living.horse;
package org.geysermc.connector.entity.living.animal.horse;
import com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata;
import com.nukkitx.math.vector.Vector3f;
import com.nukkitx.protocol.bedrock.data.EntityData;
import org.geysermc.connector.entity.living.AbstractHorseEntity;
import org.geysermc.connector.entity.type.EntityType;
import org.geysermc.connector.network.session.GeyserSession;

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -23,10 +23,9 @@
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.connector.entity.living.horse;
package org.geysermc.connector.entity.living.animal.horse;
import com.nukkitx.math.vector.Vector3f;
import org.geysermc.connector.entity.living.ChestedHorseEntity;
import org.geysermc.connector.entity.type.EntityType;
public class LlamaEntity extends ChestedHorseEntity {

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -23,7 +23,7 @@
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.connector.entity.living;
package org.geysermc.connector.entity.living.monster;
import com.nukkitx.math.vector.Vector3f;
import org.geysermc.connector.entity.type.EntityType;

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -29,7 +29,6 @@ import com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadat
import com.nukkitx.math.vector.Vector3f;
import com.nukkitx.protocol.bedrock.data.EntityData;
import org.geysermc.connector.entity.Entity;
import org.geysermc.connector.entity.living.MonsterEntity;
import org.geysermc.connector.entity.type.EntityType;
import org.geysermc.connector.network.session.GeyserSession;

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -23,9 +23,10 @@
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.connector.entity.living;
package org.geysermc.connector.entity.living.monster;
import com.nukkitx.math.vector.Vector3f;
import org.geysermc.connector.entity.living.CreatureEntity;
import org.geysermc.connector.entity.type.EntityType;
public class MonsterEntity extends CreatureEntity {

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -29,7 +29,6 @@ import com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadat
import com.nukkitx.math.vector.Vector3f;
import com.nukkitx.protocol.bedrock.data.EntityData;
import com.nukkitx.protocol.bedrock.data.EntityFlag;
import org.geysermc.connector.entity.living.MonsterEntity;
import org.geysermc.connector.entity.type.EntityType;
import org.geysermc.connector.network.session.GeyserSession;

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -23,7 +23,7 @@
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.connector.entity.living;
package org.geysermc.connector.entity.living.monster.raid;
import com.nukkitx.math.vector.Vector3f;
import org.geysermc.connector.entity.type.EntityType;

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -23,9 +23,10 @@
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.connector.entity.living;
package org.geysermc.connector.entity.living.monster.raid;
import com.nukkitx.math.vector.Vector3f;
import org.geysermc.connector.entity.living.monster.MonsterEntity;
import org.geysermc.connector.entity.type.EntityType;
public class RaidParticipantEntity extends MonsterEntity {

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -23,9 +23,10 @@
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.connector.entity.living;
package org.geysermc.connector.entity.living.monster.raid;
import com.nukkitx.math.vector.Vector3f;
import org.geysermc.connector.entity.living.monster.raid.AbstractIllagerEntity;
import org.geysermc.connector.entity.type.EntityType;
public class SpellcasterIllagerEntity extends AbstractIllagerEntity {

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -28,10 +28,18 @@ package org.geysermc.connector.entity.type;
import lombok.Getter;
import org.geysermc.connector.entity.*;
import org.geysermc.connector.entity.living.*;
import org.geysermc.connector.entity.living.horse.HorseEntity;
import org.geysermc.connector.entity.living.horse.LlamaEntity;
import org.geysermc.connector.entity.living.monster.GuardianEntity;
import org.geysermc.connector.entity.living.monster.ZombieEntity;
import org.geysermc.connector.entity.living.animal.AnimalEntity;
import org.geysermc.connector.entity.living.animal.TameableEntity;
import org.geysermc.connector.entity.living.animal.horse.AbstractHorseEntity;
import org.geysermc.connector.entity.living.animal.RabbitEntity;
import org.geysermc.connector.entity.living.animal.SheepEntity;
import org.geysermc.connector.entity.living.animal.horse.ChestedHorseEntity;
import org.geysermc.connector.entity.living.animal.horse.HorseEntity;
import org.geysermc.connector.entity.living.animal.horse.LlamaEntity;
import org.geysermc.connector.entity.living.monster.*;
import org.geysermc.connector.entity.living.monster.raid.AbstractIllagerEntity;
import org.geysermc.connector.entity.living.monster.raid.RaidParticipantEntity;
import org.geysermc.connector.entity.living.monster.raid.SpellcasterIllagerEntity;
@Getter
public enum EntityType {
@ -39,7 +47,7 @@ public enum EntityType {
CHICKEN(AnimalEntity.class, 10, 0.7f, 0.4f),
COW(AnimalEntity.class, 11, 1.4f, 0.9f),
PIG(AnimalEntity.class, 12, 0.9f),
SHEEP(AnimalEntity.class, 13, 1.3f, 0.9f),
SHEEP(SheepEntity.class, 13, 1.3f, 0.9f),
WOLF(AnimalEntity.class, 14, 0.85f, 0.6f),
VILLAGER(AbstractMerchantEntity.class, 15, 1.8f, 0.6f, 0.6f, 1.62f),
MOOSHROOM(AnimalEntity.class, 16, 1.4f, 0.9f),

Datei anzeigen

@ -1,3 +1,28 @@
/*
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* @author GeyserMC
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.connector.metrics;
import com.google.gson.JsonArray;

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,3 +1,28 @@
/*
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* @author GeyserMC
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.connector.network.session;
import com.nukkitx.protocol.bedrock.BedrockPacket;

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -95,6 +95,7 @@ public class TranslatorsInit {
public static void start() {
Registry.registerJava(ServerJoinGamePacket.class, new JavaJoinGameTranslator());
Registry.registerJava(ServerPluginMessagePacket.class, new JavaPluginMessageTranslator());
Registry.registerJava(ServerChatPacket.class, new JavaChatTranslator());
Registry.registerJava(ServerTitlePacket.class, new JavaTitleTranslator());
Registry.registerJava(ServerUpdateTimePacket.class, new JavaUpdateTimeTranslator());
@ -157,6 +158,7 @@ public class TranslatorsInit {
Registry.registerBedrock(InteractPacket.class, new BedrockInteractTranslator());
Registry.registerBedrock(TextPacket.class, new BedrockTextTranslator());
Registry.registerBedrock(RespawnPacket.class, new BedrockRespawnTranslator());
Registry.registerBedrock(ShowCreditsPacket.class, new BedrockShowCreditsTranslator());
itemTranslator = new ItemTranslator();
BlockTranslator.init();

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,3 +1,28 @@
/*
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* @author GeyserMC
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.connector.network.translators.bedrock;
import com.nukkitx.protocol.bedrock.packet.SetLocalPlayerAsInitializedPacket;

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -0,0 +1,43 @@
/*
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* @author GeyserMC
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.connector.network.translators.bedrock;
import com.github.steveice10.mc.protocol.data.game.ClientRequest;
import com.github.steveice10.mc.protocol.packet.ingame.client.ClientRequestPacket;
import com.nukkitx.protocol.bedrock.packet.ShowCreditsPacket;
import org.geysermc.connector.network.session.GeyserSession;
import org.geysermc.connector.network.translators.PacketTranslator;
public class BedrockShowCreditsTranslator extends PacketTranslator<ShowCreditsPacket> {
@Override
public void translate(ShowCreditsPacket packet, GeyserSession session) {
if (packet.getStatus() == ShowCreditsPacket.Status.END_CREDITS) {
ClientRequestPacket javaRespawnPacket = new ClientRequestPacket(ClientRequest.RESPAWN);
session.getDownstream().getSession().send(javaRespawnPacket);
}
}
}

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,3 +1,28 @@
/*
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* @author GeyserMC
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.connector.network.translators.block;
import com.fasterxml.jackson.databind.JsonNode;

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,3 +1,28 @@
/*
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* @author GeyserMC
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.connector.network.translators.java;
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerBossBarPacket;

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -0,0 +1,43 @@
/*
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* @author GeyserMC
* @link https://github.com/GeyserMC/Geyser
*/
package org.geysermc.connector.network.translators.java;
import com.github.steveice10.mc.protocol.packet.ingame.client.ClientPluginMessagePacket;
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerPluginMessagePacket;
import org.geysermc.connector.GeyserConnector;
import org.geysermc.connector.network.session.GeyserSession;
import org.geysermc.connector.network.translators.PacketTranslator;
public class JavaPluginMessageTranslator extends PacketTranslator<ServerPluginMessagePacket> {
@Override
public void translate(ServerPluginMessagePacket packet, GeyserSession session) {
if (packet.getChannel().equals("minecraft:brand")) {
session.getDownstream().getSession().send(
new ClientPluginMessagePacket(packet.getChannel(), GeyserConnector.NAME.getBytes())
);
}
}
}

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Datei anzeigen

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 GeyserMC. http://geysermc.org
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen