Skip to content

Commit

Permalink
bump mappings, anonymous class to lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
LemmaEOF committed Jul 15, 2018
1 parent 118946e commit 6ae4bea
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
4 changes: 2 additions & 2 deletions project.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ ext {

language = 'java'

forge = '1.12.2-14.23.3.2655'
mappings = 'snapshot_20170908'
forge = '1.12.2-14.23.4.2736'
mappings = 'snapshot_20180715'

enforceLicenseHeaders = false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class ItemBraceletKeyring extends Item {

public ItemBraceletKeyring() {
this.name = "bracelet_keyring";
setUnlocalizedName(name);
setTranslationKey(name);
setRegistryName(name);
this.maxStackSize = 1;
this.tag = new NBTTagCompound();
Expand All @@ -61,7 +61,7 @@ public void addCapability(AttachCapabilitiesEvent e) {
(it) -> (it.getItem() == ItemFriendshipBracelet.FRIENDSHIP_BRACELET),
(it) -> (it.getItem() == ItemFriendshipBracelet.FRIENDSHIP_BRACELET),
(it) -> (it.getItem() == ItemFriendshipBracelet.FRIENDSHIP_BRACELET))
.withName(ItemFriendshipBracelet.BRACELET_KEYRING.getUnlocalizedName()+".name");
.withName(ItemFriendshipBracelet.BRACELET_KEYRING.getTranslationKey()+".name");

inv.listen(() -> {
if (!stack.hasTagCompound()) stack.setTagCompound(new NBTTagCompound());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class ItemFriendshipBracelet extends Item implements IBauble {

public ItemFriendshipBracelet() {
this.name = "friendship_bracelet";
setUnlocalizedName(name);
setTranslationKey(name);
setRegistryName(name);
this.maxStackSize = 1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,10 @@ public void registerItemRenderer(Item item, int meta, String id) {

@Override
public void postInit() {
Minecraft.getMinecraft().getItemColors().registerItemColorHandler(new IItemColor() {
@Override
public int getColorFromItemstack(ItemStack stack, int tintIndex) {
if (stack.getItem() != ItemFriendshipBracelet.FRIENDSHIP_BRACELET || stack.getTagCompound() == null) return -1;
String index = "StringColor"+tintIndex;
return getDyeColor(stack, index);
}
Minecraft.getMinecraft().getItemColors().registerItemColorHandler((stack, tintIndex) -> {
if (stack.getItem() != ItemFriendshipBracelet.FRIENDSHIP_BRACELET || stack.getTagCompound() == null) return -1;
String index = "StringColor"+tintIndex;
return getDyeColor(stack, index);
}, ItemFriendshipBracelet.FRIENDSHIP_BRACELET);
}

Expand Down

0 comments on commit 6ae4bea

Please sign in to comment.