Clean repo for open source release

Remove build artifacts, dev tool configs, unused dependencies,
and third-party source dumps. Add proper README, update .gitignore,
clean up Makefile.
This commit is contained in:
NotEvil
2026-04-12 00:51:22 +02:00
parent 2e7a1d403b
commit f6466360b6
1947 changed files with 238025 additions and 1 deletions

View File

@@ -0,0 +1,60 @@
package com.tiedup.remake.items;
import com.tiedup.remake.state.IRestrainable;
import com.tiedup.remake.util.KidnappedHelper;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.item.ItemStack;
/**
* Automatic Shock Collar - Shocks the wearer at regular intervals.
*
* Phase 14.1.5: Refactored to support IRestrainable (LivingEntity + NPCs)
*
* <p>Mechanics:</p>
* <ul>
* <li><b>Self-Triggering:</b> Has an internal timer stored in NBT that shocks the entity when it reaches 0.</li>
* <li><b>Unstruggable:</b> By default, cannot be escaped via struggle mechanics (requires key).</li>
* </ul>
*/
public class ItemShockCollarAuto extends ItemShockCollar {
private final int interval;
/**
* @param interval Frequency of shocks in TICKS (20 ticks = 1 second).
*/
public ItemShockCollarAuto() {
this(600); // 30 seconds default
}
public ItemShockCollarAuto(int interval) {
super();
this.interval = interval;
}
public int getInterval() {
return interval;
}
/**
* Ensures the internal shock timer is cleaned up when the item is removed.
*
* Phase 14.1.5: Refactored to support IRestrainable (LivingEntity + NPCs)
*/
@Override
public void onUnequipped(ItemStack stack, LivingEntity entity) {
IRestrainable state = KidnappedHelper.getKidnappedState(entity);
if (state != null) {
state.resetAutoShockTimer();
}
super.onUnequipped(stack, entity);
}
/**
* Prevents escaping through struggle mechanics for this specific collar type.
*/
@Override
public boolean canBeStruggledOut(ItemStack stack) {
return false;
}
}