-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d8f33ab
commit 9315a1a
Showing
20 changed files
with
61 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
project_version=0.13.5 | ||
project_version=0.14.0 | ||
|
||
# FM Protocols | ||
protocols_version=09b2b0a077 | ||
protocols_use_local_build=false | ||
protocols_local_version=0.13.2 | ||
|
||
minecraft_version=1.20.2-R0.1-SNAPSHOT | ||
minecraft_version=1.20.4-R0.1-SNAPSHOT | ||
|
||
# Dependencies | ||
ld_version=10.0.33 | ||
pluginbase_version=306d580 | ||
gsit_version=1.4.1 | ||
papi_version=2.11.3 | ||
bstats_version=3.0.1 | ||
gsit_version=1.6.0 | ||
papi_version=2.11.5 | ||
bstats_version=3.0.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/xiamomc/morph/events/RevealingEventProcessor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package xiamomc.morph.utilities; | ||
|
||
import net.minecraft.world.phys.Vec3; | ||
import org.bukkit.Location; | ||
import org.bukkit.World; | ||
import org.bukkit.craftbukkit.v1_20_R3.CraftWorld; | ||
import org.bukkit.entity.Entity; | ||
import org.bukkit.entity.EntityType; | ||
|
||
public class NmsUtils | ||
{ | ||
public static Entity spawnEntity(EntityType bukkitType, World targetWorld, Location location) | ||
{ | ||
var nmsType = EntityTypeUtils.getNmsType(bukkitType); | ||
|
||
if (nmsType == null) | ||
throw new IllegalArgumentException("No NMS EntityType for bukkit type '%s'".formatted(bukkitType)); | ||
|
||
var nmsWorld = ((CraftWorld) targetWorld).getHandle(); | ||
var nmsEntity = nmsType.create(nmsWorld); | ||
|
||
if (nmsEntity == null) | ||
throw new IllegalArgumentException("Unable to spawn entity"); | ||
|
||
nmsEntity.setPos(new Vec3(location.x(), location.y(), location.z())); | ||
|
||
return nmsEntity.getBukkitEntity(); | ||
} | ||
} |