No files matched your search
@@ -17,7 +17,7 @@ buildscript {
|
||||
|
||||
apply plugin: 'forge'
|
||||
|
||||
version = "1.7.10-1.0.2"
|
||||
version = "1.7.10-1.0.3"
|
||||
group= "makeo.gadomancy"
|
||||
archivesBaseName = "gadomancy"
|
||||
|
||||
|
||||
@@ -58,6 +58,13 @@ public abstract class AdditionalGolemCore {
|
||||
|
||||
public abstract String getUnlocalizedName();
|
||||
|
||||
/**
|
||||
* @return If you're able to set markers using the golemancers bell
|
||||
*/
|
||||
public boolean hasMarkers() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the item that is used as a core
|
||||
*/
|
||||
|
||||
@@ -3,17 +3,36 @@ package makeo.gadomancy.client;
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import makeo.gadomancy.client.events.ClientTickHandler;
|
||||
import makeo.gadomancy.client.events.RenderEventHandler;
|
||||
import makeo.gadomancy.client.events.ResourceReloadListener;
|
||||
import makeo.gadomancy.client.gui.InfusionClawGui;
|
||||
import makeo.gadomancy.client.renderers.block.BlockExtendedNodeJarRenderer;
|
||||
import makeo.gadomancy.client.renderers.block.RenderBlockStoneMachine;
|
||||
import makeo.gadomancy.client.renderers.block.RenderBlockTransparent;
|
||||
import makeo.gadomancy.client.renderers.entity.RenderAdditionalGolemBase;
|
||||
import makeo.gadomancy.client.renderers.item.*;
|
||||
import makeo.gadomancy.client.renderers.tile.*;
|
||||
import makeo.gadomancy.client.renderers.tile.RenderTileArcaneDropper;
|
||||
import makeo.gadomancy.client.renderers.tile.RenderTileExtendedNode;
|
||||
import makeo.gadomancy.client.renderers.tile.RenderTileExtendedNodeJar;
|
||||
import makeo.gadomancy.client.renderers.tile.RenderTileInfusionClaw;
|
||||
import makeo.gadomancy.client.renderers.tile.RenderTileManipulationFocus;
|
||||
import makeo.gadomancy.client.renderers.tile.RenderTileManipulatorPillar;
|
||||
import makeo.gadomancy.client.renderers.tile.RenderTileNodeManipulator;
|
||||
import makeo.gadomancy.client.renderers.tile.RenderTileRemoteJar;
|
||||
import makeo.gadomancy.client.renderers.tile.RenderTileStickyJar;
|
||||
import makeo.gadomancy.common.CommonProxy;
|
||||
import makeo.gadomancy.common.blocks.tiles.*;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileArcaneDropper;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileExtendedNode;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileExtendedNodeJar;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileInfusionClaw;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileManipulationFocus;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileManipulatorPillar;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileNodeManipulator;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileRemoteJar;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileStickyJar;
|
||||
import makeo.gadomancy.common.registration.RegisteredBlocks;
|
||||
import makeo.gadomancy.common.registration.RegisteredItems;
|
||||
import makeo.gadomancy.common.utils.Injector;
|
||||
@@ -96,9 +115,13 @@ public class ClientProxy extends CommonProxy {
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(RegisteredBlocks.blockStoneMachine), itemRenderStoneMachine);
|
||||
itemRenderStoneMachine.registerRenderer(0, new TileManipulationFocus(), renderTileManipulationFocus);
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(RegisteredItems.itemFamiliar, new ItemRenderFamiliar());
|
||||
MinecraftForgeClient.registerItemRenderer(RegisteredItems.itemCreativeNode, new ItemCreativeNodeRenderer());
|
||||
|
||||
//Blocks
|
||||
RegisteredBlocks.rendererTransparentBlock = registerBlockRenderer(new RenderBlockTransparent());
|
||||
RegisteredBlocks.rendererExtendedNodeJarBlock = registerBlockRenderer(new BlockExtendedNodeJarRenderer());
|
||||
RegisteredBlocks.rendererBlockStoneMachine = registerBlockRenderer(new RenderBlockStoneMachine());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -111,6 +134,8 @@ public class ClientProxy extends CommonProxy {
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(new RenderEventHandler());
|
||||
|
||||
FMLCommonHandler.instance().bus().register(new ClientTickHandler());
|
||||
|
||||
super.postInitalize();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package makeo.gadomancy.client.events;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent;
|
||||
import makeo.gadomancy.client.util.FamiliarHandlerClient;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
* Gadomancy is Open Source and distributed under the
|
||||
* GNU LESSER GENERAL PUBLIC LICENSE
|
||||
* for more read the LICENSE file
|
||||
* <p/>
|
||||
* Created by HellFirePvP @ 01.11.2015 10:41
|
||||
*/
|
||||
public class ClientTickHandler {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onClientTick(TickEvent.ClientTickEvent event) {
|
||||
if(event.phase.equals(TickEvent.Phase.END)) {
|
||||
FamiliarHandlerClient.playerTickEvent();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package makeo.gadomancy.client.events;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import makeo.gadomancy.client.util.ExtendedTypeDisplayManager;
|
||||
import makeo.gadomancy.client.util.FamiliarHandlerClient;
|
||||
import makeo.gadomancy.client.util.MultiTickEffectDispatcher;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileExtendedNode;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileExtendedNodeJar;
|
||||
@@ -12,6 +13,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraftforge.client.event.DrawBlockHighlightEvent;
|
||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -21,7 +23,6 @@ import thaumcraft.api.wands.ItemFocusBasic;
|
||||
import thaumcraft.client.lib.REHWandHandler;
|
||||
import thaumcraft.common.items.relics.ItemThaumometer;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import thaumcraft.common.tiles.TileJarNode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -89,4 +90,9 @@ public class RenderEventHandler {
|
||||
ExtendedTypeDisplayManager.notifyRenderTick();
|
||||
MultiTickEffectDispatcher.notifyRenderTick(Minecraft.getMinecraft().theWorld, event.partialTicks);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void playerRenderEvent(RenderPlayerEvent.Post renderEvent) {
|
||||
FamiliarHandlerClient.playerRenderEvent(renderEvent.entityPlayer, renderEvent.partialRenderTick);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package makeo.gadomancy.client.renderers.block;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import makeo.gadomancy.common.blocks.BlockStoneMachine;
|
||||
import makeo.gadomancy.common.registration.RegisteredBlocks;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import thaumcraft.client.renderers.block.BlockStoneDeviceRenderer;
|
||||
import thaumcraft.common.blocks.BlockStoneDevice;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
* Gadomancy is Open Source and distributed under the
|
||||
* GNU LESSER GENERAL PUBLIC LICENSE
|
||||
* for more read the LICENSE file
|
||||
* <p/>
|
||||
* Created by makeo @ 03.11.2015 22:09
|
||||
*/
|
||||
public class RenderBlockStoneMachine implements ISimpleBlockRenderingHandler {
|
||||
private static final BlockStoneDeviceRenderer DEVICE_RENDERER = new BlockStoneDeviceRenderer();
|
||||
private static final BlockStoneDevice DEVICE_BLOCK = new BlockStoneDevice();
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
|
||||
if(metadata == 1) {
|
||||
BlockStoneMachine blockStoneMachine = (BlockStoneMachine)block;
|
||||
DEVICE_BLOCK.iconPedestal[0] = blockStoneMachine.pedestalSideIcon;
|
||||
DEVICE_BLOCK.iconPedestal[1] = blockStoneMachine.pedestalTopIcon;
|
||||
DEVICE_RENDERER.renderInventoryBlock(DEVICE_BLOCK, 1, modelId, renderer);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
|
||||
int metadata = world.getBlockMetadata(x, y, z);
|
||||
if(metadata == 1) {
|
||||
DEVICE_RENDERER.renderWorldBlock(world, x, y, z, block, modelId, renderer);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory(int modelId) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return RegisteredBlocks.rendererBlockStoneMachine;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package makeo.gadomancy.client.renderers.item;
|
||||
|
||||
import makeo.gadomancy.common.registration.RegisteredItems;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.nodes.NodeType;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
* Gadomancy is Open Source and distributed under the
|
||||
* GNU LESSER GENERAL PUBLIC LICENSE
|
||||
* for more read the LICENSE file
|
||||
* <p/>
|
||||
* Created by makeo @ 04.11.2015 20:41
|
||||
*/
|
||||
public class ItemCreativeNodeRenderer extends ItemExNodeRenderer {
|
||||
private static final AspectList ASPECTS = new AspectList().add(Aspect.AIR, 50).add(Aspect.FIRE, 50).add(Aspect.EARTH, 50).add(Aspect.WATER, 50);
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
return (item != null) && (item.getItem() == RegisteredItems.itemCreativeNode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
makeo.gadomancy.client.renderers.item.ItemNodeRenderer.renderNodeItem(type, item, ASPECTS, NodeType.values()[item.getItemDamage()], null, data);
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ import org.lwjgl.opengl.GL11;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.nodes.INode;
|
||||
import thaumcraft.api.nodes.NodeModifier;
|
||||
import thaumcraft.api.nodes.NodeType;
|
||||
import thaumcraft.client.lib.UtilsFX;
|
||||
import thaumcraft.client.renderers.tile.TileNodeRenderer;
|
||||
@@ -44,8 +45,8 @@ public class ItemNodeRenderer implements IItemRenderer {
|
||||
renderNodeItem(type, item, data);
|
||||
}
|
||||
|
||||
//Gadomancy: Renamed to access it static from another class
|
||||
public static void renderNodeItem(IItemRenderer.ItemRenderType type, ItemStack item, Object... data) {
|
||||
//Gadomancy: Renamed to access it static from another class and added aspects, nodeType and nodeModifier as params
|
||||
public static void renderNodeItem(IItemRenderer.ItemRenderType type, ItemStack item, AspectList aspects, NodeType nodeType, NodeModifier nodeModifier, Object... data) {
|
||||
if (type == IItemRenderer.ItemRenderType.ENTITY) {
|
||||
GL11.glTranslatef(-0.5F, -0.25F, -0.5F);
|
||||
} else if ((type == IItemRenderer.ItemRenderType.EQUIPPED) && ((data[1] instanceof EntityPlayer))) {
|
||||
@@ -53,7 +54,7 @@ public class ItemNodeRenderer implements IItemRenderer {
|
||||
}
|
||||
TileNode tjf = new TileNode();
|
||||
tjf.setAspects(aspects);
|
||||
tjf.setNodeType(NodeType.NORMAL);
|
||||
tjf.setNodeType(nodeType);
|
||||
tjf.blockType = ConfigBlocks.blockAiry;
|
||||
tjf.blockMetadata = 0;
|
||||
GL11.glPushMatrix();
|
||||
@@ -68,6 +69,11 @@ public class ItemNodeRenderer implements IItemRenderer {
|
||||
GL11.glEnable(32826);
|
||||
}
|
||||
|
||||
|
||||
public static void renderNodeItem(IItemRenderer.ItemRenderType type, ItemStack item, Object... data) {
|
||||
renderNodeItem(type, item, aspects, NodeType.NORMAL, null, data);
|
||||
}
|
||||
|
||||
private static AspectList aspects = new AspectList().add(Aspect.AIR, 40).add(Aspect.FIRE, 40).add(Aspect.EARTH, 40).add(Aspect.WATER, 40);
|
||||
|
||||
public static void renderItemNode(INode node) {
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
package makeo.gadomancy.client.renderers.item;
|
||||
|
||||
import makeo.gadomancy.client.util.FamiliarHandlerClient;
|
||||
import makeo.gadomancy.common.items.baubles.ItemFamiliar;
|
||||
import makeo.gadomancy.common.utils.FakeWorld;
|
||||
import net.minecraft.client.renderer.ActiveRenderInfo;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import thaumcraft.client.renderers.entity.RenderWisp;
|
||||
import thaumcraft.common.entities.monster.EntityWisp;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
* Gadomancy is Open Source and distributed under the
|
||||
* GNU LESSER GENERAL PUBLIC LICENSE
|
||||
* for more read the LICENSE file
|
||||
* <p/>
|
||||
* Created by HellFirePvP @ 01.11.2015 12:55
|
||||
*/
|
||||
public class ItemRenderFamiliar implements IItemRenderer {
|
||||
|
||||
private static final RenderWisp fallbackRenderer;
|
||||
private static final EntityWisp ENTITY_WISP;
|
||||
private float[] renderInfo = new float[5];
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
return !(item == null || !(item.getItem() instanceof ItemFamiliar));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return helper != ItemRendererHelper.ENTITY_ROTATION;
|
||||
}
|
||||
|
||||
static {
|
||||
fallbackRenderer = new RenderWisp();
|
||||
fallbackRenderer.setRenderManager(RenderManager.instance);
|
||||
ENTITY_WISP = new EntityWisp(new FakeWorld());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
if(item == null || !(item.getItem() instanceof ItemFamiliar)) return;
|
||||
GL11.glPushMatrix();
|
||||
if(type == ItemRenderType.EQUIPPED) {
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.7F);
|
||||
} else if(type == ItemRenderType.EQUIPPED_FIRST_PERSON) {
|
||||
GL11.glTranslatef(0, 1F, 0.8F);
|
||||
} else if(type == ItemRenderType.INVENTORY) {
|
||||
GL11.glTranslatef(0, -0.45F, 0);
|
||||
}
|
||||
|
||||
try {
|
||||
cleanActiveRenderInfo(type);
|
||||
GL11.glScalef(1.2F, 1.2F, 1.2F);
|
||||
if(((ItemFamiliar) item.getItem()).hasAspect(item)) {
|
||||
ENTITY_WISP.ticksExisted = FamiliarHandlerClient.PartialEntityFamiliar.DUMMY_FAMILIAR.ticksExisted;
|
||||
ENTITY_WISP.setType(((ItemFamiliar) item.getItem()).getAspect(item).getTag());
|
||||
fallbackRenderer.doRender(ENTITY_WISP, 0, 0, 0, 0, 0);
|
||||
}
|
||||
} finally {
|
||||
restoreActiveRenderInfo();
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
private void cleanActiveRenderInfo(ItemRenderType renderType) {
|
||||
renderInfo[0] = ActiveRenderInfo.rotationX;
|
||||
renderInfo[1] = ActiveRenderInfo.rotationXZ;
|
||||
renderInfo[2] = ActiveRenderInfo.rotationZ;
|
||||
renderInfo[3] = ActiveRenderInfo.rotationYZ;
|
||||
renderInfo[4] = ActiveRenderInfo.rotationXY;
|
||||
switch (renderType) {
|
||||
case ENTITY:
|
||||
break;
|
||||
case EQUIPPED:
|
||||
ActiveRenderInfo.rotationX = 0.85535365F;
|
||||
ActiveRenderInfo.rotationXZ = 0.9868404F;
|
||||
ActiveRenderInfo.rotationZ = -0.51804453F;
|
||||
ActiveRenderInfo.rotationYZ = 0.083717324F;
|
||||
ActiveRenderInfo.rotationXY = 0.13822734F;
|
||||
break;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
ActiveRenderInfo.rotationX = -0.4186075F;
|
||||
ActiveRenderInfo.rotationXZ = 0.99932945F;
|
||||
ActiveRenderInfo.rotationZ = -0.90816724F;
|
||||
ActiveRenderInfo.rotationYZ = 0.033253096F;
|
||||
ActiveRenderInfo.rotationXY = -0.015327567F;
|
||||
break;
|
||||
case INVENTORY:
|
||||
ActiveRenderInfo.rotationX = -0.71445745F;
|
||||
ActiveRenderInfo.rotationXZ = 0.9573291F;
|
||||
ActiveRenderInfo.rotationZ = 0.69967884F;
|
||||
ActiveRenderInfo.rotationYZ = -0.20220716F;
|
||||
ActiveRenderInfo.rotationXY = -0.20647818F;
|
||||
break;
|
||||
case FIRST_PERSON_MAP:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void restoreActiveRenderInfo() {
|
||||
if(renderInfo[0] != -1) ActiveRenderInfo.rotationX = renderInfo[0];
|
||||
if(renderInfo[1] != -1) ActiveRenderInfo.rotationXZ = renderInfo[1];
|
||||
if(renderInfo[2] != -1) ActiveRenderInfo.rotationZ = renderInfo[2];
|
||||
if(renderInfo[3] != -1) ActiveRenderInfo.rotationYZ = renderInfo[3];
|
||||
if(renderInfo[4] != -1) ActiveRenderInfo.rotationXY = renderInfo[4];
|
||||
for (int i = 0; i < renderInfo.length; i++) {
|
||||
renderInfo[i] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package makeo.gadomancy.client.renderers.tile;
|
||||
|
||||
import makeo.gadomancy.common.node.ExtendedNodeType;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileExtendedNode;
|
||||
import makeo.gadomancy.common.node.ExtendedNodeType;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package makeo.gadomancy.client.renderers.tile;
|
||||
|
||||
import makeo.gadomancy.client.models.ModelJarPot;
|
||||
import makeo.gadomancy.common.utils.FakeWorld;
|
||||
import makeo.gadomancy.common.blocks.BlockRemoteJar;
|
||||
import makeo.gadomancy.common.utils.FakeWorld;
|
||||
import makeo.gadomancy.common.utils.SimpleResourceLocation;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
@@ -0,0 +1,180 @@
|
||||
package makeo.gadomancy.client.util;
|
||||
|
||||
import baubles.api.BaublesApi;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import makeo.gadomancy.common.items.baubles.ItemFamiliar;
|
||||
import makeo.gadomancy.common.network.packets.PacketFamiliar;
|
||||
import makeo.gadomancy.common.utils.FakeWorld;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import thaumcraft.client.fx.bolt.FXLightningBolt;
|
||||
import thaumcraft.client.renderers.entity.RenderWisp;
|
||||
import thaumcraft.common.entities.monster.EntityWisp;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
* Gadomancy is Open Source and distributed under the
|
||||
* GNU LESSER GENERAL PUBLIC LICENSE
|
||||
* for more read the LICENSE file
|
||||
*
|
||||
* Created by HellFirePvP @ 31.10.2015 12:13
|
||||
*/
|
||||
public class FamiliarHandlerClient {
|
||||
private static final EntityWisp ENTITY_WISP;
|
||||
|
||||
private static RenderWisp fallbackRenderer;
|
||||
|
||||
private static Map<String, PartialEntityFamiliar> clientFamiliars = new HashMap<String, PartialEntityFamiliar>();
|
||||
private static List<String> familiarPlayers = new ArrayList<String>();
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static void processPacket(PacketFamiliar packet) {
|
||||
if(packet instanceof PacketFamiliar.PacketFamiliarBolt) {
|
||||
PacketFamiliar.PacketFamiliarBolt pkt = (PacketFamiliar.PacketFamiliarBolt) packet;
|
||||
EntityPlayer p = Minecraft.getMinecraft().theWorld.getPlayerEntityByName(pkt.owner);
|
||||
if(p == null || p.getDistanceSqToEntity(Minecraft.getMinecraft().thePlayer) > 1024) return; //32^2
|
||||
PartialEntityFamiliar fam = clientFamiliars.get(p.getCommandSenderName());
|
||||
if(fam == null) return;
|
||||
FXLightningBolt bolt = new FXLightningBolt(Minecraft.getMinecraft().theWorld, (float) fam.posX, (float) fam.posY, (float) fam.posZ, pkt.targetX, pkt.targetY, pkt.targetZ, Minecraft.getMinecraft().theWorld.rand.nextLong(), 10, 4.0F, 5);
|
||||
bolt.defaultFractal();
|
||||
bolt.setType(pkt.type);
|
||||
bolt.finalizeBolt();
|
||||
} else if(packet instanceof PacketFamiliar.PacketFamiliarSyncCompletely) {
|
||||
PacketFamiliar.PacketFamiliarSyncCompletely sync = (PacketFamiliar.PacketFamiliarSyncCompletely) packet;
|
||||
familiarPlayers = sync.playerNamesWithFamiliars;
|
||||
} else if(packet instanceof PacketFamiliar.PacketFamiliarSyncSingle) {
|
||||
PacketFamiliar.PacketFamiliarSyncSingle sync = (PacketFamiliar.PacketFamiliarSyncSingle) packet;
|
||||
String value = sync.name;
|
||||
if(sync.status) {
|
||||
if(!familiarPlayers.contains(value)) {
|
||||
familiarPlayers.add(value);
|
||||
clientFamiliars.put(value, new PartialEntityFamiliar(Minecraft.getMinecraft().theWorld.getPlayerEntityByName(value), value));
|
||||
}
|
||||
} else {
|
||||
clientFamiliars.remove(value);
|
||||
familiarPlayers.remove(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static void playerRenderEvent(EntityPlayer player, float partialTicks) {
|
||||
for(String ownerName : clientFamiliars.keySet()) {
|
||||
PartialEntityFamiliar fam = clientFamiliars.get(ownerName);
|
||||
|
||||
if(!ownerName.equals(player.getCommandSenderName())) continue;
|
||||
|
||||
ItemStack stack = BaublesApi.getBaubles(player).getStackInSlot(0);
|
||||
if(stack == null || !(stack.getItem() instanceof ItemFamiliar)) return;
|
||||
if(((ItemFamiliar) stack.getItem()).hasAspect(stack)) {
|
||||
ENTITY_WISP.setType(((ItemFamiliar) stack.getItem()).getAspect(stack).getTag());
|
||||
ENTITY_WISP.ticksExisted = fam.dummyEntity.ticksExisted;
|
||||
GL11.glPushMatrix();
|
||||
fallbackRenderer.doRender(ENTITY_WISP, fam.renderX, fam.renderY, fam.renderZ, 0, partialTicks);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static void playerTickEvent() {
|
||||
if(Minecraft.getMinecraft().theWorld == null) return;
|
||||
for(PartialEntityFamiliar fam : clientFamiliars.values()) fam.tick();
|
||||
PartialEntityFamiliar.DUMMY_FAMILIAR.tick();
|
||||
}
|
||||
|
||||
static {
|
||||
fallbackRenderer = new RenderWisp();
|
||||
fallbackRenderer.setRenderManager(RenderManager.instance);
|
||||
ENTITY_WISP = new EntityWisp(new FakeWorld());
|
||||
}
|
||||
|
||||
public static class DummyEntityFamiliar extends Entity {
|
||||
|
||||
public DummyEntityFamiliar(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit() {}
|
||||
|
||||
@Override
|
||||
protected void readEntityFromNBT(NBTTagCompound p_70037_1_) {}
|
||||
|
||||
@Override
|
||||
protected void writeEntityToNBT(NBTTagCompound p_70014_1_) {}
|
||||
}
|
||||
|
||||
public static class PartialEntityFamiliar {
|
||||
|
||||
public static final PartialEntityFamiliar DUMMY_FAMILIAR = new PartialEntityFamiliar(null, "§Invalid§");
|
||||
|
||||
private static final double RAD_CAP = 2 * Math.PI;
|
||||
private static final int CRICLE_TIME_TICKS = 160;
|
||||
private static final double RADIUS = 1;
|
||||
|
||||
public DummyEntityFamiliar dummyEntity = new DummyEntityFamiliar(null);
|
||||
public WeakReference<EntityPlayer> owner;
|
||||
public String potentialOwnerName;
|
||||
public double posX, posY, posZ;
|
||||
public double renderX, renderY, renderZ;
|
||||
public double prevPosX, prevPosY, prevPosZ;
|
||||
public int ticksExisted = 0;
|
||||
|
||||
public PartialEntityFamiliar(EntityPlayer owner, String ownerNameToSearch) {
|
||||
this.owner = new WeakReference<EntityPlayer>(owner);
|
||||
this.potentialOwnerName = ownerNameToSearch;
|
||||
}
|
||||
|
||||
public void tick() {
|
||||
ticksExisted++;
|
||||
dummyEntity.ticksExisted = ticksExisted;
|
||||
|
||||
if(owner.get() == null) {
|
||||
if(potentialOwnerName != null) {
|
||||
EntityPlayer player = Minecraft.getMinecraft().theWorld.getPlayerEntityByName(potentialOwnerName);
|
||||
if(player != null) {
|
||||
owner = new WeakReference<EntityPlayer>(player);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if(owner.get().worldObj.provider.dimensionId != Minecraft.getMinecraft().renderViewEntity.worldObj.provider.dimensionId) {
|
||||
owner = new WeakReference<EntityPlayer>(null);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
|
||||
double part = ((double) ticksExisted) / ((double) CRICLE_TIME_TICKS);
|
||||
double theta = RAD_CAP * part;
|
||||
this.renderX = RADIUS * Math.cos(theta);
|
||||
this.renderZ = RADIUS * Math.sin(theta);
|
||||
this.renderY = 0.7 + Math.sin(theta * 2) / 2D;
|
||||
|
||||
this.posX = owner.get().posX + renderX;
|
||||
this.posZ = owner.get().posZ + renderZ;
|
||||
this.posY = owner.get().posY + renderY;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package makeo.gadomancy.client.util;
|
||||
|
||||
import net.minecraft.client.multiplayer.WorldClient;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
|
||||
|
||||
@@ -3,26 +3,33 @@ package makeo.gadomancy.common;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import makeo.gadomancy.client.ClientProxy;
|
||||
import makeo.gadomancy.common.containers.ContainerInfusionClaw;
|
||||
import makeo.gadomancy.common.data.ModConfig;
|
||||
import makeo.gadomancy.common.events.EventHandlerEntity;
|
||||
import makeo.gadomancy.common.events.EventHandlerGolem;
|
||||
import makeo.gadomancy.common.events.EventHandlerNetwork;
|
||||
import makeo.gadomancy.common.events.EventHandlerWorld;
|
||||
import makeo.gadomancy.common.familiar.FamiliarHandlerServer;
|
||||
import makeo.gadomancy.common.network.PacketHandler;
|
||||
import makeo.gadomancy.common.registration.*;
|
||||
import makeo.gadomancy.client.ClientProxy;
|
||||
import makeo.gadomancy.common.registration.ModSubstitutions;
|
||||
import makeo.gadomancy.common.registration.RegisteredBlocks;
|
||||
import makeo.gadomancy.common.registration.RegisteredGolemStuff;
|
||||
import makeo.gadomancy.common.registration.RegisteredIntegrations;
|
||||
import makeo.gadomancy.common.registration.RegisteredItems;
|
||||
import makeo.gadomancy.common.registration.RegisteredPotions;
|
||||
import makeo.gadomancy.common.registration.RegisteredRecipes;
|
||||
import makeo.gadomancy.common.registration.RegisteredResearches;
|
||||
import makeo.gadomancy.common.utils.WorldProviderTCEldrich;
|
||||
import makeo.gadomancy.common.utils.Injector;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import thaumcraft.api.wands.WandTriggerRegistry;
|
||||
import thaumcraft.common.blocks.BlockAiryItem;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.entities.golems.ContainerGolem;
|
||||
import thaumcraft.common.entities.golems.EntityGolemBase;
|
||||
|
||||
@@ -40,6 +47,7 @@ import java.util.List;
|
||||
*/
|
||||
public class CommonProxy implements IGuiHandler {
|
||||
public static final EventHandlerGolem EVENT_HANDLER_GOLEM = new EventHandlerGolem();
|
||||
public FamiliarHandlerServer familiarHandler;
|
||||
|
||||
public void onConstruct() { }
|
||||
|
||||
@@ -56,16 +64,23 @@ public class CommonProxy implements IGuiHandler {
|
||||
}
|
||||
|
||||
public void initalize() {
|
||||
familiarHandler = new FamiliarHandlerServer();
|
||||
|
||||
NetworkRegistry.INSTANCE.registerGuiHandler(Gadomancy.instance, this);
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(EVENT_HANDLER_GOLEM);
|
||||
FMLCommonHandler.instance().bus().register(new EventHandlerNetwork());
|
||||
MinecraftForge.EVENT_BUS.register(new EventHandlerWorld());
|
||||
MinecraftForge.EVENT_BUS.register(new EventHandlerEntity());
|
||||
|
||||
RegisteredRecipes.init();
|
||||
|
||||
ModSubstitutions.init();
|
||||
|
||||
RegisteredPotions.init();
|
||||
|
||||
//DimensionManager.registerProviderType(ModConfig.dimOuterId, WorldProviderTCEldrich.class, false);
|
||||
//DimensionManager.registerDimension(ModConfig.dimOuterId, ModConfig.dimOuterId);
|
||||
}
|
||||
|
||||
public void postInitalize() {
|
||||
@@ -77,6 +92,8 @@ public class CommonProxy implements IGuiHandler {
|
||||
RegisteredItems.postInit();
|
||||
|
||||
ModSubstitutions.postInit();
|
||||
|
||||
familiarHandler.setupPostInit();
|
||||
}
|
||||
|
||||
public static void unregisterWandHandler(String modid, Block block, int metadata) {
|
||||
|
||||
@@ -25,7 +25,7 @@ public class Gadomancy
|
||||
public static final String MODID = "gadomancy";
|
||||
public static final String NAME = "Gadomancy";
|
||||
|
||||
public static final String VERSION = "1.0.2";
|
||||
public static final String VERSION = "1.0.3";
|
||||
|
||||
private static final String PROXY_CLIENT = "makeo.gadomancy.client.ClientProxy";
|
||||
private static final String PROXY_SERVER = "makeo.gadomancy.common.CommonProxy";
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package makeo.gadomancy.common.api;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.api.ClickBehavior;
|
||||
import makeo.gadomancy.api.golems.AdditionalGolemType;
|
||||
import makeo.gadomancy.api.golems.cores.AdditionalGolemCore;
|
||||
import makeo.gadomancy.api.internal.IApiHandler;
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.common.data.ModConfig;
|
||||
import makeo.gadomancy.common.entities.golems.ItemAdditionalGolemPlacer;
|
||||
import makeo.gadomancy.common.entities.golems.nbt.ExtendedGolemProperties;
|
||||
@@ -64,7 +64,7 @@ public class DefaultApiHandler implements IApiHandler {
|
||||
|
||||
@Override
|
||||
public AdditionalGolemCore getAdditionalGolemCore(EntityGolemBase golem) {
|
||||
String coreName = golem.getDataWatcher().getWatchableObjectString(ModConfig.getGolemDatawatcherId());
|
||||
String coreName = golem.getDataWatcher().getWatchableObjectString(ModConfig.golemDatawatcherId);
|
||||
if(!coreName.isEmpty()) {
|
||||
return additionalGolemCores.get(coreName);
|
||||
}
|
||||
@@ -97,7 +97,7 @@ public class DefaultApiHandler implements IApiHandler {
|
||||
String coreName = core == null ? "" : core.getName();
|
||||
|
||||
golem.setCore(core == null ? -1 : core.getBaseCore());
|
||||
golem.getDataWatcher().updateObject(ModConfig.getGolemDatawatcherId(), coreName);
|
||||
golem.getDataWatcher().updateObject(ModConfig.golemDatawatcherId, coreName);
|
||||
|
||||
if(!golem.worldObj.isRemote) {
|
||||
NBTHelper.getPersistentData(golem).setString("Core", coreName);
|
||||
|
||||
@@ -2,7 +2,6 @@ package makeo.gadomancy.common.blocks;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileExtendedNode;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileExtendedNodeJar;
|
||||
import makeo.gadomancy.common.items.ItemExtendedNodeJar;
|
||||
import makeo.gadomancy.common.registration.RegisteredBlocks;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package makeo.gadomancy.common.blocks;
|
||||
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.api.ClickBehavior;
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileInfusionClaw;
|
||||
import makeo.gadomancy.common.registration.RegisteredBlocks;
|
||||
import makeo.gadomancy.common.registration.RegisteredItems;
|
||||
|
||||
@@ -2,14 +2,11 @@ package makeo.gadomancy.common.blocks;
|
||||
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileNodeManipulator;
|
||||
import makeo.gadomancy.common.registration.RegisteredBlocks;
|
||||
import makeo.gadomancy.common.registration.RegisteredItems;
|
||||
import makeo.gadomancy.common.registration.RegisteredRecipes;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -18,7 +15,6 @@ import thaumcraft.api.ThaumcraftApiHelper;
|
||||
import thaumcraft.common.blocks.BlockStoneDevice;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import thaumcraft.common.lib.research.ResearchManager;
|
||||
import thaumcraft.common.lib.utils.InventoryUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -7,11 +7,9 @@ import makeo.gadomancy.common.registration.RegisteredItems;
|
||||
import makeo.gadomancy.common.utils.NBTHelper;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.common.blocks.BlockJar;
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package makeo.gadomancy.common.blocks;
|
||||
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileManipulationFocus;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileManipulatorPillar;
|
||||
import makeo.gadomancy.common.registration.RegisteredBlocks;
|
||||
import makeo.gadomancy.common.registration.RegisteredItems;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
@@ -19,6 +21,8 @@ import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.lib.utils.InventoryUtils;
|
||||
import thaumcraft.common.tiles.TilePedestal;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
@@ -43,19 +47,29 @@ public class BlockStoneMachine extends Block {
|
||||
|
||||
private IIcon pillarIcon;
|
||||
private IIcon focusIcon;
|
||||
public IIcon pedestalSideIcon;
|
||||
public IIcon pedestalTopIcon;
|
||||
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister ir) {
|
||||
pillarIcon = ir.registerIcon("thaumcraft:es_1");
|
||||
focusIcon = ir.registerIcon("thaumcraft:thaumiumblock");
|
||||
pedestalTopIcon = ir.registerIcon(Gadomancy.MODID + ":manipulator_bot");
|
||||
pedestalSideIcon = ir.registerIcon(Gadomancy.MODID + ":ancient_pedestal_side");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
if(metadata == 11 || metadata == 15) {
|
||||
if (metadata == 11 || metadata == 15) {
|
||||
return pillarIcon;
|
||||
} else if(metadata == 0) {
|
||||
} else if (metadata == 0) {
|
||||
return focusIcon;
|
||||
} else if (metadata == 1) {
|
||||
if (side > 1) {
|
||||
return pedestalSideIcon;
|
||||
} else {
|
||||
return pedestalTopIcon;
|
||||
}
|
||||
}
|
||||
|
||||
return super.getIcon(side, metadata);
|
||||
@@ -63,20 +77,19 @@ public class BlockStoneMachine extends Block {
|
||||
|
||||
@Override
|
||||
public boolean hasTileEntity(int metadata) {
|
||||
return metadata == 15 || metadata == 0;
|
||||
return metadata == 15 || metadata == 0 || metadata == 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
|
||||
list.add(new ItemStack(item, 1, 0));
|
||||
list.add(new ItemStack(item, 1, 15));
|
||||
list.add(new ItemStack(item, 1, 11));
|
||||
list.add(new ItemStack(item, 1, 1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player) {
|
||||
int metadata = world.getBlockMetadata(x, y, z);
|
||||
if(metadata == 11 || metadata == 15) {
|
||||
if (metadata == 11 || metadata == 15) {
|
||||
return new ItemStack(getItemDropped(metadata, null, 0), 1, damageDropped(metadata));
|
||||
}
|
||||
|
||||
@@ -85,10 +98,12 @@ public class BlockStoneMachine extends Block {
|
||||
|
||||
@Override
|
||||
public TileEntity createTileEntity(World world, int metadata) {
|
||||
if(metadata == 15) {
|
||||
if (metadata == 15) {
|
||||
return new TileManipulatorPillar();
|
||||
} else if(metadata == 0) {
|
||||
} else if (metadata == 0) {
|
||||
return new TileManipulationFocus();
|
||||
} else if(metadata == 1) {
|
||||
return new TilePedestal();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -100,16 +115,23 @@ public class BlockStoneMachine extends Block {
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int metadata, Random random, int fortune) {
|
||||
if(metadata == 11 || metadata == 15) {
|
||||
if (metadata == 11 || metadata == 15) {
|
||||
return Item.getItemFromBlock(ConfigBlocks.blockCosmeticSolid);
|
||||
}
|
||||
|
||||
return super.getItemDropped(metadata, random, fortune);
|
||||
}
|
||||
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int metadata) {
|
||||
if(metadata == 1) {
|
||||
InventoryUtils.dropItems(world, x, y, z);
|
||||
}
|
||||
super.breakBlock(world, x, y, z, block, metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canReplace(World world, int x, int y, int z, int side, ItemStack stack) {
|
||||
if(stack.getItemDamage() == 0 && (y < 1 || world.getBlock(x, y - 1, z) != RegisteredBlocks.blockNodeManipulator)) {
|
||||
if (stack.getItemDamage() == 0 && (y < 1 || world.getBlock(x, y - 1, z) != RegisteredBlocks.blockNodeManipulator)) {
|
||||
return false;
|
||||
}
|
||||
return super.canReplace(world, x, y, z, side, stack);
|
||||
@@ -118,18 +140,18 @@ public class BlockStoneMachine extends Block {
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
|
||||
int metadata = world.getBlockMetadata(x, y, z);
|
||||
if(metadata == 15) {
|
||||
if(world.getBlock(x, y + 1, z) != this || world.getBlockMetadata(x, y + 1, z) != 11) {
|
||||
if (metadata == 15) {
|
||||
if (world.getBlock(x, y + 1, z) != this || world.getBlockMetadata(x, y + 1, z) != 11) {
|
||||
dropBlockAsItem(world, x, y, z, metadata, 0);
|
||||
world.setBlockToAir(x, y, z);
|
||||
}
|
||||
} else if(metadata == 11) {
|
||||
if(world.getBlock(x, y - 1, z) != this || world.getBlockMetadata(x, y - 1, z) != 15) {
|
||||
} else if (metadata == 11) {
|
||||
if (world.getBlock(x, y - 1, z) != this || world.getBlockMetadata(x, y - 1, z) != 15) {
|
||||
dropBlockAsItem(world, x, y, z, metadata, 0);
|
||||
world.setBlockToAir(x, y, z);
|
||||
}
|
||||
} else if(metadata == 0) {
|
||||
if(world.getBlock(x, y - 1, z) != RegisteredBlocks.blockNodeManipulator || world.getBlockMetadata(x, y - 1, z) != 5) {
|
||||
} else if (metadata == 0) {
|
||||
if (world.getBlock(x, y - 1, z) != RegisteredBlocks.blockNodeManipulator || world.getBlockMetadata(x, y - 1, z) != 5) {
|
||||
dropBlockAsItem(world, x, y, z, metadata, 0);
|
||||
world.setBlockToAir(x, y, z);
|
||||
}
|
||||
@@ -137,22 +159,31 @@ public class BlockStoneMachine extends Block {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer p_149727_5_, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) {
|
||||
if(world.getBlockMetadata(x, y, z) == 0 && world.getBlock(x, y - 1, z).equals(RegisteredBlocks.blockNodeManipulator) && world.getBlockMetadata(x, y - 1, z) == 5) {
|
||||
world.getBlock(x, y - 1, z).onBlockActivated(world, x, y - 1, z, p_149727_5_, p_149727_6_, p_149727_7_, p_149727_8_, p_149727_9_);
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
int metadata = world.getBlockMetadata(x, y, z);
|
||||
|
||||
if(metadata == 0) {
|
||||
if (world.getBlock(x, y - 1, z).equals(RegisteredBlocks.blockNodeManipulator) && world.getBlockMetadata(x, y - 1, z) == 5) {
|
||||
return world.getBlock(x, y - 1, z).onBlockActivated(world, x, y - 1, z, player, side, hitX, hitY, hitZ);
|
||||
}
|
||||
} else if(metadata == 1) {
|
||||
return ConfigBlocks.blockStoneDevice.onBlockActivated(world, x, y, z, player, side, hitX, hitY, hitZ);
|
||||
}
|
||||
return super.onBlockActivated(world, x, y, z, p_149727_5_, p_149727_6_, p_149727_7_, p_149727_8_, p_149727_9_);
|
||||
|
||||
return super.onBlockActivated(world, x, y, z, player, side, hitX, hitY, hitZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
|
||||
int metadata = world.getBlockMetadata(x, y, z);
|
||||
if(metadata == 15) {
|
||||
if (metadata == 15) {
|
||||
setBlockBounds(0, 0, 0, 1, 0.5f, 1);
|
||||
} else if(metadata == 11) {
|
||||
} else if (metadata == 11) {
|
||||
setBlockBounds(0.0F, -1.0F, 0.0F, 1.0F, -0.5F, 1.0F);
|
||||
} else if(metadata == 0) {
|
||||
setBlockBounds(3/16f, 0, 3/16f, 1-(3/16f), 6/16f, 1-(3/16f));
|
||||
} else if (metadata == 0) {
|
||||
setBlockBounds(3 / 16f, 0, 3 / 16f, 1 - (3 / 16f), 6 / 16f, 1 - (3 / 16f));
|
||||
} else if(metadata == 1) {
|
||||
setBlockBounds(0.25f, 0, 0.25f, 0.75f, 0.99f, 0.75f);
|
||||
}
|
||||
super.setBlockBoundsBasedOnState(world, x, y, z);
|
||||
}
|
||||
@@ -160,27 +191,24 @@ public class BlockStoneMachine extends Block {
|
||||
@Override
|
||||
public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB axisalignedbb, List list, Entity entity) {
|
||||
int metadata = world.getBlockMetadata(x, y, z);
|
||||
if(metadata == 11 || metadata == 15) {
|
||||
if (metadata == 11 || metadata == 15 || metadata == 1) {
|
||||
setBlockBounds(0, 0, 0, 1, 1, 1);
|
||||
} else if(metadata == 0) {
|
||||
} else if (metadata == 0) {
|
||||
setBlockBoundsBasedOnState(world, x, y, z);
|
||||
}
|
||||
|
||||
super.addCollisionBoxesToList(world, x, y, z, axisalignedbb, list, entity);
|
||||
}
|
||||
|
||||
public boolean isOpaqueCube()
|
||||
/* 97: */ {
|
||||
/* 98: 96 */ return false;
|
||||
/* 99: */ }
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean renderAsNormalBlock()
|
||||
/* 102: */ {
|
||||
/* 103:102 */ return false;
|
||||
/* 104: */ }
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return -1;
|
||||
return RegisteredBlocks.rendererBlockStoneMachine;
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,6 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
@@ -21,18 +20,14 @@ import net.minecraft.world.EnumDifficulty;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.IEssentiaContainerItem;
|
||||
import thaumcraft.api.nodes.INode;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.entities.EntityAspectOrb;
|
||||
import thaumcraft.common.entities.monster.EntityWisp;
|
||||
import thaumcraft.common.items.ItemCrystalEssence;
|
||||
import thaumcraft.common.items.ItemManaBean;
|
||||
import thaumcraft.common.items.ItemWispEssence;
|
||||
import thaumcraft.common.lib.network.playerdata.PacketResearchComplete;
|
||||
import thaumcraft.common.lib.research.ResearchManager;
|
||||
import thaumcraft.common.tiles.TileNode;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
@@ -103,7 +98,10 @@ public class TileExtendedNode extends TileNode implements INode {
|
||||
ResearchHelper.distributeResearch(Gadomancy.MODID.toUpperCase() + ".GROWING_AGGRESSION", worldObj, xCoord, yCoord, zCoord, 6);
|
||||
|
||||
livingEntity.attackEntityFrom(DamageSource.magic, behavior.getZapDamage());
|
||||
PacketTCNodeBolt packet = new PacketTCNodeBolt(xCoord + 0.5F, yCoord + 0.5F, zCoord + 0.5F, (float) livingEntity.posX, (float) (livingEntity.posY + livingEntity.height), (float) livingEntity.posZ);
|
||||
|
||||
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, "thaumcraft:zap", 0.8F, 1.0F);
|
||||
|
||||
PacketTCNodeBolt packet = new PacketTCNodeBolt(xCoord + 0.5F, yCoord + 0.5F, zCoord + 0.5F, (float) livingEntity.posX, (float) (livingEntity.posY + livingEntity.height), (float) livingEntity.posZ, 0, false);
|
||||
PacketHandler.INSTANCE.sendToAllAround(packet, new NetworkRegistry.TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 32.0D));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ import cpw.mods.fml.common.ObfuscationReflectionHelper;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.api.ClickBehavior;
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.common.entities.fake.AdvancedFakePlayer;
|
||||
import makeo.gadomancy.common.network.PacketHandler;
|
||||
import makeo.gadomancy.common.network.packets.PacketStartAnimation;
|
||||
|
||||
@@ -81,7 +81,7 @@ public class TileNodeManipulator extends TileWandPedestal implements IAspectCont
|
||||
}
|
||||
if(worldObj.rand.nextInt(4) == 0) {
|
||||
Vec3 rel = getRelPillarLoc(worldObj.rand.nextInt(4));
|
||||
PacketTCNodeBolt bolt = new PacketTCNodeBolt(xCoord + 0.5F, yCoord + 2.5F, zCoord + 0.5F, (float) (xCoord + 0.5F + rel.xCoord), (float) (yCoord + 2.5F + rel.yCoord), (float) (zCoord + 0.5F + rel.zCoord));
|
||||
PacketTCNodeBolt bolt = new PacketTCNodeBolt(xCoord + 0.5F, yCoord + 2.5F, zCoord + 0.5F, (float) (xCoord + 0.5F + rel.xCoord), (float) (yCoord + 2.5F + rel.yCoord), (float) (zCoord + 0.5F + rel.zCoord), 0, false);
|
||||
PacketHandler.INSTANCE.sendToAllAround(bolt, getTargetPoint(32));
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -5,7 +5,13 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import thaumcraft.common.tiles.TileJarFillable;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
|
||||
@@ -13,8 +13,12 @@ import java.io.File;
|
||||
* Created by makeo @ 15.09.2015 18:25
|
||||
*/
|
||||
public class ModConfig {
|
||||
|
||||
private static Configuration config;
|
||||
|
||||
public static int golemDatawatcherId = 29;
|
||||
public static int dimOuterId = -73;
|
||||
|
||||
private ModConfig() {}
|
||||
|
||||
public static void init(File file) {
|
||||
@@ -22,16 +26,13 @@ public class ModConfig {
|
||||
|
||||
config.load();
|
||||
|
||||
getGolemDatawatcherId();
|
||||
loadFromConfig();
|
||||
|
||||
config.save();
|
||||
}
|
||||
|
||||
private static int golemDatawatcherId = -1;
|
||||
public static int getGolemDatawatcherId() {
|
||||
if(golemDatawatcherId < 0) {
|
||||
golemDatawatcherId = config.getInt("datawatcherId", "golem", 29, 0, 31, "Do not edit unless you know what are you doing!");
|
||||
}
|
||||
return golemDatawatcherId;
|
||||
private static void loadFromConfig() {
|
||||
golemDatawatcherId = config.getInt("datawatcherId", "golem", 29, 0, 31, "Do not edit unless you know what are you doing!");
|
||||
dimOuterId = config.getInt("dimOuterId", "dimension", -73, Integer.MIN_VALUE, Integer.MAX_VALUE, "Dimension Id for the eldrich mazes accessed via Node Manipulator");
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,12 @@ import cpw.mods.fml.common.FMLLog;
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@@ -18,7 +18,11 @@ import thaumcraft.common.entities.golems.EntityGolemBase;
|
||||
import thaumcraft.common.entities.golems.Marker;
|
||||
import thaumcraft.common.lib.utils.InventoryUtils;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package makeo.gadomancy.common.entities.ai;
|
||||
|
||||
import net.minecraft.entity.ai.EntityAIFollowOwner;
|
||||
import net.minecraft.entity.passive.EntityTameable;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
* Gadomancy is Open Source and distributed under the
|
||||
* GNU LESSER GENERAL PUBLIC LICENSE
|
||||
* for more read the LICENSE file
|
||||
* <p/>
|
||||
* Created by makeo @ 31.10.2015 15:55
|
||||
*/
|
||||
public class AIFollowOwner extends EntityAIFollowOwner {
|
||||
EntityTameable entity;
|
||||
|
||||
public AIFollowOwner(EntityTameable entity, float minDist, float maxDist) {
|
||||
super(entity, 0, minDist, maxDist);
|
||||
this.entity = entity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startExecuting() {
|
||||
boolean avoidWater = entity.getNavigator().getAvoidsWater();
|
||||
super.startExecuting();
|
||||
entity.getNavigator().setAvoidsWater(avoidWater);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetTask() {
|
||||
boolean avoidWater = entity.getNavigator().getAvoidsWater();
|
||||
super.resetTask();
|
||||
entity.getNavigator().setAvoidsWater(avoidWater);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTask() {
|
||||
super.field_75336_f = entity.getAIMoveSpeed();
|
||||
super.updateTask();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package makeo.gadomancy.common.entities.ai;
|
||||
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.common.entities.golems.nbt.ExtendedGolemProperties;
|
||||
import net.minecraft.entity.ai.EntityAIBase;
|
||||
import thaumcraft.common.entities.golems.EntityGolemBase;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
* Gadomancy is Open Source and distributed under the
|
||||
* GNU LESSER GENERAL PUBLIC LICENSE
|
||||
* for more read the LICENSE file
|
||||
* <p/>
|
||||
* Created by makeo @ 31.10.2015 20:15
|
||||
*/
|
||||
public class AISit extends EntityAIBase {
|
||||
private EntityGolemBase golem;
|
||||
private ExtendedGolemProperties properties;
|
||||
|
||||
public AISit(EntityGolemBase golem) {
|
||||
this.golem = golem;
|
||||
this.properties = (ExtendedGolemProperties) golem.getExtendedProperties(Gadomancy.MODID);
|
||||
setMutexBits(7);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldExecute() {
|
||||
return properties.isSitting();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startExecuting() {
|
||||
golem.getNavigator().clearPathEntity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean continueExecuting() {
|
||||
golem.setTarget(null);
|
||||
|
||||
golem.getLookHelper().setLookPosition(0, 0, 0, 0, -45);
|
||||
return properties.isSitting();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package makeo.gadomancy.common.entities.ai;
|
||||
|
||||
import makeo.gadomancy.common.utils.Injector;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.pathfinding.PathEntity;
|
||||
import thaumcraft.common.entities.ai.combat.AIGolemAttackOnCollide;
|
||||
import thaumcraft.common.entities.golems.EntityGolemBase;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
* Gadomancy is Open Source and distributed under the
|
||||
* GNU LESSER GENERAL PUBLIC LICENSE
|
||||
* for more read the LICENSE file
|
||||
* <p/>
|
||||
* Created by makeo @ 31.10.2015 19:11
|
||||
*/
|
||||
public class AIUncheckedAttackOnCollide extends AIGolemAttackOnCollide {
|
||||
private static final Injector INJECTOR = new Injector(AIGolemAttackOnCollide.class);
|
||||
private EntityGolemBase golem;
|
||||
|
||||
public AIUncheckedAttackOnCollide(EntityGolemBase golem) {
|
||||
super(golem);
|
||||
this.golem = golem;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldExecute() {
|
||||
EntityLivingBase target = golem.getAttackTarget();
|
||||
if (target == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
PathEntity pathEntity = golem.getNavigator().getPathToEntityLiving(target);
|
||||
if(pathEntity != null) {
|
||||
INJECTOR.setObject(this);
|
||||
INJECTOR.setField("entityPathEntity", pathEntity);
|
||||
INJECTOR.setField("entityTarget", target);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package makeo.gadomancy.common.entities.ai;
|
||||
|
||||
import makeo.gadomancy.common.utils.Injector;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import thaumcraft.common.entities.ai.combat.AIDartAttack;
|
||||
import thaumcraft.common.entities.golems.EntityGolemBase;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
* Gadomancy is Open Source and distributed under the
|
||||
* GNU LESSER GENERAL PUBLIC LICENSE
|
||||
* for more read the LICENSE file
|
||||
* <p/>
|
||||
* Created by makeo @ 31.10.2015 20:03
|
||||
*/
|
||||
public class AIUncheckedDartAttack extends AIDartAttack {
|
||||
private static final Injector INJECTOR = new Injector(AIDartAttack.class);
|
||||
private EntityGolemBase golem;
|
||||
|
||||
public AIUncheckedDartAttack(EntityGolemBase golem) {
|
||||
super(golem);
|
||||
this.golem = golem;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldExecute() {
|
||||
EntityLivingBase target = golem.getAttackTarget();
|
||||
if (target == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
double ra = golem.getDistanceSq(target.posX, target.boundingBox.minY, target.posZ);
|
||||
if (ra < 9.0D) {
|
||||
return false;
|
||||
}
|
||||
|
||||
INJECTOR.setObject(this);
|
||||
INJECTOR.setField("attackTarget", target);
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -4,8 +4,32 @@ import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.util.concurrent.GenericFutureListener;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.network.*;
|
||||
import net.minecraft.network.play.client.*;
|
||||
import net.minecraft.network.EnumConnectionState;
|
||||
import net.minecraft.network.INetHandler;
|
||||
import net.minecraft.network.NetHandlerPlayServer;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.client.C00PacketKeepAlive;
|
||||
import net.minecraft.network.play.client.C01PacketChatMessage;
|
||||
import net.minecraft.network.play.client.C02PacketUseEntity;
|
||||
import net.minecraft.network.play.client.C03PacketPlayer;
|
||||
import net.minecraft.network.play.client.C07PacketPlayerDigging;
|
||||
import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement;
|
||||
import net.minecraft.network.play.client.C09PacketHeldItemChange;
|
||||
import net.minecraft.network.play.client.C0APacketAnimation;
|
||||
import net.minecraft.network.play.client.C0BPacketEntityAction;
|
||||
import net.minecraft.network.play.client.C0CPacketInput;
|
||||
import net.minecraft.network.play.client.C0DPacketCloseWindow;
|
||||
import net.minecraft.network.play.client.C0EPacketClickWindow;
|
||||
import net.minecraft.network.play.client.C0FPacketConfirmTransaction;
|
||||
import net.minecraft.network.play.client.C10PacketCreativeInventoryAction;
|
||||
import net.minecraft.network.play.client.C11PacketEnchantItem;
|
||||
import net.minecraft.network.play.client.C12PacketUpdateSign;
|
||||
import net.minecraft.network.play.client.C13PacketPlayerAbilities;
|
||||
import net.minecraft.network.play.client.C14PacketTabComplete;
|
||||
import net.minecraft.network.play.client.C15PacketClientSettings;
|
||||
import net.minecraft.network.play.client.C16PacketClientStatus;
|
||||
import net.minecraft.network.play.client.C17PacketCustomPayload;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
|
||||
|
||||
@@ -0,0 +1,200 @@
|
||||
package makeo.gadomancy.common.entities.golems.cores;
|
||||
|
||||
import makeo.gadomancy.api.golems.cores.AdditionalGolemCore;
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.common.entities.ai.AIFollowOwner;
|
||||
import makeo.gadomancy.common.entities.ai.AISit;
|
||||
import makeo.gadomancy.common.entities.ai.AIUncheckedAttackOnCollide;
|
||||
import makeo.gadomancy.common.entities.ai.AIUncheckedDartAttack;
|
||||
import makeo.gadomancy.common.entities.golems.nbt.ExtendedGolemProperties;
|
||||
import makeo.gadomancy.common.registration.RegisteredItems;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityAgeable;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.ai.EntityAIHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import net.minecraft.entity.ai.EntityLookHelper;
|
||||
import net.minecraft.entity.ai.EntitySenses;
|
||||
import net.minecraft.entity.ai.attributes.IAttribute;
|
||||
import net.minecraft.entity.ai.attributes.IAttributeInstance;
|
||||
import net.minecraft.entity.passive.EntityTameable;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.pathfinding.PathNavigate;
|
||||
import thaumcraft.common.entities.ai.misc.AIOpenDoor;
|
||||
import thaumcraft.common.entities.golems.EntityGolemBase;
|
||||
import thaumcraft.common.entities.golems.Marker;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
* Gadomancy is Open Source and distributed under the
|
||||
* GNU LESSER GENERAL PUBLIC LICENSE
|
||||
* for more read the LICENSE file
|
||||
* <p/>
|
||||
* Created by makeo @ 31.10.2015 15:35
|
||||
*/
|
||||
public class BodyguardGolemCore extends AdditionalGolemCore {
|
||||
@Override
|
||||
public void setupGolem(EntityGolemBase golem) {
|
||||
WrappedGolem wrapped = new WrappedGolem(golem);
|
||||
|
||||
golem.setHomeArea(0, 300000000, 0, 300000000);
|
||||
golem.setMarkers(new ArrayList<Marker>());
|
||||
|
||||
golem.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(wrapped));
|
||||
golem.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(wrapped));
|
||||
golem.targetTasks.addTask(3, new EntityAIHurtByTarget(golem, true));
|
||||
|
||||
golem.tasks.addTask(1, new AISit(golem));
|
||||
|
||||
if (golem.decoration.contains("R")) {
|
||||
golem.tasks.addTask(2, new AIUncheckedDartAttack(golem));
|
||||
}
|
||||
golem.tasks.addTask(3, new AIUncheckedAttackOnCollide(golem));
|
||||
golem.tasks.addTask(4, new AIFollowOwner(wrapped, 5, 2));
|
||||
|
||||
golem.tasks.addTask(5, new AIOpenDoor(golem, true));
|
||||
golem.tasks.addTask(7, new EntityAIWatchClosest(golem, EntityPlayer.class, 6.0F));
|
||||
golem.tasks.addTask(8, new EntityAILookIdle(golem));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasMarkers() {
|
||||
return false;
|
||||
}
|
||||
|
||||
private static class WrappedGolem extends EntityTameable {
|
||||
private EntityGolemBase golem;
|
||||
|
||||
public WrappedGolem(EntityGolemBase golem) {
|
||||
super(golem.worldObj);
|
||||
|
||||
this.golem = golem;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isWithinHomeDistance(int p_110176_1_, int p_110176_2_, int p_110176_3_) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getAIMoveSpeed() {
|
||||
return golem.getAIMoveSpeed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Random getRNG() {
|
||||
return golem.getRNG();
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityLivingBase getAttackTarget() {
|
||||
return golem.getAttackTarget();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canAttackClass(Class p_70686_1_) {
|
||||
return golem.canAttackClass(p_70686_1_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntitySenses getEntitySenses() {
|
||||
return golem.getEntitySenses();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAttributeInstance getEntityAttribute(IAttribute p_110148_1_) {
|
||||
if(golem != null) {
|
||||
return golem.getEntityAttribute(p_110148_1_);
|
||||
}
|
||||
return super.getEntityAttribute(p_110148_1_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAttackTarget(EntityLivingBase p_70624_1_) {
|
||||
golem.setAttackTarget(p_70624_1_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTamed() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PathNavigate getNavigator() {
|
||||
return golem.getNavigator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityAgeable createChild(EntityAgeable entity) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityLivingBase getOwner() {
|
||||
return golem.getOwner();
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityLookHelper getLookHelper() {
|
||||
return golem.getLookHelper();
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getDistanceSqToEntity(Entity entity) {
|
||||
return golem.getDistanceSqToEntity(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getLeashed() {
|
||||
return golem.getLeashed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getVerticalFaceSpeed() {
|
||||
return golem.getVerticalFaceSpeed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLocationAndAngles(double x, double y, double z, float rotationYaw, float rotationPitch) {
|
||||
rotationYaw = golem.rotationYaw;
|
||||
rotationPitch = golem.rotationPitch;
|
||||
golem.setLocationAndAngles(x, y, z, rotationYaw, rotationPitch);
|
||||
this.worldObj.playSoundEffect(x, y, z, "mob.endermen.portal", 0.5F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasGui() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean openGui(EntityPlayer player, EntityGolemBase golem) {
|
||||
ExtendedGolemProperties props = (ExtendedGolemProperties) golem.getExtendedProperties(Gadomancy.MODID);
|
||||
props.setSitting(!props.isSitting());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getBaseCore() {
|
||||
return 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName() {
|
||||
return "gadomancy.golem.bodyguardcore";
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getItem() {
|
||||
return new ItemStack(RegisteredItems.itemGolemCoreBreak, 1, 1);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
package makeo.gadomancy.common.entities.golems.cores;
|
||||
|
||||
import makeo.gadomancy.api.GadomancyApi;
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.common.entities.golems.nbt.ExtendedGolemProperties;
|
||||
import net.minecraft.entity.ai.EntityAIBase;
|
||||
import net.minecraft.entity.ai.EntityAITasks;
|
||||
import thaumcraft.common.entities.golems.EntityGolemBase;
|
||||
@@ -21,14 +23,18 @@ public class EntityAITasksWrapper extends EntityAITasks {
|
||||
private final EntityAITasks original;
|
||||
private boolean locked = true;
|
||||
|
||||
public EntityAITasksWrapper(EntityGolemBase golem) {
|
||||
super(golem.targetTasks.theProfiler);
|
||||
private boolean scheduleUpdate;
|
||||
|
||||
public EntityAITasksWrapper(EntityGolemBase golem, EntityAITasks tasks, boolean scheduleUpdate) {
|
||||
super(tasks.theProfiler);
|
||||
|
||||
this.golem = golem;
|
||||
this.original = golem.targetTasks;
|
||||
this.original = tasks;
|
||||
|
||||
this.taskEntries = new WrapperList(original.taskEntries);
|
||||
this.original.taskEntries = this.taskEntries;
|
||||
|
||||
this.scheduleUpdate = scheduleUpdate;
|
||||
}
|
||||
|
||||
private class WrapperList extends ArrayList {
|
||||
@@ -40,6 +46,8 @@ public class EntityAITasksWrapper extends EntityAITasks {
|
||||
public void clear() {
|
||||
if(!isLocked()) {
|
||||
super.clear();
|
||||
} else if(scheduleUpdate) {
|
||||
((ExtendedGolemProperties)golem.getExtendedProperties(Gadomancy.MODID)).updateGolem();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package makeo.gadomancy.common.entities.golems.nbt;
|
||||
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.api.GadomancyApi;
|
||||
import makeo.gadomancy.api.golems.AdditionalGolemType;
|
||||
import makeo.gadomancy.api.golems.cores.AdditionalGolemCore;
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.common.data.ModConfig;
|
||||
import makeo.gadomancy.common.entities.golems.cores.EntityAITasksWrapper;
|
||||
import makeo.gadomancy.common.utils.NBTHelper;
|
||||
@@ -30,7 +30,10 @@ public class ExtendedGolemProperties implements IExtendedEntityProperties {
|
||||
private boolean updateHealth = false;
|
||||
private float health;
|
||||
|
||||
private EntityAITasksWrapper wrapper = null;
|
||||
private boolean isSitting = false;
|
||||
|
||||
private EntityAITasksWrapper taskWrapper = null;
|
||||
private EntityAITasksWrapper targetWrapper = null;
|
||||
|
||||
public ExtendedGolemProperties(EntityGolemBase golem) {
|
||||
this.golem = golem;
|
||||
@@ -48,6 +51,14 @@ public class ExtendedGolemProperties implements IExtendedEntityProperties {
|
||||
return health;
|
||||
}
|
||||
|
||||
public boolean isSitting() {
|
||||
return isSitting;
|
||||
}
|
||||
|
||||
public void setSitting(boolean isSitting) {
|
||||
this.isSitting = isSitting;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveNBTData(NBTTagCompound compound) {
|
||||
AdditionalGolemType type = GadomancyApi.getAdditionalGolemType(golem.getGolemType());
|
||||
@@ -63,6 +74,8 @@ public class ExtendedGolemProperties implements IExtendedEntityProperties {
|
||||
writeAdvancedGolemType(entityData, type);
|
||||
golem.ridingEntity = new OverrideRidingEntity(golem, compound, golem.ridingEntity);
|
||||
}
|
||||
|
||||
compound.setBoolean(Gadomancy.MODID + ":sitting", isSitting);
|
||||
}
|
||||
|
||||
private static void writeAdvancedGolemType(NBTTagCompound base, AdditionalGolemType type) {
|
||||
@@ -89,6 +102,8 @@ public class ExtendedGolemProperties implements IExtendedEntityProperties {
|
||||
}
|
||||
}
|
||||
|
||||
isSitting = compound.getBoolean(Gadomancy.MODID + ":sitting");
|
||||
|
||||
updateGolemCore();
|
||||
}
|
||||
|
||||
@@ -99,7 +114,7 @@ public class ExtendedGolemProperties implements IExtendedEntityProperties {
|
||||
if(persistent.hasKey("Core")) {
|
||||
for(AdditionalGolemCore core : GadomancyApi.getAdditionalGolemCores()) {
|
||||
if(core.getName().equals(persistent.getString("Core"))) {
|
||||
golem.getDataWatcher().updateObject(ModConfig.getGolemDatawatcherId(), core.getName());
|
||||
golem.getDataWatcher().updateObject(ModConfig.golemDatawatcherId, core.getName());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -109,27 +124,42 @@ public class ExtendedGolemProperties implements IExtendedEntityProperties {
|
||||
}
|
||||
|
||||
public void setWrapperIfNeeded() {
|
||||
if(wrapper == null) {
|
||||
wrapper = new EntityAITasksWrapper(golem);
|
||||
golem.tasks = wrapper;
|
||||
boolean needsUpdate = false;
|
||||
if(taskWrapper == null) {
|
||||
taskWrapper = new EntityAITasksWrapper(golem, golem.tasks, true);
|
||||
golem.tasks = taskWrapper;
|
||||
|
||||
needsUpdate = true;
|
||||
}
|
||||
|
||||
if(targetWrapper == null) {
|
||||
targetWrapper = new EntityAITasksWrapper(golem, golem.targetTasks, false);
|
||||
golem.targetTasks = targetWrapper;
|
||||
|
||||
needsUpdate = true;
|
||||
}
|
||||
|
||||
if(needsUpdate) {
|
||||
updateGolem();
|
||||
}
|
||||
}
|
||||
|
||||
public void updateGolem() {
|
||||
wrapper.unlock();
|
||||
taskWrapper.unlock();
|
||||
targetWrapper.unlock();
|
||||
|
||||
golem.setupGolem();
|
||||
golem.setupGolemInventory();
|
||||
|
||||
AdditionalGolemCore core = GadomancyApi.getAdditionalGolemCore(golem);
|
||||
if(core != null) {
|
||||
wrapper.taskEntries.clear();
|
||||
golem.targetTasks.taskEntries.clear();
|
||||
taskWrapper.taskEntries.clear();
|
||||
targetWrapper.taskEntries.clear();
|
||||
|
||||
core.setupGolem(golem);
|
||||
|
||||
wrapper.lock();
|
||||
taskWrapper.lock();
|
||||
targetWrapper.lock();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package makeo.gadomancy.common.entities.golems.types;
|
||||
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.api.golems.AdditionalGolemType;
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.common.utils.SimpleResourceLocation;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -18,7 +18,7 @@ import net.minecraft.util.ResourceLocation;
|
||||
*/
|
||||
public class SilverwoodGolemType extends AdditionalGolemType {
|
||||
public SilverwoodGolemType() {
|
||||
super(20, 3, 0.36F, false, 3, 8, 75, 1);
|
||||
super(20, 9, 0.38f, false, 3, 8, 75, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
package makeo.gadomancy.common.events;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.EventPriority;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import makeo.gadomancy.common.familiar.FamiliarAIController;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.event.entity.EntityEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingSetAttackTargetEvent;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
* Gadomancy is Open Source and distributed under the
|
||||
* GNU LESSER GENERAL PUBLIC LICENSE
|
||||
* for more read the LICENSE file
|
||||
* <p/>
|
||||
* Created by HellFirePvP @ 31.10.2015 15:28
|
||||
*/
|
||||
public class EventHandlerEntity {
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.LOWEST)
|
||||
public void on(EntityEvent.EntityConstructing e) {
|
||||
if (e.entity instanceof EntityPlayer) {
|
||||
//e.entity.registerExtendedProperties(Gadomancy.MODID, new ExtendedPlayerProperties((EntityPlayer) e.entity));
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void on(LivingSetAttackTargetEvent targetEvent) {
|
||||
if(targetEvent.target instanceof EntityPlayer) {
|
||||
FamiliarAIController.notifyTargetEvent(targetEvent.entityLiving, (EntityPlayer) targetEvent.target);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,12 +2,12 @@ package makeo.gadomancy.common.events;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.EventPriority;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.api.GadomancyApi;
|
||||
import makeo.gadomancy.api.golems.AdditionalGolemType;
|
||||
import makeo.gadomancy.api.golems.cores.AdditionalGolemCore;
|
||||
import makeo.gadomancy.api.golems.events.GolemDropPlacerEvent;
|
||||
import makeo.gadomancy.api.golems.events.PlacerCreateGolemEvent;
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.common.data.ModConfig;
|
||||
import makeo.gadomancy.common.entities.golems.ItemAdditionalGolemPlacer;
|
||||
import makeo.gadomancy.common.entities.golems.nbt.ExtendedGolemProperties;
|
||||
@@ -53,7 +53,7 @@ public class EventHandlerGolem {
|
||||
|
||||
golem.registerExtendedProperties(Gadomancy.MODID, new ExtendedGolemProperties(golem));
|
||||
|
||||
golem.getDataWatcher().addObject(ModConfig.getGolemDatawatcherId(), "");
|
||||
golem.getDataWatcher().addObject(ModConfig.golemDatawatcherId, "");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,10 +73,6 @@ public class EventHandlerGolem {
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.LOWEST, receiveCanceled = true)
|
||||
public void on(EntityJoinWorldEvent event) {
|
||||
if(event.world.isRemote && event.entity instanceof EntityGolemBase) {
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
if(!event.entity.worldObj.isRemote && event.entity instanceof EntityGolemBase) {
|
||||
EntityGolemBase golem = (EntityGolemBase) event.entity;
|
||||
ExtendedGolemProperties props = (ExtendedGolemProperties) golem.getExtendedProperties(Gadomancy.MODID);
|
||||
@@ -223,17 +219,25 @@ public class EventHandlerGolem {
|
||||
event.setCanceled(true);
|
||||
}
|
||||
}
|
||||
} else if(!event.target.worldObj.isRemote) {
|
||||
if(heldItem == null
|
||||
|| (heldItem.getItem() != ConfigItems.itemGolemBell
|
||||
&& heldItem.getItem() != ConfigItems.itemGolemUpgrade
|
||||
&& heldItem.getItem() != ConfigItems.itemGolemDecoration
|
||||
&& !(heldItem.getItem() instanceof ItemWandCasting))) {
|
||||
AdditionalGolemCore core = GadomancyApi.getAdditionalGolemCore(golem);
|
||||
if(core != null) {
|
||||
if(core.hasGui() && !core.openGui(event.entityPlayer, golem)) {
|
||||
event.entityPlayer.openGui(Gadomancy.instance, 0, golem.worldObj, golem.getEntityId(), 0, 0);
|
||||
} else {
|
||||
if(!event.target.worldObj.isRemote) {
|
||||
if(heldItem == null
|
||||
|| (heldItem.getItem() != ConfigItems.itemGolemBell
|
||||
&& heldItem.getItem() != ConfigItems.itemGolemUpgrade
|
||||
&& heldItem.getItem() != ConfigItems.itemGolemDecoration
|
||||
&& !(heldItem.getItem() instanceof ItemWandCasting))) {
|
||||
AdditionalGolemCore core = GadomancyApi.getAdditionalGolemCore(golem);
|
||||
if(core != null) {
|
||||
if(core.hasGui() && !core.openGui(event.entityPlayer, golem)) {
|
||||
event.entityPlayer.openGui(Gadomancy.instance, 0, golem.worldObj, golem.getEntityId(), 0, 0);
|
||||
}
|
||||
event.setCanceled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(heldItem != null && heldItem.getItem() == ConfigItems.itemGolemBell) {
|
||||
AdditionalGolemCore core = GadomancyApi.getAdditionalGolemCore(golem);
|
||||
if(core != null && !core.hasMarkers()) {
|
||||
event.setCanceled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,12 @@ package makeo.gadomancy.common.events;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.PlayerEvent;
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.common.network.PacketHandler;
|
||||
import makeo.gadomancy.common.network.packets.PacketFamiliar;
|
||||
import makeo.gadomancy.common.network.packets.PacketUpdateGolemTypeOrder;
|
||||
import makeo.gadomancy.common.utils.GolemEnumHelper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
|
||||
/**
|
||||
@@ -21,6 +24,14 @@ public class EventHandlerNetwork {
|
||||
EntityPlayerMP p = (EntityPlayerMP) e.player;
|
||||
if(!p.playerNetServerHandler.netManager.isLocalChannel()) {
|
||||
PacketHandler.INSTANCE.sendTo(new PacketUpdateGolemTypeOrder(GolemEnumHelper.getCurrentMapping()), p);
|
||||
Gadomancy.proxy.familiarHandler.checkPlayerEquipment(p);
|
||||
PacketHandler.INSTANCE.sendTo(new PacketFamiliar.PacketFamiliarSyncCompletely(Gadomancy.proxy.familiarHandler.getCurrentActiveFamiliars()), p);
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void on(PlayerEvent.PlayerLoggedOutEvent e) {
|
||||
EntityPlayer player = e.player;
|
||||
Gadomancy.proxy.familiarHandler.notifyUnequip(player.worldObj, player);
|
||||
}
|
||||
}
|
||||
@@ -6,41 +6,23 @@ import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileNodeManipulator;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileStickyJar;
|
||||
import makeo.gadomancy.common.registration.RegisteredBlocks;
|
||||
import makeo.gadomancy.common.registration.RegisteredIntegrations;
|
||||
import makeo.gadomancy.common.registration.RegisteredItems;
|
||||
import makeo.gadomancy.common.utils.GolemEnumHelper;
|
||||
import makeo.gadomancy.common.utils.JarMultiblockHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.event.entity.EntityEvent;
|
||||
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
||||
import net.minecraftforge.event.world.BlockEvent;
|
||||
import net.minecraftforge.event.world.WorldEvent;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import thaumcraft.api.ThaumcraftApiHelper;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.nodes.INode;
|
||||
import thaumcraft.common.blocks.BlockMagicalLog;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import thaumcraft.common.lib.research.ResearchManager;
|
||||
import thaumcraft.common.tiles.TileJarFillable;
|
||||
import thaumcraft.common.tiles.TileJarNode;
|
||||
import thaumcraft.common.tiles.TileOwned;
|
||||
import thaumcraft.common.tiles.TileWarded;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -52,12 +34,6 @@ import java.util.Map;
|
||||
* Created by makeo @ 05.07.2015 13:20
|
||||
*/
|
||||
public class EventHandlerWorld {
|
||||
@SubscribeEvent(priority = EventPriority.LOWEST)
|
||||
public void on(EntityEvent.EntityConstructing e) {
|
||||
if (e.entity instanceof EntityPlayer) {
|
||||
//e.entity.registerExtendedProperties(Gadomancy.MODID, new ExtendedPlayerProperties((EntityPlayer) e.entity));
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.NORMAL)
|
||||
public void on(WorldEvent.Load e) {
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
package makeo.gadomancy.common.familiar;
|
||||
|
||||
import baubles.api.BaublesApi;
|
||||
import makeo.gadomancy.common.registration.RegisteredFamiliarAI;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
* Gadomancy is Open Source and distributed under the
|
||||
* GNU LESSER GENERAL PUBLIC LICENSE
|
||||
* for more read the LICENSE file
|
||||
*
|
||||
* Created by HellFirePvP @ 31.10.2015 14:08
|
||||
*/
|
||||
public class FamiliarAIController {
|
||||
|
||||
private static final Random RAND = new Random();
|
||||
|
||||
private static Map<EntityPlayer, LinkedList<EntityLivingBase>> targetMap = new HashMap<EntityPlayer, LinkedList<EntityLivingBase>>();
|
||||
|
||||
private List<FamiliarAIProcess> availableTasks = new ArrayList<FamiliarAIProcess>();
|
||||
private Map<FamiliarAIProcess, Integer> cooldownProcesses = new HashMap<FamiliarAIProcess, Integer>();
|
||||
private LinkedList<FamiliarAIProcess> requestedLoop = new LinkedList<FamiliarAIProcess>();
|
||||
private FamiliarAIProcess runningTask;
|
||||
private int ticksInTask;
|
||||
private EntityPlayer owningPlayer;
|
||||
|
||||
public FamiliarAIController(EntityPlayer owningPlayer) {
|
||||
this.owningPlayer = owningPlayer;
|
||||
}
|
||||
|
||||
public void registerDefaultTasks() {
|
||||
this.availableTasks.add(RegisteredFamiliarAI.familiarAIIdle);
|
||||
this.availableTasks.add(RegisteredFamiliarAI.familiarAIZapAttackingMonsters);
|
||||
}
|
||||
|
||||
public void scheduleTick() {
|
||||
reduceRunningCooldowns();
|
||||
if(runningTask == null) {
|
||||
selectNewTask();
|
||||
} else {
|
||||
ItemStack famStack = BaublesApi.getBaubles(owningPlayer).getStackInSlot(0);
|
||||
runningTask.tick(ticksInTask, owningPlayer.worldObj, owningPlayer, famStack);
|
||||
ticksInTask++;
|
||||
if(ticksInTask >= runningTask.getDuration()) {
|
||||
if(runningTask.getCooldownDuration(famStack) > 0) cooldownProcesses.put(runningTask, runningTask.getCooldownDuration(famStack));
|
||||
if(runningTask.tryLoop() && !requestedLoop.contains(runningTask)) requestedLoop.addLast(runningTask);
|
||||
runningTask = null;
|
||||
ticksInTask = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void selectNewTask() {
|
||||
if(!requestedLoop.isEmpty()) {
|
||||
Iterator<FamiliarAIProcess> it = requestedLoop.iterator();
|
||||
while(it.hasNext()) {
|
||||
FamiliarAIProcess process = it.next();
|
||||
if(!cooldownProcesses.containsKey(process)) {
|
||||
runningTask = process;
|
||||
it.remove();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
int size = availableTasks.size();
|
||||
int randIndex = RAND.nextInt(size);
|
||||
for (int i = 0; i < size; i++) {
|
||||
int index = (randIndex + i) % size;
|
||||
FamiliarAIProcess process = availableTasks.get(index);
|
||||
if(process.canRun(owningPlayer.worldObj, owningPlayer.posX, owningPlayer.posY, owningPlayer.posZ, owningPlayer, BaublesApi.getBaubles(owningPlayer).getStackInSlot(0)) &&
|
||||
!cooldownProcesses.containsKey(process)) {
|
||||
runningTask = process;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void reduceRunningCooldowns() {
|
||||
Iterator<FamiliarAIProcess> itProcesses = cooldownProcesses.keySet().iterator();
|
||||
while(itProcesses.hasNext()) {
|
||||
FamiliarAIProcess process = itProcesses.next();
|
||||
int cd = cooldownProcesses.get(process) - 1;
|
||||
if(cd <= 0) {
|
||||
itProcesses.remove();
|
||||
} else {
|
||||
cooldownProcesses.put(process, cd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public EntityPlayer getOwningPlayer() {
|
||||
return owningPlayer;
|
||||
}
|
||||
|
||||
public static boolean hasLastTargetter(EntityPlayer player) {
|
||||
return targetMap.containsKey(player) && targetMap.get(player).size() >= 1;
|
||||
}
|
||||
|
||||
public static LinkedList<EntityLivingBase> getLastTargetters(EntityPlayer player) {
|
||||
if(!targetMap.containsKey(player)) return null;
|
||||
if(targetMap.get(player).size() < 1) return null;
|
||||
return targetMap.get(player);
|
||||
}
|
||||
|
||||
public static void cleanTargetterList(EntityPlayer player) {
|
||||
if(!targetMap.containsKey(player)) return;
|
||||
Iterator<EntityLivingBase> it = targetMap.get(player).iterator();
|
||||
while(it.hasNext()) {
|
||||
EntityLivingBase living = it.next();
|
||||
if(living.isDead) it.remove();
|
||||
}
|
||||
}
|
||||
|
||||
public static void notifyTargetEvent(EntityLivingBase targetter, EntityPlayer targetted) {
|
||||
LinkedList<EntityLivingBase> targetters;
|
||||
boolean needsUpdate = false;
|
||||
if(targetMap.containsKey(targetted)) {
|
||||
targetters = targetMap.get(targetted);
|
||||
} else {
|
||||
targetters = new LinkedList<EntityLivingBase>();
|
||||
needsUpdate = true;
|
||||
}
|
||||
|
||||
if(!targetters.contains(targetter)) {
|
||||
targetters.addLast(targetter);
|
||||
}
|
||||
if(needsUpdate) {
|
||||
targetMap.put(targetted, targetters);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package makeo.gadomancy.common.familiar;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
* Gadomancy is Open Source and distributed under the
|
||||
* GNU LESSER GENERAL PUBLIC LICENSE
|
||||
* for more read the LICENSE file
|
||||
*
|
||||
* Created by HellFirePvP @ 31.10.2015 14:05
|
||||
*/
|
||||
public abstract class FamiliarAIProcess {
|
||||
|
||||
private static int sessionProcessIdCounter = 0;
|
||||
private int id;
|
||||
private int duration;
|
||||
|
||||
public FamiliarAIProcess(int durationTicks) {
|
||||
this.duration = durationTicks;
|
||||
this.id = sessionProcessIdCounter++;
|
||||
}
|
||||
|
||||
public abstract boolean canRun(World world, double x, double y, double z, EntityPlayer parent, ItemStack itemStack);
|
||||
|
||||
public abstract void tick(int ticksSoFar, World worldObj, EntityPlayer owningPlayer, ItemStack itemStack);
|
||||
|
||||
public abstract int getCooldownDuration(ItemStack itemStack);
|
||||
|
||||
public boolean tryLoop() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public final int getDuration() {
|
||||
return duration;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
FamiliarAIProcess that = (FamiliarAIProcess) o;
|
||||
return id == that.id;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return id;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package makeo.gadomancy.common.familiar;
|
||||
|
||||
import baubles.api.BaublesApi;
|
||||
import makeo.gadomancy.common.network.PacketHandler;
|
||||
import makeo.gadomancy.common.network.packets.PacketFamiliar;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
* Gadomancy is Open Source and distributed under the
|
||||
* GNU LESSER GENERAL PUBLIC LICENSE
|
||||
* for more read the LICENSE file
|
||||
*
|
||||
* Created by HellFirePvP @ 31.10.2015 12:10
|
||||
*/
|
||||
public class FamiliarHandlerServer {
|
||||
|
||||
private List<String> activeFamiliars = new ArrayList<String>();
|
||||
private Map<EntityPlayer, FamiliarAIController> familiarAI;
|
||||
|
||||
public void setupPostInit() {
|
||||
familiarAI = new HashMap<EntityPlayer, FamiliarAIController>();
|
||||
}
|
||||
|
||||
public void notifyEquip(World world, ItemStack itemStack, EntityPlayer player) {
|
||||
if(!world.isRemote) {
|
||||
if(!familiarAI.containsKey(player)) {
|
||||
FamiliarAIController controller = new FamiliarAIController(player);
|
||||
controller.registerDefaultTasks();
|
||||
familiarAI.put(player, controller);
|
||||
}
|
||||
|
||||
if(!activeFamiliars.contains(player.getCommandSenderName())) activeFamiliars.add(player.getCommandSenderName());
|
||||
|
||||
PacketFamiliar.PacketFamiliarSyncSingle pkt;
|
||||
List entityPlayers = MinecraftServer.getServer().getConfigurationManager().playerEntityList;
|
||||
for(Object playerEntity : entityPlayers) {
|
||||
if(!(playerEntity instanceof EntityPlayer)) continue;
|
||||
|
||||
pkt = new PacketFamiliar.PacketFamiliarSyncSingle(true, player.getCommandSenderName());
|
||||
PacketHandler.INSTANCE.sendTo(pkt, (net.minecraft.entity.player.EntityPlayerMP) playerEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void notifyUnequip(World world, EntityPlayer player) {
|
||||
if(!world.isRemote) {
|
||||
familiarAI.remove(player);
|
||||
|
||||
activeFamiliars.remove(player.getCommandSenderName());
|
||||
|
||||
PacketFamiliar.PacketFamiliarSyncSingle pkt;
|
||||
List entityPlayers = MinecraftServer.getServer().getConfigurationManager().playerEntityList;
|
||||
for(Object playerEntity : entityPlayers) {
|
||||
if(!(playerEntity instanceof EntityPlayer)) continue;
|
||||
|
||||
pkt = new PacketFamiliar.PacketFamiliarSyncSingle(false, player.getCommandSenderName());
|
||||
PacketHandler.INSTANCE.sendTo(pkt, (net.minecraft.entity.player.EntityPlayerMP) playerEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void equippedTick(World world, ItemStack itemStack, EntityPlayer player) {
|
||||
if(!world.isRemote) {
|
||||
IInventory baublesInv = BaublesApi.getBaubles(player);
|
||||
if(baublesInv.getStackInSlot(0) == null) {
|
||||
notifyUnequip(world, player);
|
||||
return;
|
||||
}
|
||||
|
||||
if(familiarAI.get(player) == null || !activeFamiliars.contains(player.getCommandSenderName())) {
|
||||
notifyEquip(world, itemStack, player);
|
||||
}
|
||||
|
||||
familiarAI.get(player).scheduleTick();
|
||||
}
|
||||
}
|
||||
|
||||
public List<String> getCurrentActiveFamiliars() {
|
||||
return activeFamiliars;
|
||||
}
|
||||
|
||||
public void checkPlayerEquipment(EntityPlayer p) {
|
||||
IInventory baublesInv = BaublesApi.getBaubles(p);
|
||||
if(baublesInv.getStackInSlot(0) != null) {
|
||||
notifyEquip(p.worldObj, baublesInv.getStackInSlot(0), p);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package makeo.gadomancy.common.integration;
|
||||
|
||||
import makeo.gadomancy.common.CommonProxy;
|
||||
import makeo.gadomancy.common.registration.ModSubstitutions;
|
||||
import makeo.gadomancy.common.registration.RegisteredBlocks;
|
||||
import makeo.gadomancy.common.registration.RegisteredItems;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
@@ -11,13 +11,13 @@ import cpw.mods.fml.common.registry.ExistingSubstitutionException;
|
||||
import cpw.mods.fml.common.registry.FMLControlledNamespacedRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.api.ClickBehavior;
|
||||
import makeo.gadomancy.client.ClientProxy;
|
||||
import makeo.gadomancy.common.CommonProxy;
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.common.integration.IntegrationMod;
|
||||
import makeo.gadomancy.common.registration.RegisteredBlocks;
|
||||
import makeo.gadomancy.common.utils.Injector;
|
||||
import makeo.gadomancy.client.ClientProxy;
|
||||
import makeo.gadomancy.common.CommonProxy;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.entity.RendererLivingEntity;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package makeo.gadomancy.common.integration.waila;
|
||||
|
||||
import makeo.gadomancy.common.blocks.tiles.TileInfusionClaw;
|
||||
import mcp.mobius.waila.api.*;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
@@ -3,7 +3,6 @@ package makeo.gadomancy.common.integration.waila;
|
||||
import makeo.gadomancy.common.blocks.BlockInfusionClaw;
|
||||
import makeo.gadomancy.common.blocks.BlockRemoteJar;
|
||||
import makeo.gadomancy.common.blocks.BlockStickyJar;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileStickyJar;
|
||||
import makeo.gadomancy.common.integration.IntegrationMod;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
import thaumcraft.common.entities.golems.EntityGolemBase;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package makeo.gadomancy.common.integration.waila;
|
||||
|
||||
import makeo.gadomancy.common.blocks.BlockRemoteJar;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileInfusionClaw;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileRemoteJar;
|
||||
import makeo.gadomancy.common.items.ItemBlockRemoteJar;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
|
||||
@@ -7,7 +7,6 @@ import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
@@ -5,9 +5,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import makeo.gadomancy.client.events.ResourceReloadListener;
|
||||
import makeo.gadomancy.common.blocks.BlockRemoteJar;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileRemoteJar;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileStickyJar;
|
||||
import makeo.gadomancy.common.registration.RegisteredBlocks;
|
||||
import makeo.gadomancy.common.registration.RegisteredItems;
|
||||
import makeo.gadomancy.common.utils.NBTHelper;
|
||||
import makeo.gadomancy.common.utils.StringHelper;
|
||||
import net.minecraft.block.Block;
|
||||
@@ -16,12 +14,10 @@ import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.IWandTriggerManager;
|
||||
import thaumcraft.common.blocks.ItemJarFilled;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
package makeo.gadomancy.common.items;
|
||||
|
||||
import makeo.gadomancy.common.blocks.BlockStoneMachine;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockBrewingStand;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
package makeo.gadomancy.common.items;
|
||||
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileExtendedNode;
|
||||
import makeo.gadomancy.common.registration.RegisteredItems;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.nodes.NodeModifier;
|
||||
import thaumcraft.api.nodes.NodeType;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.lib.world.ThaumcraftWorldGenerator;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
* Gadomancy is Open Source and distributed under the
|
||||
* GNU LESSER GENERAL PUBLIC LICENSE
|
||||
* for more read the LICENSE file
|
||||
* <p/>
|
||||
* Created by makeo @ 04.11.2015 09:57
|
||||
*/
|
||||
public class ItemCreativeNode extends Item {
|
||||
public ItemCreativeNode() {
|
||||
setCreativeTab(RegisteredItems.creativeTab);
|
||||
setUnlocalizedName("nodePlacer");
|
||||
setTextureName(Gadomancy.MODID + ":transparent");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
for(int i = 0; i < NodeType.values().length; i++) {
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedNameInefficiently(ItemStack stack) {
|
||||
return Item.getItemFromBlock(ConfigBlocks.blockAiry).getUnlocalizedName(new ItemStack(ConfigBlocks.blockAiry, 1, 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(side);
|
||||
x += dir.offsetX;
|
||||
y += dir.offsetY;
|
||||
z += dir.offsetZ;
|
||||
|
||||
if(placeRandomNode(world, x, y, z)) {
|
||||
int metadata = stack.getItemDamage();
|
||||
TileExtendedNode node = (TileExtendedNode) world.getTileEntity(x, y, z);
|
||||
|
||||
if(metadata == 0) {
|
||||
node.setNodeType(NodeType.NORMAL);
|
||||
node.setNodeModifier(NodeModifier.BRIGHT);
|
||||
|
||||
AspectList aspects = new AspectList();
|
||||
for(Aspect primal : Aspect.getPrimalAspects()) {
|
||||
aspects.add(primal, 500);
|
||||
}
|
||||
node.setAspects(aspects);
|
||||
node.markDirty();
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
} else {
|
||||
node.setNodeType(NodeType.values()[metadata]);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean placeRandomNode(World world, int x, int y, int z) {
|
||||
if(world.getBlock(x, y, z) == Blocks.air) {
|
||||
ThaumcraftWorldGenerator.createRandomNodeAt(world, x, y, z, world.rand, false, false, false);
|
||||
return world.getBlock(x, y, z) == ConfigBlocks.blockAiry;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean advancedItemTooltips) {
|
||||
int metadata = stack.getItemDamage();
|
||||
if(metadata == 0) {
|
||||
list.add("\u00a75Place a huge and bright aura node");
|
||||
} else {
|
||||
list.add("\u00a75Place a node of type " + NodeType.values()[metadata].name().toLowerCase());
|
||||
}
|
||||
list.add("\u00a7oCreative Mode Only");
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package makeo.gadomancy.common.items;
|
||||
|
||||
import makeo.gadomancy.common.node.ExtendedNodeType;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileExtendedNodeJar;
|
||||
import makeo.gadomancy.common.node.ExtendedNodeType;
|
||||
import makeo.gadomancy.common.registration.RegisteredBlocks;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
@@ -1,18 +1,40 @@
|
||||
package makeo.gadomancy.common.items;
|
||||
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
* Gadomancy is Open Source and distributed under the
|
||||
* GNU LESSER GENERAL PUBLIC LICENSE
|
||||
* for more read the LICENSE file
|
||||
* <p/>
|
||||
*
|
||||
* Created by makeo @ 20.10.2015 22:49
|
||||
*/
|
||||
public class ItemFakeModIcon extends Item {
|
||||
|
||||
public ItemFakeModIcon() {
|
||||
setTextureName(Gadomancy.MODID + ":category_icon");
|
||||
}
|
||||
|
||||
public IIcon[] icons = new IIcon[6];
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
icons[0] = ir.registerIcon(Gadomancy.MODID + ":category_icon");
|
||||
icons[1] = ir.registerIcon(Gadomancy.MODID + ":Attack1");
|
||||
icons[2] = ir.registerIcon(Gadomancy.MODID + ":Attack2");
|
||||
icons[3] = ir.registerIcon(Gadomancy.MODID + ":Attack3");
|
||||
icons[4] = ir.registerIcon(Gadomancy.MODID + ":Range1");
|
||||
icons[5] = ir.registerIcon(Gadomancy.MODID + ":Cooldown1");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int damage) {
|
||||
if(damage < 0 || damage >= icons.length) return null;
|
||||
return icons[damage];
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,10 +2,13 @@ package makeo.gadomancy.common.items;
|
||||
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.common.registration.RegisteredItems;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import java.util.List;
|
||||
@@ -18,14 +21,36 @@ import java.util.List;
|
||||
*
|
||||
* Created by makeo @ 02.10.2015 19:40
|
||||
*/
|
||||
//TODO rename when updating to 1.8
|
||||
public class ItemGolemCoreBreak extends Item {
|
||||
public ItemGolemCoreBreak() {
|
||||
setCreativeTab(RegisteredItems.creativeTab);
|
||||
}
|
||||
|
||||
private IIcon breakIcon;
|
||||
private IIcon bodyguardIcon;
|
||||
|
||||
@Override
|
||||
protected String getIconString() {
|
||||
return Gadomancy.MODID + ":golem_core_break";
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
breakIcon = ir.registerIcon(Gadomancy.MODID + ":golem_core_break");
|
||||
bodyguardIcon = ir.registerIcon("thaumcraft:golem_core_bodyguard");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int damage) {
|
||||
if(damage == 0) {
|
||||
return breakIcon;
|
||||
} else if(damage == 1) {
|
||||
return bodyguardIcon;
|
||||
}
|
||||
|
||||
return super.getIconFromDamage(damage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
list.add(new ItemStack(item, 1, 0));
|
||||
list.add(new ItemStack(item, 1, 1));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -40,7 +65,12 @@ public class ItemGolemCoreBreak extends Item {
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean showAdvanced) {
|
||||
list.add(StatCollector.translateToLocal("gadomancy.golem.breakcore"));
|
||||
int damage = stack.getItemDamage();
|
||||
if(damage == 0) {
|
||||
list.add(StatCollector.translateToLocal("gadomancy.golem.breakcore"));
|
||||
} else if(damage == 1) {
|
||||
list.add(StatCollector.translateToLocal("gadomancy.golem.bodyguardcore"));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,230 @@
|
||||
package makeo.gadomancy.common.items.baubles;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.IBauble;
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.common.registration.RegisteredItems;
|
||||
import makeo.gadomancy.common.utils.NBTHelper;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
* Gadomancy is Open Source and distributed under the
|
||||
* GNU LESSER GENERAL PUBLIC LICENSE
|
||||
* for more read the LICENSE file
|
||||
*
|
||||
* Created by HellFirePvP @ 31.10.2015 11:38
|
||||
*/
|
||||
public class ItemFamiliar extends Item implements IBauble {
|
||||
|
||||
public ItemFamiliar() {
|
||||
setUnlocalizedName("ItemFamiliar");
|
||||
setMaxStackSize(1);
|
||||
setFull3D();
|
||||
setCreativeTab(RegisteredItems.creativeTab);
|
||||
|
||||
//Shut up FML.
|
||||
setTextureName(Gadomancy.MODID + ":category_icon");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
ItemStack stack = new ItemStack(item);
|
||||
setAspect(stack, Aspect.MAGIC);
|
||||
list.add(stack);
|
||||
|
||||
stack = new ItemStack(item);
|
||||
setAspect(stack, Aspect.MAGIC);
|
||||
for(FamiliarUpgrade upgrade : FamiliarUpgrade.values()) {
|
||||
addUpgrade(stack, upgrade);
|
||||
}
|
||||
list.add(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List lore, boolean par4Flag) {
|
||||
if(stack.hasTagCompound()) {
|
||||
if(hasAspect(stack)) {
|
||||
lore.add(getAspect(stack).getName());
|
||||
}
|
||||
|
||||
if(hasUpgrade(stack, FamiliarUpgrade.ATTACK_1) || hasUpgrade(stack, FamiliarUpgrade.ATTACK_2) || hasUpgrade(stack, FamiliarUpgrade.ATTACK_3)) {
|
||||
String strength = EnumChatFormatting.DARK_RED + "Strength ";
|
||||
if(hasUpgrade(stack, FamiliarUpgrade.ATTACK_1)) strength += "I";
|
||||
if(hasUpgrade(stack, FamiliarUpgrade.ATTACK_2)) strength += "I";
|
||||
if(hasUpgrade(stack, FamiliarUpgrade.ATTACK_3)) strength += "I";
|
||||
lore.add(strength);
|
||||
}
|
||||
|
||||
if(hasUpgrade(stack, FamiliarUpgrade.RANGE_1)) {
|
||||
lore.add(EnumChatFormatting.GOLD + "Reach I");
|
||||
}
|
||||
|
||||
if(hasUpgrade(stack, FamiliarUpgrade.COOLDOWN_1)) {
|
||||
lore.add(EnumChatFormatting.AQUA + "Swiftness I");
|
||||
}
|
||||
}
|
||||
super.addInformation(stack, player, lore, par4Flag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack) {
|
||||
return RegisteredItems.raritySacred;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack paramItemStack) {
|
||||
return BaubleType.AMULET;
|
||||
}
|
||||
|
||||
public Aspect getAspect(ItemStack stack) {
|
||||
if(!hasAspect(stack)) return null;
|
||||
if(stack == null || !(stack.getItem() instanceof ItemFamiliar)) return null;
|
||||
if(!stack.hasTagCompound() || !stack.getTagCompound().hasKey("aspect")) return null;
|
||||
return Aspect.getAspect(stack.getTagCompound().getString("aspect"));
|
||||
}
|
||||
|
||||
public boolean hasAspect(ItemStack stack) {
|
||||
if(stack == null || !(stack.getItem() instanceof ItemFamiliar)) return false;
|
||||
if(!stack.hasTagCompound() || !stack.getTagCompound().hasKey("aspect")) return false;
|
||||
return Aspect.getAspect(stack.getTagCompound().getString("aspect")) != null;
|
||||
}
|
||||
|
||||
public void setAspect(ItemStack stack, Aspect aspect) {
|
||||
if(stack == null || !(stack.getItem() instanceof ItemFamiliar)) return;
|
||||
NBTHelper.getData(stack).setString("aspect", aspect.getTag());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWornTick(ItemStack itemStack, EntityLivingBase entity) {
|
||||
if(itemStack == null) return;
|
||||
if(entity instanceof EntityPlayer && itemStack.getItem() instanceof ItemFamiliar) {
|
||||
Gadomancy.proxy.familiarHandler.equippedTick(((EntityPlayer) entity).worldObj, itemStack, (EntityPlayer) entity);
|
||||
|
||||
if(((EntityPlayer) entity).worldObj.isRemote) return;
|
||||
|
||||
int probability = 0;
|
||||
if(hasUpgrade(itemStack, FamiliarUpgrade.ATTACK_2)) probability += 1;
|
||||
if(hasUpgrade(itemStack, FamiliarUpgrade.ATTACK_3)) probability += 1;
|
||||
if(probability > 0) {
|
||||
int rand = itemRand.nextInt(20000 / probability);
|
||||
if(rand == 42) {
|
||||
Thaumcraft.addWarpToPlayer((EntityPlayer) entity, 1 + itemRand.nextInt(4), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEquipped(ItemStack itemStack, EntityLivingBase entity) {
|
||||
if(itemStack == null) return;
|
||||
if(entity instanceof EntityPlayer && itemStack.getItem() instanceof ItemFamiliar) {
|
||||
Gadomancy.proxy.familiarHandler.notifyEquip(((EntityPlayer) entity).worldObj, itemStack, (EntityPlayer) entity);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUnequipped(ItemStack itemStack, EntityLivingBase entity) {
|
||||
if(itemStack == null) return;
|
||||
if(entity instanceof EntityPlayer && itemStack.getItem() instanceof ItemFamiliar) {
|
||||
Gadomancy.proxy.familiarHandler.notifyUnequip(((EntityPlayer) entity).worldObj, (EntityPlayer) entity);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canEquip(ItemStack itemStack, EntityLivingBase entity) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUnequip(ItemStack itemStack, EntityLivingBase entity) {
|
||||
return true;
|
||||
}
|
||||
|
||||
//Infusion stuff.
|
||||
|
||||
public int getAttackRangeIncrease(ItemStack itemStack) {
|
||||
if(!(itemStack.getItem() instanceof ItemFamiliar)) return 0;
|
||||
|
||||
int range = 0;
|
||||
|
||||
if(hasUpgrade(itemStack, FamiliarUpgrade.RANGE_1)) {
|
||||
range += 3;
|
||||
}
|
||||
return range;
|
||||
}
|
||||
|
||||
public int getAttackCooldownReduction(ItemStack itemStack) {
|
||||
if(!(itemStack.getItem() instanceof ItemFamiliar)) return 0;
|
||||
return hasUpgrade(itemStack, FamiliarUpgrade.COOLDOWN_1) ? 10 : 0;
|
||||
}
|
||||
|
||||
public float getAttackStrength(ItemStack itemStack) {
|
||||
if(!(itemStack.getItem() instanceof ItemFamiliar)) return 0F;
|
||||
|
||||
float attack = 1F;
|
||||
|
||||
if(hasUpgrade(itemStack, FamiliarUpgrade.ATTACK_1)) {
|
||||
attack += 1F;
|
||||
}
|
||||
if(hasUpgrade(itemStack, FamiliarUpgrade.ATTACK_2)) {
|
||||
attack += 2F;
|
||||
}
|
||||
if(hasUpgrade(itemStack, FamiliarUpgrade.ATTACK_3)) {
|
||||
attack += 4F;
|
||||
}
|
||||
return attack;
|
||||
}
|
||||
|
||||
public boolean hasUpgrade(ItemStack stack, FamiliarUpgrade upgrade) {
|
||||
if(stack == null || !(stack.getItem() instanceof ItemFamiliar)) return false;
|
||||
if(upgrade == null) return true;
|
||||
if(!stack.hasTagCompound() || !stack.getTagCompound().hasKey(upgrade.getTag())) return false;
|
||||
return stack.getTagCompound().getBoolean(upgrade.getTag());
|
||||
}
|
||||
|
||||
public void addUpgrade(ItemStack stack, FamiliarUpgrade upgrade) {
|
||||
if(stack == null || !(stack.getItem() instanceof ItemFamiliar)) return;
|
||||
NBTHelper.getData(stack).setBoolean(upgrade.getTag(), true);
|
||||
}
|
||||
|
||||
public static enum FamiliarUpgrade {
|
||||
|
||||
ATTACK_1("AttackUpgrade1"),
|
||||
ATTACK_2("AttackUpgrade2", ATTACK_1),
|
||||
ATTACK_3("AttackUpgrade3", ATTACK_2),
|
||||
COOLDOWN_1("CdUpgrade1"),
|
||||
RANGE_1("RangeUpgrade1");
|
||||
|
||||
private String tag;
|
||||
private FamiliarUpgrade neededUpgrade;
|
||||
|
||||
private FamiliarUpgrade(String tagStr) {
|
||||
this(tagStr, null);
|
||||
}
|
||||
|
||||
private FamiliarUpgrade(String tagStr, FamiliarUpgrade neededUpgrade) {
|
||||
this.tag = tagStr;
|
||||
this.neededUpgrade = neededUpgrade;
|
||||
}
|
||||
|
||||
public String getTag() {
|
||||
return tag;
|
||||
}
|
||||
|
||||
public FamiliarUpgrade getNeededPreviousUpgrade() {
|
||||
return neededUpgrade;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.common.network.packets.PacketAnimationAbsorb;
|
||||
import makeo.gadomancy.common.network.packets.PacketFamiliar;
|
||||
import makeo.gadomancy.common.network.packets.PacketStartAnimation;
|
||||
import makeo.gadomancy.common.network.packets.PacketTCNodeBolt;
|
||||
import makeo.gadomancy.common.network.packets.PacketTCWispyLine;
|
||||
@@ -29,5 +30,9 @@ public class PacketHandler {
|
||||
INSTANCE.registerMessage(PacketAnimationAbsorb.class, PacketAnimationAbsorb.class, id++, Side.CLIENT);
|
||||
INSTANCE.registerMessage(PacketTCNodeBolt.class, PacketTCNodeBolt.class, id++, Side.CLIENT);
|
||||
INSTANCE.registerMessage(PacketTCWispyLine.class, PacketTCWispyLine.class, id++, Side.CLIENT);
|
||||
|
||||
INSTANCE.registerMessage(PacketFamiliar.PacketFamiliarBolt.class, PacketFamiliar.PacketFamiliarBolt.class, id++, Side.CLIENT);
|
||||
INSTANCE.registerMessage(PacketFamiliar.PacketFamiliarSyncCompletely.class, PacketFamiliar.PacketFamiliarSyncCompletely.class, id++, Side.CLIENT);
|
||||
INSTANCE.registerMessage(PacketFamiliar.PacketFamiliarSyncSingle.class, PacketFamiliar.PacketFamiliarSyncSingle.class, id++, Side.CLIENT);
|
||||
}
|
||||
}
|
||||
@@ -9,9 +9,6 @@ import io.netty.buffer.ByteBuf;
|
||||
import makeo.gadomancy.client.util.MultiTickEffectDispatcher;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
package makeo.gadomancy.common.network.packets;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import makeo.gadomancy.client.util.FamiliarHandlerClient;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
* Gadomancy is Open Source and distributed under the
|
||||
* GNU LESSER GENERAL PUBLIC LICENSE
|
||||
* for more read the LICENSE file
|
||||
* <p/>
|
||||
* Created by HellFirePvP @ 31.10.2015 14:36
|
||||
*/
|
||||
public abstract class PacketFamiliar {
|
||||
|
||||
public static class PacketFamiliarBolt extends PacketFamiliar implements IMessage, IMessageHandler<PacketFamiliarBolt, IMessage> {
|
||||
|
||||
public float targetX, targetY, targetZ;
|
||||
public int type;
|
||||
public boolean mightGetLong;
|
||||
public String owner;
|
||||
|
||||
public PacketFamiliarBolt() {}
|
||||
|
||||
public PacketFamiliarBolt(String whoseFamiliar, float targetX, float targetY, float targetZ, int type, boolean mightGetLong) {
|
||||
this.targetX = targetX;
|
||||
this.targetY = targetY;
|
||||
this.targetZ = targetZ;
|
||||
this.owner = whoseFamiliar;
|
||||
this.type = type;
|
||||
this.mightGetLong = mightGetLong;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf) {
|
||||
this.targetX = buf.readFloat();
|
||||
this.targetY = buf.readFloat();
|
||||
this.targetZ = buf.readFloat();
|
||||
|
||||
this.type = buf.readInt();
|
||||
this.mightGetLong = buf.readBoolean();
|
||||
|
||||
int length = buf.readInt();
|
||||
byte[] strBytes = new byte[length];
|
||||
buf.readBytes(strBytes, 0, length);
|
||||
owner = new String(strBytes);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf buf) {
|
||||
buf.writeFloat(targetX);
|
||||
buf.writeFloat(targetY);
|
||||
buf.writeFloat(targetZ);
|
||||
|
||||
buf.writeInt(type);
|
||||
buf.writeBoolean(mightGetLong);
|
||||
|
||||
byte[] str = owner.getBytes();
|
||||
buf.writeInt(str.length);
|
||||
buf.writeBytes(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMessage onMessage(PacketFamiliarBolt message, MessageContext ctx) {
|
||||
FamiliarHandlerClient.processPacket(message);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static class PacketFamiliarSyncCompletely extends PacketFamiliar implements IMessage, IMessageHandler<PacketFamiliarSyncCompletely, IMessage> {
|
||||
|
||||
public List<String> playerNamesWithFamiliars = new ArrayList<String>();
|
||||
|
||||
public PacketFamiliarSyncCompletely() {}
|
||||
|
||||
public PacketFamiliarSyncCompletely(List<String> playerNamesWithFamiliars) {
|
||||
this.playerNamesWithFamiliars = playerNamesWithFamiliars;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf) {
|
||||
int cnt = buf.readInt();
|
||||
for (int i = 0; i < cnt; i++) {
|
||||
int length = buf.readInt();
|
||||
byte[] strBytes = new byte[length];
|
||||
buf.readBytes(strBytes, 0, length);
|
||||
playerNamesWithFamiliars.add(new String(strBytes));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf buf) {
|
||||
buf.writeInt(playerNamesWithFamiliars.size());
|
||||
for(String str : playerNamesWithFamiliars) {
|
||||
byte[] strBytes = str.getBytes();
|
||||
buf.writeInt(strBytes.length);
|
||||
buf.writeBytes(strBytes);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMessage onMessage(PacketFamiliarSyncCompletely message, MessageContext ctx) {
|
||||
FamiliarHandlerClient.processPacket(message);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static class PacketFamiliarSyncSingle extends PacketFamiliar implements IMessage, IMessageHandler<PacketFamiliarSyncSingle, IMessage> {
|
||||
|
||||
//True=add, False=remove
|
||||
public boolean status;
|
||||
public String name;
|
||||
|
||||
public PacketFamiliarSyncSingle() {}
|
||||
|
||||
public PacketFamiliarSyncSingle(boolean status, String name) {
|
||||
this.status = status;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf) {
|
||||
status = buf.readBoolean();
|
||||
int length = buf.readInt();
|
||||
byte[] strBytes = new byte[length];
|
||||
buf.readBytes(strBytes, 0, length);
|
||||
name = new String(strBytes);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf buf) {
|
||||
buf.writeBoolean(status);
|
||||
byte[] str = name.getBytes();
|
||||
buf.writeInt(str.length);
|
||||
buf.writeBytes(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMessage onMessage(PacketFamiliarSyncSingle message, MessageContext ctx) {
|
||||
FamiliarHandlerClient.processPacket(message);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,9 +7,7 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.client.fx.bolt.FXLightningBolt;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
@@ -23,16 +21,20 @@ public class PacketTCNodeBolt implements IMessage, IMessageHandler<PacketTCNodeB
|
||||
|
||||
private float x, y, z;
|
||||
private float targetX, targetY, targetZ;
|
||||
private int type;
|
||||
private boolean mightGetLong;
|
||||
|
||||
public PacketTCNodeBolt() {}
|
||||
|
||||
public PacketTCNodeBolt(float x, float y, float z, float targetX, float targetY, float targetZ) {
|
||||
public PacketTCNodeBolt(float x, float y, float z, float targetX, float targetY, float targetZ, int type, boolean mightGetLong) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.targetX = targetX;
|
||||
this.targetY = targetY;
|
||||
this.targetZ = targetZ;
|
||||
this.type = type;
|
||||
this.mightGetLong = mightGetLong;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -43,6 +45,8 @@ public class PacketTCNodeBolt implements IMessage, IMessageHandler<PacketTCNodeB
|
||||
this.targetX = buf.readFloat();
|
||||
this.targetY = buf.readFloat();
|
||||
this.targetZ = buf.readFloat();
|
||||
this.type = buf.readInt();
|
||||
this.mightGetLong = buf.readBoolean();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -53,12 +57,17 @@ public class PacketTCNodeBolt implements IMessage, IMessageHandler<PacketTCNodeB
|
||||
buf.writeFloat(targetX);
|
||||
buf.writeFloat(targetY);
|
||||
buf.writeFloat(targetZ);
|
||||
buf.writeInt(type);
|
||||
buf.writeBoolean(mightGetLong);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IMessage onMessage(PacketTCNodeBolt p, MessageContext ctx) {
|
||||
Thaumcraft.proxy.nodeBolt(Minecraft.getMinecraft().theWorld, p.x, p.y, p.z, p.targetX, p.targetY, p.targetZ);
|
||||
FXLightningBolt bolt = new FXLightningBolt(Minecraft.getMinecraft().theWorld, p.x, p.y, p.z, p.targetX, p.targetY, p.targetZ, Minecraft.getMinecraft().theWorld.rand.nextLong(), 10, 4.0F, 5);
|
||||
bolt.defaultFractal();
|
||||
bolt.setType(p.type);
|
||||
bolt.finalizeBolt();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,11 @@ import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import makeo.gadomancy.common.utils.GolemEnumHelper;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,7 +32,7 @@ public class GrowingNodeBehavior {
|
||||
|
||||
public static final double SATURATION_DIFFICULTY = 15D;
|
||||
public static final double SATURATION_CAP = 90D;
|
||||
public static final int HAPPINESS_CAP = 500;
|
||||
public static final int HAPPINESS_CAP = 400;
|
||||
|
||||
//The node the growing node attacks.
|
||||
private TileNode fixedNode;
|
||||
@@ -192,7 +192,7 @@ public class GrowingNodeBehavior {
|
||||
fixedNode.getWorldObj().spawnEntityInWorld(aspectOrb);
|
||||
|
||||
NetworkRegistry.TargetPoint point = new NetworkRegistry.TargetPoint(world.provider.dimensionId, ox + 0.5F, oy + 0.5F, oz + 0.5F, 32);
|
||||
PacketTCNodeBolt bolt = new PacketTCNodeBolt(ox + 0.5F, oy + 0.5F, oz + 0.5F, fx + 0.5F, fy + 0.5F, fz + 0.5F);
|
||||
PacketTCNodeBolt bolt = new PacketTCNodeBolt(ox + 0.5F, oy + 0.5F, oz + 0.5F, fx + 0.5F, fy + 0.5F, fz + 0.5F, 0, false);
|
||||
PacketHandler.INSTANCE.sendToAllAround(bolt, point);
|
||||
|
||||
PacketAnimationAbsorb packet = new PacketAnimationAbsorb(ox, oy, oz, fx, fy, fz, 7);
|
||||
@@ -256,6 +256,7 @@ public class GrowingNodeBehavior {
|
||||
inc *= evaluateFeedingDenialFunc((lastFedRow > 0 ? lastFedRow : 1));
|
||||
} else {
|
||||
inc *= -10;
|
||||
lastFedRow = 0;
|
||||
}
|
||||
}
|
||||
this.overallHappiness += inc; //The node doesn't like to be forced to eat the same every time.
|
||||
@@ -274,7 +275,9 @@ public class GrowingNodeBehavior {
|
||||
return (Math.log(i) / 6) + 1;
|
||||
}
|
||||
|
||||
private void handleOverfeed() {}
|
||||
private void handleOverfeed() {
|
||||
//TODO handle transformation into STARVING
|
||||
}
|
||||
|
||||
public void readFromNBT(NBTTagCompound nbtTagCompound) {
|
||||
this.isSaturated = nbtTagCompound.getBoolean("overallSaturated");
|
||||
|
||||
@@ -5,7 +5,6 @@ import makeo.gadomancy.common.registration.RegisteredManipulations;
|
||||
import net.minecraft.util.WeightedRandom;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.common.lib.research.ResearchManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
package makeo.gadomancy.common.potions;
|
||||
|
||||
import makeo.gadomancy.common.utils.ColorHelper;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.potion.Potion;
|
||||
import thaumcraft.common.entities.golems.EntityGolemBase;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
* Gadomancy is Open Source and distributed under the
|
||||
* GNU LESSER GENERAL PUBLIC LICENSE
|
||||
* for more read the LICENSE file
|
||||
* <p/>
|
||||
* Created by makeo @ 31.10.2015 23:01
|
||||
*/
|
||||
public class PotionInactiveGolem extends Potion {
|
||||
public PotionInactiveGolem(int id) {
|
||||
super(id, false, ColorHelper.toHex(Color.WHITE));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void performEffect(EntityLivingBase entity, int par2) {
|
||||
if(entity instanceof EntityGolemBase) {
|
||||
((EntityGolemBase) entity).inactive = true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isReady(int p_76397_1_, int p_76397_2_) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package makeo.gadomancy.common.registration;
|
||||
|
||||
import makeo.gadomancy.common.items.baubles.ItemFamiliar;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.ThaumcraftApiHelper;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.crafting.InfusionRecipe;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
* Gadomancy is Open Source and distributed under the
|
||||
* GNU LESSER GENERAL PUBLIC LICENSE
|
||||
* for more read the LICENSE file
|
||||
*
|
||||
* Created by HellFirePvP @ 02.11.2015 17:39
|
||||
*/
|
||||
public class FamiliarAugmentInfusion extends InfusionRecipe {
|
||||
|
||||
private ItemFamiliar.FamiliarUpgrade upgradeToAdd;
|
||||
|
||||
public FamiliarAugmentInfusion(String research, int inst, AspectList aspects2, ItemStack input, ItemFamiliar.FamiliarUpgrade upgradeToAdd, ItemStack[] recipe) {
|
||||
super(research, null, inst, aspects2, input, recipe);
|
||||
this.upgradeToAdd = upgradeToAdd;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean matches(ArrayList<ItemStack> input, ItemStack central, World world, EntityPlayer player) {
|
||||
if(central == null || !(central.getItem() instanceof ItemFamiliar)) return false; //We call it "FamiliarAugment" Recipe for a reason..
|
||||
if(getRecipeInput() == null || !(getRecipeInput().getItem() instanceof ItemFamiliar)) return false; //A bit late but still working..
|
||||
|
||||
if ((this.research.length() > 0) && (!ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), this.research))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ItemStack centralCopy = central.copy();
|
||||
if(!((ItemFamiliar) centralCopy.getItem()).hasUpgrade(centralCopy, getUpgradeToAdd().getNeededPreviousUpgrade())) return false;
|
||||
|
||||
ArrayList<ItemStack> ii = new ArrayList<ItemStack>();
|
||||
for (ItemStack is : input) {
|
||||
ii.add(is.copy());
|
||||
}
|
||||
for (ItemStack comp : getComponents()) {
|
||||
boolean b = false;
|
||||
for (int a = 0; a < ii.size(); a++) {
|
||||
centralCopy = ii.get(a).copy();
|
||||
if (comp.getItemDamage() == 32767) {
|
||||
centralCopy.setItemDamage(32767);
|
||||
}
|
||||
if (areItemStacksEqual(centralCopy, comp, true)) {
|
||||
ii.remove(a);
|
||||
b = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!b) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return ii.size() == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getRecipeOutput(ItemStack input) {
|
||||
ItemStack inputCopy = input.copy();
|
||||
((ItemFamiliar) input.getItem()).addUpgrade(inputCopy, getUpgradeToAdd());
|
||||
return inputCopy;
|
||||
}
|
||||
|
||||
public ItemFamiliar.FamiliarUpgrade getUpgradeToAdd() {
|
||||
return upgradeToAdd;
|
||||
}
|
||||
}
|
||||
@@ -3,21 +3,13 @@ package makeo.gadomancy.common.registration;
|
||||
import com.google.common.collect.BiMap;
|
||||
import cpw.mods.fml.common.registry.FMLControlledNamespacedRegistry;
|
||||
import cpw.mods.fml.common.registry.GameData;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import makeo.gadomancy.common.CommonProxy;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import thaumcraft.api.research.ResearchCategories;
|
||||
import thaumcraft.api.research.ResearchItem;
|
||||
import thaumcraft.api.research.ResearchPage;
|
||||
import thaumcraft.common.blocks.BlockAiryItem;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
* Gadomancy is Open Source and distributed under the
|
||||
|
||||
@@ -2,8 +2,23 @@ package makeo.gadomancy.common.registration;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import makeo.gadomancy.api.ClickBehavior;
|
||||
import makeo.gadomancy.common.blocks.*;
|
||||
import makeo.gadomancy.common.blocks.tiles.*;
|
||||
import makeo.gadomancy.common.blocks.BlockArcaneDropper;
|
||||
import makeo.gadomancy.common.blocks.BlockExtendedNodeJar;
|
||||
import makeo.gadomancy.common.blocks.BlockInfusionClaw;
|
||||
import makeo.gadomancy.common.blocks.BlockNode;
|
||||
import makeo.gadomancy.common.blocks.BlockNodeManipulator;
|
||||
import makeo.gadomancy.common.blocks.BlockRemoteJar;
|
||||
import makeo.gadomancy.common.blocks.BlockStickyJar;
|
||||
import makeo.gadomancy.common.blocks.BlockStoneMachine;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileArcaneDropper;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileExtendedNode;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileExtendedNodeJar;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileInfusionClaw;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileManipulationFocus;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileManipulatorPillar;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileNodeManipulator;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileRemoteJar;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileStickyJar;
|
||||
import makeo.gadomancy.common.items.ItemBlockRemoteJar;
|
||||
import makeo.gadomancy.common.items.ItemBlockStoneMachine;
|
||||
import makeo.gadomancy.common.items.ItemNodeManipulator;
|
||||
@@ -12,7 +27,6 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.common.blocks.BlockStoneDeviceItem;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.tiles.TileInfusionMatrix;
|
||||
|
||||
@@ -32,6 +46,7 @@ public class RegisteredBlocks {
|
||||
|
||||
public static int rendererTransparentBlock;
|
||||
public static int rendererExtendedNodeJarBlock;
|
||||
public static int rendererBlockStoneMachine;
|
||||
|
||||
public static BlockStickyJar blockStickyJar;
|
||||
public static BlockArcaneDropper blockArcaneDropper;
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
package makeo.gadomancy.common.registration;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import makeo.gadomancy.common.familiar.FamiliarAIController;
|
||||
import makeo.gadomancy.common.familiar.FamiliarAIProcess;
|
||||
import makeo.gadomancy.common.items.baubles.ItemFamiliar;
|
||||
import makeo.gadomancy.common.network.PacketHandler;
|
||||
import makeo.gadomancy.common.network.packets.PacketFamiliar;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.monster.IMob;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
* Gadomancy is Open Source and distributed under the
|
||||
* GNU LESSER GENERAL PUBLIC LICENSE
|
||||
* for more read the LICENSE file
|
||||
*
|
||||
* Created by HellFirePvP @ 31.10.2015 14:12
|
||||
*/
|
||||
public class RegisteredFamiliarAI {
|
||||
|
||||
public static FamiliarAIProcess familiarAIIdle = new FamiliarAIProcess(1) {
|
||||
@Override
|
||||
public boolean canRun(World world, double x, double y, double z, EntityPlayer parent, ItemStack stackInSlot) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick(int ticksSoFar, World worldObj, EntityPlayer owningPlayer, ItemStack itemStack) {}
|
||||
|
||||
@Override
|
||||
public int getCooldownDuration(ItemStack itemStack) {
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
public static FamiliarAIProcess familiarAIZapAttackingMonsters = new FamiliarAIProcess(1) {
|
||||
|
||||
@Override
|
||||
public boolean canRun(World world, double x, double y, double z, EntityPlayer parent, ItemStack itemStack) {
|
||||
int rangeInc = ((ItemFamiliar) itemStack.getItem()).getAttackRangeIncrease(itemStack);
|
||||
return getPotentialTargets(world, parent, rangeInc).size() > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick(int ticksSoFar, World world, EntityPlayer parent, ItemStack itemStack) {
|
||||
int rangeInc = ((ItemFamiliar) itemStack.getItem()).getAttackRangeIncrease(itemStack);
|
||||
|
||||
List<EntityLivingBase> lastTargetters = getPotentialTargets(world, parent, rangeInc);
|
||||
if(lastTargetters.size() < 1) {
|
||||
FamiliarAIController.cleanTargetterList(parent);
|
||||
return;
|
||||
}
|
||||
EntityLivingBase mob = lastTargetters.get(world.rand.nextInt(lastTargetters.size()));
|
||||
if(mob.isDead) {
|
||||
FamiliarAIController.cleanTargetterList(parent);
|
||||
return;
|
||||
}
|
||||
|
||||
mob.attackEntityFrom(DamageSource.magic, ((ItemFamiliar) itemStack.getItem()).getAttackStrength(itemStack));
|
||||
|
||||
world.playSoundEffect(mob.posX + 0.5, mob.posY + 0.5, mob.posZ + 0.5, "thaumcraft:zap", 0.8F, 1.0F);
|
||||
|
||||
PacketFamiliar.PacketFamiliarBolt bolt = new PacketFamiliar.PacketFamiliarBolt(parent.getCommandSenderName(), (float) mob.posX, (float) mob.posY, (float) mob.posZ, 6, true);
|
||||
PacketHandler.INSTANCE.sendToAllAround(bolt, new NetworkRegistry.TargetPoint(mob.worldObj.provider.dimensionId, mob.posX, mob.posY, mob.posZ, 32));
|
||||
FamiliarAIController.cleanTargetterList(parent);
|
||||
}
|
||||
|
||||
private List<EntityLivingBase> getPotentialTargets(World world, EntityPlayer player, int rangeInc) {
|
||||
List<EntityLivingBase> validTargets = getCloseEnoughTargetters(world, player, rangeInc);
|
||||
int range = 5 + rangeInc;
|
||||
List mobs = world.getEntitiesWithinAABB(IMob.class, AxisAlignedBB.getBoundingBox(player.posX - 0.5, player.posY - 0.5, player.posZ - 0.5, player.posX + 0.5, player.posY + 0.5, player.posZ + 0.5).expand(range, range, range));
|
||||
for(Object mobObj : mobs) {
|
||||
if(!(mobObj instanceof EntityLivingBase)) continue;
|
||||
EntityLivingBase mob = (EntityLivingBase) mobObj;
|
||||
if(mob.isDead) continue;
|
||||
if(!validTargets.contains(mob)) validTargets.add(mob);
|
||||
}
|
||||
return validTargets;
|
||||
}
|
||||
|
||||
private List<EntityLivingBase> getCloseEnoughTargetters(World world, EntityPlayer parent, int rangeInc) {
|
||||
LinkedList<EntityLivingBase> lastTargetters = FamiliarAIController.getLastTargetters(parent);
|
||||
if(lastTargetters == null || lastTargetters.isEmpty()) return new ArrayList<EntityLivingBase>();
|
||||
List<EntityLivingBase> closeEnoughLastTargetters = new ArrayList<EntityLivingBase>();
|
||||
int range = 8 + rangeInc;
|
||||
List livingAround = world.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(parent.posX - 0.5, parent.posY - 0.5, parent.posZ - 0.5, parent.posX + 0.5, parent.posY + 0.5, parent.posZ + 0.5).expand(range, range, range));
|
||||
for(Object living : livingAround) {
|
||||
if(!(living instanceof EntityLivingBase)) continue;
|
||||
if(lastTargetters.contains(living)) closeEnoughLastTargetters.add((EntityLivingBase) living);
|
||||
}
|
||||
return closeEnoughLastTargetters;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean tryLoop() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCooldownDuration(ItemStack itemStack) {
|
||||
return 20 - ((ItemFamiliar) itemStack.getItem()).getAttackCooldownReduction(itemStack);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,9 +1,10 @@
|
||||
package makeo.gadomancy.common.registration;
|
||||
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.api.GadomancyApi;
|
||||
import makeo.gadomancy.api.golems.AdditionalGolemType;
|
||||
import makeo.gadomancy.api.golems.cores.AdditionalGolemCore;
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.common.entities.golems.cores.BodyguardGolemCore;
|
||||
import makeo.gadomancy.common.entities.golems.cores.BreakGolemCore;
|
||||
import makeo.gadomancy.common.entities.golems.types.SilverwoodGolemType;
|
||||
import makeo.gadomancy.common.entities.golems.upgrades.GolemUpgrade;
|
||||
@@ -29,11 +30,13 @@ public class RegisteredGolemStuff {
|
||||
public static SilverwoodGolemType typeSilverwood;
|
||||
|
||||
public static AdditionalGolemCore breakCore;
|
||||
public static AdditionalGolemCore bodyguardCore;
|
||||
|
||||
public static void init() {
|
||||
typeSilverwood = registerGolemType("SILVERWOOD", new SilverwoodGolemType());
|
||||
|
||||
breakCore = registerGolemCore("breakCore", new BreakGolemCore());
|
||||
bodyguardCore = registerGolemCore("bodyguardCore", new BodyguardGolemCore());
|
||||
|
||||
upgradeRunicShield = registerGolemUpgrade(new GolemUpgradeRunicShield());
|
||||
}
|
||||
|
||||
@@ -3,11 +3,14 @@ package makeo.gadomancy.common.registration;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.common.items.*;
|
||||
import makeo.gadomancy.common.items.baubles.ItemFamiliar;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraftforge.common.util.EnumHelper;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
@@ -27,6 +30,8 @@ import java.util.List;
|
||||
public class RegisteredItems {
|
||||
private RegisteredItems() {}
|
||||
|
||||
public static EnumRarity raritySacred = EnumHelper.addRarity("Sacred", EnumChatFormatting.GOLD, "Sacred");
|
||||
|
||||
public static CreativeTabs creativeTab;
|
||||
|
||||
public static Item itemFakeModIcon;
|
||||
@@ -35,9 +40,8 @@ public class RegisteredItems {
|
||||
public static Item itemTransformationFocus;
|
||||
public static Item itemGolemCoreBreak;
|
||||
public static Item itemExtendedNodeJar;
|
||||
|
||||
//@Deprecated
|
||||
//public static Item itemBlockAiryCopy; //!!!!!!!!!!DO NOT TOUCH THIS OR USE THIS ANYWHERE!!!!!!!!!!
|
||||
public static Item itemFamiliar;
|
||||
public static Item itemCreativeNode;
|
||||
|
||||
public static void preInit() {
|
||||
creativeTab = new CreativeTabs(Gadomancy.MODID) {
|
||||
@@ -66,6 +70,8 @@ public class RegisteredItems {
|
||||
itemTransformationFocus = registerItem(new ItemTransformationFocus());
|
||||
itemGolemCoreBreak = registerItem(new ItemGolemCoreBreak());
|
||||
itemExtendedNodeJar = registerItem(new ItemExtendedNodeJar());
|
||||
itemFamiliar = registerItem(new ItemFamiliar());
|
||||
itemCreativeNode = registerItem(new ItemCreativeNode());
|
||||
}
|
||||
|
||||
private static <T extends Item> T registerItem(T item, String name) {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package makeo.gadomancy.common.registration;
|
||||
|
||||
import makeo.gadomancy.common.utils.MultiblockHelper;
|
||||
import net.minecraft.init.Blocks;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package makeo.gadomancy.common.registration;
|
||||
|
||||
import makeo.gadomancy.common.utils.Injector;
|
||||
import net.minecraft.potion.Potion;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
* Gadomancy is Open Source and distributed under the
|
||||
* GNU LESSER GENERAL PUBLIC LICENSE
|
||||
* for more read the LICENSE file
|
||||
* <p/>
|
||||
* Created by makeo @ 31.10.2015 23:09
|
||||
*/
|
||||
public class RegisteredPotions {
|
||||
public static void init() {
|
||||
}
|
||||
|
||||
private static <T extends Potion> T registerPotion(Class<T> potionClass) {
|
||||
int id = Potion.potionTypes.length;
|
||||
Potion[] potions = new Potion[Potion.potionTypes.length + 1];
|
||||
System.arraycopy(Potion.potionTypes, 0, potions, 0, Potion.potionTypes.length);
|
||||
Potion.potionTypes = potions;
|
||||
|
||||
return new Injector(potionClass).invokeConstructor(int.class, id);
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import makeo.gadomancy.api.golems.AdditionalGolemType;
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.common.crafting.InfusionUpgradeRecipe;
|
||||
import makeo.gadomancy.common.crafting.RecipeStickyJar;
|
||||
import makeo.gadomancy.common.items.baubles.ItemFamiliar;
|
||||
import makeo.gadomancy.common.research.SimpleResearchItem;
|
||||
import makeo.gadomancy.common.utils.NBTHelper;
|
||||
import net.minecraft.init.Blocks;
|
||||
@@ -17,7 +18,9 @@ import thaumcraft.api.crafting.InfusionRecipe;
|
||||
import thaumcraft.api.crafting.ShapedArcaneRecipe;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
import thaumcraft.common.items.ItemWispEssence;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@@ -42,6 +45,11 @@ public class RegisteredRecipes {
|
||||
public static InfusionRecipe recipeInfusionClaw;
|
||||
public static InfusionRecipe recipeNodeManipulator;
|
||||
public static InfusionRecipe recipeRandomizationFocus;
|
||||
public static InfusionRecipe[] recipesFamilar;
|
||||
public static InfusionRecipe recipeGolemCoreBodyguard;
|
||||
|
||||
//ID's: 0-2=Strength upgrades, 3=range, 4=cdReduction
|
||||
public static InfusionRecipe[][] recipesFamiliarAugmentation;
|
||||
|
||||
public static IArcaneRecipe recipeStickyJar;
|
||||
public static IArcaneRecipe recipeArcaneDropper;
|
||||
@@ -95,6 +103,84 @@ public class RegisteredRecipes {
|
||||
null, null, null, null, new ItemStack(RegisteredBlocks.blockNode, 1, 5), null, null, null, null,
|
||||
new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 11), null, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 11), null, new ItemStack(RegisteredBlocks.blockStoneMachine, 1, 0), null, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 11), null, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 11),
|
||||
new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 15), null, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 15), null, new ItemStack(RegisteredBlocks.blockNodeManipulator, 1, 5), null, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 15), null, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 15)));
|
||||
|
||||
recipeGolemCoreBodyguard = ThaumcraftApi.addInfusionCraftingRecipe(Gadomancy.MODID.toUpperCase() + ".GOLEMCOREBODYGUARD", new ItemStack(RegisteredItems.itemGolemCoreBreak, 1, 1), 3, new AspectList().add(Aspect.TOOL, 28).add(Aspect.MECHANISM, 20).add(Aspect.WEAPON, 10).add(Aspect.ARMOR, 16),
|
||||
new ItemStack(ConfigItems.itemGolemCore, 1, 4), new ItemStack[] { new ItemStack(ConfigItems.itemBootsTraveller, 1, 0), new ItemStack(Items.ender_pearl, 1, 0), new ItemStack(ConfigItems.itemSwordElemental, 1, 0), new ItemStack(Items.ender_pearl, 1, 0) } );
|
||||
|
||||
recipesFamilar = createFamilarRecipes();
|
||||
recipesFamiliarAugmentation = createFamiliarAugmentationRecipes();
|
||||
}
|
||||
|
||||
private static InfusionRecipe[][] createFamiliarAugmentationRecipes() {
|
||||
InfusionRecipe[][] recipes = new InfusionRecipe[5][];
|
||||
ItemWispEssence wispEssence = (ItemWispEssence) ConfigItems.itemWispEssence;
|
||||
ItemFamiliar familiar = (ItemFamiliar) RegisteredItems.itemFamiliar;
|
||||
|
||||
List<Aspect> aspects = new ArrayList<Aspect>(Aspect.aspects.values());
|
||||
InfusionRecipe[] upgradeArrayStr1 = new InfusionRecipe[aspects.size()];
|
||||
InfusionRecipe[] upgradeArrayStr2 = new InfusionRecipe[aspects.size()];
|
||||
InfusionRecipe[] upgradeArrayStr3 = new InfusionRecipe[aspects.size()];
|
||||
InfusionRecipe[] upgradeArrayRange1 = new InfusionRecipe[aspects.size()];
|
||||
InfusionRecipe[] upgradeArrayCd1 = new InfusionRecipe[aspects.size()];
|
||||
|
||||
for (int i = 0; i < aspects.size(); i++) {
|
||||
Aspect aspect = aspects.get(i);
|
||||
ItemStack wispyEssence = new ItemStack(wispEssence, 1, 0);
|
||||
wispEssence.setAspects(wispyEssence, new AspectList().add(aspect, 2));
|
||||
|
||||
ItemStack familiarIn = new ItemStack(RegisteredItems.itemFamiliar);
|
||||
familiar.setAspect(familiarIn, aspect);
|
||||
|
||||
FamiliarAugmentInfusion infusion = new FamiliarAugmentInfusion(Gadomancy.MODID.toUpperCase() + ".FAM_ATTACK_1", 4, new AspectList().add(Aspect.AURA, 37).add(Aspect.MAGIC, 53).add(aspect, 35), familiarIn, ItemFamiliar.FamiliarUpgrade.ATTACK_1,
|
||||
new ItemStack[]{ wispyEssence, new ItemStack(ConfigItems.itemResource, 1, 6), wispyEssence, new ItemStack(ConfigItems.itemResource, 1, 4), wispyEssence, new ItemStack(ConfigItems.itemResource, 1, 6), wispyEssence, new ItemStack(ConfigItems.itemResource, 1, 4)});
|
||||
ThaumcraftApi.getCraftingRecipes().add(infusion);
|
||||
upgradeArrayStr1[i] = infusion;
|
||||
|
||||
familiarIn = new ItemStack(RegisteredItems.itemFamiliar);
|
||||
familiar.setAspect(familiarIn, aspect);
|
||||
familiar.addUpgrade(familiarIn, ItemFamiliar.FamiliarUpgrade.ATTACK_1);
|
||||
|
||||
infusion = new FamiliarAugmentInfusion(Gadomancy.MODID.toUpperCase() + ".FAM_ATTACK_2", 6, new AspectList().add(Aspect.AURA, 43).add(Aspect.MAGIC, 71).add(Aspect.ELDRITCH, 37).add(aspect, 59), familiarIn, ItemFamiliar.FamiliarUpgrade.ATTACK_2,
|
||||
new ItemStack[] { wispyEssence, new ItemStack(ConfigBlocks.blockCrystal, 1, 6), new ItemStack(ConfigItems.itemResource, 1, 15), wispyEssence, new ItemStack(ConfigBlocks.blockCrystal, 1, 6), new ItemStack(ConfigItems.itemResource, 1, 17), wispyEssence, new ItemStack(ConfigBlocks.blockCrystal, 1, 6), new ItemStack(ConfigItems.itemResource, 1, 15), wispyEssence, new ItemStack(ConfigBlocks.blockCrystal, 1, 6), new ItemStack(ConfigItems.itemResource, 1, 17)});
|
||||
ThaumcraftApi.getCraftingRecipes().add(infusion);
|
||||
upgradeArrayStr2[i] = infusion;
|
||||
|
||||
|
||||
familiarIn = new ItemStack(RegisteredItems.itemFamiliar);
|
||||
familiar.setAspect(familiarIn, aspect);
|
||||
familiar.addUpgrade(familiarIn, ItemFamiliar.FamiliarUpgrade.ATTACK_1);
|
||||
familiar.addUpgrade(familiarIn, ItemFamiliar.FamiliarUpgrade.ATTACK_2);
|
||||
|
||||
infusion = new FamiliarAugmentInfusion(Gadomancy.MODID.toUpperCase() + ".FAM_ATTACK_3", 10, new AspectList().add(Aspect.AURA, 77).add(Aspect.MAGIC, 93).add(Aspect.WEAPON, 49).add(aspect, 104), familiarIn, ItemFamiliar.FamiliarUpgrade.ATTACK_3,
|
||||
new ItemStack[] { new ItemStack(ConfigItems.itemEldritchObject, 1, 3), wispyEssence, new ItemStack(ConfigBlocks.blockCustomPlant, 1, 4), wispyEssence, new ItemStack(Items.nether_star, 1, 0), wispyEssence, new ItemStack(ConfigBlocks.blockCustomPlant, 1, 4), wispyEssence });
|
||||
ThaumcraftApi.getCraftingRecipes().add(infusion);
|
||||
upgradeArrayStr3[i] = infusion;
|
||||
|
||||
familiarIn = new ItemStack(RegisteredItems.itemFamiliar);
|
||||
familiar.setAspect(familiarIn, aspect);
|
||||
|
||||
infusion = new FamiliarAugmentInfusion(Gadomancy.MODID.toUpperCase() + ".FAM_RANGE_1", 8, new AspectList().add(Aspect.AURA, 44).add(Aspect.MAGIC, 51).add(aspect, 37), familiarIn, ItemFamiliar.FamiliarUpgrade.RANGE_1,
|
||||
new ItemStack[] { new ItemStack(ConfigItems.itemResource, 1, 0), wispyEssence, new ItemStack(ConfigItems.itemResource, 1, 17), wispyEssence, new ItemStack(ConfigItems.itemResource, 1, 0), wispyEssence, new ItemStack(ConfigItems.itemResource, 1, 17), wispyEssence });
|
||||
ThaumcraftApi.getCraftingRecipes().add(infusion);
|
||||
upgradeArrayRange1[i] = infusion;
|
||||
|
||||
|
||||
familiarIn = new ItemStack(RegisteredItems.itemFamiliar);
|
||||
familiar.setAspect(familiarIn, aspect);
|
||||
|
||||
infusion = new FamiliarAugmentInfusion(Gadomancy.MODID.toUpperCase() + ".FAM_COOLDOWN_1", 10, new AspectList().add(Aspect.AURA, 79).add(Aspect.MAGIC, 101).add(Aspect.EXCHANGE, 54).add(aspect, 81), familiarIn, ItemFamiliar.FamiliarUpgrade.COOLDOWN_1,
|
||||
new ItemStack[] { new ItemStack(ConfigItems.itemEldritchObject, 1, 3), new ItemStack(ConfigItems.itemFocusPrimal, 1, 0), wispyEssence, new ItemStack(ConfigItems.itemBathSalts, 1, 0), new ItemStack(ConfigItems.itemFocusPrimal, 1, 0), wispyEssence, new ItemStack(ConfigItems.itemBathSalts, 1, 0) });
|
||||
ThaumcraftApi.getCraftingRecipes().add(infusion);
|
||||
upgradeArrayCd1[i] = infusion;
|
||||
}
|
||||
|
||||
recipes[0] = upgradeArrayStr1;
|
||||
recipes[1] = upgradeArrayStr2;
|
||||
recipes[2] = upgradeArrayStr3;
|
||||
recipes[3] = upgradeArrayRange1;
|
||||
recipes[4] = upgradeArrayCd1;
|
||||
|
||||
return recipes;
|
||||
}
|
||||
|
||||
private static IArcaneRecipe[] stickyJarRecipes = null;
|
||||
@@ -122,4 +208,24 @@ public class RegisteredRecipes {
|
||||
|
||||
return stickyJarRecipes;
|
||||
}
|
||||
|
||||
public static InfusionRecipe[] createFamilarRecipes() {
|
||||
List<Aspect> aspects = new ArrayList<Aspect>(Aspect.aspects.values());
|
||||
InfusionRecipe[] recipes = new InfusionRecipe[aspects.size()];
|
||||
ItemFamiliar familiar = (ItemFamiliar) RegisteredItems.itemFamiliar;
|
||||
|
||||
ItemWispEssence itemEssence = (ItemWispEssence) ConfigItems.itemWispEssence;
|
||||
for (int i = 0; i < aspects.size(); i++) {
|
||||
Aspect aspect = aspects.get(i);
|
||||
|
||||
ItemStack wispyEssence = new ItemStack(itemEssence, 1, 0);
|
||||
itemEssence.setAspects(wispyEssence, new AspectList().add(aspect, 2));
|
||||
|
||||
ItemStack result = new ItemStack(RegisteredItems.itemFamiliar);
|
||||
familiar.setAspect(result, aspect);
|
||||
|
||||
recipes[i] = ThaumcraftApi.addInfusionCraftingRecipe(Gadomancy.MODID.toUpperCase() + ".FAMILIAR", result, 4, new AspectList().add(aspect, 46).add(Aspect.AURA, 34).add(Aspect.MAGIC, 51), new ItemStack(ConfigItems.itemResource, 1, 1), new ItemStack[] { wispyEssence, new ItemStack(ConfigItems.itemResource, 1, 15), new ItemStack(ConfigBlocks.blockCrystal, 1, 6) , wispyEssence, new ItemStack(ConfigItems.itemResource, 1, 14), new ItemStack(ConfigBlocks.blockCrystal, 1, 6), wispyEssence, new ItemStack(ConfigItems.itemResource, 1, 15), new ItemStack(ConfigBlocks.blockCrystal, 1, 6), wispyEssence, new ItemStack(ConfigItems.itemResource, 1, 14), new ItemStack(ConfigBlocks.blockCrystal, 1, 6) });
|
||||
}
|
||||
return recipes;
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.common.research.AlternatingResearchItem;
|
||||
import makeo.gadomancy.common.research.PseudoResearchItem;
|
||||
import makeo.gadomancy.common.research.SimpleResearchItem;
|
||||
import makeo.gadomancy.common.utils.NBTHelper;
|
||||
import makeo.gadomancy.common.utils.SimpleResourceLocation;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@@ -14,7 +15,6 @@ import thaumcraft.api.research.ResearchCategories;
|
||||
import thaumcraft.api.research.ResearchItem;
|
||||
import thaumcraft.api.research.ResearchPage;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.lib.research.ResearchManager;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
@@ -35,6 +35,7 @@ public class RegisteredResearches {
|
||||
public static ResearchItem researchStickyJar;
|
||||
public static ResearchItem researchArcaneDropper;
|
||||
public static ResearchItem researchGolemCoreBreak;
|
||||
public static ResearchItem researchGolemCoreBodyguard;
|
||||
public static ResearchItem researchInfusionClaw;
|
||||
public static ResearchItem researchRemoteJar;
|
||||
public static ResearchItem researchNodeManipulator;
|
||||
@@ -46,70 +47,93 @@ public class RegisteredResearches {
|
||||
public static ResearchItem researchGrowingNodeAttackNodes;
|
||||
public static ResearchItem researchGrowingNodeGrowthClue;
|
||||
|
||||
//Familiar
|
||||
public static ResearchItem researchFamiliarBasic;
|
||||
public static ResearchItem researchFamiliarAttack_1;
|
||||
public static ResearchItem researchFamiliarAttack_2;
|
||||
public static ResearchItem researchFamiliarAttack_3;
|
||||
public static ResearchItem researchFamiliarRange_1;
|
||||
public static ResearchItem researchFamiliarCooldown_1;
|
||||
|
||||
public static void init() {
|
||||
|
||||
ResearchCategories.registerCategory(Gadomancy.MODID, CATEGORY_ICON, CATEGORY_BACKGROUND);
|
||||
|
||||
ResearchItem researchAdvancedGolem = PseudoResearchItem.create("ADVANCEDGOLEM", 2, -2).registerResearchItem();
|
||||
ResearchItem researchAdvancedGolem = PseudoResearchItem.create("ADVANCEDGOLEM", 0, -5).registerResearchItem();
|
||||
|
||||
researchGolemSilverwood = new SimpleResearchItem("GOLEMSILVERWOOD", 4, -3, 3, (ItemStack) RegisteredRecipes.recipeGolemSilverwood.getRecipeOutput(),
|
||||
researchGolemSilverwood = new SimpleResearchItem("GOLEMSILVERWOOD", 1, -2, 3, (ItemStack) RegisteredRecipes.recipeGolemSilverwood.getRecipeOutput(),
|
||||
new AspectList().add(Aspect.MOTION, 10).add(Aspect.TREE, 10).add(Aspect.MAGIC, 8).add(Aspect.ORDER, 8).add(Aspect.FLESH, 6).add(Aspect.EXCHANGE, 5))
|
||||
.setParents(researchAdvancedGolem.key).setConcealed()
|
||||
.setPages(new ResearchPage("gadomancy.research_page.GOLEMSILVERWOOD.1"), new ResearchPage(RegisteredRecipes.recipeGolemSilverwood)).registerResearchItem();
|
||||
|
||||
researchGolemRunicShield = new SimpleResearchItem("GOLEMRUNICSHIELD", 6, -4, 4, new ItemStack(RegisteredItems.itemFakeGolemShield, 1, 32767),
|
||||
researchGolemRunicShield = new SimpleResearchItem("GOLEMRUNICSHIELD", 0, 0, 4, new ItemStack(RegisteredItems.itemFakeGolemShield, 1, 32767),
|
||||
new AspectList().add(Aspect.AURA, 16))
|
||||
.setParents(researchGolemSilverwood.key).setConcealed()
|
||||
.setPages(new ResearchPage("gadomancy.research_page.GOLEMRUNICSHIELD.1"), new ResearchPage(RegisteredRecipes.recipesGolemRunicShield)).registerResearchItem();
|
||||
|
||||
ResearchItem researchDistill = PseudoResearchItem.create("DISTILESSENTIA", -2, -1).registerResearchItem();
|
||||
ResearchItem researchDistill = PseudoResearchItem.create("DISTILESSENTIA", -2, -5).registerResearchItem();
|
||||
ResearchItem researchBellows = PseudoResearchItem.create("BELLOWS", -3, -1).registerResearchItem();
|
||||
|
||||
researchArcaneDropper = new SimpleResearchItem("ARCANEDROPPER", -1, -1, 2, new ItemStack(RegisteredBlocks.blockArcaneDropper),
|
||||
researchArcaneDropper = new SimpleResearchItem("ARCANEDROPPER", -1, -2, 2, new ItemStack(RegisteredBlocks.blockArcaneDropper),
|
||||
new AspectList().add(Aspect.ORDER, 4).add(Aspect.AIR, 6).add(Aspect.EARTH, 5).add(Aspect.SENSES, 5).add(Aspect.MECHANISM, 7))
|
||||
.setParents(researchDistill.key).setConcealed()
|
||||
.setParents(researchDistill.key, researchBellows.key).setConcealed()
|
||||
.setPages(new ResearchPage("gadomancy.research_page.ARCANEDROPPER.1"), new ResearchPage(RegisteredRecipes.recipeArcaneDropper)).registerResearchItem();
|
||||
|
||||
ResearchItem researchCoreGather = PseudoResearchItem.create("COREGATHER", 3, 0).registerResearchItem();
|
||||
ResearchItem researchHarvestGather = PseudoResearchItem.create("COREHARVEST", 3, -8).registerResearchItem();
|
||||
ResearchItem researchEleToolAxe = PseudoResearchItem.create("ELEMENTALAXE", 4, -10).registerResearchItem();
|
||||
ResearchItem researchEleToolPick = PseudoResearchItem.create("ELEMENTALPICK", 5, -9).registerResearchItem();
|
||||
ResearchItem researchEleToolShovel = PseudoResearchItem.create("ELEMENTALSHOVEL", 6, -8).registerResearchItem();
|
||||
ResearchItem researchEleSword = PseudoResearchItem.create("ELEMENTALSWORD", 7, -7).registerResearchItem();
|
||||
ResearchItem researchCoreGuard = PseudoResearchItem.create("COREGUARD", 7, -5).registerResearchItem();
|
||||
|
||||
researchGolemCoreBreak = new SimpleResearchItem("GOLEMCOREBREAK", 5, -1, 3, new ItemStack(RegisteredItems.itemGolemCoreBreak),
|
||||
researchGolemCoreBreak = new SimpleResearchItem("GOLEMCOREBREAK", 5, -6, 3, new ItemStack(RegisteredItems.itemGolemCoreBreak),
|
||||
new AspectList().add(Aspect.TOOL, 8).add(Aspect.ENTROPY, 8).add(Aspect.MECHANISM, 8))
|
||||
.setParents(researchCoreGather.key).setConcealed()
|
||||
.setParents(researchHarvestGather.key, researchEleToolAxe.key, researchEleToolPick.key, researchEleToolShovel.key).setConcealed()
|
||||
.setPages(new ResearchPage("gadomancy.research_page.GOLEMCOREBREAK.1"), new ResearchPage(RegisteredRecipes.recipeGolemCoreBreak)).registerResearchItem();
|
||||
|
||||
ResearchItem researchFocusPrimal = PseudoResearchItem.create("FOCUSPRIMAL", -2, -3).registerResearchItem();
|
||||
ResearchItem researchBootsTraveller = PseudoResearchItem.create("BOOTSTRAVELLER", 3, -6).registerResearchItem();
|
||||
|
||||
ResearchItem researchItemVoidMetal = PseudoResearchItem.create("VOIDMETAL", -3, 4).registerResearchItem();
|
||||
ResearchItem researchNodeStabilizer = PseudoResearchItem.create("NODESTABILIZER", -3, 6).registerResearchItem();
|
||||
ResearchItem researchWardingStone = PseudoResearchItem.create("PAVEWARD", -1, 6).registerResearchItem();
|
||||
researchGolemCoreBodyguard = new SimpleResearchItem("GOLEMCOREBODYGUARD", 5, -4, 2, new ItemStack(RegisteredItems.itemGolemCoreBreak, 1, 1),
|
||||
new AspectList().add(Aspect.TOOL, 8).add(Aspect.ORDER, 8).add(Aspect.MECHANISM, 10).add(Aspect.ARMOR, 8).add(Aspect.WEAPON, 8))
|
||||
.setParents(researchBootsTraveller.key, researchEleSword.key, researchCoreGuard.key).setConcealed()
|
||||
.setPages(new ResearchPage("gadomancy.research_page.GOLEMCOREBODYGUARD.1"), new ResearchPage(RegisteredRecipes.recipeGolemCoreBodyguard)).registerResearchItem();
|
||||
|
||||
researchInfusionClaw = new SimpleResearchItem("INFUSIONCLAW", -1, -3, 5, new ItemStack(RegisteredBlocks.blockInfusionClaw),
|
||||
ResearchItem researchFocusPrimal = PseudoResearchItem.create("FOCUSPRIMAL", -7, -10).registerResearchItem();
|
||||
ResearchItem researchItemVoidMetal = PseudoResearchItem.create("VOIDMETAL", -8, -6).registerResearchItem();
|
||||
ResearchItem researchWandPedestal = PseudoResearchItem.create("WANDPED", -9, -8).registerResearchItem();
|
||||
ResearchItem researchWardingStone = PseudoResearchItem.create("PAVEWARD", -10, -6).registerResearchItem();
|
||||
ResearchItem researchNodeStabilizer = PseudoResearchItem.create("WANDPEDFOC", -12, -5).registerResearchItem();
|
||||
ResearchItem researchCoreUse = PseudoResearchItem.create("COREUSE", -5, -9).registerResearchItem();
|
||||
|
||||
researchInfusionClaw = new SimpleResearchItem("INFUSIONCLAW", -6, -7, 5, new ItemStack(RegisteredBlocks.blockInfusionClaw),
|
||||
new AspectList().add(Aspect.ELDRITCH, 8).add(Aspect.MECHANISM, 8).add(Aspect.MAGIC, 8).add(Aspect.ORDER, 8).add(Aspect.DARKNESS, 4))
|
||||
.setParents(researchFocusPrimal.key).setConcealed()
|
||||
.setPages(new ResearchPage("gadomancy.research_page.INFUSIONCLAW.1"), new ResearchPage(RegisteredRecipes.recipeInfusionClaw)).registerResearchItem();
|
||||
.setParents(researchFocusPrimal.key, researchItemVoidMetal.key, researchWandPedestal.key, researchCoreUse.key).setConcealed()
|
||||
.setPages(new ResearchPage("gadomancy.research_page.INFUSIONCLAW.1"), new ResearchPage(RegisteredRecipes.recipeInfusionClaw), new ResearchPage("gadomancy.research_page.INFUSIONCLAW.2")).registerResearchItem();
|
||||
|
||||
|
||||
researchNodeManipulator = new ResearchItem(Gadomancy.MODID.toUpperCase() + ".NODE_MANIPULATOR", Gadomancy.MODID,
|
||||
new AspectList().add(Aspect.ELDRITCH, 1).add(Aspect.AURA, 1).add(Aspect.DARKNESS, 1).add(Aspect.MAGIC, 1).add(Aspect.GREED, 1).add(Aspect.VOID, 1).add(Aspect.MECHANISM, 1).add(Aspect.EXCHANGE, 1),
|
||||
-1, 4, 2, new ItemStack(RegisteredBlocks.blockNodeManipulator, 1, 5))
|
||||
new AspectList().add(Aspect.ELDRITCH, 8).add(Aspect.AURA, 6).add(Aspect.DARKNESS, 4).add(Aspect.MAGIC, 8).add(Aspect.GREED, 4).add(Aspect.VOID, 10).add(Aspect.MECHANISM, 6).add(Aspect.EXCHANGE, 4),
|
||||
-9, -4, 2, new ItemStack(RegisteredBlocks.blockNodeManipulator, 1, 5))
|
||||
.setConcealed().setSpecial()
|
||||
.setParents(researchItemVoidMetal.key, researchNodeStabilizer.key, researchWardingStone.key)
|
||||
.setParents(researchItemVoidMetal.key, researchNodeStabilizer.key, researchWardingStone.key, researchWandPedestal.key)
|
||||
.setPages(new ResearchPage("gadomancy.research_page.NODE_MANIPULATOR.1"), new ResearchPage(RegisteredRecipes.recipeNodeManipulator), new ResearchPage("gadomancy.research_page.NODE_MANIPULATOR.3"), new ResearchPage(RegisteredRecipes.recipeRandomizationFocus), new ResearchPage(RegisteredRecipes.multiblockNodeManipulator), new ResearchPage("gadomancy.research_page.NODE_MANIPULATOR.6")).registerResearchItem();
|
||||
|
||||
researchGrowingNodes = new ResearchItem(Gadomancy.MODID.toUpperCase() + ".GROWING", Gadomancy.MODID, new AspectList(), 2, 2, 5, new ResourceLocation("thaumcraft", "textures/misc/r_nodes.png"))
|
||||
researchGrowingNodes = new ResearchItem(Gadomancy.MODID.toUpperCase() + ".GROWING", Gadomancy.MODID, new AspectList(), -8, -1, 5, new ResourceLocation("thaumcraft", "textures/misc/r_nodes.png"))
|
||||
.setSpecial().setLost().setConcealed()
|
||||
.setParents(Gadomancy.MODID.toUpperCase() + ".NODE_MANIPULATOR")
|
||||
.setPages(new ResearchPage("gadomancy.research_page.GROWING.1"), new ResearchPage("gadomancy.research_page.GROWING.2")).registerResearchItem();
|
||||
|
||||
researchGrowingNodeAgression = new ResearchItem(Gadomancy.MODID.toUpperCase() + ".GROWING_AGGRESSION", Gadomancy.MODID, new AspectList(), 5, 3, 6, new ItemStack(ConfigBlocks.blockAiry, 1, 5))
|
||||
researchGrowingNodeAgression = new ResearchItem(Gadomancy.MODID.toUpperCase() + ".GROWING_AGGRESSION", Gadomancy.MODID, new AspectList(), -5, 0, 6, new ItemStack(ConfigBlocks.blockAiry, 1, 5))
|
||||
.setLost()
|
||||
.setParents(Gadomancy.MODID.toUpperCase() + ".GROWING")
|
||||
.setPages(new ResearchPage("gadomancy.research_page.GROWING_AGGRESSION.1")).registerResearchItem();
|
||||
|
||||
researchGrowingNodeGrowth = new ResearchItem(Gadomancy.MODID.toUpperCase() + ".GROWING_GROWTH", Gadomancy.MODID, new AspectList(), 3, 5, 6, new ResourceLocation("gadomancy", "textures/misc/r_node_star.png"))
|
||||
researchGrowingNodeGrowth = new ResearchItem(Gadomancy.MODID.toUpperCase() + ".GROWING_GROWTH", Gadomancy.MODID, new AspectList(), -7, 2, 6, new ResourceLocation("gadomancy", "textures/misc/r_node_star.png"))
|
||||
.setLost()
|
||||
.setParents(Gadomancy.MODID.toUpperCase() + ".GROWING")
|
||||
.setPages(new ResearchPage("gadomancy.research_page.GROWING_GROWTH.1"), new ResearchPage("gadomancy.research_page.GROWING_GROWTH.2")).registerResearchItem();
|
||||
|
||||
researchGrowingNodeAttackNodes = new ResearchItem(Gadomancy.MODID.toUpperCase() + ".GROWING_ATTACK", Gadomancy.MODID, new AspectList(), 4, 4, 6, new ResourceLocation("gadomancy", "textures/misc/r_node_dark.png"))
|
||||
researchGrowingNodeAttackNodes = new ResearchItem(Gadomancy.MODID.toUpperCase() + ".GROWING_ATTACK", Gadomancy.MODID, new AspectList(), -6, 1, 6, new ResourceLocation("gadomancy", "textures/misc/r_node_dark.png"))
|
||||
.setLost()
|
||||
.setParents(Gadomancy.MODID.toUpperCase() + ".GROWING")
|
||||
.setPages(new ResearchPage("gadomancy.research_page.GROWING_ATTACK.1")).registerResearchItem();
|
||||
@@ -117,28 +141,89 @@ public class RegisteredResearches {
|
||||
researchGrowingNodeGrowthClue = new ResearchItem(Gadomancy.MODID.toUpperCase() + ".GROWING_GROWTHCLUE", Gadomancy.MODID,
|
||||
new AspectList().add(Aspect.AURA, 10).add(Aspect.MAGIC, 15).add(Aspect.ELDRITCH, 5).add(Aspect.VOID, 12).add(Aspect.ENERGY, 12).add(Aspect.ENTROPY, 8).add(Aspect.DEATH, 3)
|
||||
.add(Aspect.GREED, 10).add(Aspect.HUNGER, 10).add(Aspect.MECHANISM, 12).add(Aspect.DARKNESS, 12),
|
||||
6, 6, 2, new ItemStack(ConfigBlocks.blockAiry, 1, 5))
|
||||
-4, 3, 2, new ItemStack(ConfigBlocks.blockAiry, 1, 5))
|
||||
.setSpecial().setRound().setConcealed()
|
||||
.setParents(Gadomancy.MODID.toUpperCase() + ".GROWING_AGGRESSION", Gadomancy.MODID.toUpperCase() + ".GROWING_GROWTH", Gadomancy.MODID.toUpperCase() + ".GROWING_ATTACK")
|
||||
.setPages(new ResearchPage("gadomancy.research_page.GROWING_GROWTHCLUE.1"), new ResearchPage("gadomancy.research_page.GROWING_GROWTHCLUE.2")).registerResearchItem();
|
||||
|
||||
ResearchItem nitorResearch = PseudoResearchItem.create("NITOR", 2, -4).registerResearchItem();
|
||||
|
||||
ItemStack familiarResearchStack = new ItemStack(RegisteredItems.itemFamiliar, 1, 0);
|
||||
NBTHelper.getData(familiarResearchStack).setString("aspect", Aspect.MAGIC.getTag());
|
||||
|
||||
researchFamiliarBasic = new ResearchItem(Gadomancy.MODID.toUpperCase() + ".FAMILIAR", Gadomancy.MODID,
|
||||
new AspectList().add(Aspect.AURA, 8).add(Aspect.MAGIC, 10).add(Aspect.AIR, 2).add(Aspect.WATER, 2).add(Aspect.EARTH, 2).add(Aspect.FIRE, 2).add(Aspect.ORDER, 2).add(Aspect.ENTROPY, 2),
|
||||
3, -2, 2, familiarResearchStack)
|
||||
.setSpecial().setConcealed()
|
||||
.setParents(nitorResearch.key)
|
||||
.setPages(new ResearchPage("gadomancy.research_page.FAMILIAR.1"), new ResearchPage(RegisteredRecipes.recipesFamilar)).registerResearchItem();
|
||||
|
||||
ResearchItem researchTallow = PseudoResearchItem.create("TALLOW", 7, -3).registerResearchItem();
|
||||
|
||||
researchFamiliarAttack_1 = new ResearchItem(Gadomancy.MODID.toUpperCase() + ".FAM_ATTACK_1", Gadomancy.MODID,
|
||||
new AspectList().add(Aspect.AURA, 6).add(Aspect.MAGIC, 8).add(Aspect.WEAPON, 6),
|
||||
5, -1, 2, new ItemStack(RegisteredItems.itemFakeModIcon, 1, 1))
|
||||
.setConcealed()
|
||||
.setParents(Gadomancy.MODID.toUpperCase() + ".FAMILIAR", researchTallow.key)
|
||||
.setPages(new ResearchPage("gadomancy.research_page.FAM_ATTACK_1.1"), new ResearchPage(RegisteredRecipes.recipesFamiliarAugmentation[0])).registerResearchItem();
|
||||
|
||||
ResearchItem researchVoidSeed = PseudoResearchItem.create("ELDRITCHMINOR", 8, -2).registerResearchItem();
|
||||
|
||||
researchFamiliarAttack_2 = new ResearchItem(Gadomancy.MODID.toUpperCase() + ".FAM_ATTACK_2", Gadomancy.MODID,
|
||||
new AspectList().add(Aspect.AURA, 10).add(Aspect.MAGIC, 12).add(Aspect.ELDRITCH, 8).add(Aspect.WEAPON, 8),
|
||||
7, 0, 2, new ItemStack(RegisteredItems.itemFakeModIcon, 1, 2))
|
||||
.setConcealed()
|
||||
.setParents(Gadomancy.MODID.toUpperCase() + ".FAM_ATTACK_1", researchVoidSeed.key)
|
||||
.setPages(new ResearchPage("gadomancy.research_page.FAM_ATTACK_2.1"), new ResearchPage(RegisteredRecipes.recipesFamiliarAugmentation[1])).registerResearchItem();
|
||||
|
||||
ResearchItem researchPrimodialPearl = PseudoResearchItem.create("PRIMPEARL", 10, 1).registerResearchItem();
|
||||
ResearchItem researchEthBloom = PseudoResearchItem.create("ETHEREALBLOOM", 9, 0).registerResearchItem();
|
||||
ResearchItem researchBathSalts = PseudoResearchItem.create("BATHSALTS", 3, 2).registerResearchItem();
|
||||
ResearchItem researchPrimalFocus2 = PseudoResearchItem.create("FOCUSPRIMAL", 3, 4, true).registerResearchItem();
|
||||
ResearchItem researchAlumentum = PseudoResearchItem.create("ALUMENTUM", 2, 0).registerResearchItem();
|
||||
|
||||
researchFamiliarAttack_3 = new ResearchItem(Gadomancy.MODID.toUpperCase() + ".FAM_ATTACK_3", Gadomancy.MODID,
|
||||
new AspectList().add(Aspect.ORDER, 4).add(Aspect.AURA, 6).add(Aspect.FIRE, 6).add(Aspect.MAGIC, 6).add(Aspect.AIR, 6).add(Aspect.ELDRITCH, 8).add(Aspect.WATER, 5).add(Aspect.WEAPON, 8).add(Aspect.ENTROPY, 6).add(Aspect.EARTH, 8),
|
||||
8, 2, 2, new ItemStack(RegisteredItems.itemFakeModIcon, 1, 3))
|
||||
.setConcealed()
|
||||
.setParents(Gadomancy.MODID.toUpperCase() + ".FAM_ATTACK_2", researchPrimodialPearl.key, researchEthBloom.key)
|
||||
.setPages(new ResearchPage("gadomancy.research_page.FAM_ATTACK_3.1"), new ResearchPage(RegisteredRecipes.recipesFamiliarAugmentation[2])).registerResearchItem();
|
||||
|
||||
researchFamiliarRange_1 = new ResearchItem(Gadomancy.MODID.toUpperCase() + ".FAM_RANGE_1", Gadomancy.MODID,
|
||||
new AspectList().add(Aspect.AURA, 8).add(Aspect.MOTION, 10).add(Aspect.MAGIC, 8).add(Aspect.VOID, 8).add(Aspect.ENERGY, 10),
|
||||
4, 1, 2, new ItemStack(RegisteredItems.itemFakeModIcon, 1, 4))
|
||||
.setConcealed()
|
||||
.setParents(Gadomancy.MODID.toUpperCase() + ".FAMILIAR", Gadomancy.MODID.toUpperCase() + ".FAM_ATTACK_2", researchAlumentum.key)
|
||||
.setPages(new ResearchPage("gadomancy.research_page.FAM_RANGE_1.1"), new ResearchPage(RegisteredRecipes.recipesFamiliarAugmentation[3])).registerResearchItem();
|
||||
|
||||
researchFamiliarCooldown_1 = new ResearchItem(Gadomancy.MODID.toUpperCase() + ".FAM_COOLDOWN_1", Gadomancy.MODID,
|
||||
new AspectList().add(Aspect.AURA, 12).add(Aspect.MAGIC, 10).add(Aspect.TAINT, 10).add(Aspect.ELDRITCH, 8).add(Aspect.WEAPON, 10).add(Aspect.VOID, 10),
|
||||
5, 3, 2, new ItemStack(RegisteredItems.itemFakeModIcon, 1, 5))
|
||||
.setConcealed()
|
||||
.setParents(Gadomancy.MODID.toUpperCase() + ".FAM_RANGE_1", Gadomancy.MODID.toUpperCase() + ".FAM_ATTACK_3", researchBathSalts.key, researchPrimalFocus2.key)
|
||||
.setPages(new ResearchPage("gadomancy.research_page.FAM_COOLDOWN_1.1"), new ResearchPage(RegisteredRecipes.recipesFamiliarAugmentation[4])).registerResearchItem();
|
||||
|
||||
//Warpy warpy
|
||||
ThaumcraftApi.addWarpToResearch(Gadomancy.MODID.toUpperCase() + ".FAM_ATTACK_3", 2);
|
||||
ThaumcraftApi.addWarpToResearch(Gadomancy.MODID.toUpperCase() + ".FAM_COOLDOWN_1", 3);
|
||||
ThaumcraftApi.addWarpToResearch(Gadomancy.MODID.toUpperCase() + ".NODE_MANIPULATOR", 4);
|
||||
ThaumcraftApi.addWarpToResearch(Gadomancy.MODID.toUpperCase() + ".GROWING_GROWTHCLUE", 3);
|
||||
ThaumcraftApi.addWarpToResearch(Gadomancy.MODID.toUpperCase() + ".FAMILIAR", 1);
|
||||
}
|
||||
|
||||
public static void postInit() {
|
||||
ResearchItem researchVoidJar = PseudoResearchItem.create("JARVOID", -2, 1).registerResearchItem();
|
||||
ResearchItem researchVoidJar = PseudoResearchItem.create("JARVOID", -3, -7).registerResearchItem();
|
||||
|
||||
researchStickyJar = new AlternatingResearchItem("STICKYJAR", -1, 1, 2,
|
||||
researchStickyJar = new AlternatingResearchItem("STICKYJAR", -5, -5, 2,
|
||||
new AspectList().add(Aspect.SLIME, 8).add(Aspect.EARTH, 8),
|
||||
RegisteredItems.getStickyJarStacks())
|
||||
.setParents(researchVoidJar.key).setConcealed()
|
||||
.setPages(new ResearchPage("gadomancy.research_page.STICKYJAR.1"), new ResearchPage(RegisteredRecipes.getVisualStickyJarRecipes())).registerResearchItem();
|
||||
|
||||
researchRemoteJar = new SimpleResearchItem("REMOTEJAR", -2, 2, 3,
|
||||
researchRemoteJar = new SimpleResearchItem("REMOTEJAR", -4, -3, 3,
|
||||
RegisteredRecipes.recipeRemoteJar.getRecipeOutput(),
|
||||
new AspectList().add(Aspect.WATER, 4).add(Aspect.MECHANISM, 8).add(Aspect.EARTH, 4).add(Aspect.ORDER, 8))
|
||||
.setParents(researchVoidJar.key).setConcealed()
|
||||
.setPages(new ResearchPage("gadomancy.research_page.REMOTEJAR.1"), new ResearchPage(RegisteredRecipes.recipeRemoteJar)).registerResearchItem();
|
||||
.setPages(new ResearchPage("gadomancy.research_page.REMOTEJAR.1"), new ResearchPage(RegisteredRecipes.recipeRemoteJar), new ResearchPage("gadomancy.research_page.REMOTEJAR.2")).registerResearchItem();
|
||||
}
|
||||
}
|
||||
@@ -27,14 +27,14 @@ public class PseudoResearchItem extends SimpleResearchItem {
|
||||
|
||||
private final ResearchItem original;
|
||||
|
||||
private PseudoResearchItem(ResearchItem original, String key, int col, int row, ResourceLocation icon) {
|
||||
super(PSEUDO_PREFIX + key, col, row, original.getComplexity(), icon, new AspectList());
|
||||
private PseudoResearchItem(ResearchItem original, String key, int col, int row, ResourceLocation icon, boolean doubleThisPage) {
|
||||
super(PSEUDO_PREFIX + key + (doubleThisPage ? ".2" : ""), col, row, original.getComplexity(), icon, new AspectList());
|
||||
this.original = original;
|
||||
setStub().setHidden();
|
||||
}
|
||||
|
||||
private PseudoResearchItem(ResearchItem original, String key, int col, int row, ItemStack icon) {
|
||||
super(PSEUDO_PREFIX + key, col, row, original.getComplexity(), icon, new AspectList());
|
||||
private PseudoResearchItem(ResearchItem original, String key, int col, int row, ItemStack icon, boolean doubleThisPage) {
|
||||
super(PSEUDO_PREFIX + key + (doubleThisPage ? ".2" : ""), col, row, original.getComplexity(), icon, new AspectList());
|
||||
this.original = original;
|
||||
setStub().setHidden();
|
||||
}
|
||||
@@ -67,15 +67,19 @@ public class PseudoResearchItem extends SimpleResearchItem {
|
||||
}
|
||||
|
||||
public static ResearchItem create(String original, int col, int row) {
|
||||
return create(original, col, row, false);
|
||||
}
|
||||
|
||||
public static ResearchItem create(String original, int col, int row, boolean doubleInThisPage) {
|
||||
ResearchItem item = ResearchCategories.getResearch(original);
|
||||
|
||||
if(item != null) {
|
||||
ResearchItem pseudo;
|
||||
|
||||
if(item.icon_resource == null) {
|
||||
pseudo = new PseudoResearchItem(item, item.key, col, row, item.icon_item);
|
||||
pseudo = new PseudoResearchItem(item, item.key, col, row, item.icon_item, doubleInThisPage);
|
||||
} else {
|
||||
pseudo = new PseudoResearchItem(item, item.key, col, row, item.icon_resource);
|
||||
pseudo = new PseudoResearchItem(item, item.key, col, row, item.icon_resource, doubleInThisPage);
|
||||
}
|
||||
|
||||
String[] siblings = item.siblings;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package makeo.gadomancy.common.utils;
|
||||
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileExtendedNode;
|
||||
import makeo.gadomancy.common.network.PacketHandler;
|
||||
@@ -9,9 +8,6 @@ import makeo.gadomancy.common.network.packets.PacketStartAnimation;
|
||||
import makeo.gadomancy.common.network.packets.PacketTCNodeBolt;
|
||||
import makeo.gadomancy.common.registration.RegisteredBlocks;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.SoundHandler;
|
||||
import net.minecraft.client.audio.SoundRegistry;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
@@ -87,7 +83,7 @@ public class ExplosionHelper {
|
||||
if(livingEntity instanceof EntityPlayer && ((EntityPlayer) livingEntity).capabilities.isCreativeMode) continue;
|
||||
if(world.rand.nextInt(16) != 0) continue;
|
||||
livingEntity.attackEntityFrom(DamageSource.magic, 4F);
|
||||
PacketTCNodeBolt packet = new PacketTCNodeBolt(x + 0.5F, y + 0.5F, z + 0.5F, (float) livingEntity.posX, (float) (livingEntity.posY + livingEntity.height), (float) livingEntity.posZ);
|
||||
PacketTCNodeBolt packet = new PacketTCNodeBolt(x + 0.5F, y + 0.5F, z + 0.5F, (float) livingEntity.posX, (float) (livingEntity.posY + livingEntity.height), (float) livingEntity.posZ, 0, false);
|
||||
PacketHandler.INSTANCE.sendToAllAround(packet, new NetworkRegistry.TargetPoint(world.provider.dimensionId, x, y, z, 32.0D));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package makeo.gadomancy.common.utils;
|
||||
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.api.GadomancyApi;
|
||||
import makeo.gadomancy.api.golems.AdditionalGolemType;
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.common.entities.golems.types.RemovedGolemType;
|
||||
import net.minecraftforge.common.util.EnumHelper;
|
||||
import thaumcraft.common.entities.golems.EnumGolemType;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package makeo.gadomancy.common.utils;
|
||||
|
||||
import makeo.gadomancy.common.node.ExtendedNodeType;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileExtendedNode;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileExtendedNodeJar;
|
||||
import makeo.gadomancy.common.node.ExtendedNodeType;
|
||||
import makeo.gadomancy.common.registration.RegisteredBlocks;
|
||||
import makeo.gadomancy.common.registration.RegisteredIntegrations;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package makeo.gadomancy.common.utils;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
package makeo.gadomancy.common.utils;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.WorldProvider;
|
||||
import net.minecraft.world.biome.WorldChunkManagerHell;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import thaumcraft.common.config.Config;
|
||||
import thaumcraft.common.lib.world.ThaumcraftWorldGenerator;
|
||||
import thaumcraft.common.lib.world.dim.ChunkProviderOuter;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
* Gadomancy is Open Source and distributed under the
|
||||
* GNU LESSER GENERAL PUBLIC LICENSE
|
||||
* for more read the LICENSE file
|
||||
* <p/>
|
||||
* Created by HellFirePvP @ 03.11.2015 19:02
|
||||
*/
|
||||
public class WorldProviderTCEldrich extends WorldProvider {
|
||||
|
||||
@Override
|
||||
public String getDimensionName() {
|
||||
return "Outer Lands";
|
||||
}
|
||||
|
||||
public String getWelcomeMessage() {
|
||||
return "Entering The Outer Lands";
|
||||
}
|
||||
|
||||
public String getDepartMessage() {
|
||||
return "Leaving The Outer Lands";
|
||||
}
|
||||
|
||||
public boolean shouldMapSpin(String entity, double x, double y, double z) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean canBlockFreeze(int x, int y, int z, boolean byWater) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean canSnowAt(int x, int y, int z, boolean checkLight) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean canDoLightning(Chunk chunk) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean canDoRainSnowIce(Chunk chunk) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void registerWorldChunkManager() {
|
||||
this.worldChunkMgr = new WorldChunkManagerHell(ThaumcraftWorldGenerator.biomeEldritchLands, 0.0F);
|
||||
this.dimensionId = Config.dimensionOuterId;
|
||||
this.hasNoSky = true;
|
||||
}
|
||||
|
||||
public IChunkProvider createChunkGenerator() {
|
||||
return new ChunkProviderOuter(this.worldObj, this.worldObj.getSeed(), true);
|
||||
}
|
||||
|
||||
public float calculateCelestialAngle(long p_76563_1_, float p_76563_3_) {
|
||||
return 0.0F;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float[] calcSunriseSunsetColors(float p_76560_1_, float p_76560_2_) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Vec3 getFogColor(float p_76562_1_, float p_76562_2_) {
|
||||
int i = 10518688;
|
||||
float f2 = MathHelper.cos(p_76562_1_ * 3.141593F * 2.0F) * 2.0F + 0.5F;
|
||||
if (f2 < 0.0F) {
|
||||
f2 = 0.0F;
|
||||
}
|
||||
if (f2 > 1.0F) {
|
||||
f2 = 1.0F;
|
||||
}
|
||||
float f3 = (i >> 16 & 0xFF) / 255.0F;
|
||||
float f4 = (i >> 8 & 0xFF) / 255.0F;
|
||||
float f5 = (i & 0xFF) / 255.0F;
|
||||
f3 *= (f2 * 0.0F + 0.15F);
|
||||
f4 *= (f2 * 0.0F + 0.15F);
|
||||
f5 *= (f2 * 0.0F + 0.15F);
|
||||
return Vec3.createVectorHelper(f3, f4, f5);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isSkyColored() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean canRespawnHere() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isSurfaceWorld() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getCloudHeight() {
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
public boolean canCoordinateBeSpawn(int p_76566_1_, int p_76566_2_) {
|
||||
return this.worldObj.getTopBlock(p_76566_1_, p_76566_2_).getMaterial().blocksMovement();
|
||||
}
|
||||
|
||||
public ChunkCoordinates getEntrancePortalLocation() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public int getAverageGroundLevel() {
|
||||
return 50;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean doesXZShowFog(int p_76568_1_, int p_76568_2_) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -6,10 +6,15 @@ public net.minecraft.server.management.ItemInWorldManager field_73087_g #partial
|
||||
public net.minecraft.server.management.ItemInWorldManager field_73099_h #partiallyDestroyedBlockZ
|
||||
public net.minecraft.entity.ai.EntityAITasks field_75781_c #theProfiler
|
||||
public-f net.minecraft.entity.EntityLiving field_70714_bg #tasks
|
||||
public-f net.minecraft.entity.EntityLiving field_70715_bh #targetTasks
|
||||
public net.minecraft.entity.Entity field_70152_a #nextEntityID
|
||||
public net.minecraft.client.renderer.entity.RendererLivingEntity field_77045_g #mainModel
|
||||
public-f net.minecraft.item.ItemBlock field_150939_a #field_150939_a
|
||||
public net.minecraft.util.RegistryNamespaced field_148759_a #underlyingIntegerMap
|
||||
public net.minecraft.util.ObjectIntIdentityMap field_148749_a #field_148749_a
|
||||
public net.minecraft.util.ObjectIntIdentityMap field_148748_b #field_148748_b
|
||||
public net.minecraft.util.RegistryNamespaced field_148758_b #field_148758_b
|
||||
public net.minecraft.util.RegistryNamespaced field_148758_b #field_148758_b
|
||||
public net.minecraft.entity.ai.EntityAIFollowOwner field_75336_f #field_75336_f
|
||||
public net.minecraft.entity.ai.EntityLookHelper *
|
||||
public net.minecraft.entity.EntityLiving field_70749_g #lookHelper
|
||||
public-f net.minecraft.potion.Potion field_76425_a #potionTypes
|
||||
@@ -1,69 +1,101 @@
|
||||
item.ItemGolemPlacer.silverwood.name=Silverwood Golem
|
||||
item.ItemTransformationFocus.name=[WIP] Wand Focus: Transformation
|
||||
item.ItemFamiliar.name=Ethereal Familiar
|
||||
|
||||
itemGroup.gadomancy=Gadomancy
|
||||
tc.research_category.gadomancy=Gadomancy
|
||||
|
||||
tc.research_name.GADOMANCY.GOLEMSILVERWOOD=Silverwood Golems
|
||||
tc.research_text.GADOMANCY.GOLEMSILVERWOOD=Not a part of golemancy...
|
||||
gadomancy.research_page.GOLEMSILVERWOOD.1=Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
|
||||
tc.research_text.GADOMANCY.GOLEMSILVERWOOD=Just a dash of Chemical X
|
||||
gadomancy.research_page.GOLEMSILVERWOOD.1=This golem is carved from a silverwood log. The extra magical affinities of silverwood allow this golem to hold more upgrades.<BR>§l§nSilverwood Golem Attributes§r<BR>§lDurability:§r Average<BR>§lStrength:§r Low<BR>§lSelf-repair:§r Average<BR>§lCarry Limit:§r 8<BR>§lSpeed:§r Fast<BR>§lUpgrades:§r 3
|
||||
|
||||
tc.research_name.GADOMANCY.GOLEMRUNICSHIELD=Golemic Shielding
|
||||
tc.research_text.GADOMANCY.GOLEMRUNICSHIELD=Now available to your tiny friends!
|
||||
gadomancy.research_page.GOLEMRUNICSHIELD.1=Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
|
||||
gadomancy.research_page.GOLEMRUNICSHIELD.1=Furthering your research into protective magic, you have discovered a way to apply runic shielding to your Golems.<BR>In the same way you yourself are protected, golems will be protected by a barrier of magical energy that wards out most types of damage until the pool of extra hit points is depleted.<BR>Does not protect against drowning and certain other environmental hazards.
|
||||
|
||||
tc.research_name.GADOMANCY.STICKYJAR=Sticky Jars
|
||||
tc.research_text.GADOMANCY.STICKYJAR=Why not rotate your jars?
|
||||
gadomancy.research_page.STICKYJAR.1=Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
|
||||
tc.research_text.GADOMANCY.STICKYJAR=Stick 'em up!
|
||||
gadomancy.research_page.STICKYJAR.1=Warded jars are any thaumaturge's bread and butter; however, they can be a bit difficult to arrange when large tangles of essentia tubes get involved. You decided to alleviate this minor difficulty by applying some adhesive to the bottom of the jar. Any jar that has had its base coated will stick to any surface it is placed on, even facing sideways or upside down. Breaking the jar does not remove the adhesive, allowing sticky jars to be reused. Also, many other types of essentia containing jars other than basic warded jars can accept this alteration.
|
||||
|
||||
tc.research_name.GADOMANCY.ARCANEDROPPER=Arcane Dropper
|
||||
tc.research_text.GADOMANCY.ARCANEDROPPER=Steves ripoff
|
||||
gadomancy.research_page.ARCANEDROPPER.1=Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
|
||||
tc.research_text.GADOMANCY.ARCANEDROPPER=When the pimps in the crib, ma
|
||||
gadomancy.research_page.ARCANEDROPPER.1=After thinking a lot about the properties of the dropper, and how those properties can be extended, you have made a series of modifications to the dropper.<LINE>The Arcane Dropper gives you the ability to extract, insert, and monitor items in a 3x3 area as if they were in an inventory.<BR>To see this area of effect, hover over the Arcane Dropper with a wand (without focus).<BR>Only the flat sides of the Arcane Dropper can be interacted with.
|
||||
|
||||
tc.research_name.GADOMANCY.GOLEMCOREBREAK=Golem Core: Break
|
||||
tc.research_text.GADOMANCY.GOLEMCOREBREAK=Bone-breaking news!
|
||||
gadomancy.research_page.GOLEMCOREBREAK.1=Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
|
||||
tc.research_text.GADOMANCY.GOLEMCOREBREAK=Breaking news!
|
||||
gadomancy.research_page.GOLEMCOREBREAK.1=Golems fitted with this core will monitor and break blocks specified by you.<BR>You may specify a tool for the golem to use in its inventory.<BR>You can add a block to the golem's inventory to specify which blocks will be broken. Breaking speed depends on tool strength and speed.<BR>You can apply the Order Upgrade to specify which tool needs to be used on the associated marked block.<BR>You can apply the Etropy Upgrade to ignore metadata on tools.
|
||||
|
||||
tc.research_name.GADOMANCY.GOLEMCOREBODYGUARD=Golem Core: Bodyguard
|
||||
tc.research_text.GADOMANCY.GOLEMCOREBODYGUARD=One does not simply attack my Master
|
||||
gadomancy.research_page.GOLEMCOREBODYGUARD.1=Guard Golems are all good and fine, but even with upgrades, they still don't understand how to protect their master specifically. Adding a few modifications to a Golem Core: Guard easily remedies this issue. A golem equipped with the Golem Core: Bodyguard will be smart enough to follow its master around in a manner similar to that of a tamed wolf.
|
||||
|
||||
tc.research_name.GADOMANCY.INFUSIONCLAW=Automated Infusion
|
||||
tc.research_text.GADOMANCY.INFUSIONCLAW=Floating stuff!
|
||||
gadomancy.research_page.INFUSIONCLAW.1=Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
|
||||
gadomancy.research_page.INFUSIONCLAW.1=Considering there are many situations in which you would like to be able to automate an Infusion Altar without being so close, you've been fooling with the Wand Recharge Pedestal, trying to get it to do things for you. It's slightly sentient and somehow bound to your soul, but it seems to work well! Your eye has been twitching a bit recently though... i'm sure it will be fine.
|
||||
gadomancy.research_page.INFUSIONCLAW.2=Place this device atop your Infusion Matrix and insert a wand or staff. They can be inserted and extracted from the top side. With the checkbox marked, only empty wands can be extracted. This process adds instability to any infusions triggered with the Infusion Claw. The amount of instability depends on how good the wand you use is. Staffs are a bit more stable, but the main factor is the amount of storage a wand has.<BR>You can trigger infusions with a redstone signal into one of the four sides.<BR>This device can also be used to automate production of Thaumonomicons and Crucibles, making your dream of a Thaumonomicon and Crucible factory possible!
|
||||
|
||||
tc.research_name.GADOMANCY.REMOTEJAR=Mirrored Jars
|
||||
tc.research_text.GADOMANCY.REMOTEJAR=Mirrored transportation
|
||||
gadomancy.research_page.REMOTEJAR.1=Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
|
||||
gadomancy.research_page.REMOTEJAR.1=The essentia mirror is excellent for moving essentia around for infusions, but you have the uncanny feeling that it has some untapped potential. Two essentia mirrors, when linked, effectively allow essentia to move between two points in space. By placing an essentia mirror inside of a specially altered warded jar, the space inside of one jar can be effectively linked to another. In order to link two jars, simply place one in the world and right click it with another mirrored jar.
|
||||
gadomancy.research_page.REMOTEJAR.2=If a network already exists, then the jar will be added to the current network. Unlike essentia mirrors, mirrored jar networks can have more than two jars. The space inside of a network is shared and balanced between the jars it contains. To put it simply, a two jar network will hold two jars of essentia, a three jar network will hold three, etc. Also, when one mirrored jar is filled, it will attempt to evenly distribute its contents between the other jars in its network.
|
||||
|
||||
tc.research_name.GADOMANCY.FAMILIAR=Ethereal Familiar
|
||||
tc.research_text.GADOMANCY.FAMILIAR=A arcane follower
|
||||
gadomancy.research_page.FAMILIAR.1=Thanks to your deep research into Wisps and arcane flames you call 'Nitor' you think you may be able to create a being just like the Wisp. Using the same Ethereal Essence and Essentia you are able to define the base aspect of your Familiar. But that's not enough! You might be able to direct its movements and actions to defend yourself with it. However, making it attack players doesn't seem so easy and it seems a bit weak too.. Let's do something about that when the time comes...
|
||||
|
||||
tc.research_name.GADOMANCY.FAM_ATTACK_1=Attack Enhancement
|
||||
tc.research_text.GADOMANCY.FAM_ATTACK_1=Increasing the damage
|
||||
gadomancy.research_page.FAM_ATTACK_1.1=By concentrating more magic into the wisp, its attack power is effectively doubled.
|
||||
|
||||
tc.research_name.GADOMANCY.FAM_ATTACK_2=Further Attack Enhancement
|
||||
tc.research_text.GADOMANCY.FAM_ATTACK_2=What does the scouter say about its power level?
|
||||
gadomancy.research_page.FAM_ATTACK_2.1=By adding eldritch energies and further concentrating the wisps internal magic, an even further doubling can be achieved. You occasionally hear strange whispering coming from the familiar, but the sound is so quiet that you don't think it will be an issue.
|
||||
|
||||
tc.research_name.GADOMANCY.FAM_ATTACK_3=Maximized Damage
|
||||
tc.research_text.GADOMANCY.FAM_ATTACK_3=ITS OVER 9000!
|
||||
gadomancy.research_page.FAM_ATTACK_3.1=After observing the primordial pearl for some time, you think you can find a way to use it to enhance the familiar even further. By infusing the resonating energies of the pearl with the familiar, you found a way to double its power. The nearly inaudible whispering has become far more pronounced, leaving you with an uneasy feeling...
|
||||
|
||||
tc.research_name.GADOMANCY.FAM_RANGE_1=Range Enhancement
|
||||
tc.research_text.GADOMANCY.FAM_RANGE_1=Attacking even further
|
||||
gadomancy.research_page.FAM_RANGE_1.1=By enhancing the wisps sensitivity to external influence, you can slightly increasing its range.
|
||||
|
||||
tc.research_name.GADOMANCY.FAM_COOLDOWN_1=Attack-Speed Enhancement
|
||||
tc.research_text.GADOMANCY.FAM_COOLDOWN_1=A scientific Railgun
|
||||
gadomancy.research_page.FAM_COOLDOWN_1.1=The resonance of the primordial pearl has proven useful in more than one way. Combining the pearl and a primal wand focus with the wisp seems to change its frequencies drastically. The enhanced wisp attacks twice as fast as before.
|
||||
|
||||
tc.research_name.GADOMANCY.NODE_MANIPULATOR=Node Manipulator
|
||||
tc.research_text.GADOMANCY.NODE_MANIPULATOR=Almost like roulette
|
||||
gadomancy.research_page.NODE_MANIPULATOR.1=By infusing your ordinary Wand Recharge Pedestal with the stabilizing factors of a Node Stabilizer and the Paving Stone of Warding along with some of the most ancient ingredients that share the highest affinity when it comes to channeling Vis in its most pure form, one of the most dangerous machines fell into your possession: The Node Manipulator. A machine so capable of changing the way an aura node transports Vis from their end to our end.
|
||||
gadomancy.research_page.NODE_MANIPULATOR.3=This doesn't seem to be enough though. Even by adding one of your newest inventions, the Void Seeds, to it, it doesn't seem to be capable of holding the Node in position... You figured out that a focus, enhanced by Void Metal, might be strong enough to keep it in position. <LINE>Still the machine isn't capable of modifying a node on its own. Placing some manipulation pillars near the machine should help fixing that issue.
|
||||
gadomancy.research_page.NODE_MANIPULATOR.1=After infusing your ordinary Wand Recharge Pedestal with a Node Stabilizer, the Paving Stone of Warding, and some ancient ingredients adept at channeling Vis in its most pure form, one of the most dangerous machines you could fathom fell into your possession: The Node Manipulator. A machine that is capable of changing the way an aura node channels Vis from the other realms.
|
||||
gadomancy.research_page.NODE_MANIPULATOR.3=This doesn't seem to be enough though. Even by adding the mysterious and ancient Void Seeds, it doesn't seem to be capable of holding a Node in position...<BR>You figure that a new focus, enhanced by Void Metal, might be strong enough to keep it in position. <LINE>Still, the machine isn't capable of modifying a node on its own. Placing some manipulation pillars in a specific arrangement around the machine may help..
|
||||
gadomancy.research_page.NODE_MANIPULATOR.6=This machine doesn't work for free obviously. Once there is a node above the Node Manipulator and the pillars are formed, you need to place a wand or a staff into the Manipulator and it will drain the Vis from the wand into the manipulator. Once at least 70 of each Vis is stored, the Manipulator starts manipulating the node. However, you can store more than 70 Vis in the Manipulator. The more the better maybe...? <LINE>You don't know the possible outcomes yet, but you should at least try it a few times.. What could possibly go wrong?
|
||||
|
||||
tc.research_name.GADOMANCY.GROWING=Growing Nodes
|
||||
tc.research_text.GADOMANCY.GROWING=Hungry Nodes v2.0
|
||||
gadomancy.research_page.GROWING.1=This node is something... different. <BR>You did expect an Energized Node to be the only stable connection between us and the source of all Vis, but this Aura Node seems very stable too. Energizing an Aura Node channels Vis from its source to our end and breaks it down to the purest primal Aspects. <BR>But... this node behaves so different from the other nodes. It seems to search for something... It seems... restless...
|
||||
gadomancy.research_page.GROWING.2=What is it searching for? Judging from my knowledge so far it can be compared to a hungry Aura Node, but still... You should really keep a close eye on this new type of nodes.
|
||||
tc.research_text.GADOMANCY.GROWING=Feed me Semour
|
||||
gadomancy.research_page.GROWING.1=This node is something... different. <BR>You did expect an Energized Node to be the only stable connection between us and the source of all Vis, but this Aura Node seems very stable too. Energizing an Aura Node channels Vis from its source to our end and breaks it down to the purest primal Aspects. <BR>But... this node behaves much differently from the others. It feels like it's looking for something... it seems... restless...
|
||||
gadomancy.research_page.GROWING.2=What could it be searching for? Judging from what I know so far it is similar to a hungry Aura Node, but there is just something about it that is very disconcerting.
|
||||
|
||||
tc.research_name.GADOMANCY.GROWING_AGGRESSION=Aggressive Behavior
|
||||
tc.research_text.GADOMANCY.GROWING_AGGRESSION=Taking a step back
|
||||
gadomancy.research_page.GROWING_AGGRESSION.1=Interesting... This node just released a lightning.. Why does this happen? <BR>It may be a large amount of Vis flowing through the Aura Node and erupting as huge amount of energy in form of a lightning. It seems to be attracted by living things. <BR>Maybe i should keep a safe distance from the node while researching.
|
||||
tc.research_text.GADOMANCY.GROWING_AGGRESSION=Someone call Tesla
|
||||
gadomancy.research_page.GROWING_AGGRESSION.1=Terrifyingly, the Node released a huge lightning bolt. What could have caused this?<BR>It may be the large amount of Vis flowing through the Aura Node and being released as electrical energy. It seems to be attracted to living things.<BR>I should probably stand back a bit while researching, that was a close call.
|
||||
|
||||
tc.research_name.GADOMANCY.GROWING_GROWTH=Growing Behavior
|
||||
tc.research_text.GADOMANCY.GROWING_GROWTH=A picky one.
|
||||
gadomancy.research_page.GROWING_GROWTH.1=I was right! The node has similarities to a hungry node! It grew bigger than before! <BR>But it looks light the node only attracts things that contains Vis in its purest form. So the node should attract things like Wisps or Ethereal Essence. <LINE>Hmm... As far as my research goes, it seems that the more pure the aspect is, the more likely it will fuse with the node. It seems that the node attracts Aspect Orbs and Wisps the most as they are the most pure.
|
||||
gadomancy.research_page.GROWING_GROWTH.2=Materialized or solid vis in forms of essentia like Mana Beans, Ethereal Essence or Crystallized Essentia may work too, but may have bad outcome in the end... <BR>Still it is by far more fascinating than a hungry node. In contrast to its hungry brother, this node seems to keep the complexity of its gained compound aspects instead of breaking them down to primal aspects. After all it does seem that this node does not like primal aspects at all..?
|
||||
gadomancy.research_page.GROWING_GROWTH.1=I was right! The node has similarities to a hungry node! It has grown! <BR>The big difference is this node only seems to attract things containing pure Vis, things such as Wisps or Ethereal Essence. <LINE>As far as my research goes, it seems that the more pure the aspect is, the more likely it will fuse with the node. Aspect Orbs and Wisps are absorbed most because they are the most pure.
|
||||
gadomancy.research_page.GROWING_GROWTH.2=Materialized or solid vis in forms of essentia like Mana Beans, Ethereal Essence, or Crystallized Essentia may work too, but I should be careful with what I throw in this thing...<BR>Still it is more fascinating than a hungry node by far. In contrast to its hungry brother, this node seems to keep the complexity of its gained compound aspects instead of breaking them down to primal aspects. It seems to have something against primal aspects...
|
||||
|
||||
tc.research_name.GADOMANCY.GROWING_ATTACK=Destroying Behavior
|
||||
tc.research_text.GADOMANCY.GROWING_ATTACK=Stop bullying!
|
||||
gadomancy.research_page.GROWING_ATTACK.1=Whoa, what an interesting sight! It seems the growing node does not only bully the other nodes as we know it - it's more like completely destroying the other node. If the growing node can find another node within range it attacks it and breaks the other node into little Aspect orbs. <BR>Further research shows that the node stabilizers cannot stop the growing node from destroying other nodes. But it seems like the growing node does not attack bigger nodes than themselves.
|
||||
gadomancy.research_page.GROWING_ATTACK.1=Whoa, what an interesting sight! It seems the growing node does not only bully the other nodes as we know it - it completely destroys them! If the growing node can find another node within range it attacks it and breaks the other node into little Aspect orbs. <BR>Further research shows that the node stabilizers cannot stop the growing node from destroying other nodes, but the growing node does not seem to attack bigger nodes than itself.
|
||||
|
||||
tc.research_name.GADOMANCY.GROWING_GROWTHCLUE=Secrets of growth
|
||||
tc.research_text.GADOMANCY.GROWING_GROWTHCLUE=Growing explained
|
||||
gadomancy.research_page.GROWING_GROWTHCLUE.1=This is it! I think i solved the puzzle of the growth and dangers of a growing node! <LINE>It looks so simple: Just don't feed it the same aspects. That's what our node hates. It just wants variety and new aspects. If you feed it the same over and over it gets angry and stops growing if its too saturated. It only accepts pure aspects though. Ethereal Essence, Crystallized Essence and Mana beans are weak forms of materialized Vis. It seems the node doesn't like that...
|
||||
gadomancy.research_page.GROWING_GROWTHCLUE.2=In contrast to that it seems that it really likes Wisps or Aspect Orbs. Still one of the best and most expensive things might be offering other Aura Nodes to the growing node... <LINE>But there are high risks too. The more saturated the node gets, the harder and more often the node does attack its surroundings. I wonder what happens once the node is fully saturated..?
|
||||
gadomancy.research_page.GROWING_GROWTHCLUE.1=This is it! I think I've figured out the growth and potential dangers of a growing node! <LINE>It looks so simple now: Just don't feed it the same aspects. That's what our node hates. It just wants variety and new aspects. If you feed it the same over and over it gets angry and stops growing due to becoming over saturated.<BR>It only accepts pure aspects though. Ethereal Essence, Crystallized Essence, and Mana beans are weak forms of materialized Vis. The node doesn't seem like that...
|
||||
gadomancy.research_page.GROWING_GROWTHCLUE.2=In contrast to that it really likes Wisps and Aspect Orbs. Although, one of the best things might be offering other Aura Nodes to the growing node... Expensive though.<LINE>There are high risks too. The more saturated the node gets, the harder and more often the node attacks its surroundings. I wonder what happens when the node is fully saturated?
|
||||
|
||||
gadomancy.golemblurb.default=??
|
||||
gadomancy.golemblurb.breakcore=Master, should I break everything, or something specific?
|
||||
gadomancy.golem.breakcore=Break
|
||||
gadomancy.golem.bodyguardcore=Bodyguard
|
||||
|
||||
gadomancy.upgrades.runicshield=Runic Shield
|
||||
|
||||
@@ -78,6 +110,7 @@ tile.BlockNode.name=Aura Node
|
||||
tile.BlockExtendedNodeJar.name=Node in a Jar
|
||||
tile.BlockNodeManipulator.5.name=Node Manipulator
|
||||
tile.BlockStoneMachine.0.name=Randomization Focus
|
||||
tile.BlockStoneMachine.1.name=Ancient Pedestal
|
||||
tile.BlockStoneMachine.11.name=Manipulation Pillar
|
||||
tile.BlockStoneMachine.15.name=Manipulation Pillar
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 585 B |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 167 KiB |
@@ -7,8 +7,8 @@
|
||||
"mcversion": "${mcversion}",
|
||||
"url": "",
|
||||
"updateUrl": "",
|
||||
"authorList": ["makeo"],
|
||||
"credits": "To makeo for making this mod",
|
||||
"authorList": ["makeo", "HellFirePvP"],
|
||||
"credits": "To HellFirePvP and makeo for making this mod",
|
||||
"logoFile": "",
|
||||
"screenshots": [],
|
||||
"dependencies": ["Thaumcraft"]
|
||||
|
||||