mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-21 12:42:57 +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
@@ -8,39 +8,37 @@ import net.minecraft.potion.*;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class StrangeFood extends SpecialFood
|
||||
{
|
||||
public StrangeFood()
|
||||
{
|
||||
super(new int[] { 2, 2, 4 }, new float[] { 1f, 1f, 0.6f }, new String[] { "edibleslime", "edibleblood", "bacon" }, new String[] { "food/edibleslime", "food/edibleblood", "food/bacon" });
|
||||
public class StrangeFood extends SpecialFood {
|
||||
public StrangeFood() {
|
||||
super(
|
||||
new int[] {2, 2, 4},
|
||||
new float[] {1f, 1f, 0.6f},
|
||||
new String[] {"edibleslime", "edibleblood", "bacon"},
|
||||
new String[] {"food/edibleslime", "food/edibleblood", "food/bacon"});
|
||||
this.setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onFoodEaten (ItemStack stack, World world, EntityPlayer player)
|
||||
{
|
||||
if (stack.getItemDamage() == 1)
|
||||
player.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, 20 * 15, 0));
|
||||
protected void onFoodEaten(ItemStack stack, World world, EntityPlayer player) {
|
||||
if (stack.getItemDamage() == 1) player.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, 20 * 15, 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation (ItemStack stack, EntityPlayer player, List list, boolean par4)
|
||||
{
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
|
||||
int type = stack.getItemDamage();
|
||||
switch (type)
|
||||
{
|
||||
case 0:
|
||||
list.add("\u00a7b\u00a7o" + StatCollector.translateToLocal("strangefood1.tooltip"));
|
||||
list.add("\u00a7b\u00a7o" + StatCollector.translateToLocal("strangefood2.tooltip"));
|
||||
break;
|
||||
case 1:
|
||||
list.add("\u00a74\u00a7o" + StatCollector.translateToLocal("strangefood3.tooltip"));
|
||||
list.add("\u00a74\u00a7o" + StatCollector.translateToLocal("strangefood4.tooltip"));
|
||||
break;
|
||||
case 2:
|
||||
list.add("\u00a7c" + StatCollector.translateToLocal("strangefood7.tooltip"));
|
||||
break;
|
||||
switch (type) {
|
||||
case 0:
|
||||
list.add("\u00a7b\u00a7o" + StatCollector.translateToLocal("strangefood1.tooltip"));
|
||||
list.add("\u00a7b\u00a7o" + StatCollector.translateToLocal("strangefood2.tooltip"));
|
||||
break;
|
||||
case 1:
|
||||
list.add("\u00a74\u00a7o" + StatCollector.translateToLocal("strangefood3.tooltip"));
|
||||
list.add("\u00a74\u00a7o" + StatCollector.translateToLocal("strangefood4.tooltip"));
|
||||
break;
|
||||
case 2:
|
||||
list.add("\u00a7c" + StatCollector.translateToLocal("strangefood7.tooltip"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user