Skip to content

Commit

Permalink
loot container dupe fix (#668)
Browse files Browse the repository at this point in the history
* fixed create valuebox rendering on ships

* loot container dupe fix
  • Loading branch information
mrsterner authored Dec 30, 2023
1 parent a04911c commit cb72d0f
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import net.minecraft.world.level.Level
import net.minecraft.world.level.block.Blocks
import net.minecraft.world.level.block.Rotation
import net.minecraft.world.level.block.Rotation.NONE
import net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
import net.minecraft.world.level.block.state.BlockState
import net.minecraft.world.level.chunk.LevelChunk
import org.valkyrienskies.core.api.ships.ServerShip
Expand Down Expand Up @@ -40,6 +41,11 @@ fun relocateBlock(
it.clearContent()
}

// so loot containers dont drop its content
if (it is RandomizableContainerBlockEntity) {
it.setLootTable(null, 0)
}

tag
}

Expand Down

0 comments on commit cb72d0f

Please sign in to comment.