mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
I18n implementation for cloth
This commit is contained in:
parent
78ea52cbab
commit
4b28ee2227
@ -2,6 +2,7 @@ package com.hbm.items.special;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
@ -15,31 +16,28 @@ public class ItemRag extends Item {
|
||||
|
||||
@Override
|
||||
public boolean onEntityItemUpdate(EntityItem entityItem) {
|
||||
|
||||
|
||||
if(entityItem != null && !entityItem.worldObj.isRemote) {
|
||||
|
||||
|
||||
if(entityItem.worldObj.getBlock((int)Math.floor(entityItem.posX), (int)Math.floor(entityItem.posY), (int)Math.floor(entityItem.posZ)).getMaterial() == Material.water) {
|
||||
ItemStack stack = entityItem.getEntityItem();
|
||||
entityItem.setEntityItemStack(new ItemStack(ModItems.rag_damp, stack.stackSize));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
|
||||
stack.stackSize--;
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.rag_piss));
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
list.add("Drop into water to make damp cloth.");
|
||||
list.add("Right-click to urinate on the cloth.");
|
||||
list.add(I18nUtil.resolveKey("item.rag.desc.1"));
|
||||
list.add(I18nUtil.resolveKey("item.rag.desc.2"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -4140,6 +4140,8 @@ item.radaway_strong.name=Strong RadAway
|
||||
item.radx.name=Rad-X
|
||||
item.radx.desc=Increases radiation resistance by 0.2 (37%%) for 3 minutes
|
||||
item.rag.name=Cloth
|
||||
item.rag.desc.1=Drop into water to make damp cloth.
|
||||
item.rag.desc.2=Right-click to urinate on the cloth.
|
||||
item.rag_damp.name=Damp Cloth
|
||||
item.rag_piss.name=Piss-Soaked Rag
|
||||
item.rangefinder.name=Rangefinder
|
||||
|
||||
@ -4402,6 +4402,8 @@ item.radaway_strong.name=Усиленный антирадин
|
||||
item.radx.name=Рад-X
|
||||
item.radx.desc=Increases radiation resistance by 0.2 (37%) for 3 minutes
|
||||
item.rag.name=Тряпка
|
||||
item.rag.desc.1=Бросьте в воду, чтобы намочить тряпку.
|
||||
item.rag.desc.2=ПКМ, чтобы помочиться на тряпку.
|
||||
item.rag_damp.name=Влажная тряпка
|
||||
item.rag_piss.name=Пропитанная мочой тряпка
|
||||
item.rangefinder.name=Дальнометр
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user