Merge upstream and probably introduce a zillion errors

This commit is contained in:
Vincent Lee committed 2015-12-14 16:38:07 -06:00
commit 5211ed9149
164 files changed
+5198 -2141

No files matched your search

+3 -3
View File
@@ -1,9 +1,9 @@
#
#Wed Nov 25 22:02:37 GMT 2015
version=r1.7
#Sun Dec 13 01:59:42 GMT 2015
version=r1.8
dir_output=../Build Output/Botania/
mc_version=1.8
forge_version=11.14.3.1468
dir_repo=./
build_number=237
build_number=244
mod_name=Botania
+1
View File
@@ -47,3 +47,4 @@ luckylucyf=14
epiczeus=7
fredfrog1234=15
pjfranke=5
_bloop=0
@@ -86,8 +86,11 @@ public final class BotaniaAPI {
public static Map<String, Integer> oreWeights = new HashMap<String, Integer>();
public static Map<String, Integer> oreWeightsNether = new HashMap<String, Integer>();
public static Map<Item, Block> seeds = new HashMap();
public static Set<Item> looniumBlacklist = new LinkedHashSet();
public static Set<Item> looniumBlacklist = new LinkedHashSet<Item>();
public static Map<Block, PropertyEnum> paintableBlocks = new LinkedHashMap<Block, PropertyEnum>();
public static Set<String> magnetBlacklist = new LinkedHashSet<String>();
public static ArmorMaterial manasteelArmorMaterial = EnumHelper.addArmorMaterial("MANASTEEL", "manasteel", 16, new int[] { 2, 6, 5, 2 }, 18);
public static ToolMaterial manasteelToolMaterial = EnumHelper.addToolMaterial("MANASTEEL", 3, 300, 6.2F, 2F, 20);
@@ -293,6 +296,61 @@ public final class BotaniaAPI {
//todo 1.8 improve this
}
/**
* Blacklists an item from being pulled by the Ring of Magnetization.
* Short.MAX_VALUE can be used as the stack's damage for a wildcard.
*/
public static void blacklistItemFromMagnet(ItemStack stack) {
String key = getMagnetKey(stack);
magnetBlacklist.add(key);
}
/**
* Blacklists a block from having items on top of it being pulled by the Ring of Magnetization.
* Short.MAX_VALUE can be used as meta for a wildcard.
*/
public static void blacklistBlockFromMagnet(Block block, int meta) {
String key = getMagnetKey(block, meta);
magnetBlacklist.add(key);
}
public static boolean isItemBlacklistedFromMagnet(ItemStack stack) {
return isItemBlacklistedFromMagnet(stack, 0);
}
public static boolean isItemBlacklistedFromMagnet(ItemStack stack, int recursion) {
if(recursion > 5)
return false;
if(stack.getItemDamage() != Short.MAX_VALUE) {
ItemStack copy = new ItemStack(stack.getItem(), 0, Short.MAX_VALUE);
boolean general = isItemBlacklistedFromMagnet(copy, recursion + 1);
if(general)
return true;
}
String key = getMagnetKey(stack);
return magnetBlacklist.contains(key);
}
public static boolean isBlockBlacklistedFromMagnet(Block block, int meta) {
return isBlockBlacklistedFromMagnet(block, meta, 0);
}
public static boolean isBlockBlacklistedFromMagnet(Block block, int meta, int recursion) {
if(recursion >= 5)
return false;
if(meta != Short.MAX_VALUE) {
boolean general = isBlockBlacklistedFromMagnet(block, Short.MAX_VALUE, recursion + 1);
if(general)
return true;
}
String key = getMagnetKey(block, meta);
return magnetBlacklist.contains(key);
}
/**
* Registers a Petal Recipe.
* @param output The ItemStack to craft.
@@ -569,4 +627,16 @@ public final class BotaniaAPI {
public static Set<String> getAllSubTiles() {
return subTiles.keySet();
}
private static String getMagnetKey(ItemStack stack) {
if(stack == null)
return "";
return "i_" + stack.getItem().getUnlocalizedName() + "@" + stack.getItemDamage();
}
private static String getMagnetKey(Block block, int meta) {
return "bm_" + block.getUnlocalizedName() + "@" + meta;
}
}
@@ -15,6 +15,7 @@ import java.util.List;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.inventory.IInventory;
@@ -202,12 +203,16 @@ public class DummyMethodHandler implements IInternalMethodHandler {
return false;
}
@Override
public void breakOnAllCursors(EntityPlayer player, Item item, ItemStack stack, BlockPos pos, EnumFacing side) {
// NO-OP
}
@Override
public boolean hasSolegnoliaAround(Entity e) {
return false;
}
@Override
public long getWorldElapsedTicks() {
return 0;
@@ -15,6 +15,7 @@ import java.util.List;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
@@ -97,6 +98,8 @@ public interface IInternalMethodHandler {
public void breakOnAllCursors(EntityPlayer player, Item item, ItemStack stack, BlockPos pos, EnumFacing side);
public boolean hasSolegnoliaAround(Entity e);
@SideOnly(Side.CLIENT)
public void drawSimpleManaHUD(int color, int mana, int maxMana, String name, ScaledResolution res);
@@ -0,0 +1,29 @@
/**
* 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 the
* Botania License: http://botaniamod.net/license.php
*
* File Created @ [04/12/2015, 18:29:56 (GMT)]
*/
package vazkii.botania.api.lexicon;
import java.util.Queue;
import net.minecraftforge.fml.common.eventhandler.Event;
/**
* Fired when the Lexica Botania's tutorial is started. You can add your
* own entries to the tutorial here. Please use this responsibly.
*/
public class BotaniaTutorialStartEvent extends Event {
public final Queue<LexiconEntry> tutorial;
public BotaniaTutorialStartEvent(Queue<LexiconEntry> tutorial) {
this.tutorial = tutorial;
}
}
@@ -30,6 +30,8 @@ public class LexiconEntry implements Comparable<LexiconEntry> {
public List<LexiconPage> pages = new ArrayList<LexiconPage>();
private boolean priority = false;
private ItemStack icon = null;
private List<ItemStack> extraDisplayedRecipes = new ArrayList();
/**
* @param unlocalizedName The unlocalized name of this entry. This will be localized by the client display.
@@ -146,9 +148,15 @@ public class LexiconEntry implements Comparable<LexiconEntry> {
}
}
}
list.addAll(extraDisplayedRecipes);
return list;
}
public void addExtraDisplayedRecipe(ItemStack stack) {
extraDisplayedRecipes.add(stack);
}
@Override
public int compareTo(LexiconEntry o) {
@@ -49,7 +49,7 @@ public final class LexiconRecipeMappings {
public static EntryData getDataForStack(ItemStack stack) {
return mappings.get(stackToString(stack));
}
public static String stackToString(ItemStack stack) {
if(stack.hasTagCompound() && stack.getItem() instanceof IRecipeKeyProvider)
return ((IRecipeKeyProvider) stack.getItem()).getKey(stack);
@@ -29,5 +29,5 @@ public class AnyComponent extends MultiblockComponent {
Block block = world.getBlockState(pos).getBlock();
return !block.isAir(world, pos) && block.getCollisionBoundingBox(world, pos, world.getBlockState(pos)) != null;
}
}
@@ -18,13 +18,13 @@ import net.minecraft.item.ItemStack;
public interface ICompositableLens extends ILens {
/**
* Returns the properties of the itemstack, used to check if two lenses can combine.
*/
* Returns the properties of the itemstack, used to check if two lenses can combine.
*/
public int getProps(ItemStack stack);
/**
* Checks if the lens is combinable.
*/
* Checks if the lens is combinable.
*/
public boolean isCombinable(ItemStack stack);
}
@@ -11,7 +11,7 @@
package vazkii.botania.api.mana;
/**
* Any TileEntity that implements this is defined as having a direction,
* Any TileEntity that implements this is defined as having a direction,
* and has two rotations (X and Y).
* An example of this is the Mana Spreader.
*/
@@ -19,9 +19,9 @@ import net.minecraft.item.ItemStack;
public interface ILensControl extends ILens {
public boolean isControlLens(ItemStack stack);
public boolean allowBurstShooting(ItemStack stack, IManaSpreader spreader, boolean redstone);
/**
* Used for the tick of a non-redstone spreader.
*/
@@ -30,6 +30,6 @@ public interface ILensControl extends ILens {
/**
* Used for when a redstone spreader gets a pulse.
*/
public void onControlledSpreaderPulse(ItemStack stack, IManaSpreader spreader, boolean redstone);
public void onControlledSpreaderPulse(ItemStack stack, IManaSpreader spreader, boolean redstone);
}
@@ -0,0 +1,20 @@
/**
* 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 the
* Botania License: http://botaniamod.net/license.php
*
* File Created @ [08/12/2015, 18:10:29 (GMT)]
*/
package vazkii.botania.api.mana;
/**
* An item that implements this is an item that can give mana to other items.
* This is used in botania for the terra shatterer to not be constantly
* receiving mana from these items..
*/
public interface IManaGivingItem {
}
@@ -18,9 +18,9 @@ package vazkii.botania.api.mana;
public interface IRedirectable extends IDirectioned {
public void setRotationX(float rot);
public void setRotationY(float rot);
/**
* This should be called after rotation setting is done to allow
* for the block to re-calculate.
@@ -1,4 +1,4 @@
@API(owner = "Botania", apiVersion = "69", provides = "BotaniaAPI")
@API(owner = "Botania", apiVersion = "73", provides = "BotaniaAPI")
package vazkii.botania.api;
import net.minecraftforge.fml.common.API;
@@ -186,8 +186,7 @@ public class SubTileGenerating extends SubTileEntity {
@Override
public List<ItemStack> getDrops(List<ItemStack> list) {
List<ItemStack> drops = super.getDrops(list);
if(isPassiveFlower())
populateDropStackNBTs(drops);
populateDropStackNBTs(drops);
return drops;
}
@@ -10,10 +10,22 @@
*/
package vazkii.botania.api.subtile.signature;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.item.ItemStack;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.subtile.SubTileEntity;
import vazkii.botania.api.subtile.SubTileFunctional;
import vazkii.botania.api.subtile.SubTileGenerating;
/**
* A basic (and fallback) implementation of SubTileSignature.
@@ -50,6 +62,29 @@ public class BasicSignature extends SubTileSignature {
return name;
}
public String getType() {
Class<? extends SubTileEntity> clazz = BotaniaAPI.getSubTileMapping(name);
if(clazz == null)
return "uwotm8";
if(clazz.getAnnotation(PassiveFlower.class) != null)
return "botania.flowerType.passiveGenerating";
if(SubTileGenerating.class.isAssignableFrom(clazz))
return "botania.flowerType.generating";
if(SubTileFunctional.class.isAssignableFrom(clazz))
return "botania.flowerType.functional";
return "botania.flowerType.misc";
}
@Override
public void addTooltip(ItemStack stack, EntityPlayer player, List<String> tooltip) {
tooltip.add(EnumChatFormatting.BLUE + StatCollector.translateToLocal(getType()));
}
private String unlocalizedName(String end) {
return "tile.botania:" + SubTileSignature.SPECIAL_FLOWER_PREFIX + name + end;
}
@@ -0,0 +1,28 @@
/**
* 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 the
* Botania License: http://botaniamod.net/license.php
*
* File Created @ [04/12/2015, 16:47:01 (GMT)]
*/
package vazkii.botania.api.subtile.signature;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
* This annotation used for detecting whether a SubTileEntity
* is a passive flower without having to instantiate it. This
* is used for the flowers' tooltips.
*/
@Retention(value = RUNTIME)
@Target(value = TYPE)
public @interface PassiveFlower {
}
@@ -30,14 +30,14 @@ public class SimpleWikiProvider implements IWikiProvider {
public SimpleWikiProvider(String name, String urlBase, boolean lowercase) {
this(name, urlBase, "%20", lowercase);
}
public SimpleWikiProvider(String name, String urlBase, String replacement) {
this.name = name;
this.urlBase = urlBase;
this.replacement = replacement;
this.lowercase = false;
lowercase = false;
}
public SimpleWikiProvider(String name, String urlBase, String replacement, boolean lowercase) {
this.name = name;
this.urlBase = urlBase;
@@ -73,7 +73,7 @@ public class SimpleWikiProvider implements IWikiProvider {
String name = getBlockName(world, pos);
if(name == null)
return null;
if(lowercase) {
return String.format(urlBase, name.toLowerCase().replaceAll(" ", replacement));
} else {
@@ -45,7 +45,7 @@ public class ClientTickHandler {
total = ticksInGame + partialTicks;
delta = total - oldTotal;
}
@SubscribeEvent
public void renderTick(RenderTickEvent event) {
if(event.phase == Phase.START)
@@ -72,6 +72,7 @@ public class ClientTickHandler {
GuiScreen gui = Minecraft.getMinecraft().currentScreen;
if(gui == null || !gui.doesGuiPauseGame()) {
ticksInGame++;
partialTicks = 0;
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
if(player != null) {
@@ -106,7 +107,7 @@ public class ClientTickHandler {
ticksWithLexicaOpen--;
}
}
calcDelta();
}
}
@@ -58,6 +58,8 @@ public final class ContributorFancinessHandler {
} else if(name.equals("haighyorkie"))
renderGoldfish(event);
firstStart();
name = name.toLowerCase();
if(event.entityPlayer.isWearing(EnumPlayerModelParts.CAPE) && flowerMap != null && flowerMap.containsKey(name))
renderFlower(event, flowerMap.get(name));
@@ -40,15 +40,15 @@ public final class DebugHandler {
String version = LibMisc.VERSION;
if(version.contains("GRADLE"))
version = "N/A";
event.left.add(PREFIX + "pS: " + ParticleRenderDispatcher.sparkleFxCount + ", pFS: " + ParticleRenderDispatcher.fakeSparkleFxCount + ", pW: " + ParticleRenderDispatcher.wispFxCount + ", pDIW: " + ParticleRenderDispatcher.depthIgnoringWispFxCount + ", pLB: " + ParticleRenderDispatcher.lightningCount);
event.left.add(PREFIX + "netColl: " + ManaNetworkHandler.instance.getAllCollectorsInWorld(world).size() + ", netPool: " + ManaNetworkHandler.instance.getAllPoolsInWorld(world).size() + ", rv: " + version);
if(GuiScreen.isCtrlKeyDown() && GuiScreen.isShiftKeyDown()) {
event.left.add(PREFIX + "Config Context");
event.left.add(" shaders.enabled: " + ConfigHandler.useShaders);
event.left.add(" shaders.secondaryUnit: " + ConfigHandler.glSecondaryTextureUnit);
ContextCapabilities caps = GLContext.getCapabilities();
event.left.add(PREFIX + "OpenGL Context");
event.left.add(" GL_VERSION: " + GL11.glGetString(GL11.GL_VERSION));
@@ -61,7 +61,7 @@ public final class DebugHandler {
} else if(Minecraft.isRunningOnMac)
event.left.add(PREFIX + "SHIFT+CMD for context");
else event.left.add(PREFIX + "SHIFT+CTRL for context");
}
}
}
@@ -53,6 +53,8 @@ import vazkii.botania.client.core.helper.RenderHelper;
import vazkii.botania.client.lib.LibResources;
import vazkii.botania.common.Botania;
import vazkii.botania.common.block.ModBlocks;
import vazkii.botania.common.block.tile.TileAltar;
import vazkii.botania.common.block.tile.TileRuneAltar;
import vazkii.botania.common.block.tile.corporea.TileCorporeaCrystalCube;
import vazkii.botania.common.block.tile.corporea.TileCorporeaIndex;
import vazkii.botania.common.block.tile.mana.TilePool;
@@ -113,12 +115,16 @@ public final class HUDHandler {
((IWandHUD) block).renderHUD(mc, event.resolution, mc.theWorld, pos.getBlockPos());
profiler.endSection();
}
}
else if(pos != null && equippedStack.getItem() instanceof ILexicon)
} else if(pos != null && equippedStack.getItem() instanceof ILexicon)
drawLexiconHUD(mc.thePlayer.getCurrentEquippedItem(), block, pos, event.resolution);
else if(tile != null && tile instanceof TilePool)
if(tile != null && tile instanceof TilePool)
renderPoolRecipeHUD(event.resolution, (TilePool) tile, equippedStack);
}
if(tile != null && tile instanceof TileAltar)
((TileAltar) tile).renderHUD(mc, event.resolution);
else if(tile != null && tile instanceof TileRuneAltar)
((TileRuneAltar) tile).renderHUD(mc, event.resolution);
if(tile != null && tile instanceof TileCorporeaCrystalCube)
renderCrystalCubeHUD(event.resolution, (TileCorporeaCrystalCube) tile);
}
@@ -141,7 +147,7 @@ public final class HUDHandler {
ItemCraftingHalo.renderHUD(event.resolution, mc.thePlayer, equippedStack);
profiler.endSection();
}
if(equippedStack != null && equippedStack.getItem() instanceof ItemSextant) {
profiler.startSection("sextant");
ItemSextant.renderHUD(event.resolution, mc.thePlayer, equippedStack);
@@ -273,12 +279,7 @@ public final class HUDHandler {
int x = res.getScaledWidth() / 2 - 11;
int y = res.getScaledHeight() / 2 + 10;
boolean diluted = false;
int u = tile.getCurrentMana() >= recipe.getManaToConsume() ? 0 : 22;
if(u == 0 && tile.getBlockMetadata() == 2 && recipe.getOutput().getItem() != Item.getItemFromBlock(ModBlocks.pool)) {
u = 44;
diluted = true;
}
int v = mc.thePlayer.getCommandSenderName().equals("haighyorkie") && mc.thePlayer.isSneaking() ? 23 : 8;
GlStateManager.enableBlend();
@@ -294,14 +295,11 @@ public final class HUDHandler {
mc.getRenderItem().renderItemOverlayIntoGUI(mc.fontRendererObj, recipe.getOutput(), x + 26, y, "");
net.minecraft.client.renderer.RenderHelper.disableStandardItemLighting();
if(diluted) {
String s = StatCollector.translateToLocal("botaniamisc.pay2win");
mc.fontRendererObj.drawStringWithShadow(s, res.getScaledWidth() / 2 - mc.fontRendererObj.getStringWidth(s) / 2, y + 20, 0xFF8888);
}
GlStateManager.disableLighting();
GlStateManager.disableBlend();
break;
}
}
@@ -51,7 +51,7 @@ public final class MultiblockRenderHandler {
currentMultiblock = set;
anchor = null;
angle = 0;
Minecraft mc = Minecraft.getMinecraft();
if(mc.theWorld != null)
dimension = mc.theWorld.provider.getDimensionId();
@@ -22,8 +22,6 @@ import net.minecraft.nbt.NBTTagCompound;
import vazkii.botania.client.challenge.Challenge;
import vazkii.botania.client.challenge.ModChallenges;
import vazkii.botania.client.gui.lexicon.GuiLexicon;
import vazkii.botania.client.gui.lexicon.GuiLexiconEntry;
import vazkii.botania.common.lexicon.LexiconData;
import vazkii.botania.common.lib.LibMisc;
public final class PersistentVariableHelper {
@@ -109,10 +107,8 @@ public final class PersistentVariableHelper {
lastBotaniaVersion = cmp.hasKey(TAG_LAST_BOTANIA_VERSION) ? cmp.getString(TAG_LAST_BOTANIA_VERSION) : "(N/A)";
firstLoad = cmp.hasKey(TAG_FIRST_LOAD) ? cmp.getBoolean(TAG_FIRST_LOAD) : firstLoad;
if(firstLoad) {
GuiLexicon.currentOpenLexicon = new GuiLexiconEntry(LexiconData.welcome, new GuiLexiconEntry(LexiconData.tutorial, new GuiLexicon()));
if(firstLoad)
lastBotaniaVersion = LibMisc.VERSION;
}
}
public static void saveSafe() {
@@ -65,32 +65,28 @@ public final class SubTileRadiusRenderHandler {
if(descriptor == null)
return;
boolean light = GL11.glGetBoolean(GL11.GL_LIGHTING);
GlStateManager.pushMatrix();
GlStateManager.disableTexture2D();
GlStateManager.disableLighting();
GlStateManager.enableBlend();
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
// todo 1.8 Tessellator.renderingWorldRenderer = false;
if(descriptor.isCircle())
renderCircle(descriptor.getSubtileCoords(), descriptor.getCircleRadius());
else renderRectangle(descriptor.getAABB());
if(light)
GlStateManager.enableLighting();
GlStateManager.enableTexture2D();
GlStateManager.disableBlend();
GlStateManager.popMatrix();
}
private double getRenderPosX() { // todo 1.8
return ObfuscationReflectionHelper.getPrivateValue(RenderManager.class, Minecraft.getMinecraft().getRenderManager(), LibObfuscation.RENDERPOSX);
}
private double getRenderPosY() {
return ObfuscationReflectionHelper.getPrivateValue(RenderManager.class, Minecraft.getMinecraft().getRenderManager(), LibObfuscation.RENDERPOSY);
}
private double getRenderPosZ() {
return ObfuscationReflectionHelper.getPrivateValue(RenderManager.class, Minecraft.getMinecraft().getRenderManager(), LibObfuscation.RENDERPOSZ);
}
public void renderRectangle(AxisAlignedBB aabb) {
@@ -159,9 +159,11 @@ public final class TooltipAdditionDisplayHandler {
font.drawStringWithShadow("?", x + 10, y + 8, 0xFFFFFFFF);
GlStateManager.scale(0.5F, 0.5F, 1F);
boolean mac = Minecraft.isRunningOnMac;
mc.fontRendererObj.drawStringWithShadow(EnumChatFormatting.BOLD + (ConfigHandler.useShiftForQuickLookup ? "Shift" : (mac ? "Cmd" : "Ctrl")), (x + 10) * 2 - 16, (y + 8) * 2 + 20, 0xFFFFFFFF);
mc.fontRendererObj.drawStringWithShadow(EnumChatFormatting.BOLD + (ConfigHandler.useShiftForQuickLookup ? "Shift" : mac ? "Cmd" : "Ctrl"), (x + 10) * 2 - 16, (y + 8) * 2 + 20, 0xFFFFFFFF);
GlStateManager.scale(2F, 2F, 1F);
GlStateManager.enableDepth();
} else lexiconLookupTime = 0F;
} else lexiconLookupTime = 0F;
@@ -131,6 +131,7 @@ import vazkii.botania.common.core.handler.ConfigHandler;
import vazkii.botania.common.core.helper.MathHelper;
import vazkii.botania.common.core.helper.Vector3;
import vazkii.botania.common.core.proxy.CommonProxy;
import vazkii.botania.common.core.version.AdaptorNotifier;
import vazkii.botania.common.core.version.VersionChecker;
import vazkii.botania.common.entity.EntityBabylonWeapon;
import vazkii.botania.common.entity.EntityCorporeaSpark;
@@ -143,9 +144,10 @@ import vazkii.botania.common.entity.EntityPoolMinecart;
import vazkii.botania.common.entity.EntitySpark;
import vazkii.botania.common.entity.EntityThornChakram;
import vazkii.botania.common.entity.EntityVineBall;
import vazkii.botania.common.item.ModItems;
import vazkii.botania.common.item.ItemSextant.MultiblockSextant;
import vazkii.botania.common.item.ModItems;
import vazkii.botania.common.item.equipment.bauble.ItemMonocle;
import vazkii.botania.common.lexicon.LexiconData;
import vazkii.botania.common.lib.LibObfuscation;
import net.minecraftforge.fml.client.registry.ClientRegistry;
import net.minecraftforge.fml.client.registry.RenderingRegistry;
@@ -164,9 +166,16 @@ public class ClientProxy extends CommonProxy {
@Override
public void preInit(FMLPreInitializationEvent event) {
super.preInit(event);
PersistentVariableHelper.setCacheFile(new File(Minecraft.getMinecraft().mcDataDir, "BotaniaVars.dat"));
try {
PersistentVariableHelper.load();
PersistentVariableHelper.save();
} catch (IOException e) {
FMLLog.severe("Botania's persistent Variables couldn't load!");
e.printStackTrace();
}
super.preInit(event);
}
@Override
@@ -187,6 +196,8 @@ public class ClientProxy extends CommonProxy {
MinecraftForge.EVENT_BUS.register(new MultiblockRenderHandler());
FMLCommonHandler.instance().bus().register(new CorporeaAutoCompleteHandler());
if(ConfigHandler.useAdaptativeConfig)
FMLCommonHandler.instance().bus().register(new AdaptorNotifier());
if(ConfigHandler.versionCheckEnabled)
new VersionChecker().init();
@@ -200,15 +211,8 @@ public class ClientProxy extends CommonProxy {
initRenderers();
try {
PersistentVariableHelper.load();
PersistentVariableHelper.save();
} catch (IOException e) {
FMLLog.severe("Botania's persistent Variables couldn't load!");
e.printStackTrace();
}
}
@Override
public void postInit(FMLPostInitializationEvent event) {
super.postInit(event);
@@ -333,6 +337,12 @@ public class ClientProxy extends CommonProxy {
GuiLexicon.currentOpenLexicon = new GuiLexiconEntry(entry, new GuiLexiconIndex(entry.category));
}
@Override
public void setToTutorialIfFirstLaunch() {
if(PersistentVariableHelper.firstLoad)
GuiLexicon.currentOpenLexicon = new GuiLexiconEntry(LexiconData.welcome, new GuiLexiconEntry(LexiconData.tutorial, new GuiLexicon())).setFirstEntry();
}
@Override
public void setLexiconStack(ItemStack stack) {
GuiLexicon.stackUsed = stack;
@@ -386,6 +396,19 @@ public class ClientProxy extends CommonProxy {
return false;
}
@Override
public String getLastVersion() {
String s = PersistentVariableHelper.lastBotaniaVersion;
if(s == null)
return "N/A";
if(s.indexOf("-") > 0)
return s.split("-")[1];
return s;
}
@Override
public void playRecordClientSided(World world, BlockPos pos, ItemRecord record) {
Minecraft mc = Minecraft.getMinecraft();
@@ -401,24 +424,28 @@ public class ClientProxy extends CommonProxy {
public long getWorldElapsedTicks() {
return ClientTickHandler.ticksInGame;
}
@Override
public void setMultiblock(World world, int x, int y, int z, double radius, Block block) {
MultiblockSextant mb = new MultiblockSextant();
int iradius = (int) radius + 1;
for(int i = 0; i < iradius * 2 + 1; i++)
for(int j = 0; j < iradius * 2 + 1; j++) {
int xp = x + i - iradius;
int zp = z + j - iradius;
if((int) Math.floor(MathHelper.pointDistancePlane(xp, zp, x, z)) == (iradius - 1))
mb.addComponent(new AnyComponent(new BlockPos(xp - x, 1, zp - z), block.getDefaultState()));
if((int) Math.floor(MathHelper.pointDistancePlane(xp, zp, x, z)) == iradius - 1)
mb.addComponent(new AnyComponent(new BlockPos(xp - x, 1, zp - z), block.getDefaultState()));
}
MultiblockRenderHandler.setMultiblock(mb.makeSet());
MultiblockRenderHandler.anchor = new BlockPos(x, y, z);
}
@Override
public void removeSextantMultiblock() {
MultiblockSet set = MultiblockRenderHandler.currentMultiblock;
@@ -10,12 +10,12 @@
*/
package vazkii.botania.client.gui.bag;
import vazkii.botania.client.gui.SlotLocked;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import vazkii.botania.client.gui.SlotLocked;
public class ContainerFlowerBag extends Container {
@@ -28,7 +28,7 @@ public class GuiBaubleBox extends InventoryEffectRenderer {
public GuiBaubleBox(EntityPlayer player) {
super(new ContainerBaubleBox(player));
}
@Override
protected boolean checkHotbarKeys(int p_146983_1_) {
return false;
@@ -41,14 +41,14 @@ public class GuiBaubleBox extends InventoryEffectRenderer {
int k = (width - xSize) / 2;
int l = (height - ySize) / 2;
drawTexturedModalRect(k, l, 0, 0, xSize, ySize);
for(int i1 = 0; i1 < 4; ++i1) {
Slot slot = (Slot) inventorySlots.inventorySlots.get(i1);
if(slot.getHasStack() && slot.getSlotStackLimit() == 1)
drawTexturedModalRect(k+slot.xDisplayPosition, l+slot.yDisplayPosition, 200, 0, 16, 16);
}
GuiInventory.drawEntityOnScreen(this.guiLeft + 43, this.guiTop + 61, 20, (float)(this.guiLeft + 43 - p_146976_2_), (float)(this.guiTop + 45 - 30 - p_146976_3_), this.mc.thePlayer);
for(int i1 = 0; i1 < 4; ++i1) {
Slot slot = (Slot) inventorySlots.inventorySlots.get(i1);
if(slot.getHasStack() && slot.getSlotStackLimit() == 1)
drawTexturedModalRect(k+slot.xDisplayPosition, l+slot.yDisplayPosition, 200, 0, 16, 16);
}
GuiInventory.drawEntityOnScreen(guiLeft + 43, guiTop + 61, 20, guiLeft + 43 - p_146976_2_, guiTop + 45 - 30 - p_146976_3_, mc.thePlayer);
}
}
@@ -10,13 +10,10 @@
*/
package vazkii.botania.client.gui.box;
import baubles.api.IBauble;
import net.minecraft.inventory.Slot;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import vazkii.botania.api.mana.IManaItem;
import vazkii.botania.client.gui.bag.InventoryFlowerBag;
import vazkii.botania.common.block.ModBlocks;
import baubles.api.IBauble;
public class SlotAnyBauble extends Slot {
@@ -34,11 +34,13 @@ import net.minecraft.util.ChatAllowedCharacters;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import net.minecraftforge.common.MinecraftForge;
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.GL11;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.lexicon.BotaniaTutorialStartEvent;
import vazkii.botania.api.lexicon.LexiconCategory;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.client.core.handler.ClientTickHandler;
@@ -59,7 +61,6 @@ import vazkii.botania.client.gui.lexicon.button.GuiButtonNotes;
import vazkii.botania.client.gui.lexicon.button.GuiButtonOptions;
import vazkii.botania.client.gui.lexicon.button.GuiButtonUpdateWarning;
import vazkii.botania.client.lib.LibResources;
import vazkii.botania.common.core.handler.SheddingHandler;
import vazkii.botania.common.item.ItemLexicon;
import vazkii.botania.common.lexicon.LexiconData;
import vazkii.botania.common.lexicon.page.PageText;
@@ -210,13 +211,11 @@ public class GuiLexicon extends GuiScreen {
if(ClientProxy.singAnnoyingChristmasSongsTillVazkiisHeadExplodesFromAllTheDamnJingle)
drawTexturedModalRect(left + 3, top + 1, 0, 212, 138, 6);
drawBookmark(left + guiWidth / 2, top - getTitleHeight(), getTitle(), true);
String subtitle = getSubtitle();
if(subtitle != null) {
GlStateManager.scale(0.5F, 0.5F, 1F);
drawCenteredString(fontRendererObj, subtitle, left * 2 + guiWidth, (top - getTitleHeight() + 11) * 2, 0x00FF00);
GlStateManager.scale(2F, 2F, 1F);
}
if(subtitle != null)
drawBookmark(left + guiWidth / 2, top - getTitleHeight() + 10, subtitle, true, 191);
drawBookmark(left + guiWidth / 2, top - getTitleHeight(), getTitle(), true);
if(isMainPage())
drawHeader();
@@ -291,11 +290,16 @@ public class GuiLexicon extends GuiScreen {
fontRendererObj.setUnicodeFlag(unicode);
}
public void drawBookmark(int x, int y, String s, boolean drawLeft) {
drawBookmark(x, y, s, drawLeft, 0x111111);
drawBookmark(x, y, s, drawLeft, 180);
}
public void drawBookmark(int x, int y, String s, boolean drawLeft, int color) {
public void drawBookmark(int x, int y, String s, boolean drawLeft, int v) {
drawBookmark(x, y, s, drawLeft, 0x111111, v);
}
public void drawBookmark(int x, int y, String s, boolean drawLeft, int color, int v) {
// This function is called from the buttons so I can't use fontRendererObj
FontRenderer font = Minecraft.getMinecraft().fontRendererObj;
boolean unicode = font.getUnicodeFlag();
@@ -311,11 +315,12 @@ public class GuiLexicon extends GuiScreen {
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
GlStateManager.color(1F, 1F, 1F, 1F);
drawTexturedModalRect(x + l / 2 + 3, y - 1, 54, 180, 6, 11);
drawTexturedModalRect(x + l / 2 + 3, y - 1, 54, v, 6, 11);
if(drawLeft)
drawTexturedModalRect(x - l / 2 - 9, y - 1, 61, 180, 6, 11);
drawTexturedModalRect(x - l / 2 - 9, y - 1, 61, v, 6, 11);
for(int i = 0; i < l + 6; i++)
drawTexturedModalRect(x - l / 2 - 3 + i, y - 1, 60, 180, 1, 11);
drawTexturedModalRect(x - l / 2 - 3 + i, y - 1, 60, v, 1, 11);
font.drawString(s, x - l / 2 + fontOff, y, color, false);
font.setUnicodeFlag(unicode);
@@ -398,16 +403,15 @@ public class GuiLexicon extends GuiScreen {
String key = getNotesKey();
if(i == bookmarks.size()) {
if(!bookmarkKeys.contains(key)) {
bookmarks.add(this.copy());
bookmarks.add(copy());
bookmarkKeys.add(key);
modified = true;
}
} else {
if(isShiftKeyDown()) {
int index = bookmarkKeys.indexOf(key);
bookmarks.remove(index);
bookmarkKeys.remove(index);
bookmarks.remove(i);
bookmarkKeys.remove(i);
modified = true;
} else {
GuiLexicon bookmark = bookmarks.get(i).copy();
@@ -450,7 +454,7 @@ public class GuiLexicon extends GuiScreen {
}
int getTitleHeight() {
return getSubtitle() == null ? 12 : 16;
return getSubtitle() == null ? 12 : 22;
}
boolean isIndex() {
@@ -510,6 +514,7 @@ public class GuiLexicon extends GuiScreen {
public static void startTutorial() {
tutorial.clear();
tutorial.add(LexiconData.lexicon);
tutorial.add(LexiconData.flowers);
tutorial.add(LexiconData.apothecary);
@@ -521,17 +526,10 @@ public class GuiLexicon extends GuiScreen {
tutorial.add(LexiconData.generatingIntro);
tutorial.add(LexiconData.passiveGen);
tutorial.add(LexiconData.daybloom);
tutorial.add(LexiconData.endoflame);
tutorial.add(LexiconData.openCrate);
tutorial.add(LexiconData.functionalIntro);
tutorial.add(LexiconData.runicAltar);
tutorial.add(LexiconData.baublesIntro);
tutorial.add(LexiconData.manaTablet);
tutorial.add(LexiconData.manasteelGear);
tutorial.add(LexiconData.dispenserTweaks);
if(SheddingHandler.hasShedding())
tutorial.add(LexiconData.shedding);
tutorial.add(LexiconData.challenges);
MinecraftForge.EVENT_BUS.post(new BotaniaTutorialStartEvent(tutorial));
}
public final void putTutorialArrow() {
@@ -2,10 +2,10 @@
* 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 the
* Botania License: http://botaniamod.net/license.php
*
*
* File Created @ [Jan 14, 2014, 6:47:06 PM (GMT)]
*/
package vazkii.botania.client.gui.lexicon;
@@ -43,6 +43,7 @@ public class GuiLexiconEntry extends GuiLexicon implements IGuiLexiconEntry, IPa
private static final String TAG_PAGE = "page";
public int page = 0;
public boolean firstEntry = false;
LexiconEntry entry;
GuiScreen parent;
String title;
@@ -162,7 +163,7 @@ public class GuiLexiconEntry extends GuiLexicon implements IGuiLexiconEntry, IPa
break;
case 3 :
Minecraft mc = Minecraft.getMinecraft();
String cmd = "/botania-share " + entry.unlocalizedName;
String cmd = "/botania-share " + entry.getUnlocalizedName();
mc.ingameGUI.getChatGUI().addToSentMessages(cmd);
mc.thePlayer.sendChatMessage(cmd);
@@ -180,9 +181,16 @@ public class GuiLexiconEntry extends GuiLexicon implements IGuiLexiconEntry, IPa
currentPage.onActionPerformed(this, par1GuiButton);
}
public GuiLexiconEntry setFirstEntry() {
firstEntry = true;
return this;
}
public void updatePageButtons() {
leftButton.enabled = page != 0;
rightButton.enabled = page + 1 < entry.pages.size();
if(firstEntry)
backButton.enabled = !rightButton.enabled;
}
@Override
@@ -210,7 +210,8 @@ public class GuiLexiconIndex extends GuiLexicon implements IParented {
GlStateManager.scale(fract, 1F, 1F);
Gui.drawRect(12, -30, width + 20, -2, 0x44000000);
Gui.drawRect(10, -32, width + 22, -2, 0x44000000);
drawBookmark(width / 2 + 16, -8, s, true, 0xFFFFFF);
drawBookmark(width / 2 + 16, -8, s, true, 0xFFFFFF, 180);
mc.fontRendererObj.setUnicodeFlag(unicode);
net.minecraft.client.renderer.RenderHelper.enableGUIStandardItemLighting();
@@ -30,17 +30,19 @@ public class GuiButtonBack extends GuiButtonLexicon {
@Override
public void drawButton(Minecraft par1Minecraft, int par2, int par3) {
hovered = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height;
int k = getHoverState(hovered);
if(enabled) {
hovered = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height;
int k = getHoverState(hovered);
par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture);
GlStateManager.color(1F, 1F, 1F, 1F);
drawTexturedModalRect(xPosition, yPosition, 36, k == 2 ? 180 : 189, 18, 9);
par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture);
GlStateManager.color(1F, 1F, 1F, 1F);
drawTexturedModalRect(xPosition, yPosition, 36, k == 2 ? 180 : 189, 18, 9);
List<String> tooltip = getTooltip();
int tooltipY = (tooltip.size() - 1) * 10;
if(k == 2)
RenderHelper.renderTooltip(par2, par3 + tooltipY, tooltip);
List<String> tooltip = getTooltip();
int tooltipY = (tooltip.size() - 1) * 10;
if(k == 2)
RenderHelper.renderTooltip(par2, par3 + tooltipY, tooltip);
}
}
public List<String> getTooltip() {
@@ -49,8 +49,10 @@ public class GuiButtonCategory extends GuiButtonLexicon {
ARBShaderObjects.glUniform1iARB(imageUniform, 0);
OpenGlHelper.setActiveTexture(ARBMultitexture.GL_TEXTURE0_ARB + ConfigHandler.glSecondaryTextureUnit);
GlStateManager.enableTexture2D();
int texture = GL11.glGetInteger(GL11.GL_TEXTURE_BINDING_2D);
GL11.glGetInteger(GL11.GL_TEXTURE_BINDING_2D);
GL11.glBindTexture(GL11.GL_TEXTURE_2D, r.getTexture(stencilResource).getGlTextureId());
ARBShaderObjects.glUniform1iARB(maskUniform, ConfigHandler.glSecondaryTextureUnit);
@@ -88,7 +90,7 @@ public class GuiButtonCategory extends GuiButtonLexicon {
}
float s = 1F / 32F;
float defAlpha = 0F;
GlStateManager.pushMatrix();
GlStateManager.enableBlend();
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
@@ -103,7 +105,7 @@ public class GuiButtonCategory extends GuiButtonLexicon {
int texture = 0;
boolean shaders = ShaderHelper.useShaders();
if(shaders) {
OpenGlHelper.setActiveTexture(ARBMultitexture.GL_TEXTURE0_ARB + ConfigHandler.glSecondaryTextureUnit);
texture = GL11.glGetInteger(GL11.GL_TEXTURE_BINDING_2D);
@@ -112,7 +114,7 @@ public class GuiButtonCategory extends GuiButtonLexicon {
ShaderHelper.useShader(ShaderHelper.categoryButton, shaderCallback);
RenderHelper.drawTexturedModalRect(xPosition * 2, yPosition * 2, zLevel * 2, 0, 0, 32, 32, s, s);
ShaderHelper.releaseShader();
if(shaders) {
OpenGlHelper.setActiveTexture(ARBMultitexture.GL_TEXTURE0_ARB + ConfigHandler.glSecondaryTextureUnit);
GL11.glBindTexture(GL11.GL_TEXTURE_2D, texture);
@@ -38,6 +38,9 @@ public class NEIBotaniaConfig implements IConfigureNEI {
API.registerRecipeHandler(new RecipeHandlerPureDaisy());
API.registerUsageHandler(new RecipeHandlerPureDaisy());
API.registerRecipeHandler(new RecipeHandlerLexicaBotania());
API.registerUsageHandler(new RecipeHandlerLexicaBotania());
}
}
@@ -98,7 +98,7 @@ public class RecipeHandlerElvenTrade extends TemplateRecipeHandler {
}
private static boolean hasElvenKnowledge() {
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
/*EntityPlayer player = Minecraft.getMinecraft().thePlayer;
if (player != null) {
for (ItemStack stack : player.inventory.mainInventory) {
if (stack != null && stack.getItem() instanceof ILexicon) {
@@ -109,7 +109,8 @@ public class RecipeHandlerElvenTrade extends TemplateRecipeHandler {
}
}
}
return false;
return false;*/
return true;
}
@Override
@@ -0,0 +1,171 @@
/**
* 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 the
* Botania License: http://botaniamod.net/license.php
*
* File Created @ [12/12/2015, 23:25:47 (GMT)]
*/
package vazkii.botania.client.integration.nei;
import java.awt.Rectangle;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;
import net.minecraftforge.oredict.OreDictionary;
import org.lwjgl.opengl.GL11;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.lexicon.KnowledgeType;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.api.lexicon.LexiconRecipeMappings;
import vazkii.botania.api.recipe.RecipeManaInfusion;
import vazkii.botania.client.core.handler.HUDHandler;
import vazkii.botania.client.integration.nei.RecipeHandlerManaPool.CachedManaPoolRecipe;
import vazkii.botania.client.lib.LibResources;
import vazkii.botania.client.render.tile.RenderTilePool;
import vazkii.botania.common.block.ModBlocks;
import vazkii.botania.common.block.tile.mana.TilePool;
import vazkii.botania.common.core.helper.InventoryHelper;
import vazkii.botania.common.item.ModItems;
import vazkii.botania.common.lexicon.LexiconData;
import vazkii.botania.common.lexicon.page.PageRecipe;
import vazkii.botania.common.lexicon.page.PageText;
import codechicken.lib.gui.GuiDraw;
import codechicken.nei.NEIServerUtils;
import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.TemplateRecipeHandler;
import codechicken.nei.recipe.TemplateRecipeHandler.CachedRecipe;
import codechicken.nei.recipe.TemplateRecipeHandler.RecipeTransferRect;
public class RecipeHandlerLexicaBotania extends TemplateRecipeHandler {
public class CachedLexicaBotaniaRecipe extends CachedRecipe {
public LexiconEntry entry;
public PositionedStack item;
public List<PositionedStack> otherStacks = new ArrayList<PositionedStack>();
public CachedLexicaBotaniaRecipe(ItemStack stack, LexiconEntry entry) {
otherStacks.add(new PositionedStack(new ItemStack(ModItems.lexicon), 51, 5));
item = new PositionedStack(stack, 91, 5);
this.entry = entry;
}
@Override
public List<PositionedStack> getIngredients() {
return otherStacks;
}
@Override
public PositionedStack getResult() {
return item;
}
@Override
public List<PositionedStack> getOtherStacks() {
return otherStacks;
}
@Override
public boolean contains(Collection<PositionedStack> ingredients, ItemStack ingredient) {
return ingredient.getItem() == ModItems.lexicon;
}
}
@Override
public String getRecipeName() {
return StatCollector.translateToLocal("botania.nei.lexica");
}
@Override
public String getGuiTexture() {
return LibResources.GUI_NEI_BLANK;
}
@Override
public int recipiesPerPage() {
return 1;
}
@Override
public void loadTransferRects() {
transferRects.add(new RecipeTransferRect(new Rectangle(50, 4, 18, 18), "botania.lexica"));
}
@Override
public void drawBackground(int recipe) {
super.drawBackground(recipe);
FontRenderer font = Minecraft.getMinecraft().fontRenderer;
CachedLexicaBotaniaRecipe recipeObj = ((CachedLexicaBotaniaRecipe) arecipes.get(recipe));
String s = EnumChatFormatting.UNDERLINE + StatCollector.translateToLocal(recipeObj.entry.getUnlocalizedName());
font.drawString(s, 82 - font.getStringWidth(s) / 2, 30, 4210752);
KnowledgeType type = recipeObj.entry.getKnowledgeType();
s = type.color + StatCollector.translateToLocal(type.getUnlocalizedName()).replaceAll("\\&.", "");
font.drawString(s, 82 - font.getStringWidth(s) / 2, 42, 4210752);
s = "\"" + StatCollector.translateToLocal(recipeObj.entry.getTagline()) + "\"";
PageText.renderText(5, 42, 160, 200, s);
String key = LexiconRecipeMappings.stackToString(recipeObj.item.item);
String quickInfo = "botania.nei.quickInfo:" + key;
String quickInfoLocal = StatCollector.translateToLocal(quickInfo);
if(GuiScreen.isShiftKeyDown() && GuiScreen.isCtrlKeyDown() && Minecraft.getMinecraft().gameSettings.advancedItemTooltips)
s = "name: " + key;
else if(quickInfo.equals(quickInfoLocal))
s = StatCollector.translateToLocal("botania.nei.lexicaNoInfo");
else {
s = StatCollector.translateToLocal("botania.nei.lexicaSeparator");
font.drawString(s, 82 - font.getStringWidth(s) / 2, 80, 4210752);
s = quickInfoLocal;
}
PageText.renderText(5, 80, 160, 200, s);
}
@Override
public void loadCraftingRecipes(String outputId, Object... results) {
if(outputId.equals("botania.lexica")) {
for(LexiconEntry entry : BotaniaAPI.getAllEntries()) {
List<ItemStack> stacks = entry.getDisplayedRecipes();
for(ItemStack stack : stacks)
arecipes.add(new CachedLexicaBotaniaRecipe(stack, entry));
}
} else super.loadCraftingRecipes(outputId, results);
}
@Override
public void loadCraftingRecipes(ItemStack result) {
for(LexiconEntry entry : BotaniaAPI.getAllEntries()) {
List<ItemStack> stacks = entry.getDisplayedRecipes();
for(ItemStack stack : stacks) {
String key1 = LexiconRecipeMappings.stackToString(stack);
String key2 = LexiconRecipeMappings.stackToString(result);
if(key1.equals(key2))
arecipes.add(new CachedLexicaBotaniaRecipe(stack, entry));
}
}
}
@Override
public void loadUsageRecipes(ItemStack ingredient) {
// NO-OP
}
}
@@ -10,7 +10,6 @@
*/
package vazkii.botania.client.model;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.renderer.GlStateManager;
@@ -18,6 +17,8 @@ import net.minecraft.client.renderer.OpenGlHelper;
import org.lwjgl.opengl.GL11;
import vazkii.botania.client.core.handler.ClientTickHandler;
public class ModelSpinningCubes extends ModelBase {
ModelRenderer spinningCube;
@@ -37,7 +38,7 @@ public class ModelSpinningCubes extends ModelBase {
final float radiusBase = 0.35F;
final float radiusMod = 0.05F;
double ticks = Minecraft.getMinecraft().thePlayer.ticksExisted - 1.3 * (origRepeat - repeat);
double ticks = ClientTickHandler.ticksInGame + ClientTickHandler.partialTicks - 1.3 * (origRepeat - repeat);
float offsetPerCube = 360 / cubes;
GlStateManager.pushMatrix();
@@ -19,249 +19,249 @@ import net.minecraft.item.EnumAction;
import net.minecraft.item.ItemStack;
public class ModelArmorElementium extends ModelBiped {
public ModelRenderer helm;
public ModelRenderer body;
public ModelRenderer armR;
public ModelRenderer armL;
public ModelRenderer belt;
public ModelRenderer bootR;
public ModelRenderer bootL;
public ModelRenderer helm1;
public ModelRenderer helm2;
public ModelRenderer helm3;
public ModelRenderer fairy;
public ModelRenderer helmWing1;
public ModelRenderer helmWing2;
public ModelRenderer helmWing3;
public ModelRenderer helmWing4;
public ModelRenderer body2;
public ModelRenderer armRpauldron;
public ModelRenderer wing1;
public ModelRenderer wing2;
public ModelRenderer armLpauldron;
public ModelRenderer wing1_1;
public ModelRenderer wing2_1;
public ModelRenderer legR;
public ModelRenderer legL;
public ModelRenderer bootR1;
public ModelRenderer wing1_2;
public ModelRenderer wing2_2;
public ModelRenderer bootL1;
public ModelRenderer wing1_3;
public ModelRenderer wing2_3;
int slot;
public ModelArmorElementium(int slot) {
this.slot = slot;
textureWidth = 64;
textureHeight = 128;
float s = 0.2F;
fairy = new ModelRenderer(this, 34, 32);
fairy.setRotationPoint(0.0F, 0.0F, 0.0F);
fairy.addBox(-2.0F, -8.5F, -7.0F, 4, 4, 4, s);
setRotateAngle(fairy, -0.17453292519943295F, 0.0F, 0.0F);
helm3 = new ModelRenderer(this, 0, 32);
helm3.setRotationPoint(0.0F, 0.0F, 0.0F);
helm3.addBox(-1.0F, -5.5F, -5.5F, 2, 3, 1, s);
setRotateAngle(helm3, -0.17453292519943295F, 0.0F, 0.0F);
wing1_2 = new ModelRenderer(this, 56, 43);
wing1_2.mirror = true;
wing1_2.setRotationPoint(-2.5F, 9.0F, 0.0F);
wing1_2.addBox(0.5F, -2.0F, 0.0F, 0, 2, 3, s);
setRotateAngle(wing1_2, 0.2617993877991494F, -0.7853981633974483F, -0.2617993877991494F);
helm1 = new ModelRenderer(this, 50, 32);
helm1.setRotationPoint(0.0F, 0.0F, 0.0F);
helm1.addBox(-4.0F, -5.0F, -4.5F, 1, 5, 4, s);
legL = new ModelRenderer(this, 12, 79);
legL.mirror = true;
legL.setRotationPoint(1.9F, 12.0F, 0.0F);
legL.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, s);
setRotateAngle(legL, 0.0F, 0.0F, 0F);
armL = new ModelRenderer(this, 0, 79);
armL.mirror = true;
armL.setRotationPoint(5.0F, 2.0F, -0.0F);
armL.addBox(1.5F, 6.0F, -2.0F, 2, 4, 4, s);
setRotateAngle(armL, 0.0F, 0.0F, 0F);
armRpauldron = new ModelRenderer(this, 0, 67);
armRpauldron.setRotationPoint(0.0F, 0.0F, 0.0F);
armRpauldron.addBox(-4.0F, -2.5F, -3.0F, 5, 6, 6, s);
legR = new ModelRenderer(this, 12, 79);
legR.setRotationPoint(-1.9F, 12.0F, 0.0F);
legR.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, s);
setRotateAngle(legR, 0.0F, 0.0F, 0F);
helmWing2 = new ModelRenderer(this, 46, 45);
helmWing2.mirror = true;
helmWing2.setRotationPoint(-4.0F, -4.0F, -1.0F);
helmWing2.addBox(-0.5F, 0.0F, 0.0F, 1, 3, 4, s);
setRotateAngle(helmWing2, -0.2617993877991494F, -0.2617993877991494F, 0.2617993877991494F);
bootL1 = new ModelRenderer(this, 12, 79);
bootL1.mirror = true;
bootL1.setRotationPoint(0.0F, 0.0F, 0.0F);
bootL1.addBox(-2.0F, 7.0F, -2.0F, 4, 1, 4, s);
armR = new ModelRenderer(this, 0, 79);
armR.setRotationPoint(-5.0F, 2.0F, 0.0F);
armR.addBox(-3.5F, 6.0F, -2.0F, 2, 4, 4, s);
setRotateAngle(armR, 0.0F, 0.0F, 0F);
bootR1 = new ModelRenderer(this, 12, 79);
bootR1.setRotationPoint(0.0F, 0.0F, 0.0F);
bootR1.addBox(-2.0F, 7.0F, -2.0F, 4, 1, 4, s);
bootR = new ModelRenderer(this, 12, 79);
bootR.setRotationPoint(-1.9F, 12.0F, 0.0F);
bootR.addBox(-2.0F, 8.0F, -3.0F, 4, 4, 5, s);
setRotateAngle(bootR, 0.0F, 0.0F, 0F);
wing2_1 = new ModelRenderer(this, 56, 42);
wing2_1.setRotationPoint(4.5F, 0.0F, 0.0F);
wing2_1.addBox(0.0F, 0.0F, -0.5F, 0, 2, 3, s);
setRotateAngle(wing2_1, 0.08726646259971647F, 0.7853981633974483F, 0.2617993877991494F);
wing2_2 = new ModelRenderer(this, 56, 44);
wing2_2.mirror = true;
wing2_2.setRotationPoint(-2.5F, 9.0F, 0.0F);
wing2_2.addBox(0.5F, 0.0F, 0.0F, 0, 1, 2, s);
setRotateAngle(wing2_2, 0.08726646259971647F, -0.7853981633974483F, -0.2617993877991494F);
bootL = new ModelRenderer(this, 12, 79);
bootL.mirror = true;
bootL.setRotationPoint(1.9F, 12.0F, 0.0F);
bootL.addBox(-2.0F, 8.0F, -3.0F, 4, 4, 5, s);
setRotateAngle(bootL, 0.0F, 0.0F, 0F);
body = new ModelRenderer(this, 0, 44);
body.setRotationPoint(0.0F, 0.0F, 0.0F);
body.addBox(-4.5F, 0.0F, -4.0F, 9, 5, 7, s);
setRotateAngle(body, 0.08726646259971647F, 0.0F, 0.0F);
belt = new ModelRenderer(this, 22, 56);
belt.setRotationPoint(0.0F, 0.0F, 0.0F);
belt.addBox(-4.5F, 9.5F, -3.0F, 9, 3, 5, s);
helm = new ModelRenderer(this, 0, 32);
helm.setRotationPoint(0.0F, 0.0F, 0.0F);
helm.addBox(-4.0F, -8.0F, -4.5F, 8, 3, 9, s);
setRotateAngle(helm, 0.08726646259971647F, 0.0F, 0.0F);
helmWing4 = new ModelRenderer(this, 46, 45);
helmWing4.setRotationPoint(4.0F, -4.0F, -1.0F);
helmWing4.addBox(-0.5F, 0.0F, 0.0F, 1, 3, 4, s);
setRotateAngle(helmWing4, -0.2617993877991494F, 0.2617993877991494F, -0.2617993877991494F);
armLpauldron = new ModelRenderer(this, 0, 67);
armLpauldron.mirror = true;
armLpauldron.setRotationPoint(0.0F, 0.0F, -0.0F);
armLpauldron.addBox(-1.0F, -2.5F, -3.0F, 5, 6, 6, s);
wing1_1 = new ModelRenderer(this, 56, 41);
wing1_1.setRotationPoint(4.5F, 0.0F, 0.0F);
wing1_1.addBox(0.0F, -3.0F, -0.5F, 0, 3, 4, s);
setRotateAngle(wing1_1, 0.2617993877991494F, 0.7853981633974483F, 0.2617993877991494F);
helm2 = new ModelRenderer(this, 50, 32);
helm2.mirror = true;
helm2.setRotationPoint(0.0F, 0.0F, 0.0F);
helm2.addBox(3.0F, -5.0F, -4.5F, 1, 5, 4, s);
wing2_3 = new ModelRenderer(this, 56, 44);
wing2_3.setRotationPoint(2.5F, 9.0F, 0.0F);
wing2_3.addBox(0.0F, 0.0F, -0.5F, 0, 1, 2, s);
setRotateAngle(wing2_3, 0.08726646259971647F, 0.7853981633974483F, 0.2617993877991494F);
wing1 = new ModelRenderer(this, 56, 41);
wing1.mirror = true;
wing1.setRotationPoint(-4.5F, 0.0F, 0.0F);
wing1.addBox(0.5F, -3.0F, 0.0F, 0, 3, 4, s);
setRotateAngle(wing1, 0.2617993877991494F, -0.7853981633974483F, -0.2617993877991494F);
body2 = new ModelRenderer(this, 0, 56);
body2.setRotationPoint(0.0F, 0.0F, 0.0F);
body2.addBox(-3.0F, 4.0F, -3.0F, 6, 6, 5, s);
setRotateAngle(body2, -0.08726646259971647F, 0.0F, 0.0F);
helmWing3 = new ModelRenderer(this, 32, 45);
helmWing3.setRotationPoint(4.0F, -4.0F, -1.0F);
helmWing3.addBox(-0.5F, -5.0F, 0.0F, 1, 5, 6, s);
setRotateAngle(helmWing3, 0.2617993877991494F, 0.5235987755982988F, 0.08726646259971647F);
helmWing1 = new ModelRenderer(this, 32, 45);
helmWing1.mirror = true;
helmWing1.setRotationPoint(-4.0F, -4.0F, -1.0F);
helmWing1.addBox(-0.5F, -5.0F, 0.0F, 1, 5, 6, s);
setRotateAngle(helmWing1, 0.2617993877991494F, -0.5235987755982988F, -0.08726646259971647F);
wing2 = new ModelRenderer(this, 56, 42);
wing2.mirror = true;
wing2.setRotationPoint(-4.5F, 0.0F, 0.0F);
wing2.addBox(0.5F, 0.0F, 0.0F, 0, 2, 3, s);
setRotateAngle(wing2, 0.08726646259971647F, -0.7853981633974483F, -0.2617993877991494F);
wing1_3 = new ModelRenderer(this, 56, 43);
wing1_3.setRotationPoint(2.5F, 9.0F, 0.0F);
wing1_3.addBox(0.0F, -2.0F, -0.5F, 0, 2, 3, s);
setRotateAngle(wing1_3, 0.2617993877991494F, 0.7853981633974483F, 0.2617993877991494F);
helm.addChild(fairy);
helm.addChild(helm3);
bootR.addChild(wing1_2);
helm.addChild(helm1);
belt.addChild(legL);
armR.addChild(armRpauldron);
belt.addChild(legR);
helm.addChild(helmWing2);
bootL.addChild(bootL1);
bootR.addChild(bootR1);
armLpauldron.addChild(wing2_1);
bootR.addChild(wing2_2);
helm.addChild(helmWing4);
armL.addChild(armLpauldron);
armLpauldron.addChild(wing1_1);
helm.addChild(helm2);
bootL.addChild(wing2_3);
armRpauldron.addChild(wing1);
body.addChild(body2);
helm.addChild(helmWing3);
helm.addChild(helmWing1);
armRpauldron.addChild(wing2);
bootL.addChild(wing1_3);
}
public ModelRenderer helm;
public ModelRenderer body;
public ModelRenderer armR;
public ModelRenderer armL;
public ModelRenderer belt;
public ModelRenderer bootR;
public ModelRenderer bootL;
public ModelRenderer helm1;
public ModelRenderer helm2;
public ModelRenderer helm3;
public ModelRenderer fairy;
public ModelRenderer helmWing1;
public ModelRenderer helmWing2;
public ModelRenderer helmWing3;
public ModelRenderer helmWing4;
public ModelRenderer body2;
public ModelRenderer armRpauldron;
public ModelRenderer wing1;
public ModelRenderer wing2;
public ModelRenderer armLpauldron;
public ModelRenderer wing1_1;
public ModelRenderer wing2_1;
public ModelRenderer legR;
public ModelRenderer legL;
public ModelRenderer bootR1;
public ModelRenderer wing1_2;
public ModelRenderer wing2_2;
public ModelRenderer bootL1;
public ModelRenderer wing1_3;
public ModelRenderer wing2_3;
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
helm.showModel = slot == 0;
body.showModel = slot == 1;
armR.showModel = slot == 1;
armL.showModel = slot == 1;
legR.showModel = slot == 2;
legL.showModel = slot == 2;
bootL.showModel = slot == 3;
bootR.showModel = slot == 3;
bipedHeadwear.showModel = false;
int slot;
bipedHead = helm;
bipedBody = body;
bipedRightArm = armR;
bipedLeftArm = armL;
if(slot == 2) {
bipedRightLeg = legR;
bipedLeftLeg = legL;
} else {
bipedRightLeg = bootR;
bipedLeftLeg = bootL;
}
prepareForRender(entity);
super.render(entity, f, f1, f2, f3, f4, f5);
}
public ModelArmorElementium(int slot) {
this.slot = slot;
public void prepareForRender(Entity entity) {
EntityLivingBase living = (EntityLivingBase) entity;
isSneak = living != null ? living.isSneaking() : false;
if(living != null && living instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) living;
textureWidth = 64;
textureHeight = 128;
float s = 0.2F;
fairy = new ModelRenderer(this, 34, 32);
fairy.setRotationPoint(0.0F, 0.0F, 0.0F);
fairy.addBox(-2.0F, -8.5F, -7.0F, 4, 4, 4, s);
setRotateAngle(fairy, -0.17453292519943295F, 0.0F, 0.0F);
helm3 = new ModelRenderer(this, 0, 32);
helm3.setRotationPoint(0.0F, 0.0F, 0.0F);
helm3.addBox(-1.0F, -5.5F, -5.5F, 2, 3, 1, s);
setRotateAngle(helm3, -0.17453292519943295F, 0.0F, 0.0F);
wing1_2 = new ModelRenderer(this, 56, 43);
wing1_2.mirror = true;
wing1_2.setRotationPoint(-2.5F, 9.0F, 0.0F);
wing1_2.addBox(0.5F, -2.0F, 0.0F, 0, 2, 3, s);
setRotateAngle(wing1_2, 0.2617993877991494F, -0.7853981633974483F, -0.2617993877991494F);
helm1 = new ModelRenderer(this, 50, 32);
helm1.setRotationPoint(0.0F, 0.0F, 0.0F);
helm1.addBox(-4.0F, -5.0F, -4.5F, 1, 5, 4, s);
legL = new ModelRenderer(this, 12, 79);
legL.mirror = true;
legL.setRotationPoint(1.9F, 12.0F, 0.0F);
legL.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, s);
setRotateAngle(legL, 0.0F, 0.0F, 0F);
armL = new ModelRenderer(this, 0, 79);
armL.mirror = true;
armL.setRotationPoint(5.0F, 2.0F, -0.0F);
armL.addBox(1.5F, 6.0F, -2.0F, 2, 4, 4, s);
setRotateAngle(armL, 0.0F, 0.0F, 0F);
armRpauldron = new ModelRenderer(this, 0, 67);
armRpauldron.setRotationPoint(0.0F, 0.0F, 0.0F);
armRpauldron.addBox(-4.0F, -2.5F, -3.0F, 5, 6, 6, s);
legR = new ModelRenderer(this, 12, 79);
legR.setRotationPoint(-1.9F, 12.0F, 0.0F);
legR.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, s);
setRotateAngle(legR, 0.0F, 0.0F, 0F);
helmWing2 = new ModelRenderer(this, 46, 45);
helmWing2.mirror = true;
helmWing2.setRotationPoint(-4.0F, -4.0F, -1.0F);
helmWing2.addBox(-0.5F, 0.0F, 0.0F, 1, 3, 4, s);
setRotateAngle(helmWing2, -0.2617993877991494F, -0.2617993877991494F, 0.2617993877991494F);
bootL1 = new ModelRenderer(this, 12, 79);
bootL1.mirror = true;
bootL1.setRotationPoint(0.0F, 0.0F, 0.0F);
bootL1.addBox(-2.0F, 7.0F, -2.0F, 4, 1, 4, s);
armR = new ModelRenderer(this, 0, 79);
armR.setRotationPoint(-5.0F, 2.0F, 0.0F);
armR.addBox(-3.5F, 6.0F, -2.0F, 2, 4, 4, s);
setRotateAngle(armR, 0.0F, 0.0F, 0F);
bootR1 = new ModelRenderer(this, 12, 79);
bootR1.setRotationPoint(0.0F, 0.0F, 0.0F);
bootR1.addBox(-2.0F, 7.0F, -2.0F, 4, 1, 4, s);
bootR = new ModelRenderer(this, 12, 79);
bootR.setRotationPoint(-1.9F, 12.0F, 0.0F);
bootR.addBox(-2.0F, 8.0F, -3.0F, 4, 4, 5, s);
setRotateAngle(bootR, 0.0F, 0.0F, 0F);
wing2_1 = new ModelRenderer(this, 56, 42);
wing2_1.setRotationPoint(4.5F, 0.0F, 0.0F);
wing2_1.addBox(0.0F, 0.0F, -0.5F, 0, 2, 3, s);
setRotateAngle(wing2_1, 0.08726646259971647F, 0.7853981633974483F, 0.2617993877991494F);
wing2_2 = new ModelRenderer(this, 56, 44);
wing2_2.mirror = true;
wing2_2.setRotationPoint(-2.5F, 9.0F, 0.0F);
wing2_2.addBox(0.5F, 0.0F, 0.0F, 0, 1, 2, s);
setRotateAngle(wing2_2, 0.08726646259971647F, -0.7853981633974483F, -0.2617993877991494F);
bootL = new ModelRenderer(this, 12, 79);
bootL.mirror = true;
bootL.setRotationPoint(1.9F, 12.0F, 0.0F);
bootL.addBox(-2.0F, 8.0F, -3.0F, 4, 4, 5, s);
setRotateAngle(bootL, 0.0F, 0.0F, 0F);
body = new ModelRenderer(this, 0, 44);
body.setRotationPoint(0.0F, 0.0F, 0.0F);
body.addBox(-4.5F, 0.0F, -4.0F, 9, 5, 7, s);
setRotateAngle(body, 0.08726646259971647F, 0.0F, 0.0F);
belt = new ModelRenderer(this, 22, 56);
belt.setRotationPoint(0.0F, 0.0F, 0.0F);
belt.addBox(-4.5F, 9.5F, -3.0F, 9, 3, 5, s);
helm = new ModelRenderer(this, 0, 32);
helm.setRotationPoint(0.0F, 0.0F, 0.0F);
helm.addBox(-4.0F, -8.0F, -4.5F, 8, 3, 9, s);
setRotateAngle(helm, 0.08726646259971647F, 0.0F, 0.0F);
helmWing4 = new ModelRenderer(this, 46, 45);
helmWing4.setRotationPoint(4.0F, -4.0F, -1.0F);
helmWing4.addBox(-0.5F, 0.0F, 0.0F, 1, 3, 4, s);
setRotateAngle(helmWing4, -0.2617993877991494F, 0.2617993877991494F, -0.2617993877991494F);
armLpauldron = new ModelRenderer(this, 0, 67);
armLpauldron.mirror = true;
armLpauldron.setRotationPoint(0.0F, 0.0F, -0.0F);
armLpauldron.addBox(-1.0F, -2.5F, -3.0F, 5, 6, 6, s);
wing1_1 = new ModelRenderer(this, 56, 41);
wing1_1.setRotationPoint(4.5F, 0.0F, 0.0F);
wing1_1.addBox(0.0F, -3.0F, -0.5F, 0, 3, 4, s);
setRotateAngle(wing1_1, 0.2617993877991494F, 0.7853981633974483F, 0.2617993877991494F);
helm2 = new ModelRenderer(this, 50, 32);
helm2.mirror = true;
helm2.setRotationPoint(0.0F, 0.0F, 0.0F);
helm2.addBox(3.0F, -5.0F, -4.5F, 1, 5, 4, s);
wing2_3 = new ModelRenderer(this, 56, 44);
wing2_3.setRotationPoint(2.5F, 9.0F, 0.0F);
wing2_3.addBox(0.0F, 0.0F, -0.5F, 0, 1, 2, s);
setRotateAngle(wing2_3, 0.08726646259971647F, 0.7853981633974483F, 0.2617993877991494F);
wing1 = new ModelRenderer(this, 56, 41);
wing1.mirror = true;
wing1.setRotationPoint(-4.5F, 0.0F, 0.0F);
wing1.addBox(0.5F, -3.0F, 0.0F, 0, 3, 4, s);
setRotateAngle(wing1, 0.2617993877991494F, -0.7853981633974483F, -0.2617993877991494F);
body2 = new ModelRenderer(this, 0, 56);
body2.setRotationPoint(0.0F, 0.0F, 0.0F);
body2.addBox(-3.0F, 4.0F, -3.0F, 6, 6, 5, s);
setRotateAngle(body2, -0.08726646259971647F, 0.0F, 0.0F);
helmWing3 = new ModelRenderer(this, 32, 45);
helmWing3.setRotationPoint(4.0F, -4.0F, -1.0F);
helmWing3.addBox(-0.5F, -5.0F, 0.0F, 1, 5, 6, s);
setRotateAngle(helmWing3, 0.2617993877991494F, 0.5235987755982988F, 0.08726646259971647F);
helmWing1 = new ModelRenderer(this, 32, 45);
helmWing1.mirror = true;
helmWing1.setRotationPoint(-4.0F, -4.0F, -1.0F);
helmWing1.addBox(-0.5F, -5.0F, 0.0F, 1, 5, 6, s);
setRotateAngle(helmWing1, 0.2617993877991494F, -0.5235987755982988F, -0.08726646259971647F);
wing2 = new ModelRenderer(this, 56, 42);
wing2.mirror = true;
wing2.setRotationPoint(-4.5F, 0.0F, 0.0F);
wing2.addBox(0.5F, 0.0F, 0.0F, 0, 2, 3, s);
setRotateAngle(wing2, 0.08726646259971647F, -0.7853981633974483F, -0.2617993877991494F);
wing1_3 = new ModelRenderer(this, 56, 43);
wing1_3.setRotationPoint(2.5F, 9.0F, 0.0F);
wing1_3.addBox(0.0F, -2.0F, -0.5F, 0, 2, 3, s);
setRotateAngle(wing1_3, 0.2617993877991494F, 0.7853981633974483F, 0.2617993877991494F);
helm.addChild(fairy);
helm.addChild(helm3);
bootR.addChild(wing1_2);
helm.addChild(helm1);
belt.addChild(legL);
armR.addChild(armRpauldron);
belt.addChild(legR);
helm.addChild(helmWing2);
bootL.addChild(bootL1);
bootR.addChild(bootR1);
armLpauldron.addChild(wing2_1);
bootR.addChild(wing2_2);
helm.addChild(helmWing4);
armL.addChild(armLpauldron);
armLpauldron.addChild(wing1_1);
helm.addChild(helm2);
bootL.addChild(wing2_3);
armRpauldron.addChild(wing1);
body.addChild(body2);
helm.addChild(helmWing3);
helm.addChild(helmWing1);
armRpauldron.addChild(wing2);
bootL.addChild(wing1_3);
}
ItemStack itemstack = player.inventory.getCurrentItem();
heldItemRight = itemstack != null ? 1 : 0;
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
helm.showModel = slot == 0;
body.showModel = slot == 1;
armR.showModel = slot == 1;
armL.showModel = slot == 1;
legR.showModel = slot == 2;
legL.showModel = slot == 2;
bootL.showModel = slot == 3;
bootR.showModel = slot == 3;
bipedHeadwear.showModel = false;
aimedBow = false;
if (itemstack != null && player.getItemInUseCount() > 0) {
EnumAction enumaction = itemstack.getItemUseAction();
bipedHead = helm;
bipedBody = body;
bipedRightArm = armR;
bipedLeftArm = armL;
if(slot == 2) {
bipedRightLeg = legR;
bipedLeftLeg = legL;
} else {
bipedRightLeg = bootR;
bipedLeftLeg = bootL;
}
prepareForRender(entity);
super.render(entity, f, f1, f2, f3, f4, f5);
}
public void prepareForRender(Entity entity) {
EntityLivingBase living = (EntityLivingBase) entity;
isSneak = living != null ? living.isSneaking() : false;
if(living != null && living instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) living;
ItemStack itemstack = player.inventory.getCurrentItem();
heldItemRight = itemstack != null ? 1 : 0;
aimedBow = false;
if (itemstack != null && player.getItemInUseCount() > 0) {
EnumAction enumaction = itemstack.getItemUseAction();
if (enumaction == EnumAction.BLOCK)
heldItemRight = 3;
else if (enumaction == EnumAction.BOW)
aimedBow = true;
}
}
}
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
if (enumaction == EnumAction.BLOCK)
heldItemRight = 3;
else if (enumaction == EnumAction.BOW)
aimedBow = true;
}
}
}
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
@@ -19,178 +19,179 @@ import net.minecraft.item.EnumAction;
import net.minecraft.item.ItemStack;
public class ModelArmorManasteel extends ModelBiped {
public ModelRenderer helm;
public ModelRenderer body;
public ModelRenderer armR;
public ModelRenderer armL;
public ModelRenderer belt;
public ModelRenderer bootR;
public ModelRenderer bootL;
public ModelRenderer helm1;
public ModelRenderer helm2;
public ModelRenderer helm3;
public ModelRenderer helm4;
public ModelRenderer helm5;
public ModelRenderer helm6;
public ModelRenderer helm7;
public ModelRenderer body2;
public ModelRenderer armRpauldron;
public ModelRenderer armLpauldron;
public ModelRenderer legR;
public ModelRenderer legL;
int slot;
public ModelArmorManasteel(int slot) {
this.slot = slot;
textureWidth = 64;
textureHeight = 128;
float s = 0.2F;
armRpauldron = new ModelRenderer(this, 30, 47);
armRpauldron.setRotationPoint(0.0F, 0.0F, 0.0F);
armRpauldron.addBox(-4.0F, -2.0F, -2.5F, 4, 4, 5, 0.2F);
armL = new ModelRenderer(this, 0, 68);
armL.mirror = true;
armL.setRotationPoint(5.0F, 2.0F, -0.0F);
armL.addBox(1.0F, 3.0F, -2.0F, 2, 6, 4, s);
setRotateAngle(armL, 0.0F, 0.0F, -0.17453292519943295F);
legR = new ModelRenderer(this, 12, 68);
legR.setRotationPoint(-1.9F, 12.0F, 0.0F);
legR.addBox(-2.0F, 0.0F, -2.0F, 4, 8, 4, s);
setRotateAngle(legR, 0.0F, 0.0F, 0F);
helm3 = new ModelRenderer(this, 24, 32);
helm3.setRotationPoint(0.0F, 0.0F, 0.0F);
helm3.addBox(-1.0F, -8.5F, -6.5F, 2, 5, 1, s);
setRotateAngle(helm3, -0.17453292519943295F, 0.0F, 0.0F);
helm7 = new ModelRenderer(this, 24, 32);
helm7.setRotationPoint(0.0F, 0.0F, 0.0F);
helm7.addBox(-1.0F, -8.5F, -6.0F, 2, 3, 1, s);
setRotateAngle(helm7, -0.3490658503988659F, 0.0F, 0.0F);
bootL = new ModelRenderer(this, 28, 68);
bootL.mirror = true;
bootL.setRotationPoint(2.0F, 12.0F, 0.0F);
bootL.addBox(-2.0F, 8.0F, -3.0F, 4, 4, 5, s);
setRotateAngle(bootL, 0.0F, 0.0F, 0F);
helm4 = new ModelRenderer(this, 0, 39);
helm4.setRotationPoint(0.0F, 0.0F, 0.0F);
helm4.addBox(-4.0F, -8.0F, -0.5F, 1, 3, 5, s);
bootR = new ModelRenderer(this, 28, 68);
bootR.setRotationPoint(-2.0F, 12.0F, 0.0F);
bootR.addBox(-2.0F, 8.0F, -3.0F, 4, 4, 5, s);
setRotateAngle(bootR, 0.0F, 0.0F, 0F);
legL = new ModelRenderer(this, 12, 68);
legL.mirror = true;
legL.setRotationPoint(1.9F, 12.0F, 0.0F);
legL.addBox(-2.0F, 0.0F, -2.0F, 4, 8, 4, s);
setRotateAngle(legL, 0.0F, 0.0F, 0F);
armR = new ModelRenderer(this, 0, 68);
armR.setRotationPoint(-5.0F, 2.0F, 0.0F);
armR.addBox(-3.0F, 3.0F, -2.0F, 2, 6, 4, s);
setRotateAngle(armR, 0.0F, 0.0F, 0.17453292519943295F);
helm1 = new ModelRenderer(this, 12, 39);
helm1.setRotationPoint(0.0F, 0.0F, 0.0F);
helm1.addBox(-4.0F, -5.0F, -4.5F, 1, 3, 4, s);
helm2 = new ModelRenderer(this, 12, 39);
helm2.mirror = true;
helm2.setRotationPoint(0.0F, 0.0F, 0.0F);
helm2.addBox(3.0F, -5.0F, -4.5F, 1, 3, 4, s);
body2 = new ModelRenderer(this, 0, 59);
body2.setRotationPoint(0.0F, 0.0F, 0.0F);
body2.addBox(-4.0F, 6.0F, -2.5F, 8, 4, 5, s);
setRotateAngle(body2, -0.08726646259971647F, 0.0F, 0.0F);
body = new ModelRenderer(this, 0, 47);
body.setRotationPoint(0.0F, 0.0F, 0.0F);
body.addBox(-4.5F, 0.0F, -3.5F, 9, 6, 6, s);
setRotateAngle(body, 0.08726646259971647F, 0.0F, 0.0F);
helm6 = new ModelRenderer(this, 24, 32);
helm6.setRotationPoint(0.0F, 0.0F, 0.0F);
helm6.addBox(-1.0F, -8.5F, -5.5F, 2, 3, 1, s);
setRotateAngle(helm6, -0.5235987755982988F, 0.0F, 0.0F);
belt = new ModelRenderer(this, 26, 59);
belt.setRotationPoint(0.0F, 0.0F, 0.0F);
belt.addBox(-4.5F, 9.5F, -3.0F, 9, 3, 6, s);
helm = new ModelRenderer(this, 0, 32);
helm.setRotationPoint(0.0F, 0.0F, 0.0F);
helm.addBox(-4.0F, -8.0F, -4.5F, 8, 3, 4, s);
setRotateAngle(helm, 0.08726646259971647F, 0.0F, 0.0F);
armLpauldron = new ModelRenderer(this, 30, 47);
armLpauldron.mirror = true;
armLpauldron.setRotationPoint(0.0F, 0.0F, -0.0F);
armLpauldron.addBox(0.0F, -2.0F, -2.5F, 4, 4, 5, s);
helm5 = new ModelRenderer(this, 0, 39);
helm5.mirror = true;
helm5.setRotationPoint(0.0F, 0.0F, 0.0F);
helm5.addBox(3.0F, -8.0F, -0.5F, 1, 3, 5, s);
helm.addChild(helm3);
helm.addChild(helm7);
helm.addChild(helm4);
helm.addChild(helm6);
helm.addChild(helm1);
helm.addChild(helm2);
helm.addChild(helm5);
body.addChild(body2);
armL.addChild(armLpauldron);
armR.addChild(armRpauldron);
belt.addChild(legR);
belt.addChild(legL);
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
helm.showModel = slot == 0;
body.showModel = slot == 1;
armR.showModel = slot == 1;
armL.showModel = slot == 1;
legR.showModel = slot == 2;
legL.showModel = slot == 2;
bootL.showModel = slot == 3;
bootR.showModel = slot == 3;
bipedHeadwear.showModel = false;
public ModelRenderer helm;
public ModelRenderer body;
public ModelRenderer armR;
public ModelRenderer armL;
public ModelRenderer belt;
public ModelRenderer bootR;
public ModelRenderer bootL;
public ModelRenderer helm1;
public ModelRenderer helm2;
public ModelRenderer helm3;
public ModelRenderer helm4;
public ModelRenderer helm5;
public ModelRenderer helm6;
public ModelRenderer helm7;
public ModelRenderer body2;
public ModelRenderer armRpauldron;
public ModelRenderer armLpauldron;
public ModelRenderer legR;
public ModelRenderer legL;
bipedHead = helm;
bipedBody = body;
bipedRightArm = armR;
bipedLeftArm = armL;
if(slot == 2) {
bipedRightLeg = legR;
bipedLeftLeg = legL;
} else {
bipedRightLeg = bootR;
bipedLeftLeg = bootL;
}
prepareForRender(entity);
super.render(entity, f, f1, f2, f3, f4, f5);
}
public void prepareForRender(Entity entity) {
EntityLivingBase living = (EntityLivingBase) entity;
isSneak = living != null ? living.isSneaking() : false;
if(living != null && living instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) living;
int slot;
ItemStack itemstack = player.inventory.getCurrentItem();
heldItemRight = itemstack != null ? 1 : 0;
public ModelArmorManasteel(int slot) {
this.slot = slot;
aimedBow = false;
if (itemstack != null && player.getItemInUseCount() > 0) {
EnumAction enumaction = itemstack.getItemUseAction();
textureWidth = 64;
textureHeight = 128;
float s = 0.2F;
armRpauldron = new ModelRenderer(this, 30, 47);
armRpauldron.setRotationPoint(0.0F, 0.0F, 0.0F);
armRpauldron.addBox(-4.0F, -2.0F, -2.5F, 4, 4, 5, 0.2F);
armL = new ModelRenderer(this, 0, 68);
armL.mirror = true;
armL.setRotationPoint(5.0F, 2.0F, -0.0F);
armL.addBox(1.0F, 3.0F, -2.0F, 2, 6, 4, s);
setRotateAngle(armL, 0.0F, 0.0F, -0.17453292519943295F);
legR = new ModelRenderer(this, 12, 68);
legR.setRotationPoint(-1.9F, 12.0F, 0.0F);
legR.addBox(-2.0F, 0.0F, -2.0F, 4, 8, 4, s);
setRotateAngle(legR, 0.0F, 0.0F, 0F);
helm3 = new ModelRenderer(this, 24, 32);
helm3.setRotationPoint(0.0F, 0.0F, 0.0F);
helm3.addBox(-1.0F, -8.5F, -6.5F, 2, 5, 1, s);
setRotateAngle(helm3, -0.17453292519943295F, 0.0F, 0.0F);
helm7 = new ModelRenderer(this, 24, 32);
helm7.setRotationPoint(0.0F, 0.0F, 0.0F);
helm7.addBox(-1.0F, -8.5F, -6.0F, 2, 3, 1, s);
setRotateAngle(helm7, -0.3490658503988659F, 0.0F, 0.0F);
bootL = new ModelRenderer(this, 28, 68);
bootL.mirror = true;
bootL.setRotationPoint(2.0F, 12.0F, 0.0F);
bootL.addBox(-2.0F, 8.0F, -3.0F, 4, 4, 5, s);
setRotateAngle(bootL, 0.0F, 0.0F, 0F);
helm4 = new ModelRenderer(this, 0, 39);
helm4.setRotationPoint(0.0F, 0.0F, 0.0F);
helm4.addBox(-4.0F, -8.0F, -0.5F, 1, 3, 5, s);
bootR = new ModelRenderer(this, 28, 68);
bootR.setRotationPoint(-2.0F, 12.0F, 0.0F);
bootR.addBox(-2.0F, 8.0F, -3.0F, 4, 4, 5, s);
setRotateAngle(bootR, 0.0F, 0.0F, 0F);
legL = new ModelRenderer(this, 12, 68);
legL.mirror = true;
legL.setRotationPoint(1.9F, 12.0F, 0.0F);
legL.addBox(-2.0F, 0.0F, -2.0F, 4, 8, 4, s);
setRotateAngle(legL, 0.0F, 0.0F, 0F);
armR = new ModelRenderer(this, 0, 68);
armR.setRotationPoint(-5.0F, 2.0F, 0.0F);
armR.addBox(-3.0F, 3.0F, -2.0F, 2, 6, 4, s);
setRotateAngle(armR, 0.0F, 0.0F, 0.17453292519943295F);
helm1 = new ModelRenderer(this, 12, 39);
helm1.setRotationPoint(0.0F, 0.0F, 0.0F);
helm1.addBox(-4.0F, -5.0F, -4.5F, 1, 3, 4, s);
helm2 = new ModelRenderer(this, 12, 39);
helm2.mirror = true;
helm2.setRotationPoint(0.0F, 0.0F, 0.0F);
helm2.addBox(3.0F, -5.0F, -4.5F, 1, 3, 4, s);
body2 = new ModelRenderer(this, 0, 59);
body2.setRotationPoint(0.0F, 0.0F, 0.0F);
body2.addBox(-4.0F, 6.0F, -2.5F, 8, 4, 5, s);
setRotateAngle(body2, -0.08726646259971647F, 0.0F, 0.0F);
body = new ModelRenderer(this, 0, 47);
body.setRotationPoint(0.0F, 0.0F, 0.0F);
body.addBox(-4.5F, 0.0F, -3.5F, 9, 6, 6, s);
setRotateAngle(body, 0.08726646259971647F, 0.0F, 0.0F);
helm6 = new ModelRenderer(this, 24, 32);
helm6.setRotationPoint(0.0F, 0.0F, 0.0F);
helm6.addBox(-1.0F, -8.5F, -5.5F, 2, 3, 1, s);
setRotateAngle(helm6, -0.5235987755982988F, 0.0F, 0.0F);
belt = new ModelRenderer(this, 26, 59);
belt.setRotationPoint(0.0F, 0.0F, 0.0F);
belt.addBox(-4.5F, 9.5F, -3.0F, 9, 3, 6, s);
helm = new ModelRenderer(this, 0, 32);
helm.setRotationPoint(0.0F, 0.0F, 0.0F);
helm.addBox(-4.0F, -8.0F, -4.5F, 8, 3, 4, s);
setRotateAngle(helm, 0.08726646259971647F, 0.0F, 0.0F);
armLpauldron = new ModelRenderer(this, 30, 47);
armLpauldron.mirror = true;
armLpauldron.setRotationPoint(0.0F, 0.0F, -0.0F);
armLpauldron.addBox(0.0F, -2.0F, -2.5F, 4, 4, 5, s);
helm5 = new ModelRenderer(this, 0, 39);
helm5.mirror = true;
helm5.setRotationPoint(0.0F, 0.0F, 0.0F);
helm5.addBox(3.0F, -8.0F, -0.5F, 1, 3, 5, s);
helm.addChild(helm3);
helm.addChild(helm7);
helm.addChild(helm4);
helm.addChild(helm6);
helm.addChild(helm1);
helm.addChild(helm2);
helm.addChild(helm5);
body.addChild(body2);
armL.addChild(armLpauldron);
armR.addChild(armRpauldron);
belt.addChild(legR);
belt.addChild(legL);
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
helm.showModel = slot == 0;
body.showModel = slot == 1;
armR.showModel = slot == 1;
armL.showModel = slot == 1;
legR.showModel = slot == 2;
legL.showModel = slot == 2;
bootL.showModel = slot == 3;
bootR.showModel = slot == 3;
bipedHeadwear.showModel = false;
bipedHead = helm;
bipedBody = body;
bipedRightArm = armR;
bipedLeftArm = armL;
if(slot == 2) {
bipedRightLeg = legR;
bipedLeftLeg = legL;
} else {
bipedRightLeg = bootR;
bipedLeftLeg = bootL;
}
prepareForRender(entity);
super.render(entity, f, f1, f2, f3, f4, f5);
}
public void prepareForRender(Entity entity) {
EntityLivingBase living = (EntityLivingBase) entity;
isSneak = living != null ? living.isSneaking() : false;
if(living != null && living instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) living;
ItemStack itemstack = player.inventory.getCurrentItem();
heldItemRight = itemstack != null ? 1 : 0;
aimedBow = false;
if (itemstack != null && player.getItemInUseCount() > 0) {
EnumAction enumaction = itemstack.getItemUseAction();
if (enumaction == EnumAction.BLOCK)
heldItemRight = 3;
else if(enumaction == EnumAction.BOW)
aimedBow = true;
}
}
}
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
if (enumaction == EnumAction.BLOCK)
heldItemRight = 3;
else if(enumaction == EnumAction.BOW)
aimedBow = true;
}
}
}
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
@@ -19,179 +19,179 @@ import net.minecraft.item.EnumAction;
import net.minecraft.item.ItemStack;
public class ModelArmorManaweave extends ModelBiped {
public ModelRenderer helm;
public ModelRenderer body;
public ModelRenderer armR;
public ModelRenderer armL;
public ModelRenderer legR;
public ModelRenderer legL;
public ModelRenderer bootR;
public ModelRenderer bootL;
public ModelRenderer helm2;
public ModelRenderer helm3;
public ModelRenderer helm4;
public ModelRenderer helmSeam1;
public ModelRenderer helmSeam2;
public ModelRenderer helmSeam3;
public ModelRenderer helmSeam4;
public ModelRenderer body2;
public ModelRenderer armRpauldron;
public ModelRenderer armLpauldron;
public ModelRenderer skirtR;
public ModelRenderer skirtL;
int slot;
public ModelArmorManaweave(int slot) {
this.slot = slot;
textureWidth = 64;
textureHeight = 128;
float s = 0.2F;
helmSeam3 = new ModelRenderer(this, 26, 61);
helmSeam3.setRotationPoint(0.0F, 0.0F, 0.0F);
helmSeam3.addBox(-0.5F, -9.5F, 5.0F, 1, 11, 1, s);
helmSeam4 = new ModelRenderer(this, 39, 64);
helmSeam4.setRotationPoint(0.0F, 0.0F, 0.0F);
helmSeam4.addBox(-0.5F, 0.5F, -1.0F, 1, 1, 6, s);
skirtL = new ModelRenderer(this, 0, 83);
skirtL.mirror = true;
skirtL.setRotationPoint(0.0F, 0.0F, 0.0F);
skirtL.addBox(-2.0F, -2.0F, -3.5F, 5, 13, 7, s);
setRotateAngle(skirtL, 0.0F, -0.17453292519943295F, -0.2617993877991494F);
armR = new ModelRenderer(this, 24, 83);
armR.setRotationPoint(-5.0F, 2.0F, 0.0F);
armR.addBox(-3.0F, -1.5F, -2.5F, 4, 10, 5, s);
setRotateAngle(armR, 0.0F, 0.0F, 0F);
armL = new ModelRenderer(this, 24, 83);
armL.mirror = true;
armL.setRotationPoint(5.0F, 2.0F, -0.0F);
armL.addBox(-1.0F, -1.5F, -2.5F, 4, 10, 5, s);
setRotateAngle(armL, 0.0F, 0.0F, 0F);
bootR = new ModelRenderer(this, 0, 103);
bootR.setRotationPoint(-2.0F, 12.0F, 0.0F);
bootR.addBox(-2.0F, 8.0F, -3.0F, 4, 4, 5, s);
setRotateAngle(bootR, 0.0F, 0.0F, 0F);
legR = new ModelRenderer(this, 42, 81);
legR.setRotationPoint(-2.0F, 12.0F, 0.0F);
legR.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, s);
setRotateAngle(legR, 0.0F, 0.0F, 0F);
helm2 = new ModelRenderer(this, 38, 42);
helm2.setRotationPoint(0.0F, 0.0F, 0.0F);
helm2.addBox(-4.49F, -4.0F, -2.5F, 1, 5, 8, s);
skirtR = new ModelRenderer(this, 0, 83);
skirtR.setRotationPoint(0.0F, 0.0F, 0.0F);
skirtR.addBox(-3.0F, -2.0F, -3.5F, 5, 13, 7, s);
setRotateAngle(skirtR, 0.0F, 0.17453292519943295F, 0.2617993877991494F);
armRpauldron = new ModelRenderer(this, 0, 72);
armRpauldron.setRotationPoint(0.0F, 0.0F, 0.0F);
armRpauldron.addBox(-4.0F, -2.0F, -3.0F, 3, 5, 6, s);
setRotateAngle(armRpauldron, 0.0F, 0.0F, 0F);
bootL = new ModelRenderer(this, 0, 103);
bootL.setRotationPoint(2.0F, 12.0F, 0.0F);
bootL.addBox(-2.0F, 8.0F, -3.0F, 4, 4, 5, s);
setRotateAngle(bootL, 0.0F, 0.0F, 0F);
helmSeam1 = new ModelRenderer(this, 30, 61);
helmSeam1.setRotationPoint(0.0F, 0.0F, 0.0F);
helmSeam1.addBox(-0.5F, -10.5F, -5.0F, 1, 7, 2, s);
helm = new ModelRenderer(this, 0, 32);
helm.setRotationPoint(0.0F, 0.0F, 0.0F);
helm.addBox(-4.5F, -10.0F, -4.5F, 9, 6, 10, s);
setRotateAngle(helm, 0F, 0.0F, 0.0F);
armLpauldron = new ModelRenderer(this, 0, 72);
armLpauldron.mirror = true;
armLpauldron.setRotationPoint(0.0F, 0.0F, 0.0F);
armLpauldron.addBox(1.0F, -2.0F, -3.0F, 3, 5, 6, s);
setRotateAngle(armLpauldron, 0.0F, 0.0F, 0F);
helm4 = new ModelRenderer(this, 38, 32);
helm4.setRotationPoint(0.0F, 0.0F, 0.0F);
helm4.addBox(-3.5F, -4.0F, 0.49F, 7, 5, 5, s);
helmSeam2 = new ModelRenderer(this, 36, 61);
helmSeam2.setRotationPoint(0.0F, 0.0F, 0.0F);
helmSeam2.addBox(-0.5F, -10.5F, -3.0F, 1, 1, 9, s);
legL = new ModelRenderer(this, 42, 81);
legL.mirror = true;
legL.setRotationPoint(2.0F, 12.0F, 0.0F);
legL.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, s);
setRotateAngle(legL, 0.0F, 0.0F, 0F);
body2 = new ModelRenderer(this, 0, 61);
body2.setRotationPoint(0.0F, 0.0F, 0.0F);
body2.addBox(-4.0F, 6.0F, -2.5F, 8, 6, 5, s);
body = new ModelRenderer(this, 0, 48);
body.setRotationPoint(0.0F, 0.0F, 0.0F);
body.addBox(-4.5F, 0.0F, -3.0F, 9, 7, 6, s);
helm3 = new ModelRenderer(this, 38, 42);
helm3.mirror = true;
helm3.setRotationPoint(0.0F, 0.0F, 0F);
helm3.addBox(3.49F, -4.0F, -2.5F, 1, 5, 8, s);
helm.addChild(helmSeam3);
helm.addChild(helmSeam4);
legL.addChild(skirtL);
helm.addChild(helm2);
legR.addChild(skirtR);
armR.addChild(armRpauldron);
helm.addChild(helmSeam1);
armL.addChild(armLpauldron);
helm.addChild(helm4);
helm.addChild(helmSeam2);
body.addChild(body2);
helm.addChild(helm3);
}
public ModelRenderer helm;
public ModelRenderer body;
public ModelRenderer armR;
public ModelRenderer armL;
public ModelRenderer legR;
public ModelRenderer legL;
public ModelRenderer bootR;
public ModelRenderer bootL;
public ModelRenderer helm2;
public ModelRenderer helm3;
public ModelRenderer helm4;
public ModelRenderer helmSeam1;
public ModelRenderer helmSeam2;
public ModelRenderer helmSeam3;
public ModelRenderer helmSeam4;
public ModelRenderer body2;
public ModelRenderer armRpauldron;
public ModelRenderer armLpauldron;
public ModelRenderer skirtR;
public ModelRenderer skirtL;
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
helm.showModel = slot == 0;
body.showModel = slot == 1;
armR.showModel = slot == 1;
armL.showModel = slot == 1;
legR.showModel = slot == 2;
legL.showModel = slot == 2;
bootL.showModel = slot == 3;
bootR.showModel = slot == 3;
bipedHeadwear.showModel = false;
int slot;
bipedHead = helm;
bipedBody = body;
bipedRightArm = armR;
bipedLeftArm = armL;
if(slot == 2) {
bipedRightLeg = legR;
bipedLeftLeg = legL;
} else {
bipedRightLeg = bootR;
bipedLeftLeg = bootL;
}
prepareForRender(entity);
super.render(entity, f, f1, f2, f3, f4, f5);
}
public ModelArmorManaweave(int slot) {
this.slot = slot;
public void prepareForRender(Entity entity) {
EntityLivingBase living = (EntityLivingBase) entity;
isSneak = living != null ? living.isSneaking() : false;
if(living != null && living instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) living;
textureWidth = 64;
textureHeight = 128;
float s = 0.2F;
helmSeam3 = new ModelRenderer(this, 26, 61);
helmSeam3.setRotationPoint(0.0F, 0.0F, 0.0F);
helmSeam3.addBox(-0.5F, -9.5F, 5.0F, 1, 11, 1, s);
helmSeam4 = new ModelRenderer(this, 39, 64);
helmSeam4.setRotationPoint(0.0F, 0.0F, 0.0F);
helmSeam4.addBox(-0.5F, 0.5F, -1.0F, 1, 1, 6, s);
skirtL = new ModelRenderer(this, 0, 83);
skirtL.mirror = true;
skirtL.setRotationPoint(0.0F, 0.0F, 0.0F);
skirtL.addBox(-2.0F, -2.0F, -3.5F, 5, 13, 7, s);
setRotateAngle(skirtL, 0.0F, -0.17453292519943295F, -0.2617993877991494F);
armR = new ModelRenderer(this, 24, 83);
armR.setRotationPoint(-5.0F, 2.0F, 0.0F);
armR.addBox(-3.0F, -1.5F, -2.5F, 4, 10, 5, s);
setRotateAngle(armR, 0.0F, 0.0F, 0F);
armL = new ModelRenderer(this, 24, 83);
armL.mirror = true;
armL.setRotationPoint(5.0F, 2.0F, -0.0F);
armL.addBox(-1.0F, -1.5F, -2.5F, 4, 10, 5, s);
setRotateAngle(armL, 0.0F, 0.0F, 0F);
bootR = new ModelRenderer(this, 0, 103);
bootR.setRotationPoint(-2.0F, 12.0F, 0.0F);
bootR.addBox(-2.0F, 8.0F, -3.0F, 4, 4, 5, s);
setRotateAngle(bootR, 0.0F, 0.0F, 0F);
legR = new ModelRenderer(this, 42, 81);
legR.setRotationPoint(-2.0F, 12.0F, 0.0F);
legR.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, s);
setRotateAngle(legR, 0.0F, 0.0F, 0F);
helm2 = new ModelRenderer(this, 38, 42);
helm2.setRotationPoint(0.0F, 0.0F, 0.0F);
helm2.addBox(-4.49F, -4.0F, -2.5F, 1, 5, 8, s);
skirtR = new ModelRenderer(this, 0, 83);
skirtR.setRotationPoint(0.0F, 0.0F, 0.0F);
skirtR.addBox(-3.0F, -2.0F, -3.5F, 5, 13, 7, s);
setRotateAngle(skirtR, 0.0F, 0.17453292519943295F, 0.2617993877991494F);
armRpauldron = new ModelRenderer(this, 0, 72);
armRpauldron.setRotationPoint(0.0F, 0.0F, 0.0F);
armRpauldron.addBox(-4.0F, -2.0F, -3.0F, 3, 5, 6, s);
setRotateAngle(armRpauldron, 0.0F, 0.0F, 0F);
bootL = new ModelRenderer(this, 0, 103);
bootL.setRotationPoint(2.0F, 12.0F, 0.0F);
bootL.addBox(-2.0F, 8.0F, -3.0F, 4, 4, 5, s);
setRotateAngle(bootL, 0.0F, 0.0F, 0F);
helmSeam1 = new ModelRenderer(this, 30, 61);
helmSeam1.setRotationPoint(0.0F, 0.0F, 0.0F);
helmSeam1.addBox(-0.5F, -10.5F, -5.0F, 1, 7, 2, s);
helm = new ModelRenderer(this, 0, 32);
helm.setRotationPoint(0.0F, 0.0F, 0.0F);
helm.addBox(-4.5F, -10.0F, -4.5F, 9, 6, 10, s);
setRotateAngle(helm, 0F, 0.0F, 0.0F);
armLpauldron = new ModelRenderer(this, 0, 72);
armLpauldron.mirror = true;
armLpauldron.setRotationPoint(0.0F, 0.0F, 0.0F);
armLpauldron.addBox(1.0F, -2.0F, -3.0F, 3, 5, 6, s);
setRotateAngle(armLpauldron, 0.0F, 0.0F, 0F);
helm4 = new ModelRenderer(this, 38, 32);
helm4.setRotationPoint(0.0F, 0.0F, 0.0F);
helm4.addBox(-3.5F, -4.0F, 0.49F, 7, 5, 5, s);
helmSeam2 = new ModelRenderer(this, 36, 61);
helmSeam2.setRotationPoint(0.0F, 0.0F, 0.0F);
helmSeam2.addBox(-0.5F, -10.5F, -3.0F, 1, 1, 9, s);
legL = new ModelRenderer(this, 42, 81);
legL.mirror = true;
legL.setRotationPoint(2.0F, 12.0F, 0.0F);
legL.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, s);
setRotateAngle(legL, 0.0F, 0.0F, 0F);
body2 = new ModelRenderer(this, 0, 61);
body2.setRotationPoint(0.0F, 0.0F, 0.0F);
body2.addBox(-4.0F, 6.0F, -2.5F, 8, 6, 5, s);
body = new ModelRenderer(this, 0, 48);
body.setRotationPoint(0.0F, 0.0F, 0.0F);
body.addBox(-4.5F, 0.0F, -3.0F, 9, 7, 6, s);
helm3 = new ModelRenderer(this, 38, 42);
helm3.mirror = true;
helm3.setRotationPoint(0.0F, 0.0F, 0F);
helm3.addBox(3.49F, -4.0F, -2.5F, 1, 5, 8, s);
helm.addChild(helmSeam3);
helm.addChild(helmSeam4);
legL.addChild(skirtL);
helm.addChild(helm2);
legR.addChild(skirtR);
armR.addChild(armRpauldron);
helm.addChild(helmSeam1);
armL.addChild(armLpauldron);
helm.addChild(helm4);
helm.addChild(helmSeam2);
body.addChild(body2);
helm.addChild(helm3);
}
ItemStack itemstack = player.inventory.getCurrentItem();
heldItemRight = itemstack != null ? 1 : 0;
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
helm.showModel = slot == 0;
body.showModel = slot == 1;
armR.showModel = slot == 1;
armL.showModel = slot == 1;
legR.showModel = slot == 2;
legL.showModel = slot == 2;
bootL.showModel = slot == 3;
bootR.showModel = slot == 3;
bipedHeadwear.showModel = false;
aimedBow = false;
if (itemstack != null && player.getItemInUseCount() > 0) {
EnumAction enumaction = itemstack.getItemUseAction();
bipedHead = helm;
bipedBody = body;
bipedRightArm = armR;
bipedLeftArm = armL;
if(slot == 2) {
bipedRightLeg = legR;
bipedLeftLeg = legL;
} else {
bipedRightLeg = bootR;
bipedLeftLeg = bootL;
}
prepareForRender(entity);
super.render(entity, f, f1, f2, f3, f4, f5);
}
public void prepareForRender(Entity entity) {
EntityLivingBase living = (EntityLivingBase) entity;
isSneak = living != null ? living.isSneaking() : false;
if(living != null && living instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) living;
ItemStack itemstack = player.inventory.getCurrentItem();
heldItemRight = itemstack != null ? 1 : 0;
aimedBow = false;
if (itemstack != null && player.getItemInUseCount() > 0) {
EnumAction enumaction = itemstack.getItemUseAction();
if (enumaction == EnumAction.BLOCK)
heldItemRight = 3;
else if (enumaction == EnumAction.BOW)
aimedBow = true;
}
}
}
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
if (enumaction == EnumAction.BLOCK)
heldItemRight = 3;
else if (enumaction == EnumAction.BOW)
aimedBow = true;
}
}
}
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
@@ -19,270 +19,270 @@ import net.minecraft.item.EnumAction;
import net.minecraft.item.ItemStack;
public class ModelArmorTerrasteel extends ModelBiped {
public ModelRenderer helm;
public ModelRenderer body;
public ModelRenderer armr;
public ModelRenderer armL;
public ModelRenderer belt;
public ModelRenderer bootR;
public ModelRenderer bootL;
public ModelRenderer helm2;
public ModelRenderer helm3;
public ModelRenderer helm4;
public ModelRenderer helmLeaf1;
public ModelRenderer helmLeaf2;
public ModelRenderer helmLeaf3;
public ModelRenderer helmLeaf4;
public ModelRenderer helmLeaf5;
public ModelRenderer helmLeaf6;
public ModelRenderer helmbranch1;
public ModelRenderer helmbranch2;
public ModelRenderer helmbranch3;
public ModelRenderer helmbranch4;
public ModelRenderer body2;
public ModelRenderer armRpauldron;
public ModelRenderer armRbranch1;
public ModelRenderer armRbranch2;
public ModelRenderer armLpauldron;
public ModelRenderer armLbranch1;
public ModelRenderer armLbranch2;
public ModelRenderer legR;
public ModelRenderer legL;
public ModelRenderer bootR1;
public ModelRenderer bootRbranch;
public ModelRenderer bootL2;
public ModelRenderer bootLbranch;
int slot;
public ModelArmorTerrasteel(int slot) {
this.slot = slot;
textureWidth = 64;
textureHeight = 128;
float s = 0.2F;
armr = new ModelRenderer(this, 0, 77);
armr.setRotationPoint(-5.0F, 2.0F, -0.0F);
armr.addBox(-3.0F, 3.0F, -2.0F, 4, 7, 4, s);
setRotateAngle(armr, 0.0F, 0.0F, 0F);
body = new ModelRenderer(this, 0, 44);
body.setRotationPoint(0.0F, 0.0F, 0.0F);
body.addBox(-4.5F, 0.0F, -3.5F, 9, 6, 6, s);
setRotateAngle(body, 0F, 0.0F, 0.0F);
helm4 = new ModelRenderer(this, 56, 32);
helm4.setRotationPoint(0.0F, 0.0F, 0.0F);
helm4.addBox(-1.0F, -7.5F, -6.5F, 2, 6, 2, s);
setRotateAngle(helm4, 0F, 0.0F, 0.0F);
bootR1 = new ModelRenderer(this, 32, 77);
bootR1.setRotationPoint(0.0F, 0.0F, 0.0F);
bootR1.addBox(-2.0F, 6.0F, -2.0F, 4, 2, 4, s);
helmbranch4 = new ModelRenderer(this, 34, 43);
helmbranch4.mirror = true;
helmbranch4.setRotationPoint(0.0F, 0.0F, 0.0F);
helmbranch4.addBox(-2.0F, -8.0F, -4.0F, 1, 2, 7, s);
setRotateAngle(helmbranch4, 0.2617993877991494F, 0.0F, 1.0471975511965976F);
bootL = new ModelRenderer(this, 32, 83);
bootL.mirror = true;
bootL.setRotationPoint(1.9F, 12.0F, 0.0F);
bootL.addBox(-2.0F, 8.0F, -3.0F, 4, 4, 5, s);
setRotateAngle(bootL, 0.0F, 0.0F, 0F);
bootR = new ModelRenderer(this, 32, 83);
bootR.setRotationPoint(-1.9F, 12.0F, 0.1F);
bootR.addBox(-2.0F, 8.0F, -3.0F, 4, 4, 5, s);
setRotateAngle(bootR, 0.0F, 0.0F, 0F);
helmLeaf5 = new ModelRenderer(this, 50, 32);
helmLeaf5.mirror = true;
helmLeaf5.setRotationPoint(0.0F, 0.2F, 0.0F);
helmLeaf5.addBox(-1.0F, -11.0F, -4.5F, 2, 5, 1, s);
setRotateAngle(helmLeaf5, -0.5235987755982988F, -0.5235987755982988F, 0.5235987755982988F);
bootLbranch = new ModelRenderer(this, 48, 77);
bootLbranch.mirror = true;
bootLbranch.setRotationPoint(0.0F, 0.0F, 0.0F);
bootLbranch.addBox(8.0F, 1.0F, -2.0F, 1, 2, 5, s);
setRotateAngle(bootLbranch, 0.2617993877991494F, 0.0F, 1.0471975511965976F);
helmLeaf4 = new ModelRenderer(this, 50, 32);
helmLeaf4.mirror = true;
helmLeaf4.setRotationPoint(0.0F, 0.2F, 0.0F);
helmLeaf4.addBox(-1.5F, -9.0F, -6.0F, 2, 3, 1, s);
setRotateAngle(helmLeaf4, -0.2617993877991494F, -0.2617993877991494F, 0.5235987755982988F);
helmLeaf2 = new ModelRenderer(this, 50, 32);
helmLeaf2.setRotationPoint(0.0F, 0.2F, 0.0F);
helmLeaf2.addBox(-1.0F, -11.0F, -4.5F, 2, 5, 1, s);
setRotateAngle(helmLeaf2, -0.5235987755982988F, 0.5235987755982988F, -0.5235987755982988F);
helm = new ModelRenderer(this, 0, 32);
helm.setRotationPoint(0.0F, 0.0F, 0.0F);
helm.addBox(-4.0F, -8.0F, -4.5F, 8, 3, 9, s);
setRotateAngle(helm, 0.08726646259971647F, 0.0F, 0.0F);
helm2 = new ModelRenderer(this, 34, 32);
helm2.setRotationPoint(0.0F, 0.0F, 0.0F);
helm2.addBox(-4.0F, -5.0F, -4.5F, 2, 5, 6, s);
helm3 = new ModelRenderer(this, 34, 32);
helm3.mirror = true;
helm3.setRotationPoint(0.0F, 0.0F, 0.0F);
helm3.addBox(2.0F, -5.0F, -4.5F, 2, 5, 6, s);
helmbranch1 = new ModelRenderer(this, 34, 43);
helmbranch1.mirror = true;
helmbranch1.setRotationPoint(0.0F, 0.0F, 0F);
helmbranch1.addBox(-2.0F, -10.0F, -1.0F, 1, 2, 7, s);
setRotateAngle(helmbranch1, 0.5235987755982988F, 0.0F, -0.08726646259971647F);
bootL2 = new ModelRenderer(this, 32, 77);
bootL2.mirror = true;
bootL2.setRotationPoint(0.0F, 0.0F, 0.0F);
bootL2.addBox(-2.0F, 6.0F, -2.0F, 4, 2, 4, s);
helmbranch2 = new ModelRenderer(this, 34, 43);
helmbranch2.setRotationPoint(0.0F, 0.0F, 0.0F);
helmbranch2.addBox(1.0F, -10.0F, -1.0F, 1, 2, 7, s);
setRotateAngle(helmbranch2, 0.5235987755982988F, 0.0F, 0.08726646259971647F);
legR = new ModelRenderer(this, 16, 77);
legR.setRotationPoint(-1.9F, 12.0F, 0.0F);
legR.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, s);
setRotateAngle(legR, 0.0F, 0.0F, 0F);
helmLeaf6 = new ModelRenderer(this, 50, 32);
helmLeaf6.mirror = true;
helmLeaf6.setRotationPoint(0.0F, 0.2F, 0.0F);
helmLeaf6.addBox(-0.5F, -13.0F, -3.0F, 2, 7, 1, s);
setRotateAngle(helmLeaf6, -0.7853981633974483F, -0.7853981633974483F, 0.7853981633974483F);
armLbranch1 = new ModelRenderer(this, 51, 44);
armLbranch1.mirror = true;
armLbranch1.setRotationPoint(0.0F, 0.0F, -0.0F);
armLbranch1.addBox(2.5F, -5.0F, -1.0F, 1, 5, 2, s);
setRotateAngle(armLbranch1, 0.0F, 0.0F, 0.7853981633974483F);
bootRbranch = new ModelRenderer(this, 48, 77);
bootRbranch.setRotationPoint(0.0F, 0.0F, 0.0F);
bootRbranch.addBox(-9.0F, 1.0F, -2.0F, 1, 2, 5, s);
setRotateAngle(bootRbranch, 0.2617993877991494F, 0.0F, -1.0471975511965976F);
armRbranch2 = new ModelRenderer(this, 50, 43);
armRbranch2.setRotationPoint(0.0F, 0.0F, 0.0F);
armRbranch2.addBox(-1.5F, -5.0F, -1.5F, 1, 5, 3, s);
setRotateAngle(armRbranch2, 0.0F, 0.0F, -0.5235987755982988F);
helmLeaf3 = new ModelRenderer(this, 50, 32);
helmLeaf3.setRotationPoint(0.0F, 0.2F, 0.0F);
helmLeaf3.addBox(-1.5F, -13.0F, -3.0F, 2, 7, 1, s);
setRotateAngle(helmLeaf3, -0.7853981633974483F, 0.7853981633974483F, -0.7853981633974483F);
armRpauldron = new ModelRenderer(this, 0, 66);
armRpauldron.setRotationPoint(0.0F, 0.0F, 0.0F);
armRpauldron.addBox(-4.0F, -2.0F, -3.0F, 5, 5, 6, s);
armLbranch2 = new ModelRenderer(this, 50, 43);
armLbranch2.mirror = true;
armLbranch2.setRotationPoint(0.0F, 0.0F, -0.0F);
armLbranch2.addBox(0.5F, -5.0F, -1.5F, 1, 5, 3, s);
setRotateAngle(armLbranch2, 0.0F, 0.0F, 0.5235987755982988F);
armL = new ModelRenderer(this, 0, 77);
armL.mirror = true;
armL.setRotationPoint(5.0F, 2.0F, -0.0F);
armL.addBox(-1.0F, 3.0F, -2.0F, 4, 7, 4, s);
setRotateAngle(armL, 0.0F, 0.0F, 0F);
body2 = new ModelRenderer(this, 0, 57);
body2.setRotationPoint(0.0F, 0.0F, 0.0F);
body2.addBox(-4.0F, 6.0F, -2.5F, 8, 4, 5, s);
setRotateAngle(body2, -0.08726646259971647F, 0.0F, 0.0F);
helmbranch3 = new ModelRenderer(this, 34, 43);
helmbranch3.setRotationPoint(0.0F, 0.0F, 0.0F);
helmbranch3.addBox(1.0F, -8.0F, -4.0F, 1, 2, 7, s);
setRotateAngle(helmbranch3, 0.2617993877991494F, 0.0F, -1.0471975511965976F);
armRbranch1 = new ModelRenderer(this, 51, 44);
armRbranch1.setRotationPoint(0.0F, 0.0F, 0.0F);
armRbranch1.addBox(-3.5F, -5.0F, -1.0F, 1, 5, 2, s);
setRotateAngle(armRbranch1, 0.0F, 0.0F, -0.7853981633974483F);
belt = new ModelRenderer(this, 22, 66);
belt.setRotationPoint(0.0F, 0.0F, 0.0F);
belt.addBox(-4.5F, 9.5F, -3.0F, 9, 3, 6, s);
helmLeaf1 = new ModelRenderer(this, 50, 32);
helmLeaf1.setRotationPoint(0.0F, 0.2F, 0.0F);
helmLeaf1.addBox(-0.5F, -9.0F, -6.0F, 2, 3, 1, s);
setRotateAngle(helmLeaf1, -0.2617993877991494F, 0.2617993877991494F, -0.5235987755982988F);
armLpauldron = new ModelRenderer(this, 0, 66);
armLpauldron.mirror = true;
armLpauldron.setRotationPoint(0.0F, 0.0F, -0.0F);
armLpauldron.addBox(-1.0F, -2.0F, -3.0F, 5, 5, 6, s);
legL = new ModelRenderer(this, 16, 77);
legL.mirror = true;
legL.setRotationPoint(1.9F, 12.0F, 0.0F);
legL.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, s);
setRotateAngle(legL, 0.0F, 0.0F, 0F);
helm.addChild(helm4);
bootR.addChild(bootR1);
helm.addChild(helmbranch4);
helm.addChild(helmLeaf5);
bootL.addChild(bootLbranch);
helm.addChild(helmLeaf4);
helm.addChild(helmLeaf2);
helm.addChild(helm2);
helm.addChild(helm3);
helm.addChild(helmbranch1);
bootL.addChild(bootL2);
helm.addChild(helmbranch2);
belt.addChild(legR);
helm.addChild(helmLeaf6);
armLpauldron.addChild(armLbranch1);
bootR.addChild(bootRbranch);
armRpauldron.addChild(armRbranch2);
helm.addChild(helmLeaf3);
armr.addChild(armRpauldron);
armLpauldron.addChild(armLbranch2);
body.addChild(body2);
helm.addChild(helmbranch3);
armRpauldron.addChild(armRbranch1);
helm.addChild(helmLeaf1);
armL.addChild(armLpauldron);
belt.addChild(legL);
}
public ModelRenderer helm;
public ModelRenderer body;
public ModelRenderer armr;
public ModelRenderer armL;
public ModelRenderer belt;
public ModelRenderer bootR;
public ModelRenderer bootL;
public ModelRenderer helm2;
public ModelRenderer helm3;
public ModelRenderer helm4;
public ModelRenderer helmLeaf1;
public ModelRenderer helmLeaf2;
public ModelRenderer helmLeaf3;
public ModelRenderer helmLeaf4;
public ModelRenderer helmLeaf5;
public ModelRenderer helmLeaf6;
public ModelRenderer helmbranch1;
public ModelRenderer helmbranch2;
public ModelRenderer helmbranch3;
public ModelRenderer helmbranch4;
public ModelRenderer body2;
public ModelRenderer armRpauldron;
public ModelRenderer armRbranch1;
public ModelRenderer armRbranch2;
public ModelRenderer armLpauldron;
public ModelRenderer armLbranch1;
public ModelRenderer armLbranch2;
public ModelRenderer legR;
public ModelRenderer legL;
public ModelRenderer bootR1;
public ModelRenderer bootRbranch;
public ModelRenderer bootL2;
public ModelRenderer bootLbranch;
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
helm.showModel = slot == 0;
body.showModel = slot == 1;
armr.showModel = slot == 1;
armL.showModel = slot == 1;
legR.showModel = slot == 2;
legL.showModel = slot == 2;
bootL.showModel = slot == 3;
bootR.showModel = slot == 3;
bipedHeadwear.showModel = false;
int slot;
bipedHead = helm;
bipedBody = body;
bipedRightArm = armr;
bipedLeftArm = armL;
if(slot == 2) {
bipedRightLeg = legR;
bipedLeftLeg = legL;
} else {
bipedRightLeg = bootR;
bipedLeftLeg = bootL;
}
prepareForRender(entity);
super.render(entity, f, f1, f2, f3, f4, f5);
}
public void prepareForRender(Entity entity) {
EntityLivingBase living = (EntityLivingBase) entity;
isSneak = living != null ? living.isSneaking() : false;
if(living != null && living instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) living;
public ModelArmorTerrasteel(int slot) {
this.slot = slot;
ItemStack itemstack = player.inventory.getCurrentItem();
heldItemRight = itemstack != null ? 1 : 0;
textureWidth = 64;
textureHeight = 128;
float s = 0.2F;
armr = new ModelRenderer(this, 0, 77);
armr.setRotationPoint(-5.0F, 2.0F, -0.0F);
armr.addBox(-3.0F, 3.0F, -2.0F, 4, 7, 4, s);
setRotateAngle(armr, 0.0F, 0.0F, 0F);
body = new ModelRenderer(this, 0, 44);
body.setRotationPoint(0.0F, 0.0F, 0.0F);
body.addBox(-4.5F, 0.0F, -3.5F, 9, 6, 6, s);
setRotateAngle(body, 0F, 0.0F, 0.0F);
helm4 = new ModelRenderer(this, 56, 32);
helm4.setRotationPoint(0.0F, 0.0F, 0.0F);
helm4.addBox(-1.0F, -7.5F, -6.5F, 2, 6, 2, s);
setRotateAngle(helm4, 0F, 0.0F, 0.0F);
bootR1 = new ModelRenderer(this, 32, 77);
bootR1.setRotationPoint(0.0F, 0.0F, 0.0F);
bootR1.addBox(-2.0F, 6.0F, -2.0F, 4, 2, 4, s);
helmbranch4 = new ModelRenderer(this, 34, 43);
helmbranch4.mirror = true;
helmbranch4.setRotationPoint(0.0F, 0.0F, 0.0F);
helmbranch4.addBox(-2.0F, -8.0F, -4.0F, 1, 2, 7, s);
setRotateAngle(helmbranch4, 0.2617993877991494F, 0.0F, 1.0471975511965976F);
bootL = new ModelRenderer(this, 32, 83);
bootL.mirror = true;
bootL.setRotationPoint(1.9F, 12.0F, 0.0F);
bootL.addBox(-2.0F, 8.0F, -3.0F, 4, 4, 5, s);
setRotateAngle(bootL, 0.0F, 0.0F, 0F);
bootR = new ModelRenderer(this, 32, 83);
bootR.setRotationPoint(-1.9F, 12.0F, 0.1F);
bootR.addBox(-2.0F, 8.0F, -3.0F, 4, 4, 5, s);
setRotateAngle(bootR, 0.0F, 0.0F, 0F);
helmLeaf5 = new ModelRenderer(this, 50, 32);
helmLeaf5.mirror = true;
helmLeaf5.setRotationPoint(0.0F, 0.2F, 0.0F);
helmLeaf5.addBox(-1.0F, -11.0F, -4.5F, 2, 5, 1, s);
setRotateAngle(helmLeaf5, -0.5235987755982988F, -0.5235987755982988F, 0.5235987755982988F);
bootLbranch = new ModelRenderer(this, 48, 77);
bootLbranch.mirror = true;
bootLbranch.setRotationPoint(0.0F, 0.0F, 0.0F);
bootLbranch.addBox(8.0F, 1.0F, -2.0F, 1, 2, 5, s);
setRotateAngle(bootLbranch, 0.2617993877991494F, 0.0F, 1.0471975511965976F);
helmLeaf4 = new ModelRenderer(this, 50, 32);
helmLeaf4.mirror = true;
helmLeaf4.setRotationPoint(0.0F, 0.2F, 0.0F);
helmLeaf4.addBox(-1.5F, -9.0F, -6.0F, 2, 3, 1, s);
setRotateAngle(helmLeaf4, -0.2617993877991494F, -0.2617993877991494F, 0.5235987755982988F);
helmLeaf2 = new ModelRenderer(this, 50, 32);
helmLeaf2.setRotationPoint(0.0F, 0.2F, 0.0F);
helmLeaf2.addBox(-1.0F, -11.0F, -4.5F, 2, 5, 1, s);
setRotateAngle(helmLeaf2, -0.5235987755982988F, 0.5235987755982988F, -0.5235987755982988F);
helm = new ModelRenderer(this, 0, 32);
helm.setRotationPoint(0.0F, 0.0F, 0.0F);
helm.addBox(-4.0F, -8.0F, -4.5F, 8, 3, 9, s);
setRotateAngle(helm, 0.08726646259971647F, 0.0F, 0.0F);
helm2 = new ModelRenderer(this, 34, 32);
helm2.setRotationPoint(0.0F, 0.0F, 0.0F);
helm2.addBox(-4.0F, -5.0F, -4.5F, 2, 5, 6, s);
helm3 = new ModelRenderer(this, 34, 32);
helm3.mirror = true;
helm3.setRotationPoint(0.0F, 0.0F, 0.0F);
helm3.addBox(2.0F, -5.0F, -4.5F, 2, 5, 6, s);
helmbranch1 = new ModelRenderer(this, 34, 43);
helmbranch1.mirror = true;
helmbranch1.setRotationPoint(0.0F, 0.0F, 0F);
helmbranch1.addBox(-2.0F, -10.0F, -1.0F, 1, 2, 7, s);
setRotateAngle(helmbranch1, 0.5235987755982988F, 0.0F, -0.08726646259971647F);
bootL2 = new ModelRenderer(this, 32, 77);
bootL2.mirror = true;
bootL2.setRotationPoint(0.0F, 0.0F, 0.0F);
bootL2.addBox(-2.0F, 6.0F, -2.0F, 4, 2, 4, s);
helmbranch2 = new ModelRenderer(this, 34, 43);
helmbranch2.setRotationPoint(0.0F, 0.0F, 0.0F);
helmbranch2.addBox(1.0F, -10.0F, -1.0F, 1, 2, 7, s);
setRotateAngle(helmbranch2, 0.5235987755982988F, 0.0F, 0.08726646259971647F);
legR = new ModelRenderer(this, 16, 77);
legR.setRotationPoint(-1.9F, 12.0F, 0.0F);
legR.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, s);
setRotateAngle(legR, 0.0F, 0.0F, 0F);
helmLeaf6 = new ModelRenderer(this, 50, 32);
helmLeaf6.mirror = true;
helmLeaf6.setRotationPoint(0.0F, 0.2F, 0.0F);
helmLeaf6.addBox(-0.5F, -13.0F, -3.0F, 2, 7, 1, s);
setRotateAngle(helmLeaf6, -0.7853981633974483F, -0.7853981633974483F, 0.7853981633974483F);
armLbranch1 = new ModelRenderer(this, 51, 44);
armLbranch1.mirror = true;
armLbranch1.setRotationPoint(0.0F, 0.0F, -0.0F);
armLbranch1.addBox(2.5F, -5.0F, -1.0F, 1, 5, 2, s);
setRotateAngle(armLbranch1, 0.0F, 0.0F, 0.7853981633974483F);
bootRbranch = new ModelRenderer(this, 48, 77);
bootRbranch.setRotationPoint(0.0F, 0.0F, 0.0F);
bootRbranch.addBox(-9.0F, 1.0F, -2.0F, 1, 2, 5, s);
setRotateAngle(bootRbranch, 0.2617993877991494F, 0.0F, -1.0471975511965976F);
armRbranch2 = new ModelRenderer(this, 50, 43);
armRbranch2.setRotationPoint(0.0F, 0.0F, 0.0F);
armRbranch2.addBox(-1.5F, -5.0F, -1.5F, 1, 5, 3, s);
setRotateAngle(armRbranch2, 0.0F, 0.0F, -0.5235987755982988F);
helmLeaf3 = new ModelRenderer(this, 50, 32);
helmLeaf3.setRotationPoint(0.0F, 0.2F, 0.0F);
helmLeaf3.addBox(-1.5F, -13.0F, -3.0F, 2, 7, 1, s);
setRotateAngle(helmLeaf3, -0.7853981633974483F, 0.7853981633974483F, -0.7853981633974483F);
armRpauldron = new ModelRenderer(this, 0, 66);
armRpauldron.setRotationPoint(0.0F, 0.0F, 0.0F);
armRpauldron.addBox(-4.0F, -2.0F, -3.0F, 5, 5, 6, s);
armLbranch2 = new ModelRenderer(this, 50, 43);
armLbranch2.mirror = true;
armLbranch2.setRotationPoint(0.0F, 0.0F, -0.0F);
armLbranch2.addBox(0.5F, -5.0F, -1.5F, 1, 5, 3, s);
setRotateAngle(armLbranch2, 0.0F, 0.0F, 0.5235987755982988F);
armL = new ModelRenderer(this, 0, 77);
armL.mirror = true;
armL.setRotationPoint(5.0F, 2.0F, -0.0F);
armL.addBox(-1.0F, 3.0F, -2.0F, 4, 7, 4, s);
setRotateAngle(armL, 0.0F, 0.0F, 0F);
body2 = new ModelRenderer(this, 0, 57);
body2.setRotationPoint(0.0F, 0.0F, 0.0F);
body2.addBox(-4.0F, 6.0F, -2.5F, 8, 4, 5, s);
setRotateAngle(body2, -0.08726646259971647F, 0.0F, 0.0F);
helmbranch3 = new ModelRenderer(this, 34, 43);
helmbranch3.setRotationPoint(0.0F, 0.0F, 0.0F);
helmbranch3.addBox(1.0F, -8.0F, -4.0F, 1, 2, 7, s);
setRotateAngle(helmbranch3, 0.2617993877991494F, 0.0F, -1.0471975511965976F);
armRbranch1 = new ModelRenderer(this, 51, 44);
armRbranch1.setRotationPoint(0.0F, 0.0F, 0.0F);
armRbranch1.addBox(-3.5F, -5.0F, -1.0F, 1, 5, 2, s);
setRotateAngle(armRbranch1, 0.0F, 0.0F, -0.7853981633974483F);
belt = new ModelRenderer(this, 22, 66);
belt.setRotationPoint(0.0F, 0.0F, 0.0F);
belt.addBox(-4.5F, 9.5F, -3.0F, 9, 3, 6, s);
helmLeaf1 = new ModelRenderer(this, 50, 32);
helmLeaf1.setRotationPoint(0.0F, 0.2F, 0.0F);
helmLeaf1.addBox(-0.5F, -9.0F, -6.0F, 2, 3, 1, s);
setRotateAngle(helmLeaf1, -0.2617993877991494F, 0.2617993877991494F, -0.5235987755982988F);
armLpauldron = new ModelRenderer(this, 0, 66);
armLpauldron.mirror = true;
armLpauldron.setRotationPoint(0.0F, 0.0F, -0.0F);
armLpauldron.addBox(-1.0F, -2.0F, -3.0F, 5, 5, 6, s);
legL = new ModelRenderer(this, 16, 77);
legL.mirror = true;
legL.setRotationPoint(1.9F, 12.0F, 0.0F);
legL.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, s);
setRotateAngle(legL, 0.0F, 0.0F, 0F);
aimedBow = false;
if (itemstack != null && player.getItemInUseCount() > 0) {
EnumAction enumaction = itemstack.getItemUseAction();
helm.addChild(helm4);
bootR.addChild(bootR1);
helm.addChild(helmbranch4);
helm.addChild(helmLeaf5);
bootL.addChild(bootLbranch);
helm.addChild(helmLeaf4);
helm.addChild(helmLeaf2);
helm.addChild(helm2);
helm.addChild(helm3);
helm.addChild(helmbranch1);
bootL.addChild(bootL2);
helm.addChild(helmbranch2);
belt.addChild(legR);
helm.addChild(helmLeaf6);
armLpauldron.addChild(armLbranch1);
bootR.addChild(bootRbranch);
armRpauldron.addChild(armRbranch2);
helm.addChild(helmLeaf3);
armr.addChild(armRpauldron);
armLpauldron.addChild(armLbranch2);
body.addChild(body2);
helm.addChild(helmbranch3);
armRpauldron.addChild(armRbranch1);
helm.addChild(helmLeaf1);
armL.addChild(armLpauldron);
belt.addChild(legL);
}
if (enumaction == EnumAction.BLOCK)
heldItemRight = 3;
else if (enumaction == EnumAction.BOW)
aimedBow = true;
}
}
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
helm.showModel = slot == 0;
body.showModel = slot == 1;
armr.showModel = slot == 1;
armL.showModel = slot == 1;
legR.showModel = slot == 2;
legL.showModel = slot == 2;
bootL.showModel = slot == 3;
bootR.showModel = slot == 3;
bipedHeadwear.showModel = false;
bipedHead = helm;
bipedBody = body;
bipedRightArm = armr;
bipedLeftArm = armL;
if(slot == 2) {
bipedRightLeg = legR;
bipedLeftLeg = legL;
} else {
bipedRightLeg = bootR;
bipedLeftLeg = bootL;
}
prepareForRender(entity);
super.render(entity, f, f1, f2, f3, f4, f5);
}
public void prepareForRender(Entity entity) {
EntityLivingBase living = (EntityLivingBase) entity;
isSneak = living != null ? living.isSneaking() : false;
if(living != null && living instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) living;
ItemStack itemstack = player.inventory.getCurrentItem();
heldItemRight = itemstack != null ? 1 : 0;
aimedBow = false;
if (itemstack != null && player.getItemInUseCount() > 0) {
EnumAction enumaction = itemstack.getItemUseAction();
if (enumaction == EnumAction.BLOCK)
heldItemRight = 3;
else if (enumaction == EnumAction.BOW)
aimedBow = true;
}
}
}
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
@@ -36,9 +36,9 @@ public class RenderCorporeaSpark extends RenderSparkBase<EntityCorporeaSpark> {
}
@Override
public void colorSpinningIcon(EntityCorporeaSpark entity) {
public void colorSpinningIcon(EntityCorporeaSpark entity, float a) {
int network = Math.min(15, entity.getNetwork());
GlStateManager.color(EntitySheep.fleeceColorTable[network][0], EntitySheep.fleeceColorTable[network][1], EntitySheep.fleeceColorTable[network][2]);
GlStateManager.color(EntitySheep.fleeceColorTable[network][0], EntitySheep.fleeceColorTable[network][1], EntitySheep.fleeceColorTable[network][2], a);
}
@Override
@@ -26,6 +26,7 @@ import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import vazkii.botania.client.core.handler.ClientTickHandler;
import vazkii.botania.common.entity.EntitySpark;
import vazkii.botania.common.item.ItemSpark;
public class RenderSparkBase<T extends Entity> extends RenderEntity {
@@ -48,7 +49,10 @@ public class RenderSparkBase<T extends Entity> extends RenderEntity {
double time = ClientTickHandler.ticksInGame + par9;
time += new Random(par1Entity.getEntityId()).nextInt();
GlStateManager.color(1F, 1F, 1F, 0.7F + 0.3F * (float) (Math.sin(time / 5.0) + 0.5) * 2);
float a = 0.1F + (1 - par1Entity.getDataWatcher().getWatchableObjectInt(EntitySpark.INVISIBILITY_DATA_WATCHER_KEY)) * 0.8F;
GlStateManager.color(1F, 1F, 1F, (0.7F + 0.3F * (float) (Math.sin(time / 5.0) + 0.5) * 2) * a);
float scale = 0.75F + 0.1F * (float) Math.sin(time / 10);
GlStateManager.scale(scale, scale, scale);
@@ -65,7 +69,7 @@ public class RenderSparkBase<T extends Entity> extends RenderEntity {
if(spinningIcon != null) {
GlStateManager.translate(-0.02F + (float) Math.sin(time / 20) * 0.2F, 0.24F + (float) Math.cos(time / 20) * 0.2F, 0.005F);
GlStateManager.scale(0.2F, 0.2F, 0.2F);
colorSpinningIcon(tEntity);
colorSpinningIcon(tEntity, a);
func_77026_a(tessellator, spinningIcon);
}
GlStateManager.popMatrix();
@@ -81,7 +85,7 @@ public class RenderSparkBase<T extends Entity> extends RenderEntity {
return ItemSpark.worldIcon;
}
public void colorSpinningIcon(T entity) {
public void colorSpinningIcon(T entity, float a) {
// NO-OP
}
@@ -10,6 +10,9 @@
*/
package vazkii.botania.client.render.tile;
import java.awt.Color;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
@@ -52,20 +55,32 @@ public class RenderTilePool extends TileEntitySpecialRenderer {
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GlStateManager.enableRescaleNormal();
float a = MultiblockRenderHandler.rendering ? 0.6F : 1F;
GlStateManager.color(1F, 1F, 1F, a);
GlStateManager.translate(d0, d1, d2);
boolean inf = tileentity.getWorld() == null ? forceMeta == 1 : tileentity.getBlockMetadata() == 1;
boolean dil = tileentity.getWorld() == null ? forceMeta == 2 : tileentity.getBlockMetadata() == 2;
boolean fab = tileentity.getWorld() == null ? forceMeta == 3 : tileentity.getBlockMetadata() == 3;
Minecraft.getMinecraft().renderEngine.bindTexture(inf ? textureInf : dil ? textureDil : texture);
GlStateManager.translate(0.5F, 1.5F, 0.5F);
GlStateManager.scale(1F, -1F, -1F);
int hex = pool.color.getMapColor().colorValue;
int r = (hex & 0xFF0000) >> 16;
int g = (hex & 0xFF00) >> 8;
int b = (hex & 0xFF);
GlStateManager.color(r, g, b, a);
if(fab) {
float time = ClientTickHandler.ticksInGame + ClientTickHandler.partialTicks;
if(tileentity != null)
time += new Random(tileentity.getPos().hashCode()).nextInt(100000);
Color color = Color.getHSBColor(time * 0.005F, 0.6F, 1F);
GlStateManager.color((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue(), (byte) 255);
} else {
int hex = pool.color.getMapColor().colorValue;
int r = (hex & 0xFF0000) >> 16;
int g = (hex & 0xFF00) >> 8;
int b = (hex & 0xFF);
GlStateManager.color(r, g, b, a);
}
model.render();
GlStateManager.color(1F, 1F, 1F, a);
GlStateManager.scale(1F, -1F, -1F);
@@ -30,12 +30,15 @@ import net.minecraftforge.common.EnumPlantType;
import net.minecraftforge.common.IPlantable;
import vazkii.botania.api.state.BotaniaStateProps;
import vazkii.botania.api.state.enums.AltGrassVariant;
import vazkii.botania.api.lexicon.ILexiconable;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.common.Botania;
import vazkii.botania.common.item.block.ItemBlockWithMetadataAndName;
import vazkii.botania.common.lexicon.LexiconData;
import vazkii.botania.common.lib.LibBlockNames;
import net.minecraftforge.fml.common.registry.GameRegistry;
public class BlockAltGrass extends BlockMod {
public class BlockAltGrass extends BlockMod implements ILexiconable {
public BlockAltGrass() {
super(Material.grass);
@@ -92,22 +95,22 @@ public class BlockAltGrass extends BlockMod {
}
}
}
@Override
public Item getItemDropped(IBlockState state, Random p_149650_2_, int p_149650_3_) {
return Blocks.dirt.getItemDropped(state, p_149650_2_, p_149650_3_);
}
@Override
public ItemStack getPickBlock(MovingObjectPosition target, World world, BlockPos pos, EntityPlayer player) {
return new ItemStack(this, 1, getMetaFromState(world.getBlockState(pos)));
}
@Override
public boolean canSustainPlant(IBlockAccess world, BlockPos pos, EnumFacing direction, IPlantable plantable) {
return plantable.getPlantType(world, pos.down()) == EnumPlantType.Plains;
}
@Override
public void randomDisplayTick(World world, BlockPos pos, IBlockState state, Random r) {
AltGrassVariant variant = ((AltGrassVariant) state.getValue(BotaniaStateProps.ALTGRASS_VARIANT));
@@ -130,10 +133,14 @@ public class BlockAltGrass extends BlockMod {
if(r.nextInt(100) == 0) {
if(r.nextInt(100) > 25)
Botania.proxy.sparkleFX(world, pos.getX() + r.nextFloat(), pos.getY() + 1.05, pos.getZ() + r.nextFloat(), 1F, 0F, 1F, r.nextFloat() * 0.2F + 1F, 5);
else Botania.proxy.sparkleFX(world, pos.getX() + r.nextFloat(), pos.getY() + 1.05, pos.getZ() + r.nextFloat(), 1F, 1F, 0F, r.nextFloat() * 0.2F + 1F, 5);
else Botania.proxy.sparkleFX(world, pos.getX() + r.nextFloat(), pos.getY() + 1.05, pos.getZ() + r.nextFloat(), 1F, 1F, 0F, r.nextFloat() * 0.2F + 1F, 5);
}
break;
}
}
}
@Override
public LexiconEntry getEntry(World world, BlockPos pos, EntityPlayer player, ItemStack lexicon) {
return LexiconData.grassSeeds;
}
}
@@ -34,6 +34,7 @@ import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidContainerItem;
import vazkii.botania.api.internal.VanillaPacketDispatcher;
import vazkii.botania.api.lexicon.ILexiconable;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.api.mana.ManaItemHandler;
@@ -85,7 +86,8 @@ public class BlockAltar extends BlockModContainer implements ILexiconable {
public void onEntityCollidedWithBlock(World par1World, BlockPos pos, Entity par5Entity) {
if(par5Entity instanceof EntityItem) {
TileAltar tile = (TileAltar) par1World.getTileEntity(pos);
tile.collideEntityItem((EntityItem) par5Entity);
if(tile.collideEntityItem((EntityItem) par5Entity))
VanillaPacketDispatcher.dispatchTEToNearbyPlayers(tile);
}
}
@@ -158,6 +160,18 @@ public class BlockAltar extends BlockModContainer implements ILexiconable {
return false;
}
public void fillWithRain(World world, BlockPos pos) {
if(world.rand.nextInt(20) == 1) {
TileEntity tile = world.getTileEntity(pos);
if(tile instanceof TileAltar) {
TileAltar altar = (TileAltar) tile;
if(!altar.hasLava && !altar.hasWater)
altar.setWater(true);
world.updateComparatorOutputLevel(pos, this);
}
}
}
@Override
public int damageDropped(IBlockState state) {
return getMetaFromState(state);
@@ -87,11 +87,11 @@ public class BlockFelPumpkin extends BlockMod implements ILexiconable {
public void onDrops(LivingDropsEvent event) {
if(event.entity instanceof EntityBlaze && event.entity.getEntityData().getBoolean(TAG_FEL_SPAWNED))
if(event.drops.isEmpty())
event.drops.add(new EntityItem(event.entity.worldObj, event.entity.posX, event.entity.posY, event.entity.posZ, new ItemStack(Items.blaze_powder, 4)));
event.drops.add(new EntityItem(event.entity.worldObj, event.entity.posX, event.entity.posY, event.entity.posZ, new ItemStack(Items.blaze_powder, 6)));
else for(EntityItem item : event.drops) {
ItemStack stack = item.getEntityItem();
if(stack.getItem() == Items.blaze_rod)
item.setEntityItemStack(new ItemStack(Items.blaze_powder, stack.stackSize * 6));
item.setEntityItemStack(new ItemStack(Items.blaze_powder, stack.stackSize * 10));
}
}
@@ -18,11 +18,8 @@ import net.minecraft.block.Block;
import net.minecraft.block.BlockSkull;
import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTUtil;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.tileentity.TileEntitySkull;
@@ -54,7 +51,7 @@ public class BlockGaiaHead extends BlockSkull {
public Item getItem(World p_149694_1_, BlockPos pos) {
return ModItems.gaiaHead;
}
@Override
public List<ItemStack> getDrops(IBlockAccess p_149749_1_, BlockPos pos, IBlockState state, int fortune) {
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
@@ -75,7 +72,7 @@ public class BlockGaiaHead extends BlockSkull {
public Item getItemDropped(IBlockState p_149650_1_, Random p_149650_2_, int p_149650_3_) {
return ModItems.gaiaHead;
}
@Override
public int getDamageValue(World p_149643_1_, BlockPos pos) {
return 0;
@@ -78,6 +78,12 @@ public class BlockModDoubleFlower extends BlockDoublePlant implements ILexiconab
return p_149692_1_ & 7;
}
@Override
@SideOnly(Side.CLIENT)
public IIcon func_149888_a(boolean top, int index) {
return (ConfigHandler.altFlowerTextures ? top ? doublePlantTopIconsAlt : doublePlantBottomIconsAlt : top ? doublePlantTopIcons : doublePlantBottomIcons)[index & 7];
}
@Override
public void func_149889_c(World p_149889_1_, int p_149889_2_, int p_149889_3_, int p_149889_4_, int p_149889_5_, int p_149889_6_) {
p_149889_1_.setBlock(p_149889_2_, p_149889_3_, p_149889_4_, this, p_149889_5_, p_149889_6_);
@@ -18,8 +18,6 @@ import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
@@ -36,6 +34,10 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import vazkii.botania.api.lexicon.ILexiconable;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.api.state.BotaniaStateProps;
@@ -175,25 +177,25 @@ public class BlockOpenCrate extends BlockModContainer implements ILexiconable, I
TileEntity tile = world.getTileEntity(pos);
if(tile instanceof TileCraftCrate) {
TileCraftCrate craft = (TileCraftCrate) tile;
int width = 52;
int height = 52;
int xc = res.getScaledWidth() / 2 + 20;
int yc = res.getScaledHeight() / 2 - height / 2;
Gui.drawRect(xc - 6, yc - 6, xc + width + 6, yc + height + 6, 0x22000000);
Gui.drawRect(xc - 4, yc - 4, xc + width + 4, yc + height + 4, 0x22000000);
for(int i = 0; i < 3; i++)
for(int j = 0; j < 3; j++) {
int index = i * 3 + j;
int xp = xc + j * 18;
int yp = yc + i * 18;
boolean enabled = true;
if(craft.pattern > -1)
enabled = TileCraftCrate.PATTERNS[craft.pattern][index];
Gui.drawRect(xp, yp, xp + 16, yp + 16, enabled ? 0x22FFFFFF : 0x22FF0000);
ItemStack item = craft.getStackInSlot(index);
@@ -48,13 +48,13 @@ public class BlockTeruTeruBozu extends BlockModContainer implements ILexiconable
if(stack.stackSize == 0)
e.setDead();
}
}
}
}
@Override
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing s, float xs, float ys, float zs) {
ItemStack stack = player.getCurrentEquippedItem();
if(stack != null && ((isSunflower(stack) && removeRain(world)) || (isBlueOrchid(stack) && startRain(world)))) {
if(stack != null && (isSunflower(stack) && removeRain(world) || isBlueOrchid(stack) && startRain(world))) {
if(!player.capabilities.isCreativeMode)
stack.stackSize--;
return true;
@@ -65,7 +65,7 @@ public class BlockTeruTeruBozu extends BlockModContainer implements ILexiconable
public boolean isSunflower(ItemStack stack) {
return stack.getItem() == Item.getItemFromBlock(Blocks.double_plant) && stack.getItemDamage() == 0;
}
public boolean isBlueOrchid(ItemStack stack) {
return stack.getItem() == Item.getItemFromBlock(Blocks.red_flower) && stack.getItemDamage() == 1;
}
@@ -77,7 +77,7 @@ public class BlockTeruTeruBozu extends BlockModContainer implements ILexiconable
}
return false;
}
public boolean startRain(World world) {
if(!world.isRaining()) {
if(world.rand.nextInt(10) == 0)
@@ -12,7 +12,6 @@ package vazkii.botania.common.block;
import net.minecraft.block.Block;
import net.minecraft.block.BlockDispenser;
import net.minecraft.block.material.Material;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@@ -362,7 +361,7 @@ public final class ModBlocks {
shimmerwoodPlanks = new BlockShimmerwoodPlanks();
avatar = new BlockAvatar();
altGrass = new BlockAltGrass();
ModFluffBlocks.init();
for(int i = 0; i < 16; i++)
@@ -25,7 +25,6 @@ import vazkii.botania.api.state.BotaniaStateProps;
import vazkii.botania.api.state.enums.PrismarineVariant;
import vazkii.botania.client.core.helper.IconHelper;
import vazkii.botania.common.block.BlockModFlower;
import vazkii.botania.common.block.ModBlocks;
import vazkii.botania.common.core.handler.ConfigHandler;
import vazkii.botania.common.integration.coloredlights.ColoredLightHelper;
import vazkii.botania.common.lexicon.LexiconData;
@@ -37,7 +36,7 @@ public class BlockShinyFlower extends BlockModFlower implements IInfusionStabili
private static IIcon[] icons;
private static IIcon[] iconsAlt;
public BlockShinyFlower() {
super(LibBlockNames.SHINY_FLOWER);
setLightLevel(1F);
@@ -21,7 +21,7 @@ public interface IFloatingFlower {
public IslandType getIslandType();
public void setIslandType(IslandType type);
public static enum IslandType {
GRASS(LibResources.MODEL_MINI_ISLAND),
PODZOL(LibResources.MODEL_MINI_ISLAND_PODZOL),
@@ -24,6 +24,7 @@ import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.Achievement;
@@ -38,6 +39,7 @@ import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.internal.VanillaPacketDispatcher;
import vazkii.botania.api.lexicon.ILexiconable;
import vazkii.botania.api.lexicon.LexiconEntry;
@@ -47,6 +49,7 @@ import vazkii.botania.api.wand.IWandHUD;
import vazkii.botania.api.wand.IWandable;
import vazkii.botania.client.core.helper.IconHelper;
import vazkii.botania.client.lib.LibRenderIDs;
import vazkii.botania.common.achievement.ICraftAchievement;
import vazkii.botania.common.achievement.IPickupAchievement;
import vazkii.botania.common.achievement.ModAchievements;
import vazkii.botania.common.block.BlockModContainer;
@@ -57,7 +60,7 @@ import vazkii.botania.common.lexicon.LexiconData;
import vazkii.botania.common.lib.LibBlockNames;
import net.minecraftforge.fml.common.registry.GameRegistry;
public class BlockPool extends BlockModContainer implements IWandHUD, IWandable, ILexiconable, IPickupAchievement {
public class BlockPool extends BlockModContainer implements IWandHUD, IWandable, ILexiconable, ICraftAchievement {
boolean lastFragile = false;
@@ -70,8 +73,11 @@ public class BlockPool extends BlockModContainer implements IWandHUD, IWandable,
setStepSound(soundTypeStone);
setUnlocalizedName(LibBlockNames.POOL);
setBlockBounds(0F, 0F, 0F, 1F, 0.5F, 1F);
MinecraftForge.EVENT_BUS.register(this);
setDefaultState(blockState.getBaseState().withProperty(BotaniaStateProps.POOL_VARIANT, PoolVariant.DEFAULT));
BotaniaAPI.blacklistBlockFromMagnet(this, Short.MAX_VALUE);
}
@Override
@@ -133,8 +139,9 @@ public class BlockPool extends BlockModContainer implements IWandHUD, IWandable,
@Override
public void getSubBlocks(Item par1, CreativeTabs par2, List par3) {
par3.add(new ItemStack(par1, 1, 2));
par3.add(new ItemStack(par1, 1, 0));
par3.add(new ItemStack(par1, 1, 2));
par3.add(new ItemStack(par1, 1, 3));
par3.add(new ItemStack(par1, 1, 1));
}
@@ -151,23 +158,23 @@ public class BlockPool extends BlockModContainer implements IWandHUD, IWandable,
VanillaPacketDispatcher.dispatchTEToNearbyPlayers(par1World, pos);
}
}
@Override
public void addCollisionBoxesToList(World p_149743_1_, BlockPos pos, IBlockState state, AxisAlignedBB p_149743_5_, List p_149743_6_, Entity p_149743_7_) {
float f = 1F / 16F;
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, f, 1.0F);
super.addCollisionBoxesToList(p_149743_1_, pos, state, p_149743_5_, p_149743_6_, p_149743_7_);
setBlockBounds(0.0F, 0.0F, 0.0F, f, 0.5F, 1.0F);
super.addCollisionBoxesToList(p_149743_1_, pos, state, p_149743_5_, p_149743_6_, p_149743_7_);
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, f);
super.addCollisionBoxesToList(p_149743_1_, pos, state, p_149743_5_, p_149743_6_, p_149743_7_);
setBlockBounds(1.0F - f, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
super.addCollisionBoxesToList(p_149743_1_, pos, state, p_149743_5_, p_149743_6_, p_149743_7_);
setBlockBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 0.5F, 1.0F);
super.addCollisionBoxesToList(p_149743_1_, pos, state, p_149743_5_, p_149743_6_, p_149743_7_);
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
}
public void addCollisionBoxesToList(World p_149743_1_, BlockPos pos, IBlockState state, AxisAlignedBB p_149743_5_, List p_149743_6_, Entity p_149743_7_) {
float f = 1F / 16F;
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, f, 1.0F);
super.addCollisionBoxesToList(p_149743_1_, pos, state, p_149743_5_, p_149743_6_, p_149743_7_);
setBlockBounds(0.0F, 0.0F, 0.0F, f, 0.5F, 1.0F);
super.addCollisionBoxesToList(p_149743_1_, pos, state, p_149743_5_, p_149743_6_, p_149743_7_);
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, f);
super.addCollisionBoxesToList(p_149743_1_, pos, state, p_149743_5_, p_149743_6_, p_149743_7_);
setBlockBounds(1.0F - f, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
super.addCollisionBoxesToList(p_149743_1_, pos, state, p_149743_5_, p_149743_6_, p_149743_7_);
setBlockBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 0.5F, 1.0F);
super.addCollisionBoxesToList(p_149743_1_, pos, state, p_149743_5_, p_149743_6_, p_149743_7_);
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
}
@Override
public boolean isSideSolid(IBlockAccess world, BlockPos pos, EnumFacing side) {
return side == EnumFacing.DOWN;
@@ -216,11 +223,11 @@ public class BlockPool extends BlockModContainer implements IWandHUD, IWandable,
@Override
public LexiconEntry getEntry(World world, BlockPos pos, EntityPlayer player, ItemStack lexicon) {
return LexiconData.pool;
return world.getBlockMetadata(x, y, z) == 3 ? LexiconData.rainbowRod : LexiconData.pool;
}
@Override
public Achievement getAchievementOnPickup(ItemStack stack, EntityPlayer player, EntityItem item) {
return stack.getItemDamage() == 0 ? ModAchievements.manaPoolPickup : null;
public Achievement getAchievementOnCraft(ItemStack stack, EntityPlayer player, IInventory matrix) {
return ModAchievements.manaPoolPickup;
}
}
@@ -24,9 +24,9 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.lexicon.ILexiconable;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.api.wand.IWandHUD;
import vazkii.botania.api.wand.IWandable;
import vazkii.botania.client.core.helper.IconHelper;
import vazkii.botania.common.block.BlockModContainer;
@@ -35,7 +35,7 @@ import vazkii.botania.common.block.tile.TileSimpleInventory;
import vazkii.botania.common.lexicon.LexiconData;
import vazkii.botania.common.lib.LibBlockNames;
public class BlockRuneAltar extends BlockModContainer implements IWandable, IWandHUD, ILexiconable {
public class BlockRuneAltar extends BlockModContainer implements IWandable, ILexiconable {
Random random;
@@ -47,6 +47,8 @@ public class BlockRuneAltar extends BlockModContainer implements IWandable, IWan
setStepSound(soundTypeStone);
setUnlocalizedName(LibBlockNames.RUNE_ALTAR);
BotaniaAPI.blacklistBlockFromMagnet(this, Short.MAX_VALUE);
random = new Random();
}
@@ -150,10 +152,4 @@ public class BlockRuneAltar extends BlockModContainer implements IWandable, IWan
return LexiconData.runicAltar;
}
@Override
public void renderHUD(Minecraft mc, ScaledResolution res, World world, BlockPos pos) {
((TileRuneAltar) world.getTileEntity(pos)).renderHUD(mc, res);
}
}
@@ -11,25 +11,32 @@
package vazkii.botania.common.block.mana;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.client.event.TextureStitchEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.lexicon.ILexiconable;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.client.core.helper.IconHelper;
import vazkii.botania.common.block.BlockModContainer;
import vazkii.botania.common.block.tile.TileTerraPlate;
import vazkii.botania.common.item.ModItems;
import vazkii.botania.common.lexicon.LexiconData;
import vazkii.botania.common.lib.LibBlockNames;
import vazkii.botania.common.lib.LibObfuscation;
public class BlockTerraPlate extends BlockModContainer implements ILexiconable {
@@ -41,8 +48,35 @@ public class BlockTerraPlate extends BlockModContainer implements ILexiconable {
setHardness(3F);
setResistance(10F);
setStepSound(soundTypeMetal);
setUnlocalizedName(LibBlockNames.TERRA_PLATE);
MinecraftForge.EVENT_BUS.register(this);
BotaniaAPI.blacklistBlockFromMagnet(this, Short.MAX_VALUE);
}
@Override
public boolean onBlockActivated(World worldObj, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing s, float xs, float ys, float zs) {
ItemStack stack = player.getCurrentEquippedItem();
if(stack != null && stack.getItem() == ModItems.manaResource && stack.getItemDamage() < 3) {
if(player == null || !player.capabilities.isCreativeMode) {
stack.stackSize--;
if(stack.stackSize == 0 && player != null)
player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
}
ItemStack target = stack.copy();
target.stackSize = 1;
EntityItem item = new EntityItem(worldObj, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, target);
ObfuscationReflectionHelper.setPrivateValue(EntityItem.class, item, 40, LibObfuscation.PICKUP_DELAY);
item.motionX = item.motionY = item.motionZ = 0;
if(!worldObj.isRemote)
worldObj.spawnEntityInWorld(item);
return true;
}
return false;
}
@SubscribeEvent
@@ -45,6 +45,12 @@ public abstract class BlockRedString extends BlockModContainer<TileRedString> im
return new BlockState(this, BotaniaStateProps.FACING);
}
@Override
public void onBlockPlacedBy(World par1World, BlockPos pos, IBlockState state, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack) {
EnumFacing orientation = BlockPistonBase.getFacingFromEntity(par1World, pos, par5EntityLivingBase);
par1World.setBlockState(pos, state.withProperty(BotaniaStateProps.FACING, orientation), 1 | 2);
}
@Override
public int getMetaFromState(IBlockState state) {
return ((EnumFacing) state.getValue(BotaniaStateProps.FACING)).getIndex();
@@ -55,12 +61,6 @@ public abstract class BlockRedString extends BlockModContainer<TileRedString> im
return getDefaultState().withProperty(BotaniaStateProps.FACING, EnumFacing.getFront(meta));
}
@Override
public void onBlockPlacedBy(World par1World, BlockPos pos, IBlockState state, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack) {
EnumFacing orientation = BlockPistonBase.getFacingFromEntity(par1World, pos, par5EntityLivingBase);
par1World.setBlockState(pos, state.withProperty(BotaniaStateProps.FACING, orientation), 1 | 2);
}
@Override
public LexiconEntry getEntry(World world, BlockPos pos, EntityPlayer player, ItemStack lexicon) {
return LexiconData.redString;
@@ -30,19 +30,22 @@ public class SubTilePureDaisy extends SubTileEntity {
private static final String TAG_POSITION = "position";
private static final String TAG_TICKS_REMAINING = "ticksRemaining";
private static final int TOTAL_TIME = 1200;
private static final int TIME_PER = TOTAL_TIME / 8;
private static final BlockPos[] POSITIONS = {
new BlockPos(-1, 0, -1 ),
new BlockPos(-1, 0, 0 ),
new BlockPos(-1, 0, 1 ),
new BlockPos(0, 0, 1 ),
new BlockPos(1, 0, 1 ),
new BlockPos(1, 0, 0 ),
new BlockPos(1, 0, -1 ),
new BlockPos(0, 0, -1 ),
new BlockPos(-1, 0, -1 ),
new BlockPos(-1, 0, 0 ),
new BlockPos(-1, 0, 1 ),
new BlockPos(0, 0, 1 ),
new BlockPos(1, 0, 1 ),
new BlockPos(1, 0, 0 ),
new BlockPos(1, 0, -1 ),
new BlockPos(0, 0, -1 ),
};
int positionAt = 0;
int[] ticksRemaining = new int[] { 200, 200, 200, 200, 200, 200, 200, 200 };
int[] ticksRemaining = new int[] { TIME_PER, TIME_PER, TIME_PER, TIME_PER, TIME_PER, TIME_PER, TIME_PER, TIME_PER };
@Override
public void onUpdate() {
@@ -71,7 +74,7 @@ public class SubTilePureDaisy extends SubTileEntity {
Botania.proxy.sparkleFX(supertile.getWorld(), coords.getX() + Math.random(), coords.getY() + Math.random(), coords.getZ() + Math.random(), 1F, 1F, 1F, (float) Math.random(), 5);
if(ticksRemaining[positionAt] <= 0) {
ticksRemaining[positionAt] = 200;
ticksRemaining[positionAt] = TIME_PER;
if(recipe.set(world,coords, this)) {
for(int i = 0; i < 25; i++) {
@@ -85,7 +88,7 @@ public class SubTilePureDaisy extends SubTileEntity {
supertile.getWorld().playAuxSFX(2001, coords, Block.getStateId(recipe.getOutputState()));
}
}
} else ticksRemaining[positionAt] = 200;
} else ticksRemaining[positionAt] = TIME_PER;
}
}
@@ -62,7 +62,7 @@ public class SubTileBellethorn extends SubTileFunctional {
int dmg = 4;
if(entity instanceof EntityWitch)
dmg = 20;
entity.attackEntityFrom(DamageSource.magic, dmg);
mana -= manaToUse;
break;
@@ -71,7 +71,7 @@ public class SubTileExoflame extends SubTileFunctional {
heatable.boostBurnTime();
mana = Math.max(0, mana - cost);
}
if(ticksExisted % 2 == 0)
heatable.boostCookTime();
@@ -127,7 +127,7 @@ public class SubTileRannuncarpus extends SubTileFunctional {
SubTileEntity subtile = container.getSubTile();
subtile.onBlockPlacedBy(supertile.getWorld(), coords, supertile.getWorld().getBlockState(coords), null, stack);
}
if(stackItem instanceof IFlowerPlaceable)
((IFlowerPlaceable) stackItem).onBlockPlacedByFlower(stack, this, coords);
@@ -24,7 +24,7 @@ import vazkii.botania.common.lexicon.LexiconData;
public class SubTileSolegnolia extends SubTileFunctional {
private static final double RANGE = 5;
private static final double RANGE_MINI = 1;
private static final double RANGE_MINI = 1;
public static Set<SubTileSolegnolia> existingFlowers = Collections.newSetFromMap(new WeakHashMap());
private static boolean registered = false;
@@ -74,7 +74,7 @@ public class SubTileSolegnolia extends SubTileFunctional {
public double getRange() {
return RANGE;
}
@Override
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Circle(toBlockPos(), getRange());
@@ -84,7 +84,7 @@ public class SubTileSolegnolia extends SubTileFunctional {
public LexiconEntry getEntry() {
return LexiconData.solegnolia;
}
public static class Mini extends SubTileSolegnolia {
@Override public double getRange() { return RANGE_MINI; }
}
@@ -35,7 +35,7 @@ public class SubTileArcaneRose extends SubTileGenerating {
for(EntityPlayer player : players)
if(ExperienceHelper.getPlayerXP(player) >= 1 && player.onGround) {
ExperienceHelper.drainPlayerXP(player, 1);
mana += 24;
mana += 50;
return;
}
}
@@ -52,7 +52,7 @@ public class SubTileArcaneRose extends SubTileGenerating {
@Override
public int getMaxMana() {
return 1200;
return 6000;
}
@Override
@@ -53,7 +53,7 @@ public class SubTileDandelifeon extends SubTileGenerating {
void runSimulation() {
int[][] table = getCellTable();
List<int[]> changes = new ArrayList();
List<TileCell> cells = new ArrayList();
new ArrayList();
boolean wipe = false;
for(int i = 0; i < table.length; i++)
@@ -120,7 +120,7 @@ public class SubTileDandelifeon extends SubTileGenerating {
if(tile instanceof TileCell)
return ((TileCell) tile).isSameFlower(supertile) ? ((TileCell) tile).getGeneration() : 0;
return -1;
return -1;
}
int getAdjCells(int[][] table, int x, int z) {
@@ -10,7 +10,6 @@
*/
package vazkii.botania.common.block.subtile.generating;
import java.awt.Color;
import java.util.ArrayList;
import java.util.List;
@@ -20,11 +19,10 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.api.subtile.ISubTileContainer;
import vazkii.botania.common.Botania;
import vazkii.botania.api.subtile.signature.PassiveFlower;
import vazkii.botania.common.lexicon.LexiconData;
import vazkii.botania.common.lib.LibMisc;
@PassiveFlower
public class SubTileDaybloom extends SubTilePassiveGenerating {
private static final String TAG_PRIME_POSITION_X = "primePositionX";
@@ -70,31 +68,7 @@ public class SubTileDaybloom extends SubTilePassiveGenerating {
@Override
public int getDelayBetweenPassiveGeneration() {
return isPrime() ? 22 : 25 + (int) (getSurroundingFlowers() * 7.5);
}
public int getSurroundingFlowers() {
int flowers = 0;
for(EnumFacing dir : LibMisc.CARDINAL_DIRECTIONS) {
TileEntity tile = supertile.getWorld().getTileEntity(supertile.getPos().offset(dir));
if(tile != null && tile instanceof ISubTileContainer) {
ISubTileContainer flower = (ISubTileContainer) tile;
if(flower.getSubTile() != null && flower.getSubTile().getClass() == getClass()) {
flowers++;
Color color = new Color(getColor());
float r = color.getRed() / 255F;
float g = color.getGreen() / 255F;
float b = color.getBlue() / 255F;
float m = 0.045F;
if(ticksExisted % 10 == 0)
Botania.proxy.wispFX(supertile.getWorld(), supertile.getPos().getX() + 0.5, supertile.getPos().getY() + 0.05, supertile.getPos().getZ() + 0.5, r, g, b, 0.1F, dir.getFrontOffsetX() * m, dir.getFrontOffsetY() * m, dir.getFrontOffsetZ() * m);
}
}
}
return flowers;
return isPrime() ? 10 : 12;
}
@Override
@@ -10,7 +10,6 @@
*/
package vazkii.botania.common.block.subtile.generating;
import java.awt.Color;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@@ -27,13 +26,14 @@ import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.api.subtile.ISubTileContainer;
import vazkii.botania.api.subtile.RadiusDescriptor;
import vazkii.botania.api.subtile.signature.PassiveFlower;
import vazkii.botania.common.Botania;
import vazkii.botania.common.core.helper.ItemNBTHelper;
import vazkii.botania.common.lexicon.LexiconData;
import vazkii.botania.common.lib.LibMisc;
@PassiveFlower
public class SubTileHydroangeas extends SubTilePassiveGenerating {
private static final String TAG_BURN_TIME = "burnTime";
@@ -76,7 +76,10 @@ public class SubTileHydroangeas extends SubTilePassiveGenerating {
supertile.getWorld().setBlockToAir(pos);
}
burnTime += getBurnTime();
if(cooldown == 0)
burnTime += getBurnTime();
else cooldown = getCooldown();
sync();
playSound();
break;
@@ -94,30 +97,6 @@ public class SubTileHydroangeas extends SubTilePassiveGenerating {
}
}
public int getSurroundingFlowers() {
int flowers = 0;
for(BlockPos offset : OFFSETS) {
TileEntity tile = supertile.getWorld().getTileEntity(supertile.getPos().add(offset));
if(tile != null && tile instanceof ISubTileContainer) {
ISubTileContainer flower = (ISubTileContainer) tile;
if(flower.getSubTile() != null && flower.getSubTile().getClass() == getClass()) {
flowers++;
Color color = new Color(getColor());
float r = color.getRed() / 255F;
float g = color.getGreen() / 255F;
float b = color.getBlue() / 255F;
float m = 0.045F;
if(ticksExisted % 10 == 0)
Botania.proxy.wispFX(supertile.getWorld(), supertile.getPos().getX() + 0.5, supertile.getPos().getY() + 0.05, supertile.getPos().getZ() + 0.5, r, g, b, 0.1F, offset.getX() * m, 0, offset.getZ() * m);
}
}
}
return flowers;
}
public void doBurnParticles() {
Botania.proxy.wispFX(supertile.getWorld(), supertile.getPos().getX() + 0.55 + Math.random() * 0.2 - 0.1, supertile.getPos().getY() + 0.55 + Math.random() * 0.2 - 0.1, supertile.getPos().getZ() + 0.5, 0.05F, 0.05F, 0.7F, (float) Math.random() / 6, (float) -Math.random() / 60);
}
@@ -193,8 +172,7 @@ public class SubTileHydroangeas extends SubTilePassiveGenerating {
@Override
public boolean canGeneratePassively() {
int adj = getSurroundingFlowers();
return supertile.getWorld().rand.nextInt(adj + 1) == 0 && burnTime > 0;
return burnTime > 0;
}
@Override
@@ -11,8 +11,10 @@
package vazkii.botania.common.block.subtile.generating;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.api.subtile.signature.PassiveFlower;
import vazkii.botania.common.lexicon.LexiconData;
@PassiveFlower
public class SubTileNightshade extends SubTileDaybloom {
@Override
@@ -52,7 +52,7 @@ public class SubTileSpectrolus extends SubTileGenerating {
if(stack != null && stack.getItem() == wool) {
int meta = stack.getItemDamage();
if(meta == nextColor) {
mana = Math.min(getMaxMana(), mana + 200);
mana = Math.min(getMaxMana(), mana + 300);
nextColor = nextColor == 15 ? 0 : nextColor + 1;
sync();
@@ -70,7 +70,7 @@ public class SubTileSpectrolus extends SubTileGenerating {
@Override
public int getMaxMana() {
return 4000;
return 8000;
}
@Override
@@ -32,11 +32,6 @@ public class SubTileThermalily extends SubTileHydroangeas {
Botania.proxy.wispFX(supertile.getWorld(), supertile.getPos().getX() + 0.55 + Math.random() * 0.2 - 0.1, supertile.getPos().getY() + 0.9 + Math.random() * 0.2 - 0.1, supertile.getPos().getZ() + 0.5, 0.7F, 0.05F, 0.05F, (float) Math.random() / 6, (float) -Math.random() / 60);
}
@Override
public int getSurroundingFlowers() {
return 0;
}
@Override
public boolean isPassiveFlower() {
return false;
@@ -59,22 +54,22 @@ public class SubTileThermalily extends SubTileHydroangeas {
@Override
public int getBurnTime() {
return 875;
return 900;
}
@Override
public int getValueForPassiveGeneration() {
return 12;
return 20;
}
@Override
public int getMaxMana() {
return 250;
return 500;
}
@Override
public int getCooldown() {
return 8400;
return 6000;
}
}
@@ -15,6 +15,9 @@ import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
@@ -29,11 +32,17 @@ import net.minecraft.server.gui.IUpdatePlayerListBox;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.StatCollector;
import org.lwjgl.opengl.GL11;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.internal.VanillaPacketDispatcher;
import vazkii.botania.api.item.IPetalApothecary;
import vazkii.botania.api.recipe.IFlowerComponent;
import vazkii.botania.api.recipe.RecipePetals;
import vazkii.botania.client.core.handler.HUDHandler;
import vazkii.botania.client.core.helper.RenderHelper;
import vazkii.botania.common.Botania;
import vazkii.botania.common.lib.LibBlockNames;
@@ -145,7 +154,7 @@ public class TileAltar extends TileSimpleInventory implements ISidedInventory, I
ItemStack stack = getStackInSlot(i);
if(stack == null)
break;
lastRecipe.add(stack);
lastRecipe.add(stack.copy());
}
recipeKeepTicks = 400;
}
@@ -324,4 +333,54 @@ public class TileAltar extends TileSimpleInventory implements ISidedInventory, I
return hasLava;
}
public void renderHUD(Minecraft mc, ScaledResolution res) {
int xc = res.getScaledWidth() / 2;
int yc = res.getScaledHeight() / 2;
float angle = -90;
int radius = 24;
int amt = 0;
for(int i = 0; i < getSizeInventory(); i++) {
if(getStackInSlot(i) == null)
break;
amt++;
}
if(amt > 0) {
float anglePer = 360F / amt;
for(RecipePetals recipe : BotaniaAPI.petalRecipes)
if(recipe.matches(this)) {
GL11.glColor4f(1F, 1F, 1F, 1F);
mc.renderEngine.bindTexture(HUDHandler.manaBar);
RenderHelper.drawTexturedModalRect(xc + radius + 9, yc - 8, 0, 0, 8, 22, 15);
ItemStack stack = recipe.getOutput();
net.minecraft.client.renderer.RenderHelper.enableGUIStandardItemLighting();
mc.getRenderItem().renderItemIntoGUI(stack, xc + radius + 32, yc - 8);
mc.getRenderItem().renderItemIntoGUI(new ItemStack(Items.wheat_seeds), xc + radius + 16, yc + 6);
net.minecraft.client.renderer.RenderHelper.disableStandardItemLighting();
mc.fontRendererObj.drawStringWithShadow("+", xc + radius + 14, yc + 10, 0xFFFFFF);
}
net.minecraft.client.renderer.RenderHelper.enableGUIStandardItemLighting();
for(int i = 0; i < amt; i++) {
double xPos = xc + Math.cos(angle * Math.PI / 180D) * radius - 8;
double yPos = yc + Math.sin(angle * Math.PI / 180D) * radius - 8;
GL11.glTranslated(xPos, yPos, 0);
mc.getRenderItem().renderItemIntoGUI(getStackInSlot(i), 0, 0);
GL11.glTranslated(-xPos, -yPos, 0);
angle += anglePer;
}
net.minecraft.client.renderer.RenderHelper.disableStandardItemLighting();
} else if(recipeKeepTicks > 0 && hasWater) {
String s = StatCollector.translateToLocal("botaniamisc.altarRefill0");
mc.fontRendererObj.drawStringWithShadow(s, xc - mc.fontRendererObj.getStringWidth(s) / 2, yc + 10, 0xFFFFFF);
s = StatCollector.translateToLocal("botaniamisc.altarRefill1");
mc.fontRendererObj.drawStringWithShadow(s, xc - mc.fontRendererObj.getStringWidth(s) / 2, yc + 20, 0xFFFFFF);
}
}
}
@@ -180,7 +180,7 @@ public class TileCraftCrate extends TileOpenCrate {
ejectAll();
return true;
}
@Override
public void markDirty() {
super.markDirty();
@@ -191,7 +191,7 @@ public class TileCraftCrate extends TileOpenCrate {
public int getSignal() {
return signal;
}
@Override
public void onDataPacket(NetworkManager manager, S35PacketUpdateTileEntity packet) {
int lastPattern = pattern;
@@ -90,6 +90,7 @@ public class TileLightRelay extends TileMod implements IWandBindable, IUpdatePla
}
BlockPos endpoint = getEndpoint();
if(endpoint != null && !worldObj.isRemote) {
float range = 0.5F;
List<EntityEnderPearl> enderPearls = worldObj.getEntitiesWithinAABB(EntityEnderPearl.class, new AxisAlignedBB(pos.add(-range, -range, -range), pos.add(1 + range, 1 + range, 1 + range)));
@@ -111,7 +112,7 @@ public class TileLightRelay extends TileMod implements IWandBindable, IUpdatePla
List<TileLightRelay> pointsPassed = new ArrayList();
TileLightRelay relay = this;
BlockPos lastCoords = null;
// Doing while(true) gives an unreachable code error
boolean run = true;
while(run) {
@@ -127,10 +128,10 @@ public class TileLightRelay extends TileMod implements IWandBindable, IUpdatePla
if(tile != null && tile instanceof TileLightRelay)
relay = (TileLightRelay) tile;
else return lastCoords;
lastCoords = coords;
}
return null;
}
@@ -15,6 +15,7 @@ import java.util.List;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.ISidedInventory;
@@ -24,22 +25,32 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.server.gui.IUpdatePlayerListBox;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.StatCollector;
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.internal.VanillaPacketDispatcher;
import vazkii.botania.api.mana.IManaReceiver;
import vazkii.botania.api.recipe.RecipeRuneAltar;
import vazkii.botania.client.core.handler.HUDHandler;
import vazkii.botania.client.core.helper.RenderHelper;
import vazkii.botania.common.Botania;
import vazkii.botania.common.block.ModBlocks;
import vazkii.botania.common.core.helper.Vector3;
import vazkii.botania.common.item.ModItems;
import vazkii.botania.common.lib.LibBlockNames;
import vazkii.botania.common.lib.LibObfuscation;
public class TileRuneAltar extends TileSimpleInventory implements ISidedInventory, IManaReceiver, IUpdatePlayerListBox {
private static final String TAG_MANA = "mana";
private static final String TAG_MANA_TO_GET = "manaToGet";
RecipeRuneAltar currentRecipe;
public int manaToGet = 0;
int mana = 0;
int cooldown = 0;
@@ -49,7 +60,26 @@ public class TileRuneAltar extends TileSimpleInventory implements ISidedInventor
int recipeKeepTicks = 0;
public boolean addItem(EntityPlayer player, ItemStack stack) {
if(cooldown > 0 || stack.getItem() == ModItems.twigWand || stack.getItem() == ModItems.lexicon || manaToGet != 0)
if(cooldown > 0 || stack.getItem() == ModItems.twigWand || stack.getItem() == ModItems.lexicon)
return false;
if(stack.getItem() == Item.getItemFromBlock(ModBlocks.livingrock) && stack.getItemDamage() == 0) {
if(player == null || !player.capabilities.isCreativeMode) {
stack.stackSize--;
if(stack.stackSize == 0 && player != null)
player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
}
EntityItem item = new EntityItem(worldObj, getPos().getX() + 0.5, getPos().getY() + 1, getPos().getZ() + 0.5, new ItemStack(ModBlocks.livingrock));
ObfuscationReflectionHelper.setPrivateValue(EntityItem.class, item, 40, LibObfuscation.PICKUP_DELAY);
item.motionX = item.motionY = item.motionZ = 0;
if(!worldObj.isRemote)
worldObj.spawnEntityInWorld(item);
return true;
}
if(manaToGet != 0)
return false;
boolean did = false;
@@ -121,18 +151,24 @@ public class TileRuneAltar extends TileSimpleInventory implements ISidedInventor
if(recipeKeepTicks > 0)
--recipeKeepTicks;
else lastRecipe = null;
updateRecipe();
}
public void updateRecipe() {
int manaToGet = this.manaToGet;
getMana : {
for(RecipeRuneAltar recipe : BotaniaAPI.runeAltarRecipes)
if(recipe.matches(this)) {
this.manaToGet = recipe.getManaUsage();
break getMana;
}
this.manaToGet = 0;
if(currentRecipe != null)
this.manaToGet = currentRecipe.getManaUsage();
else {
for(RecipeRuneAltar recipe : BotaniaAPI.runeAltarRecipes)
if(recipe.matches(this)) {
this.manaToGet = recipe.getManaUsage();
break getMana;
}
this.manaToGet = 0;
}
}
if(manaToGet != this.manaToGet) {
@@ -147,7 +183,7 @@ public class TileRuneAltar extends TileSimpleInventory implements ISidedInventor
ItemStack stack = getStackInSlot(i);
if(stack == null)
break;
lastRecipe.add(stack);
lastRecipe.add(stack.copy());
}
recipeKeepTicks = 400;
}
@@ -167,18 +203,18 @@ public class TileRuneAltar extends TileSimpleInventory implements ISidedInventor
}
public void onWanded(EntityPlayer player, ItemStack wand) {
updateRecipe();
RecipeRuneAltar recipe = null;
for(RecipeRuneAltar recipe_ : BotaniaAPI.runeAltarRecipes) {
if(currentRecipe != null)
recipe = currentRecipe;
else for(RecipeRuneAltar recipe_ : BotaniaAPI.runeAltarRecipes) {
if(recipe_.matches(this)) {
recipe = recipe_;
break;
}
}
if(manaToGet > 0 && mana >= manaToGet && !worldObj.isRemote) {
if(manaToGet > 0 && mana >= manaToGet) {
List<EntityItem> items = worldObj.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(pos, pos.add(1, 1, 1)));
EntityItem livingrock = null;
for(EntityItem item : items)
@@ -194,14 +230,24 @@ public class TileRuneAltar extends TileSimpleInventory implements ISidedInventor
ItemStack output = recipe.getOutput().copy();
EntityItem outputItem = new EntityItem(worldObj, pos.getX() + 0.5, pos.getY() + 1.5, pos.getZ() + 0.5, output);
worldObj.spawnEntityInWorld(outputItem);
currentRecipe = null;
cooldown = 60;
}
saveLastRecipe();
for(int i = 0; i < getSizeInventory(); i++)
setInventorySlotContents(i, null);
if(!worldObj.isRemote) {
for(int i = 0; i < getSizeInventory(); i++) {
ItemStack stack = getStackInSlot(i);
if(stack != null) {
if(stack.getItem() == ModItems.rune && (player == null || !player.capabilities.isCreativeMode)) {
EntityItem outputItem = new EntityItem(worldObj, getPos().getX() + 0.5, getPos().getY() + 1.5, getPos().getZ() + 0.5, stack.copy());
worldObj.spawnEntityInWorld(outputItem);
}
setInventorySlotContents(i, null);
}
}
ItemStack livingrockItem = livingrock.getEntityItem();
livingrockItem.stackSize--;
if(livingrockItem.stackSize == 0)
@@ -211,8 +257,6 @@ public class TileRuneAltar extends TileSimpleInventory implements ISidedInventor
craftingFanciness();
}
}
updateRecipe();
}
public void craftingFanciness() {
@@ -310,20 +354,64 @@ public class TileRuneAltar extends TileSimpleInventory implements ISidedInventor
}
public void renderHUD(Minecraft mc, ScaledResolution res) {
if(manaToGet > 0) {
int x = res.getScaledWidth() / 2 + 20;
int y = res.getScaledHeight() / 2 - 8;
int xc = res.getScaledWidth() / 2;
int yc = res.getScaledHeight() / 2;
RecipeRuneAltar recipe = null;
for(RecipeRuneAltar recipe_ : BotaniaAPI.runeAltarRecipes)
if(recipe_.matches(this)) {
recipe = recipe_;
break;
float angle = -90;
int radius = 24;
int amt = 0;
for(int i = 0; i < getSizeInventory(); i++) {
if(getStackInSlot(i) == null)
break;
amt++;
}
if(amt > 0) {
float anglePer = 360F / amt;
for(RecipeRuneAltar recipe : BotaniaAPI.runeAltarRecipes)
if(recipe.matches(this)) {
GL11.glEnable(GL11.GL_BLEND);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
recipe.getOutput();
float progress = (float) mana / (float) manaToGet;
mc.renderEngine.bindTexture(HUDHandler.manaBar);
GL11.glColor4f(1F, 1F, 1F, 1F);
RenderHelper.drawTexturedModalRect(xc + radius + 9, yc - 8, 0, progress == 1F ? 0 : 22, 8, 22, 15);
net.minecraft.client.renderer.RenderHelper.enableGUIStandardItemLighting();
if(progress == 1F) {
mc.getRenderItem().renderItemIntoGUI(new ItemStack(ModBlocks.livingrock), xc + radius + 16, yc + 8);
GL11.glTranslatef(0F, 0F, 100F);
mc.getRenderItem().renderItemIntoGUI(new ItemStack(ModItems.twigWand), xc + radius + 24, yc + 8);
GL11.glTranslatef(0F, 0F, -100F);
}
RenderHelper.renderProgressPie(xc + radius + 32, yc - 8, progress, recipe.getOutput());
net.minecraft.client.renderer.RenderHelper.disableStandardItemLighting();
if(progress == 1F)
mc.fontRendererObj.drawStringWithShadow("+", xc + radius + 14, yc + 12, 0xFFFFFF);
}
if(recipe == null)
return;
RenderHelper.renderProgressPie(x, y, (float) mana / (float) manaToGet, recipe.getOutput());
net.minecraft.client.renderer.RenderHelper.enableGUIStandardItemLighting();
for(int i = 0; i < amt; i++) {
double xPos = xc + Math.cos(angle * Math.PI / 180D) * radius - 8;
double yPos = yc + Math.sin(angle * Math.PI / 180D) * radius - 8;
GL11.glTranslated(xPos, yPos, 0);
mc.getRenderItem().renderItemIntoGUI(getStackInSlot(i), 0, 0);
GL11.glTranslated(-xPos, -yPos, 0);
angle += anglePer;
}
net.minecraft.client.renderer.RenderHelper.disableStandardItemLighting();
} else if(recipeKeepTicks > 0) {
String s = StatCollector.translateToLocal("botaniamisc.altarRefill0");
mc.fontRendererObj.drawStringWithShadow(s, xc - mc.fontRendererObj.getStringWidth(s) / 2, yc + 10, 0xFFFFFF);
s = StatCollector.translateToLocal("botaniamisc.altarRefill1");
mc.fontRendererObj.drawStringWithShadow(s, xc - mc.fontRendererObj.getStringWidth(s) / 2, yc + 20, 0xFFFFFF);
}
}
@@ -89,15 +89,15 @@ public class TileCorporeaFunnel extends TileCorporeaBase implements ICorporeaReq
if(!(request instanceof ItemStack))
return;
IInventory inv = InventoryHelper.getInventory(worldObj, getPos());
if(inv == null)
inv = InventoryHelper.getInventory(worldObj, getPos());
IInventory inv = InventoryHelper.getInventory(worldObj, getPos().down());
if(inv == null || inv instanceof TileCorporeaFunnel)
inv = InventoryHelper.getInventory(worldObj, getPos().down(2));
List<ItemStack> stacks = CorporeaHelper.requestItem(request, count, spark, true, true);
spark.onItemsRequested(stacks);
for(ItemStack reqStack : stacks)
if(request != null) {
if(inv != null && reqStack.stackSize == InventoryHelper.testInventoryInsertion(inv, reqStack, EnumFacing.UP))
if(inv != null && !(inv instanceof TileCorporeaFunnel) && reqStack.stackSize == InventoryHelper.testInventoryInsertion(inv, reqStack, EnumFacing.UP))
InventoryHelper.insertItemIntoInventory(inv, reqStack);
else {
EntityItem item = new EntityItem(worldObj, pos.getX() + 0.5, pos.getY() + 1.5, pos.getZ() + 0.5, reqStack);
@@ -23,7 +23,6 @@ import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.EnumDyeColor;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
@@ -110,13 +109,9 @@ public class TilePool extends TileMod implements IManaPool, IDyablePool, IKeyLoc
@Override
public void recieveMana(int mana) {
boolean full = getCurrentMana() >= manaCap;
this.mana = Math.max(0, Math.min(getCurrentMana() + mana, manaCap));
if(full == mana < 0) {
worldObj.updateComparatorOutputLevel(pos, worldObj.getBlockState(pos).getBlock());
markDispatchable();
}
worldObj.updateComparatorOutputLevel(pos, worldObj.getBlockState(pos).getBlock());
markDispatchable();
}
@Override
@@ -150,7 +145,7 @@ public class TilePool extends TileMod implements IManaPool, IDyablePool, IKeyLoc
return false;
for(RecipeManaInfusion recipe : BotaniaAPI.manaInfusionRecipes) {
if(recipe.matches(stack) && (!recipe.isAlchemy() || alchemy) && (!recipe.isConjuration() || conjuration) && (getBlockMetadata() != 2 || recipe.getOutput().getItem() == Item.getItemFromBlock(getBlockType()))) {
if(recipe.matches(stack) && (!recipe.isAlchemy() || alchemy) && (!recipe.isConjuration() || conjuration)) {
int mana = recipe.getManaToConsume();
if(getCurrentMana() >= mana) {
recieveMana(-mana);
@@ -235,10 +235,10 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
if(shouldShoot)
control.onControlledSpreaderPulse(lens, this, redstone);
} else control.onControlledSpreaderTick(lens, this, redstone);
shouldShoot &= control.allowBurstShooting(lens, this, redstone);
}
if(shouldShoot)
tryShootBurst();
@@ -449,7 +449,7 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
ILensControl control = getLensController(stack);
if(control != null && !control.allowBurstShooting(stack, this, false))
return;
EntityManaBurst fakeBurst = getBurst(true);
fakeBurst.setScanBeam();
TileEntity receiver = fakeBurst.getCollidedTile(true);
@@ -501,14 +501,14 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
}
return null;
}
public ILensControl getLensController(ItemStack stack) {
if(stack != null && stack.getItem() instanceof ILensControl) {
ILensControl control = (ILensControl) stack.getItem();
if(control.isControlLens(stack))
return control;
}
return null;
}
@@ -705,12 +705,12 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
public void setRotationY(float rot) {
rotationY = rot;
}
@Override
public void commitRedirection() {
checkForReceiver();
}
@Override
public void setCanShoot(boolean canShoot) {
canShootBurst = canShoot;
@@ -43,7 +43,10 @@ public class TileRedStringInterceptor extends TileRedString implements IUpdatePl
List<TileRedStringInterceptor> remove = new ArrayList();
boolean did = false;
for(TileRedStringInterceptor inter : interceptors) {
// CMEs are amazing
List<TileRedStringInterceptor> interceptorsCopy = new ArrayList(interceptors);
for(TileRedStringInterceptor inter : interceptorsCopy) {
if(!inter.removeFromList()) {
remove.add(inter);
continue;
@@ -56,7 +56,7 @@ public class ModBrews {
nightVision = new BrewMod(LibBrewNames.NIGHT_VISION, 0x7C4BEB, 4000, new PotionEffect(Potion.nightVision.id, 9600, 0));
absorption = new BrewMod(LibBrewNames.ABSORPTION, 0xF2EB23, 7000, new PotionEffect(Potion.absorption.id, 1800, 3)).setNotBloodPendantInfusable().setNotIncenseInfusable();
overload = new BrewMod(LibBrewNames.OVERLOAD, 0x232323, 12000, new PotionEffect(Potion.damageBoost.id, 1800, 3), new PotionEffect(Potion.moveSpeed.id, 1800, 2), new PotionEffect(Potion.weakness.id, 2400, 2), new PotionEffect(Potion.hunger.id, 200, 2));
overload = new BrewMod(LibBrewNames.OVERLOAD, 0x232323, 12000, new PotionEffect(Potion.damageBoost.id, 1800, 3), new PotionEffect(Potion.moveSpeed.id, 1800, 2), new PotionEffect(Potion.weakness.id, 3600, 2), new PotionEffect(Potion.hunger.id, 200, 2));
soulCross = new BrewModPotion(LibBrewNames.SOUL_CROSS, 10000, new PotionEffect(ModPotions.soulCross.id, 1800, 0));
featherfeet = new BrewModPotion(LibBrewNames.FEATHER_FEET, 7000, new PotionEffect(ModPotions.featherfeet.id, 1800, 0));
emptiness = new BrewModPotion(LibBrewNames.EMPTINESS, 30000, new PotionEffect(ModPotions.emptiness.id, 7200, 0));
@@ -60,7 +60,6 @@ public final class BotaniaCreativeTab extends CreativeTabs {
addBlock(ModBlocks.flower);
addBlock(ModBlocks.specialFlower);
addItem(ModItems.petal);
addItem(ModItems.manaPetal);
addItem(ModItems.pestleAndMortar);
addItem(ModItems.dye);
addItem(ModItems.fertilizer);
@@ -123,7 +122,6 @@ public final class BotaniaCreativeTab extends CreativeTabs {
if(Botania.gardenOfGlassLoaded) {
addBlock(ModBlocks.root);
addBlock(ModBlocks.felPumpkin);
addItem(ModItems.waterBowl);
}
@@ -143,6 +141,7 @@ public final class BotaniaCreativeTab extends CreativeTabs {
addBlock(ModBlocks.incensePlate);
addItem(ModItems.incenseStick);
addItem(ModItems.bloodPendant);
addBlock(ModBlocks.felPumpkin);
addBlock(ModBlocks.pylon);
addBlock(ModBlocks.pistonRelay);
addBlock(ModBlocks.hourglass);
@@ -2,10 +2,10 @@
* 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 the
* Botania License: http://botaniamod.net/license.php
*
*
* File Created @ [Sep 23, 2014, 8:06:49 PM (GMT)]
*/
package vazkii.botania.common.core.command;
@@ -34,7 +34,7 @@ public class CommandShare extends CommandBase {
String json = StatCollector.translateToLocal("botaniamisc.shareMsg");
json = json.replaceAll("%name%", sender.getCommandSenderName());
json = json.replaceAll("%entry%", args[0]);
json = json.replaceAll("%entryname%", StatCollector.translateToLocal("botania.entry." + args[0]));
json = json.replaceAll("%entryname%", StatCollector.translateToLocal(args[0]));
IChatComponent component = IChatComponent.Serializer.jsonToComponent(json);
MinecraftServer.getServer().getConfigurationManager().sendChatMsg(component);
@@ -11,10 +11,20 @@
package vazkii.botania.common.core.handler;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.Potion;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.util.ChatStyle;
import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.common.config.Property;
import vazkii.botania.common.Botania;
import vazkii.botania.common.lib.LibMisc;
import vazkii.botania.common.lib.LibPotionNames;
import net.minecraftforge.fml.client.event.ConfigChangedEvent;
@@ -25,11 +35,14 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
public final class ConfigHandler {
public static Configuration config;
public static ConfigAdaptor adaptor;
private static final String CATEGORY_POTIONS = "potions";
public static final int hardcorePassiveGeneration = 72000;
public static boolean useAdaptativeConfig = true;
public static boolean useShaders = true;
public static boolean lexiconRotatingItems = true;
public static boolean lexiconJustifiedText = false;
@@ -69,12 +82,13 @@ public final class ConfigHandler {
public static boolean stones18Enabled = true;
public static boolean ringOfOdinFireResist = true;
public static boolean enderStuff19Enabled = true;
public static boolean invertMagnetRing = false;
public static int flowerQuantity = 2;
public static int flowerDensity = 16;
public static int flowerDensity = 2;
public static int flowerPatchSize = 6;
public static int flowerPatchChance = 4;
public static double flowerTallChance = 0.1;
public static int flowerPatchChance = 16;
public static double flowerTallChance = 0.05;
public static int mushroomQuantity = 40;
private static boolean verifiedPotionArray = false;
@@ -99,6 +113,10 @@ public final class ConfigHandler {
public static void load() {
String desc;
desc = "Set this to false to disable the Adaptative Config. Adaptative Config changes any default config values from old versions to the new defaults to make sure you aren't missing out on changes because of old configs. It will not touch any values that were changed manually.";
useAdaptativeConfig = loadPropBool("adaptativeConfig.enabled", desc, useAdaptativeConfig);
adaptor = new ConfigAdaptor(useAdaptativeConfig);
desc = "Set this to false to disable the use of shaders for some of the mod's renders.";
useShaders = loadPropBool("shaders.enabled", desc, useShaders);
@@ -155,13 +173,13 @@ public final class ConfigHandler {
desc = "Set this to false to disable custom armor models.";
enableArmorModels = loadPropBool("armorModels.enable", desc, enableArmorModels);
desc = "The height of the mana display bar in above the XP bar. You can change this if you have a mod that changes where the XP bar is.";
manaBarHeight = loadPropInt("manaBar.height", desc, manaBarHeight);
desc = "The GL Texture Unit to use for the secondary sampler passed in to the Lexica Botania's category button shader. DO NOT TOUCH THIS IF YOU DON'T KNOW WHAT YOU'RE DOING";
glSecondaryTextureUnit = loadPropInt("shaders.secondaryUnit", desc, glSecondaryTextureUnit);
desc = "Set this to true to use alternate flower textures by Futureazoo, not all flowers are textured. http://redd.it/2b3o3f";
altFlowerTextures = loadPropBool("flowerTextures.alt", desc, altFlowerTextures);
@@ -207,19 +225,28 @@ public final class ConfigHandler {
desc = "Set this to false to disable the 1.9 Ender features available as recipes. This only disables the recipes and entries. Old ones that are already in the world will stay.";
enderStuff19Enabled = loadPropBool("19enderStuff.enabled", desc, enderStuff19Enabled);
desc = "Set this to true to invert the Ring of Magnetization's controls (from shift to stop to shift to work)";
invertMagnetRing = loadPropBool("magnetRing.invert", desc, invertMagnetRing);
desc = "The quantity of Botania flower patches to generate in the world, defaults to 2, the lower the number the less patches generate.";
flowerQuantity = loadPropInt("worldgen.flower.quantity", desc, flowerQuantity);
desc = "The density of each Botania flower patch generated, defaults to 16, the lower the number, the less each patch will have.";
desc = "The density of each Botania flower patch generated, defaults to 2, the lower the number, the less each patch will have.";
adaptor.addMappingInt(0, "worldgen.flower.density", 16);
adaptor.addMappingInt(238, "worldgen.flower.density", 2);
flowerDensity = loadPropInt("worldgen.flower.density", desc, flowerDensity);
desc = "The size of each Botania flower patch. The larger this is the farther the each patch can spread";
desc = "The size of each Botania flower patch, defaults to 6. The larger this is the farther the each patch can spread";
flowerPatchSize = loadPropInt("worldgen.flower.patchSize", desc, flowerPatchSize);
desc = "The chance for a Botania flower patch to be generated. The higher this value is the less patches will exist and the more flower each will have.";
desc = "The inverse chance for a Botania flower patch to be generated, defaults to 16. The higher this value is the less patches will exist and the more flower each will have.";
adaptor.addMappingInt(0, "worldgen.flower.patchChance", 4);
adaptor.addMappingInt(238, "worldgen.flower.patchChance", 16);
flowerPatchChance = loadPropInt("worldgen.flower.patchChance", desc, flowerPatchChance);
desc = "The chance for a Botania flower generated in a patch to be a tall flowe. 0.1 is 10%, 1 is 100%.";
desc = "The chance for a Botania flower generated in a patch to be a tall flower. 0.1 is 10%, 1 is 100%. Defaults to 0.05";
adaptor.addMappingDouble(0, "worldgen.flower.tallChance", 0.1);
adaptor.addMappingDouble(238, "worldgen.flower.tallChance", 0.05);
flowerTallChance = loadPropDouble("worldgen.flower.tallChance", desc, flowerTallChance);
desc = "The quantity of Botania mushrooms to generate underground, in the world, defaults to 40, the lower the number the less patches generate.";
@@ -246,18 +273,30 @@ public final class ConfigHandler {
public static int loadPropInt(String propName, String desc, int default_) {
Property prop = config.get(Configuration.CATEGORY_GENERAL, propName, default_);
prop.comment = desc;
if(adaptor != null)
adaptor.adaptPropertyInt(prop, prop.getInt(default_));
return prop.getInt(default_);
}
public static double loadPropDouble(String propName, String desc, double default_) {
Property prop = config.get(Configuration.CATEGORY_GENERAL, propName, default_);
prop.comment = desc;
if(adaptor != null)
adaptor.adaptPropertyDouble(prop, prop.getDouble(default_));
return prop.getDouble(default_);
}
public static boolean loadPropBool(String propName, String desc, boolean default_) {
Property prop = config.get(Configuration.CATEGORY_GENERAL, propName, default_);
prop.comment = desc;
if(adaptor != null)
adaptor.adaptPropertyBool(prop, prop.getBoolean(default_));
return prop.getBoolean(default_);
}
@@ -283,6 +322,131 @@ public final class ConfigHandler {
verifiedPotionArray = true;
}
public static class ConfigAdaptor {
private boolean enabled;
private int lastBuild;
private int currentBuild;
private Map<String, List<AdaptableValue>> adaptableValues = new HashMap();
private List<String> changes = new ArrayList();
public ConfigAdaptor(boolean enabled) {
this.enabled = enabled;
String lastVersion = Botania.proxy.getLastVersion();
try {
lastBuild = Integer.parseInt(lastVersion);
currentBuild = Integer.parseInt(LibMisc.BUILD);
} catch(NumberFormatException e) {
this.enabled = false;
}
}
public <T> void adaptProperty(Property prop, T val) {
if(!enabled)
return;
String name = prop.getName();
if(!adaptableValues.containsKey(name))
return;
AdaptableValue<T> bestValue = null;
for(AdaptableValue<T> value : adaptableValues.get(name)) {
if(value.version >= lastBuild) // If version is newer than what we last used we don't care about it
continue;
if(bestValue == null || value.version > bestValue.version)
bestValue = value;
}
if(bestValue != null) {
T expected = bestValue.value;
T def = (T) prop.getDefault();
if(areEqualNumbers(val, expected) && !areEqualNumbers(val, def)) {
prop.setValue(def.toString());
changes.add(" " + prop.getName() + ": " + val + " -> " + def);
}
}
}
public <T> void addMapping(int version, String key, T val) {
if(!enabled)
return;
AdaptableValue<T> adapt = new AdaptableValue<T>(version, val);
if(!adaptableValues.containsKey(key)) {
ArrayList list = new ArrayList();
adaptableValues.put(key, list);
}
List<AdaptableValue> list = adaptableValues.get(key);
list.add(adapt);
}
public boolean areEqualNumbers(Object v1, Object v2) {
double epsilon = 1.0E-6;
float v1f = ((Number) v1).floatValue();
float v2f;
if(v2 instanceof String)
v2f = Float.parseFloat((String) v2);
else v2f = ((Number) v2).floatValue();
return Math.abs(v1f - v2f) < epsilon;
}
public void tellChanges(EntityPlayer player) {
if(changes.size() == 0)
return;
player.addChatComponentMessage(new ChatComponentTranslation("botaniamisc.adaptativeConfigChanges").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.GOLD)));
for(String change : changes)
player.addChatMessage(new ChatComponentText(change).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.LIGHT_PURPLE)));
}
public void addMappingInt(int version, String key, int val) {
this.<Integer>addMapping(version, key, val);
}
public void addMappingDouble(int version, String key, double val) {
this.<Double>addMapping(version, key, val);
}
public void addMappingBool(int version, String key, boolean val) {
this.<Boolean>addMapping(version, key, val);
}
public void adaptPropertyInt(Property prop, int val) {
this.<Integer>adaptProperty(prop, val);
}
public void adaptPropertyDouble(Property prop, double val) {
this.<Double>adaptProperty(prop, val);
}
public void adaptPropertyBool(Property prop, boolean val) {
this.<Boolean>adaptProperty(prop, val);
}
public static class AdaptableValue<T> {
public final int version;
public final T value;
public final Class<? extends T> valueType;
public AdaptableValue(int version, T value) {
this.version = version;
this.value = value;
valueType = (Class<? extends T>) value.getClass();
}
}
}
public static class ChangeListener {
@SubscribeEvent
@@ -17,6 +17,7 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Blocks;
@@ -49,6 +50,7 @@ import vazkii.botania.common.Botania;
import vazkii.botania.common.block.BlockModFlower;
import vazkii.botania.common.block.BlockSpecialFlower;
import vazkii.botania.common.block.ModBlocks;
import vazkii.botania.common.block.subtile.functional.SubTileSolegnolia;
import vazkii.botania.common.item.ModItems;
import vazkii.botania.common.item.block.ItemBlockSpecialFlower;
import vazkii.botania.common.item.relic.ItemLokiRing;
@@ -241,6 +243,11 @@ public class InternalMethodHandler extends DummyMethodHandler {
ItemLokiRing.breakOnAllCursors(player, item, stack, pos, side);
}
@Override
public boolean hasSolegnoliaAround(Entity e) {
return SubTileSolegnolia.hasSolegnoliaAround(e);
}
@Override
public long getWorldElapsedTicks() {
return Botania.proxy.getWorldElapsedTicks();
@@ -66,6 +66,7 @@ import vazkii.botania.common.entity.ModEntities;
//import vazkii.botania.common.block.ModBanners;
import vazkii.botania.common.item.ModItems;
import vazkii.botania.common.lexicon.LexiconData;
import vazkii.botania.common.lib.LibMisc;
import vazkii.botania.common.network.GuiHandler;
import vazkii.botania.common.world.WorldTypeSkyblock;
import net.minecraftforge.fml.common.FMLCommonHandler;
@@ -189,10 +190,14 @@ public class CommonProxy {
// NO-OP
}
public void setToTutorialIfFirstLaunch() {
// NO-OP
}
public void setLexiconStack(ItemStack stack) {
// NO-OP
}
public boolean isTheClientPlayer(EntityLivingBase entity) {
return false;
}
@@ -201,6 +206,10 @@ public class CommonProxy {
return false;
}
public String getLastVersion() {
return LibMisc.BUILD;
}
public void setExtraReach(EntityLivingBase entity, float reach) {
if(entity instanceof EntityPlayerMP)
((EntityPlayerMP) entity).theItemInWorldManager.setBlockReachDistance(Math.max(5, ((EntityPlayerMP) entity).theItemInWorldManager.getBlockReachDistance() + reach));
@@ -217,11 +226,11 @@ public class CommonProxy {
public void setMultiblock(World world, int x, int y, int z, double radius, Block block) {
// NO-OP
}
public void removeSextantMultiblock() {
// NO-OP
}
public long getWorldElapsedTicks() {
return MinecraftServer.getServer().worldServers[0].getTotalWorldTime();
}
@@ -0,0 +1,33 @@
/**
* 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 the
* Botania License: http://botaniamod.net/license.php
*
* File Created @ [05/12/2015, 15:31:51 (GMT)]
*/
package vazkii.botania.common.core.version;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import vazkii.botania.common.core.handler.ConfigHandler;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent;
public final class AdaptorNotifier {
boolean triedToWarnPlayer;
@SubscribeEvent
public void onTick(ClientTickEvent event) {
if(!triedToWarnPlayer && Minecraft.getMinecraft().thePlayer != null) {
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
ConfigHandler.adaptor.tellChanges(player);
triedToWarnPlayer = true;
}
}
}
@@ -52,6 +52,8 @@ public final class ModCraftingRecipes {
public static List<IRecipe> recipesSpreader;
public static List<IRecipe> recipesManaLens;
public static IRecipe recipePool;
public static IRecipe recipePoolDiluted;
public static IRecipe recipePoolFabulous;
public static List<IRecipe> recipesRuneAltar;
public static IRecipe recipeLensVelocity;
public static IRecipe recipeLensPotency;
@@ -389,11 +391,23 @@ public final class ModCraftingRecipes {
recipesManaLens = BotaniaAPI.getLatestAddedRecipes(2);
// Mana Pool Recipe
addOreDictRecipe(new ItemStack(ModBlocks.pool, 1, 2),
addOreDictRecipe(new ItemStack(ModBlocks.pool),
"R R", "RRR",
'R', LibOreDict.LIVING_ROCK);
recipePool = BotaniaAPI.getLatestAddedRecipe();
// Diluted Mana Pool Recipe
addOreDictRecipe(new ItemStack(ModBlocks.pool, 1, 2),
"R R", "RRR",
'R', new ItemStack(ModFluffBlocks.livingrockSlab));
recipePoolDiluted = BotaniaAPI.getLatestAddedRecipe();
// Fabulous Mana Pool Recipe
addOreDictRecipe(new ItemStack(ModBlocks.pool, 1, 3),
"R R", "RRR",
'R', new ItemStack(ModBlocks.shimmerrock));
recipePoolFabulous = BotaniaAPI.getLatestAddedRecipe();
// Runic Altar Recipe
addOreDictRecipe(new ItemStack(ModBlocks.runeAltar),
"SSS", "SPS",
@@ -424,7 +438,12 @@ public final class ModCraftingRecipes {
addShapelessOreDictRecipe(new ItemStack(ModItems.lens, 1, 6), new ItemStack(ModItems.lens), LibOreDict.RUNE[7]);
recipeLensGravity = BotaniaAPI.getLatestAddedRecipe();
addShapelessOreDictRecipe(new ItemStack(ModItems.lens, 1, 7), new ItemStack(ModItems.lens), LibOreDict.RUNE[11]);
addOreDictRecipe(new ItemStack(ModItems.lens, 1, 7),
" P ", "ALA", " R ",
'P', new ItemStack(Blocks.piston),
'R', "dustRedstone",
'A', "gemLapis",
'L', new ItemStack(ModItems.lens));
recipeLensBore = BotaniaAPI.getLatestAddedRecipe();
addShapelessOreDictRecipe(new ItemStack(ModItems.lens, 1, 8), new ItemStack(ModItems.lens), LibOreDict.RUNE[13]);
@@ -661,21 +680,39 @@ public final class ModCraftingRecipes {
recipeGrassHorn = BotaniaAPI.getLatestAddedRecipe();
// Terrasteel Armor Recipes
addOreDictRecipe(new ItemStack(ModItems.terrasteelHelmRevealing),
"TRT", "SAS", " S ",
'T', LibOreDict.LIVINGWOOD_TWIG,
'S', LibOreDict.TERRA_STEEL,
'R', LibOreDict.RUNE[4],
'A', new ItemStack(ModItems.manasteelHelmRevealing));
addOreDictRecipe(new ItemStack(ModItems.terrasteelHelm),
"SSS", "S S",
'S', LibOreDict.TERRA_STEEL);
"TRT", "SAS", " S ",
'T', LibOreDict.LIVINGWOOD_TWIG,
'S', LibOreDict.TERRA_STEEL,
'R', LibOreDict.RUNE[4],
'A', new ItemStack(ModItems.manasteelHelm));
recipeTerrasteelHelm = BotaniaAPI.getLatestAddedRecipe();
addOreDictRecipe(new ItemStack(ModItems.terrasteelChest),
"S S", "SSS", "SSS",
'S', LibOreDict.TERRA_STEEL);
"TRT", "SAS", " S ",
'T', LibOreDict.LIVINGWOOD_TWIG,
'S', LibOreDict.TERRA_STEEL,
'R', LibOreDict.RUNE[5],
'A', new ItemStack(ModItems.manasteelChest));
recipeTerrasteelChest = BotaniaAPI.getLatestAddedRecipe();
addOreDictRecipe(new ItemStack(ModItems.terrasteelLegs),
"SSS", "S S", "S S",
'S', LibOreDict.TERRA_STEEL);
"TRT", "SAS", " S ",
'T', LibOreDict.LIVINGWOOD_TWIG,
'S', LibOreDict.TERRA_STEEL,
'R', LibOreDict.RUNE[6],
'A', new ItemStack(ModItems.manasteelLegs));
recipeTerrasteelLegs = BotaniaAPI.getLatestAddedRecipe();
addOreDictRecipe(new ItemStack(ModItems.terrasteelBoots),
"S S", "S S",
'S', LibOreDict.TERRA_STEEL);
"TRT", "SAS", " S ",
'T', LibOreDict.LIVINGWOOD_TWIG,
'S', LibOreDict.TERRA_STEEL,
'R', LibOreDict.RUNE[7],
'A', new ItemStack(ModItems.manasteelBoots));
recipeTerrasteelBoots = BotaniaAPI.getLatestAddedRecipe();
// Terra Blade Recipe
@@ -1029,7 +1066,7 @@ public final class ModCraftingRecipes {
addOreDictRecipe(new ItemStack(ModBlocks.spreader, 1, 2),
"WWW", "EP ", "WWW",
'W', LibOreDict.DREAM_WOOD,
'P', LibOreDict.MANA_PETAL[i],
'P', LibOreDict.PETAL[i],
'E', LibOreDict.ELEMENTIUM);
recipesDreamwoodSpreader = BotaniaAPI.getLatestAddedRecipes(16);
@@ -1125,15 +1162,15 @@ public final class ModCraftingRecipes {
// Redirective Lens Recipe
addShapelessOreDictRecipe(new ItemStack(ModItems.lens, 1, 19), new ItemStack(ModItems.lens), LibOreDict.LIVING_WOOD, LibOreDict.ELEMENTIUM);
recipeLensRedirect = BotaniaAPI.getLatestAddedRecipe();
// Celebratory Lens Recipe
addShapelessOreDictRecipe(new ItemStack(ModItems.lens, 1, 20), new ItemStack(ModItems.lens), new ItemStack(Items.fireworks), LibOreDict.ELEMENTIUM);
recipeLensFirework = BotaniaAPI.getLatestAddedRecipe();
// Flare Lens Recipe
addShapelessOreDictRecipe(new ItemStack(ModItems.lens, 1, 21), new ItemStack(ModItems.lens), new ItemStack(ModBlocks.elfGlass), LibOreDict.ELEMENTIUM);
recipeLensFlare = BotaniaAPI.getLatestAddedRecipe();
// Mini Island Recipes
for(int i = 0; i < 16; i++)
GameRegistry.addRecipe(new ItemStack(ModBlocks.floatingFlower, 1, i),
@@ -1326,7 +1363,7 @@ public final class ModCraftingRecipes {
addOreDictRecipe(new ItemStack(ModItems.spark),
" P ", "BNB", " P ",
'B', new ItemStack(Items.blaze_powder),
'P', LibOreDict.MANA_PETAL[i],
'P', LibOreDict.PETAL[i],
'N', "nuggetGold");
recipesSpark = BotaniaAPI.getLatestAddedRecipes(16);
@@ -1699,7 +1736,7 @@ public final class ModCraftingRecipes {
for(int i = 0; i < 32; i++)
addOreDictRecipe(new ItemStack(ModItems.cosmetic, 1, i),
"PPP", "PSP", "PPP",
'P', new ItemStack(i < 16 ? ModItems.petal : ModItems.manaPetal, 1, i % 16),
'P', new ItemStack(i < 16 ? ModItems.petal : ModItems.dye, 1, i % 16),
'S', LibOreDict.MANA_STRING);
recipesCosmeticItems = BotaniaAPI.getLatestAddedRecipes(32);
@@ -1879,6 +1916,16 @@ public final class ModCraftingRecipes {
'D', LibOreDict.DRAGONSTONE);
recipeCocoon = BotaniaAPI.getLatestAddedRecipe();
// Fel Pumpkin
GameRegistry.addRecipe(new ItemStack(ModBlocks.felPumpkin),
" S ", "BPF", " G ",
'S', new ItemStack(Items.string),
'B', new ItemStack(Items.bone),
'P', new ItemStack(Blocks.pumpkin),
'F', new ItemStack(Items.rotten_flesh),
'G', new ItemStack(Items.gunpowder));
recipeFelPumpkin = BotaniaAPI.getLatestAddedRecipe();
// Luminizer Recipe
addShapelessOreDictRecipe(new ItemStack(ModBlocks.lightRelay), LibOreDict.RED_STRING, LibOreDict.DRAGONSTONE, "dustGlowstone", "dustGlowstone");
recipeLuminizer = BotaniaAPI.getLatestAddedRecipe();
@@ -2050,12 +2097,12 @@ public final class ModCraftingRecipes {
recipeAvatar = BotaniaAPI.getLatestAddedRecipe();
// Worldshaper's Sextant Recipe
addOreDictRecipe(new ItemStack(ModItems.sextant),
addOreDictRecipe(new ItemStack(ModItems.sextant),
" TI", " TT", "III",
'T', LibOreDict.LIVINGWOOD_TWIG,
'I', LibOreDict.MANA_STEEL);
recipeSextant = BotaniaAPI.getLatestAddedRecipe();
// Alternate Pasture Seed Recipes
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.grassSeeds, 1, 3), new ItemStack(ModItems.grassSeeds), new ItemStack(Blocks.deadbush));
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.grassSeeds, 1, 4), new ItemStack(ModItems.grassSeeds), new ItemStack(Items.wheat));
@@ -2064,7 +2111,7 @@ public final class ModCraftingRecipes {
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.grassSeeds, 1, 7), new ItemStack(ModItems.grassSeeds), new ItemStack(ModItems.manaResource, 1, 10));
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.grassSeeds, 1, 8), new ItemStack(ModItems.grassSeeds), new ItemStack(Items.spider_eye));
recipesAltGrassSeeds = BotaniaAPI.getLatestAddedRecipes(6);
// Planestrider's Sash Recipe
GameRegistry.addRecipe(new ItemStack(ModItems.speedUpBelt),
" M ", "PBP", " S ",
@@ -2073,15 +2120,15 @@ public final class ModCraftingRecipes {
'B', new ItemStack(ModItems.travelBelt),
'S', new ItemStack(Items.sugar));
recipeSpeedUpBelt = BotaniaAPI.getLatestAddedRecipe();
// Bauble Case Recipe
addOreDictRecipe(new ItemStack(ModItems.baubleBox),
addOreDictRecipe(new ItemStack(ModItems.baubleBox),
" M ", "MCG", " M ",
'M', LibOreDict.MANA_STEEL,
'C', new ItemStack(Blocks.chest),
'G', "ingotGold");
recipeBaubleCase = BotaniaAPI.getLatestAddedRecipe();
///////////////////////////////////////////////////////////////////////////////////////////////////////////
// Storage Block/Nugget Recipes
@@ -2212,16 +2259,6 @@ public final class ModCraftingRecipes {
addShapelessOreDictRecipe(new ItemStack(Items.slime_ball), new ItemStack(Items.magma_cream), new ItemStack(Items.water_bucket));
recipeMagmaToSlimeball = BotaniaAPI.getLatestAddedRecipe();
// Fel Pumpkin
GameRegistry.addRecipe(new ItemStack(ModBlocks.felPumpkin),
" S ", "BPF", " G ",
'S', new ItemStack(Items.string),
'B', new ItemStack(Items.bone),
'P', new ItemStack(Blocks.pumpkin),
'F', new ItemStack(Items.rotten_flesh),
'G', new ItemStack(Items.gunpowder));
recipeFelPumpkin = BotaniaAPI.getLatestAddedRecipe();
// Ender Portal
addOreDictRecipe(new ItemStack(Blocks.end_portal_frame),
"OGO",
@@ -22,16 +22,13 @@ import vazkii.botania.api.recipe.RecipeManaInfusion;
import vazkii.botania.common.Botania;
import vazkii.botania.common.block.ModBlocks;
import vazkii.botania.common.item.ModItems;
import vazkii.botania.common.lib.LibOreDict;
public final class ModManaInfusionRecipes {
public static RecipeManaInfusion poolRecipe;
public static List<RecipeManaInfusion> manaPetalRecipes;
public static List<RecipeManaInfusion> manasteelRecipes;
public static RecipeManaInfusion manaPearlRecipe;
public static List<RecipeManaInfusion> manaDiamondRecipes;
public static List<RecipeManaInfusion> manaPowderRecipes;
public static RecipeManaInfusion pistonRelayRecipe;
public static RecipeManaInfusion manaCookieRecipe;
public static RecipeManaInfusion grassSeedsRecipe;
@@ -46,15 +43,9 @@ public final class ModManaInfusionRecipes {
public static RecipeManaInfusion sugarCaneRecipe;
public static void init() {
poolRecipe = BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModBlocks.pool), new ItemStack(ModBlocks.pool, 1, 2), 320);
manaPetalRecipes = new ArrayList();
for(int i = 0; i < 16; i++)
manaPetalRecipes.add(BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModItems.manaPetal, 1, i), LibOreDict.PETAL[i], 200));
manasteelRecipes = new ArrayList();
manasteelRecipes.add(BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModItems.manaResource, 1, 0), "ingotIron", 3000));
manasteelRecipes.add(BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModBlocks.storage, 1, 0), new ItemStack(Blocks.iron_block), 30000));
manasteelRecipes.add(BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModBlocks.storage, 1, 0), new ItemStack(Blocks.iron_block), 27000));
manaPearlRecipe = BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModItems.manaResource, 1, 1), new ItemStack(Items.ender_pearl), 6000);
@@ -62,6 +53,14 @@ public final class ModManaInfusionRecipes {
manaDiamondRecipes.add(BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModItems.manaResource, 1, 2), "gemDiamond", 10000));
manaDiamondRecipes.add(BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModBlocks.storage, 1, 3), new ItemStack(Blocks.diamond_block), 90000));
manaPowderRecipes = new ArrayList();
manaPowderRecipes.add(BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModItems.manaResource, 1, 23), new ItemStack(Items.gunpowder), 500));
manaPowderRecipes.add(BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModItems.manaResource, 1, 23), new ItemStack(Items.redstone), 500));
manaPowderRecipes.add(BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModItems.manaResource, 1, 23), new ItemStack(Items.glowstone_dust), 500));
manaPowderRecipes.add(BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModItems.manaResource, 1, 23), new ItemStack(Items.sugar), 500));
for(int i = 0; i < 16; i++)
manaPowderRecipes.add(BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModItems.manaResource, 1, 23), new ItemStack(ModItems.dye, 1, i), 400));
pistonRelayRecipe = BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModBlocks.pistonRelay), new ItemStack(Blocks.piston), 15000);
manaCookieRecipe = BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModItems.manaCookie), new ItemStack(Items.cookie), 20000);
grassSeedsRecipe = BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModItems.grassSeeds), new ItemStack(Blocks.tallgrass, 1, 1), 2500);
@@ -26,11 +26,11 @@ import vazkii.botania.common.lib.LibOreDict;
public final class ModPetalRecipes {
public static final String white = LibOreDict.PETAL[0], orange = LibOreDict.PETAL[1], magenta = LibOreDict.PETAL[2], lightBlue = LibOreDict.PETAL[3], yellow = LibOreDict.PETAL[4], lime = LibOreDict.PETAL[5], pink = LibOreDict.PETAL[6], gray = LibOreDict.PETAL[7], lightGray = LibOreDict.PETAL[8], cyan = LibOreDict.PETAL[9], purple = LibOreDict.PETAL[10], blue = LibOreDict.PETAL[11], brown = LibOreDict.PETAL[12], green = LibOreDict.PETAL[13], red = LibOreDict.PETAL[14], black = LibOreDict.PETAL[15];
public static final String whiteMana = LibOreDict.MANA_PETAL[0], orangeMana = LibOreDict.MANA_PETAL[1], magentaMana = LibOreDict.MANA_PETAL[2], lightBlueMana = LibOreDict.MANA_PETAL[3], yellowMana = LibOreDict.MANA_PETAL[4], limeMana = LibOreDict.MANA_PETAL[5], pinkMana = LibOreDict.MANA_PETAL[6], grayMana = LibOreDict.MANA_PETAL[7], lightGrayMana = LibOreDict.MANA_PETAL[8], cyanMana = LibOreDict.MANA_PETAL[9], purpleMana = LibOreDict.MANA_PETAL[10], blueMana = LibOreDict.MANA_PETAL[11], brownMana = LibOreDict.MANA_PETAL[12], greenMana = LibOreDict.MANA_PETAL[13], redMana = LibOreDict.MANA_PETAL[14], blackMana = LibOreDict.MANA_PETAL[15];
public static final String runeWater = LibOreDict.RUNE[0], runeFire = LibOreDict.RUNE[1], runeEarth = LibOreDict.RUNE[2], runeAir = LibOreDict.RUNE[3], runeSpring = LibOreDict.RUNE[4], runeSummer = LibOreDict.RUNE[5], runeAutumn = LibOreDict.RUNE[6], runeWinter = LibOreDict.RUNE[7], runeMana = LibOreDict.RUNE[8], runeLust = LibOreDict.RUNE[9], runeGluttony = LibOreDict.RUNE[10], runeGreed = LibOreDict.RUNE[11], runeSloth = LibOreDict.RUNE[12], runeWrath = LibOreDict.RUNE[13], runeEnvy = LibOreDict.RUNE[14], runePride = LibOreDict.RUNE[15];
public static final String redstoneRoot = LibOreDict.REDSTONE_ROOT;
public static final String pixieDust = LibOreDict.PIXIE_DUST;
public static final String gaiaSpirit = LibOreDict.LIFE_ESSENCE;
public static final String manaPowder = LibOreDict.MANA_POWDER;
public static RecipePetals pureDaisyRecipe;
public static RecipePetals manastarRecipe;
@@ -78,53 +78,53 @@ public final class ModPetalRecipes {
public static void init() {
pureDaisyRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_PUREDAISY), white, white, white, white);
manastarRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_MANASTAR), lightBlueMana, greenMana, redMana, cyanMana);
manastarRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_MANASTAR), lightBlue, green, red, cyan);
daybloomRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_DAYBLOOM), yellow, yellow, orange, lightBlue);
nightshadeRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_NIGHTSHADE), black, black, purple, gray);
endoflameRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_ENDOFLAME), brown, red, redMana, brownMana, lightGray);
hydroangeasRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_HYDROANGEAS), blueMana, blue, pink, cyan, cyan, cyanMana);
thermalilyRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_THERMALILY), red, orangeMana, orange, runeEarth, runeFire);
arcaneRoseRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_ARCANE_ROSE), pink, pinkMana, pinkMana, lime, purple, purpleMana, runeMana);
munchdewRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_MUNCHDEW), lime, limeMana, green, red, redMana, white, whiteMana, runeGluttony);
entropinnyumRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_ENTROPINNYUM), red, redMana, gray, grayMana, white, whiteMana, runeWrath, runeFire);
kekimurusRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_KEKIMURUS), white, whiteMana, orangeMana, brownMana, brownMana, orange, runeGluttony, pixieDust);
gourmaryllisRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_GOURMARYLLIS), lightGray, lightGrayMana, yellowMana, yellow, yellowMana, red, runeFire, runeSummer);
narslimmusRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_NARSLIMMUS), lime, limeMana, green, greenMana, black, runeSummer, runeWater);
spectrolusRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_SPECTROLUS), redMana, orangeMana, yellowMana, greenMana, blueMana, cyanMana, purpleMana, white, runeWinter, runeAir, pixieDust);
rafflowsiaRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_RAFFLOWSIA), purpleMana, purpleMana, blackMana, green, greenMana, runeEarth, runePride, pixieDust);
dandelifeonRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_DANDELIFEON), purpleMana, purpleMana, limeMana, greenMana, runeWater, runeFire, runeEarth, runeAir, gaiaSpirit);
endoflameRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_ENDOFLAME), brown, brown, red, lightGray, manaPowder);
hydroangeasRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_HYDROANGEAS), blue, blue, cyan, cyan, manaPowder);
thermalilyRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_THERMALILY), red, orange, orange, runeEarth, runeFire);
arcaneRoseRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_ARCANE_ROSE), pink, pink, purple, purple, lime, runeMana);
munchdewRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_MUNCHDEW), lime, lime, red, red, green, runeGluttony);
entropinnyumRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_ENTROPINNYUM), red, red, gray, gray, white, white, runeWrath, runeFire);
kekimurusRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_KEKIMURUS), white, white, orange, orange, brown, brown,runeGluttony, pixieDust);
gourmaryllisRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_GOURMARYLLIS), lightGray, lightGray, yellow, yellow, red, runeFire, runeSummer);
narslimmusRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_NARSLIMMUS), lime, lime, green, green, black, runeSummer, runeWater);
spectrolusRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_SPECTROLUS), red, red, green, green, blue, blue, white, white, runeWinter, runeAir, pixieDust);
rafflowsiaRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_RAFFLOWSIA), purple, purple, green, green, black, runeEarth, runePride, pixieDust);
dandelifeonRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_DANDELIFEON), purple, purple, lime, green, runeWater, runeFire, runeEarth, runeAir, gaiaSpirit);
jadedAmaranthusRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_JADED_AMARANTHUS), purpleMana, purpleMana, lime, purple, green, runeSpring, redstoneRoot);
bellethorneRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_BELLETHORN), redMana, redMana, cyan, cyan, red, redstoneRoot);
dreadthorneRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_DREADTHORN), blackMana, purpleMana, cyan, cyan, black, purple, redstoneRoot);
heiseiDreamRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_HEISEI_DREAM), purpleMana, pinkMana, magentaMana, purple, pink, magenta, runeWrath, pixieDust);
tigerseyeRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_TIGERSEYE), yellow, brownMana, orangeMana, lime, runeAutumn);
jadedAmaranthusRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_JADED_AMARANTHUS), purple, lime, green, runeSpring, redstoneRoot);
bellethorneRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_BELLETHORN), red, red, red, cyan, cyan, redstoneRoot);
dreadthorneRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_DREADTHORN), black, black, black, cyan, cyan, redstoneRoot);
heiseiDreamRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_HEISEI_DREAM), magenta, magenta, purple, pink, runeWrath, pixieDust);
tigerseyeRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_TIGERSEYE), yellow, brown, orange, lime, runeAutumn);
if(Botania.gardenOfGlassLoaded)
orechidRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_ORECHID), gray, grayMana, lightGray, lightGrayMana, lightBlue, yellow, green, red);
else orechidRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_ORECHID), gray, grayMana, lightGray, lightGrayMana, lightBlue, yellow, green, red, runePride, runeGreed, redstoneRoot, pixieDust);
orechidRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_ORECHID), gray, gray, yellow, yellow, green, green, red, red);
else orechidRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_ORECHID), gray, gray, yellow, green, red, runePride, runeGreed, redstoneRoot, pixieDust);
orechidIgnemRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_ORECHID_IGNEM), red, redMana, black, blackMana, white, white, blue, yellow, runePride, runeGreed, redstoneRoot, pixieDust);
orechidIgnemRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_ORECHID_IGNEM), red, red, white, white, pink, runePride, runeGreed, redstoneRoot, pixieDust);
if(ConfigHandler.fallenKanadeEnabled)
fallenKanadeRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_FALLEN_KANADE), white, whiteMana, whiteMana, yellowMana, orangeMana, brownMana, runeSpring);
exoflameRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_EXOFLAME), red, redMana, redMana, gray, lightGray, runeFire, runeSummer);
agricarnationRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_AGRICARNATION), redMana, yellow, greenMana, lime, lime, limeMana, runeSpring, redstoneRoot);
hopperhockRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_HOPPERHOCK), gray, grayMana, lightGray, lightGrayMana, runeAir, redstoneRoot);
tangleberrieRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_TANGLEBERRIE), grayMana, lightGrayMana, cyanMana, cyan, runeAir, runeEarth);
jiyuuliaRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_JIYUULIA), pinkMana, purpleMana, lightGrayMana, pink, runeWater, runeAir);
rannuncarpusRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_RANNUNCARPUS), orangeMana, orangeMana, orange, yellow, runeEarth, red, redMana, redstoneRoot);
hyacidusRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_HYACIDUS), purple, purpleMana, magenta, magentaMana, brown, green, greenMana, runeWater, runeAutumn, redstoneRoot);
pollidisiacRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_POLLIDISIAC), orange, orangeMana, red, redMana, pink, pinkMana, runeLust, runeFire);
clayconiaRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_CLAYCONIA), gray, lightGray, lightGrayMana, lightGrayMana, grayMana, cyan, runeEarth);
looniumRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_LOONIUM), green, green, greenMana, greenMana, gray, grayMana, runeSloth, runeGluttony, runeEnvy, redstoneRoot, pixieDust);
daffomillRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_DAFFOMILL), white, whiteMana, brown, yellowMana, runeAir, redstoneRoot);
vinculotusRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_VINCULOTUS), purpleMana, purpleMana, lime, black, blackMana, black, runeWater, runeSloth, runeLust, redstoneRoot);
spectranthemumRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_SPECTRANTHEMUM), whiteMana, whiteMana, white, white, cyan, runeEnvy, runeWater, redstoneRoot, pixieDust);
medumoneRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_MEDUMONE), brown, brown, brownMana, gray, grayMana, runeEarth, redstoneRoot);
marimorphosisRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_MARIMORPHOSIS), grayMana, yellow, green, lime, lightBlue, red, runeEarth, runeFire, redstoneRoot);
bubbellRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_BUBBELL), cyanMana, cyan, blue, lightBlue, lightBlueMana, runeWater, runeSummer, pixieDust);
solegnoliaRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_SOLEGNOLIA), brown, red, brownMana, red, blue, redstoneRoot);
fallenKanadeRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_FALLEN_KANADE), white, white, yellow, yellow, orange, runeSpring);
exoflameRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_EXOFLAME), red, red, gray, lightGray, runeFire, runeSummer);
agricarnationRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_AGRICARNATION), lime, lime, green, yellow, runeSpring, redstoneRoot);
hopperhockRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_HOPPERHOCK), gray, gray, lightGray, lightGray, runeAir, redstoneRoot);
tangleberrieRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_TANGLEBERRIE), cyan, cyan, gray, lightGray, runeAir, runeEarth);
jiyuuliaRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_JIYUULIA), pink, pink, purple, lightGray, runeWater, runeAir);
rannuncarpusRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_RANNUNCARPUS), orange, orange, yellow, runeEarth, redstoneRoot);
hyacidusRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_HYACIDUS), purple, purple, magenta, magenta, green, runeWater, runeAutumn, redstoneRoot);
pollidisiacRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_POLLIDISIAC), red, red, pink, pink, orange, runeLust, runeFire);
clayconiaRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_CLAYCONIA), lightGray, lightGray, gray, cyan, runeEarth);
looniumRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_LOONIUM), green, green, green, green, gray, runeSloth, runeGluttony, runeEnvy, redstoneRoot, pixieDust);
daffomillRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_DAFFOMILL), white, white, brown, yellow, runeAir, redstoneRoot);
vinculotusRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_VINCULOTUS), black, black, purple, purple, green, runeWater, runeSloth, runeLust, redstoneRoot);
spectranthemumRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_SPECTRANTHEMUM), white, white, lightGray, lightGray, cyan, runeEnvy, runeWater, redstoneRoot, pixieDust);
medumoneRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_MEDUMONE), brown, brown, gray, gray, runeEarth, redstoneRoot);
marimorphosisRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_MARIMORPHOSIS), gray, yellow, green, red, runeEarth, runeFire, redstoneRoot);
bubbellRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_BUBBELL), cyan, cyan, lightBlue, lightBlue, blue, blue, runeWater, runeSummer, pixieDust);
solegnoliaRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_SOLEGNOLIA), brown, brown, red, blue, redstoneRoot);
ItemStack stack = new ItemStack(Items.skull, 1, 3);
ItemNBTHelper.setString(stack, "SkullOwner", "Vazkii");
@@ -45,20 +45,20 @@ public final class ModRuneRecipes {
public static RecipeRuneAltar recipeHead;
public static void init() {
final int costTier1 = 8500;
final int costTier2 = 4000;
final int costTier3 = 6000;
final int costTier1 = 5200;
final int costTier2 = 8000;
final int costTier3 = 12000;
recipeWaterRune = BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 3, 0), costTier1, LibOreDict.MANA_STEEL, LibOreDict.MANA_STEEL, LibOreDict.MANA_STEEL, new ItemStack(Items.dye, 1, 15), new ItemStack(Items.reeds), new ItemStack(Items.fishing_rod));
recipeFireRune = BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 3, 1), costTier1, LibOreDict.MANA_STEEL, LibOreDict.MANA_STEEL, LibOreDict.MANA_STEEL, new ItemStack(Items.netherbrick), new ItemStack(Items.gunpowder), new ItemStack(Items.nether_wart));
recipeWaterRune = BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 2, 0), costTier1, LibOreDict.MANA_POWDER, LibOreDict.MANA_STEEL, new ItemStack(Items.dye, 1, 15), new ItemStack(Items.reeds), new ItemStack(Items.fishing_rod));
recipeFireRune = BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 2, 1), costTier1, LibOreDict.MANA_POWDER, LibOreDict.MANA_STEEL, new ItemStack(Items.netherbrick), new ItemStack(Items.gunpowder), new ItemStack(Items.nether_wart));
recipesEarthRune = new ArrayList();
recipesEarthRune.add(BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 3, 2), costTier1, LibOreDict.MANA_STEEL, LibOreDict.MANA_STEEL, LibOreDict.MANA_STEEL, "stone", new ItemStack(Blocks.coal_block), new ItemStack(Blocks.brown_mushroom)));
recipesEarthRune.add(BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 3, 2), costTier1, LibOreDict.MANA_STEEL, LibOreDict.MANA_STEEL, LibOreDict.MANA_STEEL, "stone", new ItemStack(Blocks.coal_block), new ItemStack(Blocks.red_mushroom)));
recipesEarthRune.add(BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 2, 2), costTier1, LibOreDict.MANA_POWDER, LibOreDict.MANA_STEEL, "stone", new ItemStack(Blocks.coal_block), new ItemStack(Blocks.brown_mushroom)));
recipesEarthRune.add(BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 2, 2), costTier1, LibOreDict.MANA_POWDER, LibOreDict.MANA_STEEL, "stone", new ItemStack(Blocks.coal_block), new ItemStack(Blocks.red_mushroom)));
recipesAirRune = new ArrayList();
for(int i = 0; i < 16; i++)
recipesAirRune.add(BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 3, 3), costTier1, LibOreDict.MANA_STEEL, LibOreDict.MANA_STEEL, LibOreDict.MANA_STEEL, new ItemStack(Blocks.carpet, 1, i), new ItemStack(Items.feather), new ItemStack(Items.string)));
recipesAirRune.add(BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 2, 3), costTier1, LibOreDict.MANA_POWDER, LibOreDict.MANA_STEEL, new ItemStack(Blocks.carpet, 1, i), new ItemStack(Items.feather), new ItemStack(Items.string)));
recipeSpringRune = BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 1, 4), costTier2, LibOreDict.RUNE[0], LibOreDict.RUNE[1], "treeSapling", "treeSapling", "treeSapling", new ItemStack(Items.wheat));
recipeSummerRune = BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 1, 5), costTier2, LibOreDict.RUNE[2], LibOreDict.RUNE[3], new ItemStack(Block.getBlockFromName("sand")), new ItemStack(Block.getBlockFromName("sand")), new ItemStack(Items.slime_ball), new ItemStack(Items.melon));
@@ -70,13 +70,13 @@ public final class ModRuneRecipes {
recipeManaRune = BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 1, 8), costTier2, LibOreDict.MANA_STEEL, LibOreDict.MANA_STEEL, LibOreDict.MANA_STEEL, LibOreDict.MANA_STEEL, LibOreDict.MANA_STEEL, LibOreDict.MANA_PEARL);
recipeLustRune = BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 2, 9), costTier3, LibOreDict.MANA_DIAMOND, LibOreDict.MANA_DIAMOND, LibOreDict.RUNE[5], LibOreDict.RUNE[3]);
recipeGluttonyRune = BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 2, 10), costTier3, LibOreDict.MANA_DIAMOND, LibOreDict.MANA_DIAMOND, LibOreDict.RUNE[7], LibOreDict.RUNE[1]);
recipeGreedRune = BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 2, 11), costTier3, LibOreDict.MANA_DIAMOND, LibOreDict.MANA_DIAMOND, LibOreDict.RUNE[4], LibOreDict.RUNE[0]);
recipeSlothRune = BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 2, 12), costTier3, LibOreDict.MANA_DIAMOND, LibOreDict.MANA_DIAMOND, LibOreDict.RUNE[6], LibOreDict.RUNE[3]);
recipeWrathRune = BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 2, 13), costTier3, LibOreDict.MANA_DIAMOND, LibOreDict.MANA_DIAMOND, LibOreDict.RUNE[7], LibOreDict.RUNE[2]);
recipeEnvyRune = BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 2, 14), costTier3, LibOreDict.MANA_DIAMOND, LibOreDict.MANA_DIAMOND, LibOreDict.RUNE[7], LibOreDict.RUNE[0]);
recipePrideRune = BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 2, 15), costTier3, LibOreDict.MANA_DIAMOND, LibOreDict.MANA_DIAMOND, LibOreDict.RUNE[5], LibOreDict.RUNE[1]);
recipeLustRune = BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 1, 9), costTier3, LibOreDict.MANA_DIAMOND, LibOreDict.MANA_DIAMOND, LibOreDict.RUNE[5], LibOreDict.RUNE[3]);
recipeGluttonyRune = BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 1, 10), costTier3, LibOreDict.MANA_DIAMOND, LibOreDict.MANA_DIAMOND, LibOreDict.RUNE[7], LibOreDict.RUNE[1]);
recipeGreedRune = BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 1, 11), costTier3, LibOreDict.MANA_DIAMOND, LibOreDict.MANA_DIAMOND, LibOreDict.RUNE[4], LibOreDict.RUNE[0]);
recipeSlothRune = BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 1, 12), costTier3, LibOreDict.MANA_DIAMOND, LibOreDict.MANA_DIAMOND, LibOreDict.RUNE[6], LibOreDict.RUNE[3]);
recipeWrathRune = BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 1, 13), costTier3, LibOreDict.MANA_DIAMOND, LibOreDict.MANA_DIAMOND, LibOreDict.RUNE[7], LibOreDict.RUNE[2]);
recipeEnvyRune = BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 1, 14), costTier3, LibOreDict.MANA_DIAMOND, LibOreDict.MANA_DIAMOND, LibOreDict.RUNE[7], LibOreDict.RUNE[0]);
recipePrideRune = BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 1, 15), costTier3, LibOreDict.MANA_DIAMOND, LibOreDict.MANA_DIAMOND, LibOreDict.RUNE[5], LibOreDict.RUNE[1]);
recipeHead = new HeadRecipe(new ItemStack(Items.skull, 1, 3), 22500, new ItemStack(Items.skull), LibOreDict.PIXIE_DUST, LibOreDict.PRISMARINE_SHARD, new ItemStack(Items.name_tag), new ItemStack(Items.golden_apple));
BotaniaAPI.runeAltarRecipes.add(recipeHead);
@@ -37,7 +37,7 @@ public class ManaGunLensRecipe implements IRecipe {
foundLens = true;
else return false;
}
else return false; // Found an invalid item, breaking the recipe
}
}
@@ -33,6 +33,7 @@ public class EntityCorporeaSpark extends Entity implements ICorporeaSpark {
private static final String TAG_MASTER = "master";
private static final String TAG_NETWORK = "network";
private static final String TAG_INVIS = "invis";
ICorporeaSpark master;
List<ICorporeaSpark> connections = new ArrayList();
@@ -49,11 +50,13 @@ public class EntityCorporeaSpark extends Entity implements ICorporeaSpark {
@Override
protected void entityInit() {
setSize(0.1F, 0.5F);
dataWatcher.addObject(EntitySpark.INVISIBILITY_DATA_WATCHER_KEY, 0);
dataWatcher.addObject(28, 0);
dataWatcher.addObject(29, 0);
dataWatcher.addObject(30, 0);
dataWatcher.addObject(31, new ItemStack(Blocks.stone, 0, 0));
dataWatcher.setObjectWatched(EntitySpark.INVISIBILITY_DATA_WATCHER_KEY);
dataWatcher.setObjectWatched(28);
dataWatcher.setObjectWatched(29);
dataWatcher.setObjectWatched(30);
@@ -280,6 +283,16 @@ public class EntityCorporeaSpark extends Entity implements ICorporeaSpark {
}
}
return doPhantomInk(stack);
}
public boolean doPhantomInk(ItemStack stack) {
if(stack != null && stack.getItem() == ModItems.phantomInk && !worldObj.isRemote) {
int invis = dataWatcher.getWatchableObjectInt(EntitySpark.INVISIBILITY_DATA_WATCHER_KEY);
dataWatcher.updateObject(EntitySpark.INVISIBILITY_DATA_WATCHER_KEY, ~invis & 1);
return true;
}
return false;
}
@@ -287,12 +300,14 @@ public class EntityCorporeaSpark extends Entity implements ICorporeaSpark {
protected void readEntityFromNBT(NBTTagCompound cmp) {
setMaster(cmp.getBoolean(TAG_MASTER));
setNetwork(cmp.getInteger(TAG_NETWORK));
dataWatcher.updateObject(EntitySpark.INVISIBILITY_DATA_WATCHER_KEY, cmp.getInteger(TAG_INVIS));
}
@Override
protected void writeEntityToNBT(NBTTagCompound cmp) {
cmp.setBoolean(TAG_MASTER, isMaster());
cmp.setInteger(TAG_NETWORK, getNetwork());
cmp.setInteger(TAG_INVIS, dataWatcher.getWatchableObjectInt(EntitySpark.INVISIBILITY_DATA_WATCHER_KEY));
}
}
@@ -43,6 +43,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.tileentity.TileEntityBeacon;
import net.minecraft.util.*;
import net.minecraft.world.EnumDifficulty;
import net.minecraft.world.World;
@@ -130,15 +131,14 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
for(int j = 0; j < 3; j++)
mb.addComponent(new BeaconComponent(new BlockPos(i - 1, 0, j - 1)));
mb.addComponent(new BlockPos(0, 1, 0), Blocks.beacon.getDefaultState());
mb.addComponent(new BeaconBeamComponent(new BlockPos(0, 1, 0)));
mb.setRenderOffset(new BlockPos(0, -1, 0));
return mb.makeSet();
}
public static boolean spawn(EntityPlayer player, ItemStack par1ItemStack, World par3World, BlockPos pos, boolean hard) {
Block block = par3World.getBlockState(pos).getBlock();
if(block == Blocks.beacon && isTruePlayer(player)) {
if(par3World.getTileEntity(pos) instanceof TileEntityBeacon && isTruePlayer(player)) {
if(par3World.getDifficulty() == EnumDifficulty.PEACEFUL) {
if(!par3World.isRemote)
player.addChatMessage(new ChatComponentTranslation("botaniamisc.peacefulNoob").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
@@ -162,9 +162,6 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
float r = 1F;
float g = 0F;
float b = 1F;
float m = 0.15F;
float mv = 0.35F;
float rad = i * (float) Math.PI / 180F;
double x = pos.getX() + 0.5 - Math.cos(rad) * RANGE;
double y = pos.getY() + 0.5;
@@ -172,13 +169,17 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
Botania.proxy.sparkleFX(par3World, x, y, z, r, g, b, 5F, 120);
}
if(!par3World.isRemote)
player.addChatMessage(new ChatComponentTranslation("botaniamisc.badArena").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
return false;
}
par1ItemStack.stackSize--;
if(par3World.isRemote)
return true;
EntityDoppleganger e = new EntityDoppleganger(par3World);
e.setPosition(pos.getX() + 0.5, pos.getY() + 3, pos.getZ() + 0.5);
e.setInvulTime(SPAWN_TICKS);
@@ -210,11 +211,11 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
int range = (int) Math.ceil(RANGE);
for(int i = -range; i < range + 1; i++)
for(int j = -range; j < range + 1; j++) {
if((Math.abs(i) == 4 && Math.abs(j) == 4) || vazkii.botania.common.core.helper.MathHelper.pointDistancePlane(i, j, 0, 0) > RANGE)
if(Math.abs(i) == 4 && Math.abs(j) == 4 || vazkii.botania.common.core.helper.MathHelper.pointDistancePlane(i, j, 0, 0) > RANGE)
continue; // Ignore pylons and out of circle
int air = 0;
yCheck: {
for(int k = heightCheck + heightMin + 1; k >= -heightCheck; k--) {
BlockPos pos = startPos.add(i, k, j);
@@ -229,11 +230,11 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
air = 0;
}
}
return false;
}
}
return true;
}
@@ -366,7 +367,7 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
crit = p.fallDistance > 0.0F && !p.onGround && !p.isOnLadder() && !p.isInWater() && !p.isPotionActive(Potion.blindness) && p.ridingEntity == null;
}
int cap = crit ? 50 : 35;
int cap = crit ? 60 : 40;
return super.attackEntityFrom(par1DamageSource, Math.min(cap, dmg) * (isHardMode() ? 0.6F : 1F));
}
return false;
@@ -501,7 +502,7 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
@Override
public void onLivingUpdate() {
super.onLivingUpdate();
if(ridingEntity != null) {
if(ridingEntity.riddenByEntity != null)
ridingEntity.riddenByEntity = null;
@@ -884,4 +885,16 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
};
}
public static class BeaconBeamComponent extends MultiblockComponent {
public BeaconBeamComponent(BlockPos relPos) {
super(relPos, Blocks.beacon.getDefaultState());
}
@Override
public boolean matches(World world, BlockPos pos) {
return world.getTileEntity(pos) instanceof TileEntityBeacon;
}
}
}
@@ -126,8 +126,11 @@ public class EntityMagicMissile extends EntityThrowable {
List<EntityLivingBase> targetList = worldObj.getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(posX - 0.5, posY - 0.5, posZ - 0.5, posX + 0.5, posY + 0.5, posZ + 0.5));
if(targetList.contains(target) && target != null) {
EntityLivingBase thrower = getThrower();
EntityPlayer player = thrower instanceof EntityPlayer ? (EntityPlayer) thrower : null;
target.attackEntityFrom(player == null ? DamageSource.causeMobDamage(thrower) : DamageSource.causePlayerDamage(player), evil ? 12 : 7);
if(thrower != null) {
EntityPlayer player = thrower instanceof EntityPlayer ? (EntityPlayer) thrower : null;
target.attackEntityFrom(player == null ? DamageSource.causeMobDamage(thrower) : DamageSource.causePlayerDamage(player), evil ? 12 : 7);
} else target.attackEntityFrom(DamageSource.generic, evil ? 12 : 7);
setDead();
}
@@ -393,11 +393,11 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
}
@Override
@SideOnly(Side.CLIENT)
public void setPositionAndRotation2(double p_70056_1_, double p_70056_3_, double p_70056_5_, float p_70056_7_, float p_70056_8_, int p_70056_9_, boolean p_70056_10_) {
setPosition(p_70056_1_, p_70056_3_, p_70056_5_);
setRotation(p_70056_7_, p_70056_8_);
}
@SideOnly(Side.CLIENT)
public void setPositionAndRotation2(double p_70056_1_, double p_70056_3_, double p_70056_5_, float p_70056_7_, float p_70056_8_, int p_70056_9_, boolean p_70056_10) {
setPosition(p_70056_1_, p_70056_3_, p_70056_5_);
setRotation(p_70056_7_, p_70056_8_);
}
@Override
public boolean handleWaterMovement() {
@@ -43,6 +43,8 @@ public class EntitySpark extends Entity implements ISparkEntity {
private static final int TRANSFER_RATE = 1000;
private static final String TAG_UPGRADE = "upgrade";
private static final String TAG_INVIS = "invis";
public static final int INVISIBILITY_DATA_WATCHER_KEY = 27;
Set<ISparkEntity> transfers = Collections.newSetFromMap(new WeakHashMap());
@@ -57,7 +59,9 @@ public class EntitySpark extends Entity implements ISparkEntity {
@Override
protected void entityInit() {
setSize(0.1F, 0.5F);
dataWatcher.addObject(INVISIBILITY_DATA_WATCHER_KEY, 0);
dataWatcher.addObject(28, 0);
dataWatcher.setObjectWatched(INVISIBILITY_DATA_WATCHER_KEY);
dataWatcher.setObjectWatched(28);
}
@@ -278,17 +282,29 @@ public class EntitySpark extends Entity implements ISparkEntity {
}
}
return doPhantomInk(stack);
}
public boolean doPhantomInk(ItemStack stack) {
if(stack != null && stack.getItem() == ModItems.phantomInk && !worldObj.isRemote) {
int invis = dataWatcher.getWatchableObjectInt(INVISIBILITY_DATA_WATCHER_KEY);
dataWatcher.updateObject(INVISIBILITY_DATA_WATCHER_KEY, ~invis & 1);
return true;
}
return false;
}
@Override
protected void readEntityFromNBT(NBTTagCompound cmp) {
setUpgrade(cmp.getInteger(TAG_UPGRADE));
dataWatcher.updateObject(INVISIBILITY_DATA_WATCHER_KEY, cmp.getInteger(TAG_INVIS));
}
@Override
protected void writeEntityToNBT(NBTTagCompound cmp) {
cmp.setInteger(TAG_UPGRADE, getUpgrade());
cmp.setInteger(TAG_INVIS, dataWatcher.getWatchableObjectInt(INVISIBILITY_DATA_WATCHER_KEY));
}
@Override
@@ -11,19 +11,13 @@
package vazkii.botania.common.item;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityChest;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.player.EntityItemPickupEvent;
import vazkii.botania.common.Botania;
import vazkii.botania.common.block.ModBlocks;
import vazkii.botania.common.core.helper.InventoryHelper;
import vazkii.botania.common.core.helper.ItemNBTHelper;
import vazkii.botania.common.lib.LibGuiIDs;
import vazkii.botania.common.lib.LibItemNames;
@@ -71,5 +65,5 @@ public class ItemBaubleBox extends ItemMod {
ItemNBTHelper.setList(stack, TAG_ITEMS, var2);
}
}
@@ -47,7 +47,7 @@ public class ItemGrassSeeds extends ItemMod {
private static final IslandType[] ISLAND_TYPES = {
IslandType.GRASS, IslandType.PODZOL, IslandType.MYCEL,
IslandType.DRY, IslandType.GOLDEN, IslandType.VIVID,
IslandType.DRY, IslandType.GOLDEN, IslandType.VIVID,
IslandType.SCORCHED, IslandType.INFUSED, IslandType.MUTATED
};
Loaded 100 of 164 files, more files were not shown because too many files have changed in this diff. Show more