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:
71
src/main/java/com/tiedup/remake/items/ItemToken.java
Normal file
71
src/main/java/com/tiedup/remake/items/ItemToken.java
Normal file
@@ -0,0 +1,71 @@
|
||||
package com.tiedup.remake.items;
|
||||
|
||||
import java.util.List;
|
||||
import javax.annotation.Nullable;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.Rarity;
|
||||
import net.minecraft.world.item.TooltipFlag;
|
||||
import net.minecraft.world.level.Level;
|
||||
|
||||
/**
|
||||
* ItemToken - Access pass for kidnapper camps.
|
||||
*
|
||||
* Slave Trader & Maid System
|
||||
*
|
||||
* Behavior:
|
||||
* - Reusable (no durability, permanent)
|
||||
* - Drop: 5% chance from killed kidnappers
|
||||
* - Effect: Kidnappers won't target the holder
|
||||
* - Effect: Allows peaceful interaction with SlaveTrader
|
||||
*
|
||||
* When a player has a token in their inventory:
|
||||
* - EntityKidnapper.canTarget() returns false
|
||||
* - EntitySlaveTrader opens trade menu instead of attacking
|
||||
*/
|
||||
public class ItemToken extends Item {
|
||||
|
||||
public ItemToken() {
|
||||
super(new Item.Properties().stacksTo(1).rarity(Rarity.RARE));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void appendHoverText(
|
||||
ItemStack stack,
|
||||
@Nullable Level level,
|
||||
List<Component> tooltip,
|
||||
TooltipFlag flag
|
||||
) {
|
||||
tooltip.add(
|
||||
Component.literal("Camp Access Token").withStyle(
|
||||
ChatFormatting.GOLD,
|
||||
ChatFormatting.BOLD
|
||||
)
|
||||
);
|
||||
tooltip.add(Component.literal(""));
|
||||
tooltip.add(
|
||||
Component.literal("Kidnappers won't target you").withStyle(
|
||||
ChatFormatting.GREEN
|
||||
)
|
||||
);
|
||||
tooltip.add(
|
||||
Component.literal("Allows trading with Slave Traders").withStyle(
|
||||
ChatFormatting.GREEN
|
||||
)
|
||||
);
|
||||
tooltip.add(Component.literal(""));
|
||||
tooltip.add(
|
||||
Component.literal("Keep in your inventory for effect").withStyle(
|
||||
ChatFormatting.GRAY,
|
||||
ChatFormatting.ITALIC
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFoil(ItemStack stack) {
|
||||
return true; // Always glowing to indicate special item
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user