Skip to content

Commit

Permalink
Item tooltips + configurable temperatures
Browse files Browse the repository at this point in the history
  • Loading branch information
ACGaming committed Mar 27, 2021
1 parent e37161c commit 437b3bb
Show file tree
Hide file tree
Showing 8 changed files with 277 additions and 259 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
Hot Or Not
==========

Unreleased
----------
TFC-1.1.3 (2021-03-03 18:26:18 +0100)
-------------------------------------
* Altered recipe (ACGaming)
* Better versioning (ACGaming)
* Minor fixes (ACGaming)
* Reformatting + additional config options (ACGaming)
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
modGroup=com.buuz135
minecraftVersion=1.12
modVersion=1.1.3
modVersion=1.1.4
modBaseName=HotOrNotTFC
forgeVersion=1.12.2-14.23.5.2768
mcpVersion=snapshot_20180508
398 changes: 207 additions & 191 deletions src/main/java/com/buuz135/hotornot/HotOrNot.java

Large diffs are not rendered by default.

43 changes: 22 additions & 21 deletions src/main/java/com/buuz135/hotornot/item/MittsItem.java
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
package com.buuz135.hotornot.item;

import com.buuz135.hotornot.HotOrNot;
import java.util.List;
import javax.annotation.Nullable;

import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.TextComponentTranslation;
import net.minecraft.world.World;

import javax.annotation.Nullable;
import java.util.List;
import com.buuz135.hotornot.HotOrNot;

public class MittsItem extends Item
{
public MittsItem()
{
setRegistryName(HotOrNot.MOD_ID, "mitts");
setMaxStackSize(1);
setMaxDamage(HotOrNot.HotConfig.MITTS_DURABILITY);
setUnlocalizedName(HotOrNot.MOD_ID + ".mitts");
}
public MittsItem()
{
setRegistryName(HotOrNot.MOD_ID, "mitts");
setMaxStackSize(1);
setMaxDamage(HotOrNot.HotConfig.MITTS_DURABILITY);
setUnlocalizedName(HotOrNot.MOD_ID + ".mitts");
}

@Override
public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged)
{
return false;
}
@Override
public void addInformation(ItemStack stack, @Nullable World worldIn, List<String> tooltip, ITooltipFlag flagIn)
{
super.addInformation(stack, worldIn, tooltip, flagIn);
tooltip.add(new TextComponentTranslation("item.hotornot.mitts.tooltip").getUnformattedComponentText());
}

@Override
public void addInformation(ItemStack stack, @Nullable World worldIn, List<String> tooltip, ITooltipFlag flagIn)
{
super.addInformation(stack, worldIn, tooltip, flagIn);
tooltip.add(new TextComponentTranslation("item.hotornot.mitts.tooltip").getUnformattedComponentText());
}
@Override
public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged)
{
return false;
}
}
40 changes: 20 additions & 20 deletions src/main/java/com/buuz135/hotornot/proxy/ClientProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@

public class ClientProxy extends CommonProxy
{
@Override
public void preInit(FMLPreInitializationEvent event)
{
super.preInit(event);
}
@Override
public void preInit(FMLPreInitializationEvent event)
{
super.preInit(event);
}

@Override
public void init(FMLInitializationEvent event)
{
super.init(event);
}
@Override
public void init(FMLInitializationEvent event)
{
super.init(event);
}

@Override
public void postInit(FMLPostInitializationEvent event)
{
super.postInit(event);
}
@Override
public void postInit(FMLPostInitializationEvent event)
{
super.postInit(event);
}

@Override
public void modelRegistryEvent(ModelRegistryEvent event)
{
ModelLoader.setCustomModelResourceLocation(MITTS, 0, new ModelResourceLocation(MITTS.getRegistryName(), "inventory"));
}
@Override
public void modelRegistryEvent(ModelRegistryEvent event)
{
ModelLoader.setCustomModelResourceLocation(MITTS, 0, new ModelResourceLocation(MITTS.getRegistryName(), "inventory"));
}
}
40 changes: 20 additions & 20 deletions src/main/java/com/buuz135/hotornot/proxy/CommonProxy.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.buuz135.hotornot.proxy;

import com.buuz135.hotornot.item.MittsItem;
import net.minecraft.item.Item;
import net.minecraftforge.client.event.ModelRegistryEvent;
import net.minecraftforge.event.RegistryEvent;
Expand All @@ -10,34 +9,35 @@
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

import com.buuz135.hotornot.item.MittsItem;

public class CommonProxy
{
public static MittsItem MITTS = new MittsItem();

public void preInit(FMLPreInitializationEvent event)
{
public static MittsItem MITTS = new MittsItem();

}
public void preInit(FMLPreInitializationEvent event)
{

public void init(FMLInitializationEvent event)
{
}

}
public void init(FMLInitializationEvent event)
{

public void postInit(FMLPostInitializationEvent event)
{
}

}
public void postInit(FMLPostInitializationEvent event)
{

}

public void registerItems(RegistryEvent.Register<Item> event)
{
event.getRegistry().register(MITTS);
}
public void registerItems(RegistryEvent.Register<Item> event)
{
event.getRegistry().register(MITTS);
}

@SideOnly(Side.CLIENT)
public void modelRegistryEvent(ModelRegistryEvent event)
{
@SideOnly(Side.CLIENT)
public void modelRegistryEvent(ModelRegistryEvent event)
{

}
}
}
6 changes: 3 additions & 3 deletions src/main/resources/assets/hotornot/lang/en_us.lang
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
tooltip.hotornot.toohot=Too hot to handle!
tooltip.hotornot.toocold=Too cold to handle!
tooltip.hotornot.toolight=Too light to handle!
tooltip.hotornot.toohot=Too hot to handle! Wear mitts.
tooltip.hotornot.toocold=Too cold to handle! Wear mitts.
tooltip.hotornot.toolight=Too light to handle! Wear mitts.

item.hotornot.mitts.name=Mitts
item.hotornot.mitts.tooltip=Wear in the offhand to avoid bad effects
2 changes: 1 addition & 1 deletion src/main/resources/assets/hotornot/recipes/mitts.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"key": {
"W": {
"type": "forge:ore_dict",
"ore": "wool"
"ore": "clothHighQuality"
},
"L": {
"type": "forge:ore_dict",
Expand Down

0 comments on commit 437b3bb

Please sign in to comment.