Skip to content
This repository has been archived by the owner on May 13, 2023. It is now read-only.

Commit

Permalink
Initial stab at 1.11
Browse files Browse the repository at this point in the history
About halfway.
  • Loading branch information
TehNut committed Dec 13, 2016
1 parent ce52aea commit 00d6f8e
Show file tree
Hide file tree
Showing 157 changed files with 1,041 additions and 1,559 deletions.
4 changes: 1 addition & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ if (new File(projectDir, '.git').exists())

repositories {
maven { url "http://dvs1.progwml6.com/files/maven" }
maven { url "http://mobiusstrip.eu/maven" }
maven { url "http://tehnut.info/maven" }

ivy {
Expand All @@ -60,9 +59,8 @@ repositories {

dependencies {
deobfCompile "mezz.jei:jei_${mc_version}:${jei_version}"
deobfCompile "mcp.mobius.waila:Waila:${waila_version}_${mc_version}:dev"
deobfCompile "mcp.mobius.waila:Hwyla:${waila_version}_${mc_version}"
deobfCompile "info.amerifrance.guideapi:Guide-API:${mc_version}-${guideapi_version}"
deobfCompile "info.tehnut.buttons:Buttons:${buttons_version}:api"

// compile name: "Thaumcraft", version: "${mc_version}-${thaumcraft_version}", ext: "jar"
// compile name: 'Baubles', version: "${baubles_version}", ext: 'jar'
Expand Down
15 changes: 6 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
mod_name=BloodMagic
package_group=com.wayoftime.bloodmagic
mod_version=2.1.0
mc_version=1.9.4
forge_version=12.17.0.1957
mc_version=1.11
forge_version=13.19.1.2189
curse_id=224791

mappings_version=snapshot_20160518
mappings_version=snapshot_20161212

jei_version=3.6.8.225
waila_version=1.7.0-B3
thaumcraft_version=5.1.5
baubles_version=1.1.3.0
guideapi_version=2.0.0-37
buttons_version=1.10.2-0.0.3-3
jei_version=4.0.5.203
waila_version=1.8.5-B19
guideapi_version=2.1.0-47
36 changes: 6 additions & 30 deletions src/main/java/WayofTime/bloodmagic/BloodMagic.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
package WayofTime.bloodmagic;

import java.io.File;
import java.util.Map;

import WayofTime.bloodmagic.meteor.MeteorConfigHandler;
import lombok.Getter;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.launchwrapper.Launch;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
Expand All @@ -25,7 +23,6 @@
import WayofTime.bloodmagic.client.gui.GuiHandler;
import WayofTime.bloodmagic.command.CommandBloodMagic;
import WayofTime.bloodmagic.compat.ICompatibility;
import WayofTime.bloodmagic.compat.minecraft.ICrossVersionProxy;
import WayofTime.bloodmagic.network.BloodMagicPacketHandler;
import WayofTime.bloodmagic.proxy.CommonProxy;
import WayofTime.bloodmagic.registry.ModArmourTrackers;
Expand All @@ -42,8 +39,6 @@
import WayofTime.bloodmagic.util.Utils;
import WayofTime.bloodmagic.util.handler.IMCHandler;

import com.google.common.collect.ImmutableMap;

@Mod(modid = Constants.Mod.MODID, name = Constants.Mod.NAME, version = Constants.Mod.VERSION, dependencies = Constants.Mod.DEPEND, guiFactory = "WayofTime.bloodmagic.client.gui.config.ConfigGuiFactory")
@Getter
public class BloodMagic
Expand All @@ -57,51 +52,32 @@ public class BloodMagic
public static CreativeTabs tabBloodMagic = new CreativeTabs(Constants.Mod.MODID + ".creativeTab")
{
@Override
public Item getTabIconItem()
public ItemStack getTabIconItem()
{
return ModItems.BLOOD_ORB;
return new ItemStack(ModItems.BLOOD_ORB);
}
};

public static CreativeTabs tabUpgradeTome = new CreativeTabs(Constants.Mod.MODID + ".creativeTabTome")
{
@Override
public Item getTabIconItem()
public ItemStack getTabIconItem()
{
return ModItems.UPGRADE_TOME;
return new ItemStack(ModItems.UPGRADE_TOME);
}

@Override
public boolean hasSearchBar()
{
return true;
}
};
}.setNoTitle().setBackgroundImageName("upgrade_tomes.png");

@Getter
private static boolean isDev = (Boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment");

@Getter
private static ICrossVersionProxy crossVersionProxy;
private static final Map<String, String> PROXY_MAP = ImmutableMap.of("1.9.4", "WayofTime.bloodmagic.compat.minecraft.CrossVersionProxy19", "1.10", "WayofTime.bloodmagic.compat.minecraft.CrossVersionProxy110", "1.10.2", "WayofTime.bloodmagic.compat.minecraft.CrossVersionProxy110");

static
{
try
{
String mcVersion = (String) Loader.class.getDeclaredField("MC_VERSION").get(null);

if (!PROXY_MAP.containsKey(mcVersion))
throw new IllegalStateException("Blood Magic couldn't find a cross version proxy!");

Class proxyClass = Class.forName(PROXY_MAP.get(mcVersion));
crossVersionProxy = (ICrossVersionProxy) proxyClass.newInstance();
}
catch (Exception e)
{
throw new IllegalArgumentException("Blood Magic could not find a cross version proxy!", e);
}

tabUpgradeTome.setNoTitle().setBackgroundImageName("upgrade_tomes.png");

FluidRegistry.enableUniversalBucket();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
public class AlchemyTableRecipe
{
protected ItemStack output = null;
protected ArrayList<Object> input = new ArrayList<Object>();
protected ArrayList<ItemStack> input = new ArrayList<ItemStack>();
@Getter
protected int lpDrained;
@Getter
Expand Down Expand Up @@ -148,7 +148,7 @@ public boolean matches(List<ItemStack> checkedList, World world, BlockPos pos)
*
* @return The recipes input vales.
*/
public ArrayList<Object> getInput()
public ArrayList<ItemStack> getInput()
{
return this.input;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;

import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
Expand Down Expand Up @@ -57,6 +58,7 @@ public static void registerRitual(Ritual ritual)
registerRitual(ritual, ritual.getName());
}

@Nullable
public static Ritual getRitualForId(String id)
{
Ritual ritual = registry.get(id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ public boolean placeInExistingPortal(Entity entityIn, float rotationYaw)
@Override
public void placeInPortal(Entity entity, float rotationYaw)
{
entity.setLocationAndAngles(MathHelper.floor_double(entity.posX), MathHelper.floor_double(entity.posY) + 2, MathHelper.floor_double(entity.posZ), entity.rotationYaw, entity.rotationPitch);
entity.setLocationAndAngles(MathHelper.floor(entity.posX), MathHelper.floor(entity.posY) + 2, MathHelper.floor(entity.posZ), entity.rotationYaw, entity.rotationPitch);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;

import net.minecraftforge.common.ForgeModContainer;
import org.apache.commons.lang3.ArrayUtils;

import WayofTime.bloodmagic.BloodMagic;
Expand Down Expand Up @@ -368,7 +369,7 @@ public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World wo
@Override
public boolean doesSideBlockRendering(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing face)
{
if (BloodMagic.getCrossVersionProxy().disableStairSlabCulling())
if (ForgeModContainer.disableStairSlabCulling)
return super.doesSideBlockRendering(state, world, pos, face);

if (state.isOpaqueCube())
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 00d6f8e

Please sign in to comment.