Skip to content
This repository has been archived by the owner on Jan 23, 2025. It is now read-only.

Commit

Permalink
fix!: SCP-173 spawn ran into death looping
Browse files Browse the repository at this point in the history
  • Loading branch information
xtexx committed Jan 14, 2023
1 parent f6794ff commit c978b91
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ plugins {
}

group 'scpsharp'
version '1.12'
version '1.12.1'
String fullVersion = "mc${project.minecraft_version}-$project.version"

repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,19 @@ class SCP173ContainmentRoom : FacilityStructurePiece {
}
// Spawn SCP-173
if (entityPos != null && entityPos in chunkBox) {
world.spawnEntity(SCP173Entity.TYPE.spawn(world.toServerWorld(), entityPos, SpawnReason.STRUCTURE))
val entity = SCP173Entity.TYPE.create(world.toServerWorld())
if (entity != null) {
entity.setPersistent()
entity.refreshPositionAndAngles(
entityPos.x.toDouble(),
entityPos.y.toDouble(),
entityPos.z.toDouble(),
0.0f,
0.0f
)
entity.initialize(world, world.getLocalDifficulty(pos), SpawnReason.STRUCTURE, null, null)
world.spawnEntity(entity)
}
}
}

Expand Down

0 comments on commit c978b91

Please sign in to comment.