Skip to content

Commit

Permalink
fix: remove logging
Browse files Browse the repository at this point in the history
  • Loading branch information
SirEdvin committed Aug 20, 2023
1 parent d01be2e commit d1bb2e8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 18 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.2.2] - 2023-08-20

### Removed

- Extra logging for shooted item

## [1.2.1] - 2023-08-16

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ org.gradle.jvmargs = -Xmx4G
org.gradle.warning.mode = all
minecraftVersion = 1.20.1
# Mod Properties
modVersion = 1.2.1
modVersion = 1.2.2
mavenGroup = site.siredvin
modBaseName = turtlematic
archivesBaseName = turtlematic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import net.minecraft.world.phys.Vec3
import site.siredvin.peripheralium.ext.toBlockPos
import site.siredvin.peripheralium.storages.item.ItemStorageExtractor
import site.siredvin.peripheralium.storages.item.ItemStorageUtils
import site.siredvin.turtlematic.TurtlematicCore
import site.siredvin.turtlematic.common.setup.EntityTypes

class ShootedItemProjectile(level: Level, x: Double, y: Double, z: Double) : ThrowableProjectile(EntityTypes.SHOOTED_ITEM_TYPE.get(), x, y, z, level), ItemSupplier {
Expand All @@ -36,16 +35,8 @@ class ShootedItemProjectile(level: Level, x: Double, y: Double, z: Double) : Thr
private var decayTicker: Int = DEFAULT_DECAY_TICKS
private var startDecaying: Boolean = false

override fun setPos(x: Double, y: Double, z: Double) {
super.setPos(x, y, z)
if (!level().isClientSide) {
TurtlematicCore.LOGGER.info("New position $x $y $z")
}
}

override fun onHitBlock(hit: BlockHitResult) {
if (!level().isClientSide) {
TurtlematicCore.LOGGER.info("Hit block ${hit.blockPos}")
val targetableStorage =
ItemStorageExtractor.extractItemSink(level(), hit.blockPos, level().getBlockEntity(hit.blockPos))
if (targetableStorage != null) {
Expand Down Expand Up @@ -76,14 +67,13 @@ class ShootedItemProjectile(level: Level, x: Double, y: Double, z: Double) : Thr
override fun tick() {
super.tick()
if (!level().isClientSide) {
if (deltaMovement.length() != 0.0) {
TurtlematicCore.LOGGER.info("Current delta of movement $deltaMovement")
} else if (startDecaying) {
decayTicker--
if (decayTicker <= 0) {
TurtlematicCore.LOGGER.info("Dropping item stack $x ${y + 0.5} $z")
Containers.dropItemStack(level(), x, y + 0.5, z, stack)
this.kill()
if (deltaMovement.length() == 0.0) {
if (startDecaying) {
decayTicker--
if (decayTicker <= 0) {
Containers.dropItemStack(level(), x, y + 0.5, z, stack)
this.kill()
}
}
}
}
Expand Down

0 comments on commit d1bb2e8

Please sign in to comment.