mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-26 15:03:03 +00:00
Tectonic Girdle recipe/docs.
This commit is contained in:
1 parent
fc7cf4f38c
commit
282dfc1920
5 files changed
+69
-18
No files matched your search
@@ -511,6 +511,15 @@ public final class ModCrafingRecipes {
|
||||
'L', new ItemStack(Items.leather));
|
||||
recipeTravelBelt = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// Tectonic Girdle Recipe
|
||||
addOreDictRecipe(new ItemStack(ModItems.knockbackBelt),
|
||||
"AL ", "L L", "SLE",
|
||||
'E', LibOreDict.RUNE[2],
|
||||
'A', LibOreDict.RUNE[1],
|
||||
'S', LibOreDict.MANA_STEEL,
|
||||
'L', new ItemStack(Items.leather));
|
||||
recipeKnocbackBelt = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// Snowflake Pendant Recipe
|
||||
addOreDictRecipe(new ItemStack(ModItems.icePendant),
|
||||
"WS ", "S S", "MSR",
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* File Created @ [Apr 26, 2014, 10:28:39 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
|
||||
public abstract class ItemBaubleModifier extends ItemBauble {
|
||||
|
||||
Multimap<String, AttributeModifier> attributes = HashMultimap.create();
|
||||
|
||||
public ItemBaubleModifier(String name) {
|
||||
super(name);
|
||||
fillModifiers(attributes);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEquippedOrLoadedIntoWorld(ItemStack stack, EntityLivingBase player) {
|
||||
player.getAttributeMap().applyAttributeModifiers(attributes);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUnequipped(ItemStack stack, EntityLivingBase player) {
|
||||
player.getAttributeMap().removeAttributeModifiers(attributes);
|
||||
}
|
||||
|
||||
abstract void fillModifiers(Multimap<String, AttributeModifier> attributes);
|
||||
|
||||
}
|
||||
@@ -23,31 +23,20 @@ import baubles.api.BaubleType;
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
|
||||
public class ItemKnockbackBelt extends ItemBauble {
|
||||
public class ItemKnockbackBelt extends ItemBaubleModifier {
|
||||
|
||||
static Multimap attributes = HashMultimap.create();
|
||||
static {
|
||||
attributes.put(SharedMonsterAttributes.knockbackResistance.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(2745708 /** Random number **/, 43743), "Bauble modifier", 1.0, 0));
|
||||
}
|
||||
|
||||
public ItemKnockbackBelt() {
|
||||
super(LibItemNames.KNOCKBACK_BELT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEquippedOrLoadedIntoWorld(ItemStack stack, EntityLivingBase player) {
|
||||
player.getAttributeMap().applyAttributeModifiers(attributes);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onUnequipped(ItemStack stack, EntityLivingBase player) {
|
||||
player.getAttributeMap().removeAttributeModifiers(attributes);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack itemstack) {
|
||||
return BaubleType.BELT;
|
||||
}
|
||||
|
||||
@Override
|
||||
void fillModifiers(Multimap<String, AttributeModifier> attributes) {
|
||||
attributes.put(SharedMonsterAttributes.knockbackResistance.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(2745708 /** Random number **/, 43743), "Bauble modifier", 1, 0));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -333,6 +333,9 @@ public final class LexiconData {
|
||||
travelBelt = new BLexiconEntry(LibLexicon.BAUBLE_TRAVEL_BELT, categoryBaubles);
|
||||
travelBelt.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeTravelBelt));
|
||||
|
||||
knockbacklBelt = new BLexiconEntry(LibLexicon.BAUBLE_KNOCKBACK_BELT, categoryBaubles);
|
||||
knockbacklBelt.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeKnocbackBelt));
|
||||
|
||||
icePendant = new BLexiconEntry(LibLexicon.BAUBLE_ICE_PENDANT, categoryBaubles);
|
||||
icePendant.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeIcePendant));
|
||||
|
||||
|
||||
Reference in new issue
Block a user