Skip to content

Commit

Permalink
Merge pull request #38 from Tombenpotter/TestProbablyBroken
Browse files Browse the repository at this point in the history
Merging for release 1.1.9!
  • Loading branch information
Tombenpotter committed Mar 31, 2015
2 parents 120837d + caefd94 commit b803cdb
Show file tree
Hide file tree
Showing 175 changed files with 3,342 additions and 2,893 deletions.
17 changes: 17 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@ Version 1.1.9-Pre:
Changed the Soul Corruption storing mechanic. It's fixing issues and unpracticalities ^-^.
It also means that players' corruptions will be reset to 0.
Fixing some stuff that would kick players when hitting mobs with an empty hand.
Fixed it so much that the mods now runs again server side!
Fixed an issue that would add an empty NBT tag to some items, causing issues with their stacking.
You now get a free claimed chunk in the SN dimension, unless you turn the config for it off.
You now need to have an Ethereal Manifestation in your inventory if you want the item/ritual to have its representation in the SN Dim.
Abandonned trying to make my own book system. I'll just try and fix Waslie's.
Fixed a bug with the free chunk assignment. -- Removed the automatic chunk assignment. It's not useful anymore.
Added 7 different types of Ethereal Blocks. Fuun!
Updated to Blood Magic 1.3.0b-3. I didn't test the fix, but it shouldn't be crashing with it anymore.
Fixed the Ritual Representations. Now they work perfectly!
Fixed the Altar Diviner algorithm.
Added a Teleposition Sigil!
Fixed a derp with one of the API tiles.
Added a Transposition Sigil, with its very own blacklist!
Fixed a huuuge dupe bug with the filler and FZ barrels -_-.
The Altar Manipulator is now finally in! Recipes, entries n' everything :D.
Switched to Guide-API.
Added silly april's fool fish :3

Version 1.1.9-Alpha3:
Finalized the Soul Network Manifestation system. I need now to give it a bit of fluff and couple of kicks in the butts, but it's close.
Expand Down
8 changes: 8 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ if (new File(projectDir, '.git').exists()) {
minecraft {
version = "${mc_version}-${forge_version}"
runDir = "run"

replace "@VERSION@", project.version
replaceIn "Sanguimancy.java"

if (project.hasProperty('mappings_version'))
mappings = project.mappings_version
Expand Down Expand Up @@ -63,11 +66,16 @@ repositories {
name 'CB Repo'
url "http://chickenbones.net/maven/"
}
maven {
name 'TehNut Repo'
url "http://tehnut.info/maven/"
}
}

dependencies {
compile "mcp.mobius.waila:Waila:1.5.5_1.7.10"
compile "codechicken:NotEnoughItems:1.7.10-1.0.3.64:dev"
compile "info.amerifrance.guideapi:Guide-API:${mc_version}-${guideapi_version}:deobf"
compile fileTree(dir: 'libs', include: '*.jar')
}

Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ mod_name=Sanguimancy
package_group=com.tombenpotter.sanguimancy

mc_version=1.7.10
guideapi_version=1.0-8
forge_version=10.13.2.1236

mod_version=1.1.9Pre
mod_version=1.1.9
Binary file not shown.
Binary file not shown.
39 changes: 25 additions & 14 deletions src/main/java/tombenpotter/sanguimancy/Sanguimancy.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.*;
import cpw.mods.fml.common.network.NetworkRegistry;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
Expand All @@ -16,13 +13,15 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import tombenpotter.sanguimancy.compat.computercraft.PeripheralProvider;
import tombenpotter.sanguimancy.compat.waila.WailaCompatRegistry;
import tombenpotter.sanguimancy.network.PacketHandler;
import tombenpotter.sanguimancy.proxies.CommonProxy;
import tombenpotter.sanguimancy.registry.*;
import tombenpotter.sanguimancy.util.ConfigHandler;
import tombenpotter.sanguimancy.util.EventHandler;
import tombenpotter.sanguimancy.util.RandomUtils;
import tombenpotter.sanguimancy.util.enums.ModList;
import tombenpotter.sanguimancy.util.teleporting.TeleportingQueue;

@Mod(modid = Sanguimancy.modid, name = Sanguimancy.name, version = Sanguimancy.version, dependencies = Sanguimancy.depend, guiFactory = "tombenpotter.sanguimancy.client.gui.ConfigGuiFactory")
public class Sanguimancy {
Expand All @@ -32,9 +31,9 @@ public class Sanguimancy {
public static final String texturePath = "sanguimancy";
public static final String clientProxy = "tombenpotter.sanguimancy.proxies.ClientProxy";
public static final String commonProxy = "tombenpotter.sanguimancy.proxies.CommonProxy";
public static final String depend = "required-after:AWWayofTime;" + "after:BloodUtils;" + "after:Waila";
public static final String depend = "required-after:AWWayofTime;" + "required-after:guideapi;" + "after:Waila";
public static final String channel = "Sanguimancy";
public static final String version = "1.1.9";
public static final String version = "@VERSION@";
public static boolean isTTLoaded = false;
public static Logger logger = LogManager.getLogger(Sanguimancy.name);
public static CreativeTabs tabSanguimancy = new CreativeTabs("tab" + Sanguimancy.modid) {
Expand Down Expand Up @@ -75,25 +74,37 @@ public void load(FMLInitializationEvent event) {
proxy.load();
RitualRegistry.registerRituals();
RecipesRegistry.registerAltarRecipes();
RecipesRegistry.registerAlchemyRecipes();
RecipesRegistry.registerBindingRecipes();
PotionsRegistry.registerPotions();
FMLCommonHandler.instance().bus().register(new EventHandler());
MinecraftForge.EVENT_BUS.register(new EventHandler());
FMLCommonHandler.instance().bus().register(TeleportingQueue.getInstance());
PacketHandler.registerPackets();
if (Loader.isModLoaded("Waila")) {
FMLInterModComms.sendMessage("Waila", "register", "tombenpotter.sanguimancy.compat.waila.WailaCorruptionCrystallizer.register");
FMLInterModComms.sendMessage("Waila", "register", "tombenpotter.sanguimancy.compat.waila.WailaAltarDiviner.register");
FMLInterModComms.sendMessage("Waila", "register", "tombenpotter.sanguimancy.compat.waila.WailaAltarEmitter.register");
FMLInterModComms.sendMessage("Waila", "register", "tombenpotter.sanguimancy.compat.waila.WailaBloodTank.register");
}
if (Loader.isModLoaded("Waila")) WailaCompatRegistry.register();
NetworkRegistry.INSTANCE.registerGuiHandler(this, proxy);
}

@Mod.EventHandler
public void imcCallback(FMLInterModComms.IMCEvent event) {
for (final FMLInterModComms.IMCMessage imcMessage : event.getMessages()) {
MessageRegistry.registerMessage(imcMessage.key, imcMessage);
}
}

@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event) {
RecipesRegistry.registerCustomModRecipes();
GuideRegistry.createCategories();
SanguimancyGuide.registerGuide();
proxy.postLoad();
isTTLoaded = Loader.isModLoaded("ThaumicTinkerer");
}

@Mod.EventHandler
public void serverStarting(FMLServerStartingEvent event) {
RandomUtils.setLogToPlank();
RandomUtils.setOreLumpList();
RandomUtils.setTranspositionBlockBlacklist();
RandomUtils.setTeleposerBlacklist();
}
}
}
124 changes: 124 additions & 0 deletions src/main/java/tombenpotter/sanguimancy/api/block/BlockCamouflage.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
package tombenpotter.sanguimancy.api.block;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import tombenpotter.sanguimancy.api.tile.TileCamouflage;

public class BlockCamouflage extends BlockContainer {

public BlockCamouflage(Material material) {
super(material);
}

@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_) {
TileCamouflage tile = (TileCamouflage) world.getTileEntity(x, y, z);
if (player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemBlock) {
Block block = Block.getBlockFromItem(player.getHeldItem().getItem());
if (block instanceof BlockCamouflage) return false;
if (!block.isNormalCube()) return false;
}
if (player.getHeldItem() != null && player.getHeldItem().getItem() == Items.water_bucket) {
tile.block = Block.getIdFromBlock(Blocks.air);
tile.metadata = 0;
world.setBlockMetadataWithNotify(x, y, z, 0, 3);
world.markBlockForUpdate(x, y, z);
return true;
} else if (player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemBlock) {
ItemBlock itemBlock = (ItemBlock) player.getHeldItem().getItem();
tile.block = Block.getIdFromBlock(Block.getBlockFromItem(itemBlock));
tile.metadata = player.getHeldItem().getItemDamage();
world.setBlockMetadataWithNotify(x, y, z, player.getHeldItem().getItemDamage(), 3);
world.markBlockForUpdate(x, y, z);
return true;
}
return true;
}

@Override
public boolean canBeReplacedByLeaves(IBlockAccess world, int x, int y, int z) {
return false;
}

@SideOnly(Side.CLIENT)
@Override
public IIcon getIcon(IBlockAccess access, int x, int y, int z, int side) {
TileCamouflage tile = (TileCamouflage) access.getTileEntity(x, y, z);
if (Block.getBlockById(tile.block) != Blocks.air) {
return Block.getBlockById(tile.block).getIcon(side, tile.metadata);
} else return super.getIcon(access, x, y, z, side);
}

@Override
public boolean canPlaceTorchOnTop(World world, int x, int y, int z) {
TileCamouflage tile = (TileCamouflage) world.getTileEntity(x, y, z);
if (Block.getBlockById(tile.block) != Blocks.air) {
return Block.getBlockById(tile.block).canPlaceTorchOnTop(world, x, y, z);
} else return true;
}

@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileCamouflage();
}

@Override
public Item getItem(World world, int x, int y, int z) {
TileCamouflage tile = (TileCamouflage) world.getTileEntity(x, y, z);
if (Block.getBlockById(tile.block) != Blocks.air) {
return new ItemStack(Block.getBlockById(tile.block), 1, tile.metadata).getItem();
} else return super.getItem(world, x, y, z);
}

@Override
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player) {
TileCamouflage tile = (TileCamouflage) world.getTileEntity(x, y, z);
if (Block.getBlockById(tile.block) != Blocks.air) {
return new ItemStack(Block.getBlockById(tile.block), 1, tile.metadata);
} else return super.getPickBlock(target, world, x, y, z, player);
}

@Override
public int getDamageValue(World world, int x, int y, int z) {
TileCamouflage tile = (TileCamouflage) world.getTileEntity(x, y, z);
if (Block.getBlockById(tile.block) != Blocks.air) return tile.metadata;
else return super.getDamageValue(world, x, y, z);
}

@Override
public int getLightValue(IBlockAccess world, int x, int y, int z) {
TileCamouflage tile = (TileCamouflage) world.getTileEntity(x, y, z);
if (Block.getBlockById(tile.block) != Blocks.air) {
return Block.getBlockById(tile.block).getLightValue();
} else return super.getLightValue(world, x, y, z);
}

@SideOnly(Side.CLIENT)
@Override
public int colorMultiplier(IBlockAccess access, int x, int y, int z) {
TileCamouflage tile = (TileCamouflage) access.getTileEntity(x, y, z);
if (Block.getBlockById(tile.block) != Blocks.air) {
return Block.getBlockById(tile.block).colorMultiplier(access, x, y, z);
} else return super.colorMultiplier(access, x, y, z);
}

@Override
public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess access, int x, int y, int z) {
return false;
}
}

This file was deleted.

This file was deleted.

Loading

0 comments on commit b803cdb

Please sign in to comment.