Clean up some todos

This commit is contained in:
Vincent Lee committed 2017-07-20 23:42:45 -05:00
1 parent a990e6a8d5
commit 9d78aca015
5 files changed
+8 -29

No files matched your search

@@ -647,30 +647,6 @@ public final class BotaniaAPI {
looniumBlacklist.add(item);
}
/**
* Gets the last recipe to have been added to the recipe list.
*/
public static IRecipe getLatestAddedRecipe() {
// todo 1.12 change this hack to just look all the recipes up by id
return null;
/*List<IRecipe> list = CraftingManager.getInstance().getRecipeList();
return list.get(list.size() - 1);*/
}
/**
* Gets the last x recipes added to the recipe list.
*/
public static List<IRecipe> getLatestAddedRecipes(int x) {
// todo 1.12 change this hack to just look all the recipes up by id
return Collections.emptyList();
/*List<IRecipe> list = CraftingManager.getInstance().getRecipeList();
List<IRecipe> newList = new ArrayList<>();
for(int i = x - 1; i >= 0; i--)
newList.add(list.get(list.size() - 1 - i));
return newList;*/
}
/**
* Registers a Wiki provider for a mod so it uses that instead of the fallback
* FTB wiki.
@@ -1,4 +1,4 @@
@API(owner = "Botania", apiVersion = "86", provides = "BotaniaAPI")
@API(owner = "Botania", apiVersion = "87", provides = "BotaniaAPI")
package vazkii.botania.api;
import net.minecraftforge.fml.common.API;
@@ -150,10 +150,10 @@ public abstract class ItemBauble extends ItemMod implements IBauble, ICosmeticAt
@Override
public void onEquipped(ItemStack stack, EntityLivingBase player) {
if(player != null) {
if(!player.world.isRemote)
if(!player.world.isRemote) {
player.world.playSound(null, player.posX, player.posY, player.posZ, ModSounds.equipBauble, SoundCategory.PLAYERS, 0.1F, 1.3F);
// todo 1.12 advancement trigger for baubles (ideally baubles adds one, not us..)
PlayerHelper.grantCriterion((EntityPlayerMP) player, new ResourceLocation(LibMisc.MOD_ID, "main/bauble_wear"), "code_triggered");
}
onEquippedOrLoadedIntoWorld(stack, player);
setLastPlayerHashcode(stack, player.hashCode());
@@ -16,6 +16,7 @@ import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.text.TextComponentString;
import net.minecraft.util.text.TextComponentTranslation;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
@@ -45,7 +46,8 @@ public class PacketDodge implements IMessage {
if(ringStack.isEmpty() || !(ringStack.getItem() instanceof ItemDodgeRing)) {
ringStack = baublesInv.getStackInSlot(2);
if(ringStack.isEmpty() || !(ringStack.getItem() instanceof ItemDodgeRing))
ctx.getServerHandler().disconnect(new TextComponentString("Invalid Dodge Packet")); // todo 1.12 textcomponenttranslation
ctx.getServerHandler().disconnect(new TextComponentTranslation("botaniamisc.invalidDodge"));
return;
}
player.addExhaustion(0.3F);