mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 19:59:55 +00:00
Fix JABBA-related issues with crafting station slots (#54)
* Fix shift-merging tools voiding items fixes <https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/11392> * Change 0-sized ItemStacks into null stacks in crafting station attached slots Fixes <https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/10425> * Update buildscript * spotlessApply
This commit is contained in:
1 parent
18bfeaff32
commit
39be06c23b
571 files changed
+25959
-28223
No files matched your search
@@ -9,118 +9,100 @@ import net.minecraft.world.World;
|
||||
import tconstruct.library.tools.*;
|
||||
import tconstruct.tools.TinkerTools;
|
||||
|
||||
public class Cleaver extends Weapon
|
||||
{
|
||||
public Cleaver()
|
||||
{
|
||||
public class Cleaver extends Weapon {
|
||||
public Cleaver() {
|
||||
super(5);
|
||||
this.setUnlocalizedName("InfiTool.Cleaver");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getHeadItem ()
|
||||
{
|
||||
public Item getHeadItem() {
|
||||
return TinkerTools.largeSwordBlade;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getHandleItem ()
|
||||
{
|
||||
public Item getHandleItem() {
|
||||
return TinkerTools.toughRod;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getAccessoryItem ()
|
||||
{
|
||||
public Item getAccessoryItem() {
|
||||
return TinkerTools.largePlate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getExtraItem ()
|
||||
{
|
||||
public Item getExtraItem() {
|
||||
return TinkerTools.toughRod;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int durabilityTypeAccessory ()
|
||||
{
|
||||
public int durabilityTypeAccessory() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int durabilityTypeExtra ()
|
||||
{
|
||||
public int durabilityTypeExtra() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getRepairCost ()
|
||||
{
|
||||
public float getRepairCost() {
|
||||
return 4.0f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getDurabilityModifier ()
|
||||
{
|
||||
public float getDurabilityModifier() {
|
||||
return 2.5f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getDamageModifier ()
|
||||
{
|
||||
public float getDamageModifier() {
|
||||
return 1.4f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPartAmount ()
|
||||
{
|
||||
public int getPartAmount() {
|
||||
return 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIconSuffix (int partType)
|
||||
{
|
||||
switch (partType)
|
||||
{
|
||||
case 0:
|
||||
return "_cleaver_head";
|
||||
case 1:
|
||||
return "_cleaver_head_broken";
|
||||
case 2:
|
||||
return "_cleaver_handle";
|
||||
case 3:
|
||||
return "_cleaver_shield";
|
||||
case 4:
|
||||
return "_cleaver_guard";
|
||||
default:
|
||||
return "";
|
||||
public String getIconSuffix(int partType) {
|
||||
switch (partType) {
|
||||
case 0:
|
||||
return "_cleaver_head";
|
||||
case 1:
|
||||
return "_cleaver_head_broken";
|
||||
case 2:
|
||||
return "_cleaver_handle";
|
||||
case 3:
|
||||
return "_cleaver_shield";
|
||||
case 4:
|
||||
return "_cleaver_guard";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEffectSuffix ()
|
||||
{
|
||||
public String getEffectSuffix() {
|
||||
return "_cleaver_effect";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDefaultFolder ()
|
||||
{
|
||||
public String getDefaultFolder() {
|
||||
return "cleaver";
|
||||
}
|
||||
|
||||
/* Cleaver specific */
|
||||
@Override
|
||||
public boolean onLeftClickEntity (ItemStack stack, EntityPlayer player, Entity entity)
|
||||
{
|
||||
if (AbilityHelper.onLeftClickEntity(stack, player, entity, this))
|
||||
{
|
||||
public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) {
|
||||
if (AbilityHelper.onLeftClickEntity(stack, player, entity, this)) {
|
||||
entity.hurtResistantTime += 7;
|
||||
|
||||
/*
|
||||
* if (entity instanceof EntityLiving) { EntityLiving living =
|
||||
* (EntityLiving) entity; if (living.getHealth() <= 0) {
|
||||
*
|
||||
*
|
||||
* } }
|
||||
*/
|
||||
// if (entity.getHealth() <= 0)
|
||||
@@ -129,15 +111,12 @@ public class Cleaver extends Weapon
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate (ItemStack stack, World world, Entity entity, int par4, boolean par5)
|
||||
{
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5) {
|
||||
super.onUpdate(stack, world, entity, par4, par5);
|
||||
if (entity instanceof EntityPlayer)
|
||||
{
|
||||
if (entity instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) entity;
|
||||
ItemStack equipped = player.getCurrentEquippedItem();
|
||||
if (equipped == stack)
|
||||
{
|
||||
if (equipped == stack) {
|
||||
player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 2, 2, true));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user