From 97476abb2b3c661d0b6803a5c73c0b835a69a7e1 Mon Sep 17 00:00:00 2001 From: HellFirePvP Date: Fri, 22 Apr 2016 19:19:12 +0200 Subject: [PATCH] - Fixxes and such --- .../gadomancy/client/events/ResourceReloadListener.java | 1 + .../gadomancy/client/util/MultiTickEffectDispatcher.java | 2 ++ .../gadomancy/common/blocks/BlockKnowledgeBook.java | 9 ++++++--- .../gadomancy/common/crafting/InfusionDisguiseArmor.java | 2 -- .../gadomancy/common/events/EventHandlerEntity.java | 4 ++-- .../gadomancy/common/registration/RegisteredRecipes.java | 6 +++--- .../gadomancy/common/utils/SimpleResourceLocation.java | 2 ++ .../assets/gadomancy/textures/fx/flow_large.mcmeta | 6 ------ .../assets/gadomancy/textures/fx/flow_large.png.mcmeta | 1 + 9 files changed, 17 insertions(+), 16 deletions(-) delete mode 100644 src/main/resources/assets/gadomancy/textures/fx/flow_large.mcmeta create mode 100644 src/main/resources/assets/gadomancy/textures/fx/flow_large.png.mcmeta diff --git a/src/main/java/makeo/gadomancy/client/events/ResourceReloadListener.java b/src/main/java/makeo/gadomancy/client/events/ResourceReloadListener.java index 9e5e3d3..48218e4 100644 --- a/src/main/java/makeo/gadomancy/client/events/ResourceReloadListener.java +++ b/src/main/java/makeo/gadomancy/client/events/ResourceReloadListener.java @@ -23,6 +23,7 @@ import java.util.Map; * Created by makeo @ 03.10.2015 12:09 */ public class ResourceReloadListener implements IResourceManagerReloadListener { + public static final ResourceReloadListener instance = new ResourceReloadListener(); public static ResourceReloadListener getInstance() { return instance; diff --git a/src/main/java/makeo/gadomancy/client/util/MultiTickEffectDispatcher.java b/src/main/java/makeo/gadomancy/client/util/MultiTickEffectDispatcher.java index 31a2d6e..2726dc1 100644 --- a/src/main/java/makeo/gadomancy/client/util/MultiTickEffectDispatcher.java +++ b/src/main/java/makeo/gadomancy/client/util/MultiTickEffectDispatcher.java @@ -2,6 +2,7 @@ package makeo.gadomancy.client.util; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.Tessellator; import net.minecraft.world.World; import thaumcraft.client.fx.ParticleEngine; import thaumcraft.client.fx.particles.FXBubble; @@ -66,6 +67,7 @@ public class MultiTickEffectDispatcher { } private static void handleWispyLineEffects(World currentRenderWorld, float partialTicks) { + Tessellator tessellator; Iterator it = floatyLineInfos.iterator(); while(it.hasNext()) { FloatyLineInfo info = it.next(); diff --git a/src/main/java/makeo/gadomancy/common/blocks/BlockKnowledgeBook.java b/src/main/java/makeo/gadomancy/common/blocks/BlockKnowledgeBook.java index cb5bbae..9d62053 100644 --- a/src/main/java/makeo/gadomancy/common/blocks/BlockKnowledgeBook.java +++ b/src/main/java/makeo/gadomancy/common/blocks/BlockKnowledgeBook.java @@ -18,6 +18,7 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import thaumcraft.common.Thaumcraft; import thaumcraft.common.config.ConfigBlocks; +import thaumcraft.common.config.ConfigItems; import java.util.ArrayList; @@ -33,7 +34,7 @@ public class BlockKnowledgeBook extends BlockContainer implements IBlockTranspar public BlockKnowledgeBook() { super(Material.circuits); - setBlockBounds(0.0625F, 0.1875F, 0.0625F, 0.9375F, 0.75F, 0.9375F); + setBlockBounds(0.0625F, 0.125F, 0.0625F, 0.9375F, 0.5F, 0.9375F); setCreativeTab(RegisteredItems.creativeTab); } @@ -55,14 +56,16 @@ public class BlockKnowledgeBook extends BlockContainer implements IBlockTranspar @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) { - if(world.isRemote) { + ItemStack thaumonomicon = new ItemStack(ConfigItems.itemThaumonomicon); + ConfigItems.itemThaumonomicon.onItemRightClick(thaumonomicon, world, player); + /*if(world.isRemote) { try { player.openGui(Thaumcraft.instance, 12, world, x, y, z); Minecraft.getMinecraft().theWorld.playSound(Minecraft.getMinecraft().thePlayer.posX, Minecraft.getMinecraft().thePlayer.posY, Minecraft.getMinecraft().thePlayer.posZ, "thaumcraft:page", 0.66F, 1.0F, false); } catch (Throwable tr) { Gadomancy.log.warn("Error on opening Thaumcraft Thaumonomicon via KnowledgeBook at world " + world.getWorldInfo().getWorldName() + ", x=" + x + ", y=" + y + ", z=" + z); } - } + }*/ return true; } diff --git a/src/main/java/makeo/gadomancy/common/crafting/InfusionDisguiseArmor.java b/src/main/java/makeo/gadomancy/common/crafting/InfusionDisguiseArmor.java index 7278a30..04bfbd0 100644 --- a/src/main/java/makeo/gadomancy/common/crafting/InfusionDisguiseArmor.java +++ b/src/main/java/makeo/gadomancy/common/crafting/InfusionDisguiseArmor.java @@ -1,12 +1,10 @@ package makeo.gadomancy.common.crafting; -import makeo.gadomancy.common.registration.RegisteredItems; import makeo.gadomancy.common.research.SimpleResearchItem; import makeo.gadomancy.common.utils.NBTHelper; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; -import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; diff --git a/src/main/java/makeo/gadomancy/common/events/EventHandlerEntity.java b/src/main/java/makeo/gadomancy/common/events/EventHandlerEntity.java index 25bded9..477c1c9 100644 --- a/src/main/java/makeo/gadomancy/common/events/EventHandlerEntity.java +++ b/src/main/java/makeo/gadomancy/common/events/EventHandlerEntity.java @@ -73,12 +73,12 @@ public class EventHandlerEntity { } } - @SubscribeEvent + /*@SubscribeEvent public void on(LivingSetAttackTargetEvent targetEvent) { if (targetEvent.target instanceof EntityPlayer) { FamiliarAIController_Old.notifyTargetEvent(targetEvent.entityLiving, (EntityPlayer) targetEvent.target); } - } + }*/ @SubscribeEvent public void on(LivingDeathEvent event) { diff --git a/src/main/java/makeo/gadomancy/common/registration/RegisteredRecipes.java b/src/main/java/makeo/gadomancy/common/registration/RegisteredRecipes.java index 6bd9a1f..413d35e 100644 --- a/src/main/java/makeo/gadomancy/common/registration/RegisteredRecipes.java +++ b/src/main/java/makeo/gadomancy/common/registration/RegisteredRecipes.java @@ -93,7 +93,7 @@ public class RegisteredRecipes { 7, new AspectList().add(Aspect.MOTION, 16).add(Aspect.MAGIC, 16).add(Aspect.MAN, 16).add(Aspect.SENSES, 16), new ItemStack(ConfigBlocks.blockMagicalLog, 1, 1), new ItemStack[]{ new ItemStack(ConfigItems.itemResource, 1, 15), new ItemStack(ConfigItems.itemResource, 1, 14), new ItemStack(ConfigItems.itemResource, 1, 9), new ItemStack(ConfigItems.itemResource, 1, 3), new ItemStack(ConfigItems.itemResource, 1, 14), new ItemStack(ConfigItems.itemResource, 1, 9), new ItemStack(ConfigItems.itemResource, 1, 3)}); - recipesGolemRunicShield = InfusionUpgradeRecipe.createRecipes(SimpleResearchItem.getFullName("GOLEMSILVERWOOD"), RegisteredGolemStuff.upgradeRunicShield, 5, + recipesGolemRunicShield = InfusionUpgradeRecipe.createRecipes(SimpleResearchItem.getFullName("GOLEMRUNICSHIELD"), RegisteredGolemStuff.upgradeRunicShield, 5, new AspectList().add(Aspect.MAGIC, 16).add(Aspect.ENERGY, 16).add(Aspect.ARMOR, 8).add(Aspect.AURA, 4), new ItemStack[]{new ItemStack(ConfigItems.itemGirdleRunic, 1, 0), new ItemStack(ConfigItems.itemResource, 1, 14), new ItemStack(ConfigItems.itemResource, 1, 14)}); ThaumcraftApi.getCraftingRecipes().addAll(Arrays.asList(recipesGolemRunicShield)); @@ -109,7 +109,7 @@ public class RegisteredRecipes { 3, new AspectList().add(Aspect.ENTROPY, 16).add(Aspect.TOOL, 24).add(Aspect.MECHANISM, 16), new ItemStack(ConfigItems.itemGolemCore, 1, 3), new ItemStack[] {new ItemStack(ConfigItems.itemShovelElemental), new ItemStack(ConfigItems.itemPickElemental), new ItemStack(ConfigItems.itemAxeElemental)}); - recipeInfusionClaw = ThaumcraftApi.addInfusionCraftingRecipe(SimpleResearchItem.getFullName("GOLEMCOREBREAK"), + recipeInfusionClaw = ThaumcraftApi.addInfusionCraftingRecipe(SimpleResearchItem.getFullName("INFUSIONCLAW"), new ItemStack(RegisteredBlocks.blockInfusionClaw), 10, new AspectList().add(Aspect.ELDRITCH, 25).add(Aspect.MECHANISM, 20).add(Aspect.MAGIC, 16).add(Aspect.ORDER, 20).add(Aspect.DARKNESS, 12), new ItemStack(ConfigBlocks.blockStoneDevice, 1, 5), new ItemStack[]{new ItemStack(ConfigItems.itemFocusPrimal), /*new ItemStack(Items.redstone),*/ new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 6), new ItemStack(ConfigItems.itemGolemCore, 1, 8), new ItemStack(ConfigItems.itemResource, 1, 16), new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 6), new ItemStack(ConfigItems.itemResource, 1, 15), /*new ItemStack(Items.redstone),*/ new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 6), new ItemStack(ConfigItems.itemZombieBrain), new ItemStack(ConfigItems.itemResource, 1, 16), new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 6)}); @@ -247,7 +247,7 @@ public class RegisteredRecipes { ThaumcraftApi.getCraftingRecipes().add(new InfusionDisguiseArmor()); - recipeRevealer = ThaumcraftApi.addInfusionEnchantmentRecipe("", RegisteredEnchantments.revealer, 4, new AspectList().add(Aspect.SENSES, 16).add(Aspect.MAGIC, 8), new ItemStack[]{new ItemStack(ConfigItems.itemGoggles), new ItemStack(ConfigItems.itemResource, 1, 14), new ItemStack(ConfigItems.itemResource, 1, 14)}); + recipeRevealer = ThaumcraftApi.addInfusionEnchantmentRecipe(Gadomancy.MODID.toUpperCase() + ".REVEALER", RegisteredEnchantments.revealer, 4, new AspectList().add(Aspect.SENSES, 16).add(Aspect.MAGIC, 8), new ItemStack[]{new ItemStack(ConfigItems.itemGoggles), new ItemStack(ConfigItems.itemResource, 1, 14), new ItemStack(ConfigItems.itemResource, 1, 14)}); CraftingManager.getInstance().getRecipeList().add(new FamiliarUndoRecipe()); } diff --git a/src/main/java/makeo/gadomancy/common/utils/SimpleResourceLocation.java b/src/main/java/makeo/gadomancy/common/utils/SimpleResourceLocation.java index e47b7f5..bae5c69 100644 --- a/src/main/java/makeo/gadomancy/common/utils/SimpleResourceLocation.java +++ b/src/main/java/makeo/gadomancy/common/utils/SimpleResourceLocation.java @@ -12,7 +12,9 @@ import net.minecraft.util.ResourceLocation; * Created by makeo @ 21.05.2015 15:13 */ public class SimpleResourceLocation extends ResourceLocation { + public SimpleResourceLocation(String file) { super(Gadomancy.MODID.toLowerCase(), "textures/" + (file.startsWith("/") ? file.substring(1) : file)); } + } diff --git a/src/main/resources/assets/gadomancy/textures/fx/flow_large.mcmeta b/src/main/resources/assets/gadomancy/textures/fx/flow_large.mcmeta deleted file mode 100644 index 2077f3c..0000000 --- a/src/main/resources/assets/gadomancy/textures/fx/flow_large.mcmeta +++ /dev/null @@ -1,6 +0,0 @@ -{ - "texture": { - "blur": true - } -} - diff --git a/src/main/resources/assets/gadomancy/textures/fx/flow_large.png.mcmeta b/src/main/resources/assets/gadomancy/textures/fx/flow_large.png.mcmeta new file mode 100644 index 0000000..b920dcd --- /dev/null +++ b/src/main/resources/assets/gadomancy/textures/fx/flow_large.png.mcmeta @@ -0,0 +1 @@ +{ "texture": { "blur": true }} \ No newline at end of file