Skip to content
This repository has been archived by the owner on Jun 14, 2022. It is now read-only.

Commit

Permalink
Some 1.8.8 fixes before merging upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
williewillus committed Dec 21, 2015
1 parent 5211ed9 commit b8a1a9c
Show file tree
Hide file tree
Showing 87 changed files with 193 additions and 196 deletions.
Binary file added ForgeGradle-2.1-20151213.034144-13.jar.1
Binary file not shown.
34 changes: 20 additions & 14 deletions build.gradle
Expand Up @@ -11,7 +11,8 @@ buildscript {
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
classpath 'com.matthewprenger:CurseGradle:1.0-SNAPSHOT'
}
}

Expand All @@ -22,8 +23,8 @@ repositories {
}
}

apply plugin: 'forge'
apply plugin: 'curseforge'
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'com.matthewprenger.cursegradle'

ext.configFile = file('build.properties')

Expand All @@ -36,8 +37,9 @@ archivesBaseName = config.mod_name

minecraft {
version = "${config.mc_version}-${config.forge_version}"
assetDir = "eclipse/assets"
runDir = "eclipse/assets"

mappings = "snapshot_20151128"
//This, does the token replacement.
//Though, I reccomend this to be replaced with a token such as @VERSION@
replace 'GRADLE:BUILD', config.build_number
Expand All @@ -60,9 +62,9 @@ dependencies {
compile files(
'Baubles-deobf.jar'
)
compile "codechicken:CodeChickenLib:1.8-1.1.2.139:dev"
compile "codechicken:CodeChickenCore:1.8-1.0.5.36:dev"
compile "codechicken:NotEnoughItems:1.8-1.0.5.104:dev"
//compile "codechicken:CodeChickenLib:1.8-1.1.2.139:dev"
//compile "codechicken:CodeChickenCore:1.8-1.0.5.36:dev"
//compile "codechicken:NotEnoughItems:1.8-1.0.5.104:dev"
//compile "codechicken:ForgeMultipart:1.7.10-1.1.1.320:dev"

//and a bit more for SCP
Expand Down Expand Up @@ -207,14 +209,18 @@ jar {
archiveName = "${baseName} ${version}.${extension}"
}

curse {
curseforge {
apiKey = priv.cfkey
projectId = "225643"
changelog = """
See http://botaniamod.net/changelog.php#${version}
"""
releaseType = "release"
relatedProject 'baubles': 'requiredLibrary'
project {
id = "225643"
changelog = """
See http://botaniamod.net/changelog.php#${version}
"""
releaseType = "release"
relations {
requiredLibrary 'baubles'
}
}
}

defaultTasks 'clean', 'build', 'sort', 'forgecraft', 'incrementBuildNumber', 'curse', 'upload'
4 changes: 2 additions & 2 deletions build.properties
Expand Up @@ -2,8 +2,8 @@
#Sun Dec 13 01:59:42 GMT 2015
version=r1.8
dir_output=../Build Output/Botania/
mc_version=1.8
forge_version=11.14.3.1468
mc_version=1.8.8
forge_version=11.15.0.1635-1.8.8
dir_repo=./
build_number=244
mod_name=Botania
6 changes: 4 additions & 2 deletions src/main/java/vazkii/botania/api/corporea/CorporeaHelper.java
Expand Up @@ -17,6 +17,8 @@
import java.util.WeakHashMap;
import java.util.regex.Pattern;

import com.google.common.base.Predicates;
import net.minecraft.entity.Entity;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
Expand Down Expand Up @@ -246,8 +248,8 @@ public static ICorporeaSpark getSparkForInventory(IInventory inv) {
* in are for the block that the spark will be on, not the coords of the spark itself.
*/
public static ICorporeaSpark getSparkForBlock(World world, BlockPos pos) {
List<ICorporeaSpark> sparks = world.getEntitiesWithinAABB(ICorporeaSpark.class, new AxisAlignedBB(pos.up(), pos.add(1, 2, 1)));
return sparks.isEmpty() ? null : sparks.get(0);
List<Entity> sparks = world.getEntitiesWithinAABB(Entity.class, new AxisAlignedBB(pos.up(), pos.add(1, 2, 1)), Predicates.instanceOf(ICorporeaSpark.class));
return sparks.isEmpty() ? null : ((ICorporeaSpark) sparks.get(0));
}

/**
Expand Down
Expand Up @@ -280,7 +280,7 @@ private void renderPoolRecipeHUD(ScaledResolution res, TilePool tile, ItemStack
int y = res.getScaledHeight() / 2 + 10;

int u = tile.getCurrentMana() >= recipe.getManaToConsume() ? 0 : 22;
int v = mc.thePlayer.getCommandSenderName().equals("haighyorkie") && mc.thePlayer.isSneaking() ? 23 : 8;
int v = mc.thePlayer.getName().equals("haighyorkie") && mc.thePlayer.isSneaking() ? 23 : 8;

GlStateManager.enableBlend();
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
Expand Down
Expand Up @@ -56,7 +56,7 @@ public static void render() {
if(slot != null && slot.getHasStack()) {
ItemStack stack = slot.getStack();
if(stack != null) {
ScaledResolution res = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
ScaledResolution res = new ScaledResolution(mc);
FontRenderer font = mc.fontRendererObj;
int mouseX = Mouse.getX() * res.getScaledWidth() / mc.displayWidth;
int mouseY = res.getScaledHeight() - Mouse.getY() * res.getScaledHeight() / mc.displayHeight;
Expand Down
Expand Up @@ -111,7 +111,7 @@ public ItemStack decrStackSize(int i, int j) {
}

@Override
public ItemStack getStackInSlotOnClosing(int i) {
public ItemStack removeStackFromSlot(int i) {
return getStackInSlot(i);
}

Expand Down Expand Up @@ -163,7 +163,7 @@ public boolean hasCustomName() {

@Override
public IChatComponent getDisplayName() {
return new ChatComponentText(getCommandSenderName());
return new ChatComponentText(getName());
}

@Override
Expand All @@ -177,7 +177,7 @@ public void closeInventory(EntityPlayer player) {
}

@Override
public String getCommandSenderName() {
public String getName() {
return LibItemNames.FLOWER_BAG;
}

Expand Down
Expand Up @@ -111,7 +111,7 @@ public ItemStack decrStackSize(int i, int j) {
}

@Override
public ItemStack getStackInSlotOnClosing(int i) {
public ItemStack removeStackFromSlot(int i) {
return getStackInSlot(i);
}

Expand Down Expand Up @@ -162,7 +162,7 @@ public boolean hasCustomName() {

@Override
public IChatComponent getDisplayName() {
return new ChatComponentText(getCommandSenderName());
return new ChatComponentText(getName());
}

@Override
Expand All @@ -176,7 +176,7 @@ public void closeInventory(EntityPlayer player) {
}

@Override
public String getCommandSenderName() {
public String getName() {
return LibItemNames.BAUBLE_BOX;
}

Expand Down
Expand Up @@ -225,7 +225,7 @@ public void drawScreen(int par1, int par2, float par3) {
bookmarksNeedPopulation = false;
}

if(mc.thePlayer.getCommandSenderName().equals("haighyorkie")) {
if(mc.thePlayer.getName().equals("haighyorkie")) {
GlStateManager.color(1F, 1F, 1F, 1F);
mc.renderEngine.bindTexture(texture);
drawTexturedModalRect(left - 19, top + 42, 67, 180, 19, 26);
Expand Down
Expand Up @@ -13,6 +13,7 @@
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.model.ModelBook;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
Expand Down Expand Up @@ -75,8 +76,8 @@ public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
GlStateManager.rotate(180F, 0F, 0F, 1F);
GlStateManager.translate(-0.3F, -0.21F, -0.07F);
GlStateManager.scale(0.0035F, 0.0035F, -0.0035F);
boolean bevo = Minecraft.getMinecraft().thePlayer.getCommandSenderName().equalsIgnoreCase("BevoLJ");
boolean saice = Minecraft.getMinecraft().thePlayer.getCommandSenderName().equalsIgnoreCase("saice");
boolean bevo = Minecraft.getMinecraft().thePlayer.getName().equalsIgnoreCase("BevoLJ");
boolean saice = Minecraft.getMinecraft().thePlayer.getName().equalsIgnoreCase("saice");

String title = ModItems.lexicon.getItemStackDisplayName(null);
String origTitle = title;
Expand Down
Expand Up @@ -59,7 +59,7 @@ public boolean canProvidePower() {
}

@Override
public int isProvidingWeakPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side) {
public int getWeakPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side) {
return ((Integer) state.getValue(BotaniaStateProps.POWER));
}

Expand Down
Expand Up @@ -76,13 +76,13 @@ public int getComparatorInputOverride(World world, BlockPos pos) {
}

@Override
public int isProvidingWeakPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side) {
public int getWeakPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side) {
return ((TileSpecialFlower) world.getTileEntity(pos)).getPowerLevel(side);
}

@Override
public int isProvidingStrongPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side) {
return isProvidingWeakPower(world, pos, state, side);
public int getStrongPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side) {
return getWeakPower(world, pos, state, side);
}

@Override
Expand Down
Expand Up @@ -114,7 +114,7 @@ public boolean canProvidePower() {
}

@Override
public int isProvidingWeakPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side) {
public int getWeakPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side) {
return ((Boolean) state.getValue(BotaniaStateProps.POWERED)) ? 0 : 15;
}

Expand Down
Expand Up @@ -85,11 +85,11 @@ public void pickUpEntities(World world, BlockPos pos) {

if(!relays.isEmpty()) {
AxisAlignedBB aabb = new AxisAlignedBB(pos, pos.add(1, 1, 1));
List<Entity> entities = world.getEntitiesWithinAABB(EntityLivingBase.class, aabb);
List entities = world.getEntitiesWithinAABB(EntityLivingBase.class, aabb);
entities.addAll(world.getEntitiesWithinAABB(EntityItem.class, aabb));

if(!entities.isEmpty()) {
for(Entity entity : entities) {
for(Entity entity : ((List<Entity>) entities)) {
TileLightRelay relay = relays.get(world.rand.nextInt(relays.size()));
relay.mountEntity(entity);
}
Expand Down
Expand Up @@ -147,7 +147,7 @@ public boolean canProvidePower() {
}

@Override
public int isProvidingWeakPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing s) {
public int getWeakPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing s) {
return state.getValue(BotaniaStateProps.LUMINIZER_VARIANT) == LuminizerVariant.DEFAULT
&& ((Boolean) state.getValue(BotaniaStateProps.POWERED)) ? 15 : 0;
}
Expand Down
Expand Up @@ -132,7 +132,7 @@ public boolean onUsedByWand(EntityPlayer player, ItemStack stack, World world, B
return false;

if(!player.isSneaking()) {
playerPositions.put(player.getCommandSenderName(), getCoordsAsString(world.provider.getDimensionId(), pos));
playerPositions.put(player.getName(), getCoordsAsString(world.provider.getDimensionId(), pos));
world.playSoundEffect(pos.getX(), pos.getY(), pos.getZ(), "botania:ding", 0.5F, 1F);
} else {
spawnAsEntity(world, pos, new ItemStack(this));
Expand Down
Expand Up @@ -152,13 +152,13 @@ public int getComparatorInputOverride(World world, BlockPos pos) {
}

@Override
public int isProvidingWeakPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side) {
public int getWeakPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side) {
return ((TileSpecialFlower) world.getTileEntity(pos)).getPowerLevel(side);
}

@Override
public int isProvidingStrongPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side) {
return isProvidingWeakPower(world, pos, state, side);
return getWeakPower(world, pos, state, side);
}

@Override
Expand Down
Expand Up @@ -65,7 +65,7 @@ public boolean canProvidePower() {
}

@Override
public int isProvidingWeakPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side) {
public int getWeakPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side) {
return ((Boolean) state.getValue(BotaniaStateProps.POWERED)) ? 15 : 0;
}

Expand Down
Expand Up @@ -11,7 +11,6 @@
package vazkii.botania.common.block.decor;

import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
Expand Down
Expand Up @@ -19,6 +19,7 @@
import net.minecraft.world.World;
import net.minecraftforge.fml.common.registry.GameRegistry;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.api.state.BotaniaStateProps;
import vazkii.botania.common.block.ModFluffBlocks;
import vazkii.botania.common.item.block.ItemBlockWithMetadataAndName;
import vazkii.botania.common.lexicon.LexiconData;
Expand Down
Expand Up @@ -67,7 +67,7 @@ public boolean canProvidePower() {
}

@Override
public int isProvidingWeakPower(IBlockAccess par1iBlockAccess, BlockPos pos, IBlockState state, EnumFacing side) {
public int getWeakPower(IBlockAccess par1iBlockAccess, BlockPos pos, IBlockState state, EnumFacing side) {
return ((Boolean) state.getValue(BotaniaStateProps.POWERED)) ? 15 : 0;
}

Expand Down
Expand Up @@ -71,7 +71,7 @@ public boolean canProvidePower() {
}

@Override
public int isProvidingWeakPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side) {
public int getWeakPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side) {
return ((Boolean) state.getValue(BotaniaStateProps.POWERED)) ? 15 : 0;
}

Expand Down
Expand Up @@ -13,7 +13,6 @@
import java.util.List;

import com.google.common.base.Predicate;
import net.minecraft.command.IEntitySelector;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.monster.EntityWitch;
Expand Down
Expand Up @@ -11,7 +11,6 @@
package vazkii.botania.common.block.subtile.functional;

import com.google.common.base.Predicate;
import net.minecraft.command.IEntitySelector;
import net.minecraft.entity.Entity;
import net.minecraft.entity.passive.EntityAnimal;
import vazkii.botania.api.lexicon.LexiconEntry;
Expand Down
Expand Up @@ -19,7 +19,7 @@
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.server.gui.IUpdatePlayerListBox;
import net.minecraft.util.ITickable;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
Expand All @@ -44,7 +44,7 @@

import com.google.common.base.Function;

public class TileAlfPortal extends TileMod implements IUpdatePlayerListBox {
public class TileAlfPortal extends TileMod implements ITickable {

private static final BlockPos[] LIVINGWOOD_POSITIONS = {
new BlockPos(-1, 0, 0), new BlockPos(1, 0, 0), new BlockPos(-2, 1, 0),
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/vazkii/botania/common/block/tile/TileAltar.java
Expand Up @@ -28,7 +28,7 @@
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.server.gui.IUpdatePlayerListBox;
import net.minecraft.util.ITickable;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumParticleTypes;
Expand All @@ -46,7 +46,7 @@
import vazkii.botania.common.Botania;
import vazkii.botania.common.lib.LibBlockNames;

public class TileAltar extends TileSimpleInventory implements ISidedInventory, IPetalApothecary, IUpdatePlayerListBox {
public class TileAltar extends TileSimpleInventory implements ISidedInventory, IPetalApothecary, ITickable {

private static final Pattern SEED_PATTERN = Pattern.compile("(?:(?:(?:[A-Z-_.:]|^)seed)|(?:(?:[a-z-_.:]|^)Seed))(?:[sA-Z-_.:]|$)");

Expand Down Expand Up @@ -279,7 +279,7 @@ public void readCustomNBT(NBTTagCompound cmp) {
}

@Override
public String getCommandSenderName() {
public String getName() {
return LibBlockNames.ALTAR;
}

Expand Down

0 comments on commit b8a1a9c

Please sign in to comment.