3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-24 15:20:25 +01:00

The Great Refactor Part 1 - connector -> core

Dieser Commit ist enthalten in:
RednedEpic 2021-11-20 13:56:40 -06:00
Ursprung a4b2e05132
Commit 0b5009b415
573 geänderte Dateien mit 135 neuen und 135 gelöschten Zeilen

8
.gitmodules vendored
Datei anzeigen

@ -1,6 +1,6 @@
[submodule "connector/src/main/resources/mappings"] [submodule "core/src/main/resources/mappings"]
path = connector/src/main/resources/mappings path = core/src/main/resources/mappings
url = https://github.com/GeyserMC/mappings.git url = https://github.com/GeyserMC/mappings.git
[submodule "connector/src/main/resources/languages"] [submodule "core/src/main/resources/languages"]
path = connector/src/main/resources/languages path = core/src/main/resources/languages
url = https://github.com/GeyserMC/languages.git url = https://github.com/GeyserMC/languages.git

Datei anzeigen

@ -13,7 +13,7 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.geysermc</groupId> <groupId>org.geysermc</groupId>
<artifactId>connector</artifactId> <artifactId>core</artifactId>
<version>1.4.3-SNAPSHOT</version> <version>1.4.3-SNAPSHOT</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>

Datei anzeigen

@ -20,7 +20,7 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.geysermc</groupId> <groupId>org.geysermc</groupId>
<artifactId>connector</artifactId> <artifactId>core</artifactId>
<version>1.4.3-SNAPSHOT</version> <version>1.4.3-SNAPSHOT</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>

Datei anzeigen

@ -13,7 +13,7 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.geysermc</groupId> <groupId>org.geysermc</groupId>
<artifactId>connector</artifactId> <artifactId>core</artifactId>
<version>1.4.3-SNAPSHOT</version> <version>1.4.3-SNAPSHOT</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>

Datei anzeigen

@ -13,7 +13,7 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.geysermc</groupId> <groupId>org.geysermc</groupId>
<artifactId>connector</artifactId> <artifactId>core</artifactId>
<version>1.4.3-SNAPSHOT</version> <version>1.4.3-SNAPSHOT</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>

Datei anzeigen

@ -13,7 +13,7 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.geysermc</groupId> <groupId>org.geysermc</groupId>
<artifactId>connector</artifactId> <artifactId>core</artifactId>
<version>1.4.3-SNAPSHOT</version> <version>1.4.3-SNAPSHOT</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>

@ -1 +0,0 @@
Subproject commit d12420771ea5e13083b3556552298d164767aae9

@ -1 +0,0 @@
Subproject commit 5b6239f0a43ec9a38d65ed53b8d1bfaf564c1c3b

Datei anzeigen

@ -8,7 +8,7 @@
<artifactId>geyser-parent</artifactId> <artifactId>geyser-parent</artifactId>
<version>1.4.3-SNAPSHOT</version> <version>1.4.3-SNAPSHOT</version>
</parent> </parent>
<artifactId>connector</artifactId> <artifactId>core</artifactId>
<properties> <properties>
<adventure.version>4.9.3</adventure.version> <adventure.version>4.9.3</adventure.version>

Datei anzeigen

@ -1,56 +1,56 @@
/* /*
* Copyright (c) 2019-2021 GeyserMC. http://geysermc.org * Copyright (c) 2019-2021 GeyserMC. http://geysermc.org
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights * in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is * copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions: * furnished to do so, subject to the following conditions:
* *
* The above copyright notice and this permission notice shall be included in * The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software. * all copies or substantial portions of the Software.
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * 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 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE. * THE SOFTWARE.
* *
* @author GeyserMC * @author GeyserMC
* @link https://github.com/GeyserMC/Geyser * @link https://github.com/GeyserMC/Geyser
*/ */
package org.geysermc.connector.entity; package org.geysermc.connector.entity;
import com.github.steveice10.mc.protocol.data.game.entity.metadata.type.BooleanEntityMetadata; import com.github.steveice10.mc.protocol.data.game.entity.metadata.type.BooleanEntityMetadata;
import com.nukkitx.math.vector.Vector3f; import com.nukkitx.math.vector.Vector3f;
import com.nukkitx.protocol.bedrock.data.entity.EntityData; import com.nukkitx.protocol.bedrock.data.entity.EntityData;
import com.nukkitx.protocol.bedrock.data.entity.EntityFlag; import com.nukkitx.protocol.bedrock.data.entity.EntityFlag;
import org.geysermc.connector.network.session.GeyserSession; import org.geysermc.connector.network.session.GeyserSession;
import java.util.UUID; import java.util.UUID;
public class FallingBlockEntity extends Entity { public class FallingBlockEntity extends Entity {
private final int javaId; private final int javaId;
public FallingBlockEntity(GeyserSession session, long entityId, long geyserId, UUID uuid, Vector3f position, Vector3f motion, float yaw, float pitch, int javaId) { public FallingBlockEntity(GeyserSession session, long entityId, long geyserId, UUID uuid, Vector3f position, Vector3f motion, float yaw, float pitch, int javaId) {
super(session, entityId, geyserId, uuid, EntityDefinitions.FALLING_BLOCK, position, motion, yaw, pitch, 0f); super(session, entityId, geyserId, uuid, EntityDefinitions.FALLING_BLOCK, position, motion, yaw, pitch, 0f);
this.javaId = javaId; this.javaId = javaId;
} }
@Override @Override
protected void initializeMetadata() { protected void initializeMetadata() {
super.initializeMetadata(); super.initializeMetadata();
this.dirtyMetadata.put(EntityData.VARIANT, session.getBlockMappings().getBedrockBlockId(javaId)); this.dirtyMetadata.put(EntityData.VARIANT, session.getBlockMappings().getBedrockBlockId(javaId));
} }
@Override @Override
public void setGravity(BooleanEntityMetadata entityMetadata) { public void setGravity(BooleanEntityMetadata entityMetadata) {
super.setGravity(entityMetadata); super.setGravity(entityMetadata);
// Set the NO_AI flag based on the no gravity flag to prevent movement // Set the NO_AI flag based on the no gravity flag to prevent movement
setFlag(EntityFlag.NO_AI, entityMetadata.getPrimitiveValue()); setFlag(EntityFlag.NO_AI, entityMetadata.getPrimitiveValue());
} }
} }

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