Skip to content

Commit b8a1a9c

Browse files
committed
Some 1.8.8 fixes before merging upstream
1 parent 5211ed9 commit b8a1a9c

File tree

87 files changed

+193
-196
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+193
-196
lines changed
1010 KB
Binary file not shown.

build.gradle

+20-14
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ buildscript {
1111
}
1212
}
1313
dependencies {
14-
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
14+
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
15+
classpath 'com.matthewprenger:CurseGradle:1.0-SNAPSHOT'
1516
}
1617
}
1718

@@ -22,8 +23,8 @@ repositories {
2223
}
2324
}
2425

25-
apply plugin: 'forge'
26-
apply plugin: 'curseforge'
26+
apply plugin: 'net.minecraftforge.gradle.forge'
27+
apply plugin: 'com.matthewprenger.cursegradle'
2728

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

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

3738
minecraft {
3839
version = "${config.mc_version}-${config.forge_version}"
39-
assetDir = "eclipse/assets"
40+
runDir = "eclipse/assets"
4041

42+
mappings = "snapshot_20151128"
4143
//This, does the token replacement.
4244
//Though, I reccomend this to be replaced with a token such as @VERSION@
4345
replace 'GRADLE:BUILD', config.build_number
@@ -60,9 +62,9 @@ dependencies {
6062
compile files(
6163
'Baubles-deobf.jar'
6264
)
63-
compile "codechicken:CodeChickenLib:1.8-1.1.2.139:dev"
64-
compile "codechicken:CodeChickenCore:1.8-1.0.5.36:dev"
65-
compile "codechicken:NotEnoughItems:1.8-1.0.5.104:dev"
65+
//compile "codechicken:CodeChickenLib:1.8-1.1.2.139:dev"
66+
//compile "codechicken:CodeChickenCore:1.8-1.0.5.36:dev"
67+
//compile "codechicken:NotEnoughItems:1.8-1.0.5.104:dev"
6668
//compile "codechicken:ForgeMultipart:1.7.10-1.1.1.320:dev"
6769

6870
//and a bit more for SCP
@@ -207,14 +209,18 @@ jar {
207209
archiveName = "${baseName} ${version}.${extension}"
208210
}
209211

210-
curse {
212+
curseforge {
211213
apiKey = priv.cfkey
212-
projectId = "225643"
213-
changelog = """
214-
See http://botaniamod.net/changelog.php#${version}
215-
"""
216-
releaseType = "release"
217-
relatedProject 'baubles': 'requiredLibrary'
214+
project {
215+
id = "225643"
216+
changelog = """
217+
See http://botaniamod.net/changelog.php#${version}
218+
"""
219+
releaseType = "release"
220+
relations {
221+
requiredLibrary 'baubles'
222+
}
223+
}
218224
}
219225

220226
defaultTasks 'clean', 'build', 'sort', 'forgecraft', 'incrementBuildNumber', 'curse', 'upload'

build.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#Sun Dec 13 01:59:42 GMT 2015
33
version=r1.8
44
dir_output=../Build Output/Botania/
5-
mc_version=1.8
6-
forge_version=11.14.3.1468
5+
mc_version=1.8.8
6+
forge_version=11.15.0.1635-1.8.8
77
dir_repo=./
88
build_number=244
99
mod_name=Botania

src/main/java/vazkii/botania/api/corporea/CorporeaHelper.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
import java.util.WeakHashMap;
1818
import java.util.regex.Pattern;
1919

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

253255
/**

src/main/java/vazkii/botania/client/core/handler/HUDHandler.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ private void renderPoolRecipeHUD(ScaledResolution res, TilePool tile, ItemStack
280280
int y = res.getScaledHeight() / 2 + 10;
281281

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

285285
GlStateManager.enableBlend();
286286
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);

src/main/java/vazkii/botania/client/core/handler/TooltipAdditionDisplayHandler.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public static void render() {
5656
if(slot != null && slot.getHasStack()) {
5757
ItemStack stack = slot.getStack();
5858
if(stack != null) {
59-
ScaledResolution res = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
59+
ScaledResolution res = new ScaledResolution(mc);
6060
FontRenderer font = mc.fontRendererObj;
6161
int mouseX = Mouse.getX() * res.getScaledWidth() / mc.displayWidth;
6262
int mouseY = res.getScaledHeight() - Mouse.getY() * res.getScaledHeight() / mc.displayHeight;

src/main/java/vazkii/botania/client/gui/bag/InventoryFlowerBag.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public ItemStack decrStackSize(int i, int j) {
111111
}
112112

113113
@Override
114-
public ItemStack getStackInSlotOnClosing(int i) {
114+
public ItemStack removeStackFromSlot(int i) {
115115
return getStackInSlot(i);
116116
}
117117

@@ -163,7 +163,7 @@ public boolean hasCustomName() {
163163

164164
@Override
165165
public IChatComponent getDisplayName() {
166-
return new ChatComponentText(getCommandSenderName());
166+
return new ChatComponentText(getName());
167167
}
168168

169169
@Override
@@ -177,7 +177,7 @@ public void closeInventory(EntityPlayer player) {
177177
}
178178

179179
@Override
180-
public String getCommandSenderName() {
180+
public String getName() {
181181
return LibItemNames.FLOWER_BAG;
182182
}
183183

src/main/java/vazkii/botania/client/gui/box/InventoryBaubleBox.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public ItemStack decrStackSize(int i, int j) {
111111
}
112112

113113
@Override
114-
public ItemStack getStackInSlotOnClosing(int i) {
114+
public ItemStack removeStackFromSlot(int i) {
115115
return getStackInSlot(i);
116116
}
117117

@@ -162,7 +162,7 @@ public boolean hasCustomName() {
162162

163163
@Override
164164
public IChatComponent getDisplayName() {
165-
return new ChatComponentText(getCommandSenderName());
165+
return new ChatComponentText(getName());
166166
}
167167

168168
@Override
@@ -176,7 +176,7 @@ public void closeInventory(EntityPlayer player) {
176176
}
177177

178178
@Override
179-
public String getCommandSenderName() {
179+
public String getName() {
180180
return LibItemNames.BAUBLE_BOX;
181181
}
182182

src/main/java/vazkii/botania/client/gui/lexicon/GuiLexicon.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ public void drawScreen(int par1, int par2, float par3) {
225225
bookmarksNeedPopulation = false;
226226
}
227227

228-
if(mc.thePlayer.getCommandSenderName().equals("haighyorkie")) {
228+
if(mc.thePlayer.getName().equals("haighyorkie")) {
229229
GlStateManager.color(1F, 1F, 1F, 1F);
230230
mc.renderEngine.bindTexture(texture);
231231
drawTexturedModalRect(left - 19, top + 42, 67, 180, 19, 26);

src/main/java/vazkii/botania/client/render/item/RenderLexicon.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import net.minecraft.client.Minecraft;
1414
import net.minecraft.client.gui.FontRenderer;
1515
import net.minecraft.client.model.ModelBook;
16+
import net.minecraft.client.renderer.GlStateManager;
1617
import net.minecraft.item.ItemStack;
1718
import net.minecraft.util.EnumChatFormatting;
1819
import net.minecraft.util.ResourceLocation;
@@ -75,8 +76,8 @@ public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
7576
GlStateManager.rotate(180F, 0F, 0F, 1F);
7677
GlStateManager.translate(-0.3F, -0.21F, -0.07F);
7778
GlStateManager.scale(0.0035F, 0.0035F, -0.0035F);
78-
boolean bevo = Minecraft.getMinecraft().thePlayer.getCommandSenderName().equalsIgnoreCase("BevoLJ");
79-
boolean saice = Minecraft.getMinecraft().thePlayer.getCommandSenderName().equalsIgnoreCase("saice");
79+
boolean bevo = Minecraft.getMinecraft().thePlayer.getName().equalsIgnoreCase("BevoLJ");
80+
boolean saice = Minecraft.getMinecraft().thePlayer.getName().equalsIgnoreCase("saice");
8081

8182
String title = ModItems.lexicon.getItemStackDisplayName(null);
8283
String origTitle = title;

src/main/java/vazkii/botania/common/block/BlockEnderEye.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public boolean canProvidePower() {
5959
}
6060

6161
@Override
62-
public int isProvidingWeakPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side) {
62+
public int getWeakPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side) {
6363
return ((Integer) state.getValue(BotaniaStateProps.POWER));
6464
}
6565

src/main/java/vazkii/botania/common/block/BlockFloatingSpecialFlower.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ public int getComparatorInputOverride(World world, BlockPos pos) {
7676
}
7777

7878
@Override
79-
public int isProvidingWeakPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side) {
79+
public int getWeakPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side) {
8080
return ((TileSpecialFlower) world.getTileEntity(pos)).getPowerLevel(side);
8181
}
8282

8383
@Override
84-
public int isProvidingStrongPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side) {
85-
return isProvidingWeakPower(world, pos, state, side);
84+
public int getStrongPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side) {
85+
return getWeakPower(world, pos, state, side);
8686
}
8787

8888
@Override

src/main/java/vazkii/botania/common/block/BlockHourglass.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public boolean canProvidePower() {
114114
}
115115

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

src/main/java/vazkii/botania/common/block/BlockLightLauncher.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ public void pickUpEntities(World world, BlockPos pos) {
8585

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

9191
if(!entities.isEmpty()) {
92-
for(Entity entity : entities) {
92+
for(Entity entity : ((List<Entity>) entities)) {
9393
TileLightRelay relay = relays.get(world.rand.nextInt(relays.size()));
9494
relay.mountEntity(entity);
9595
}

src/main/java/vazkii/botania/common/block/BlockLightRelay.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public boolean canProvidePower() {
147147
}
148148

149149
@Override
150-
public int isProvidingWeakPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing s) {
150+
public int getWeakPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing s) {
151151
return state.getValue(BotaniaStateProps.LUMINIZER_VARIANT) == LuminizerVariant.DEFAULT
152152
&& ((Boolean) state.getValue(BotaniaStateProps.POWERED)) ? 15 : 0;
153153
}

src/main/java/vazkii/botania/common/block/BlockPistonRelay.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public boolean onUsedByWand(EntityPlayer player, ItemStack stack, World world, B
132132
return false;
133133

134134
if(!player.isSneaking()) {
135-
playerPositions.put(player.getCommandSenderName(), getCoordsAsString(world.provider.getDimensionId(), pos));
135+
playerPositions.put(player.getName(), getCoordsAsString(world.provider.getDimensionId(), pos));
136136
world.playSoundEffect(pos.getX(), pos.getY(), pos.getZ(), "botania:ding", 0.5F, 1F);
137137
} else {
138138
spawnAsEntity(world, pos, new ItemStack(this));

src/main/java/vazkii/botania/common/block/BlockSpecialFlower.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,13 @@ public int getComparatorInputOverride(World world, BlockPos pos) {
152152
}
153153

154154
@Override
155-
public int isProvidingWeakPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side) {
155+
public int getWeakPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side) {
156156
return ((TileSpecialFlower) world.getTileEntity(pos)).getPowerLevel(side);
157157
}
158158

159159
@Override
160160
public int isProvidingStrongPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side) {
161-
return isProvidingWeakPower(world, pos, state, side);
161+
return getWeakPower(world, pos, state, side);
162162
}
163163

164164
@Override

src/main/java/vazkii/botania/common/block/corporea/BlockCorporeaInterceptor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public boolean canProvidePower() {
6565
}
6666

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

src/main/java/vazkii/botania/common/block/decor/BlockShimmerrock.java

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
package vazkii.botania.common.block.decor;
1212

1313
import net.minecraft.block.material.Material;
14-
import net.minecraft.client.renderer.texture.IIconRegister;
1514
import net.minecraft.entity.player.EntityPlayer;
1615
import net.minecraft.item.ItemStack;
1716
import net.minecraft.util.BlockPos;

src/main/java/vazkii/botania/common/block/decor/walls/BlockBiomeStoneWall.java

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import net.minecraft.world.World;
2020
import net.minecraftforge.fml.common.registry.GameRegistry;
2121
import vazkii.botania.api.lexicon.LexiconEntry;
22+
import vazkii.botania.api.state.BotaniaStateProps;
2223
import vazkii.botania.common.block.ModFluffBlocks;
2324
import vazkii.botania.common.item.block.ItemBlockWithMetadataAndName;
2425
import vazkii.botania.common.lexicon.LexiconData;

src/main/java/vazkii/botania/common/block/mana/BlockManaDetector.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public boolean canProvidePower() {
6767
}
6868

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

src/main/java/vazkii/botania/common/block/string/BlockRedStringInterceptor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public boolean canProvidePower() {
7171
}
7272

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

src/main/java/vazkii/botania/common/block/subtile/functional/SubTileBellethorn.java

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import java.util.List;
1414

1515
import com.google.common.base.Predicate;
16-
import net.minecraft.command.IEntitySelector;
1716
import net.minecraft.entity.Entity;
1817
import net.minecraft.entity.EntityLivingBase;
1918
import net.minecraft.entity.monster.EntityWitch;

src/main/java/vazkii/botania/common/block/subtile/functional/SubTileDreadthorn.java

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
package vazkii.botania.common.block.subtile.functional;
1212

1313
import com.google.common.base.Predicate;
14-
import net.minecraft.command.IEntitySelector;
1514
import net.minecraft.entity.Entity;
1615
import net.minecraft.entity.passive.EntityAnimal;
1716
import vazkii.botania.api.lexicon.LexiconEntry;

src/main/java/vazkii/botania/common/block/tile/TileAlfPortal.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import net.minecraft.init.Blocks;
2020
import net.minecraft.item.ItemStack;
2121
import net.minecraft.nbt.NBTTagCompound;
22-
import net.minecraft.server.gui.IUpdatePlayerListBox;
22+
import net.minecraft.util.ITickable;
2323
import net.minecraft.tileentity.TileEntity;
2424
import net.minecraft.util.AxisAlignedBB;
2525
import net.minecraft.util.BlockPos;
@@ -44,7 +44,7 @@
4444

4545
import com.google.common.base.Function;
4646

47-
public class TileAlfPortal extends TileMod implements IUpdatePlayerListBox {
47+
public class TileAlfPortal extends TileMod implements ITickable {
4848

4949
private static final BlockPos[] LIVINGWOOD_POSITIONS = {
5050
new BlockPos(-1, 0, 0), new BlockPos(1, 0, 0), new BlockPos(-2, 1, 0),

src/main/java/vazkii/botania/common/block/tile/TileAltar.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import net.minecraft.item.Item;
2929
import net.minecraft.item.ItemStack;
3030
import net.minecraft.nbt.NBTTagCompound;
31-
import net.minecraft.server.gui.IUpdatePlayerListBox;
31+
import net.minecraft.util.ITickable;
3232
import net.minecraft.util.AxisAlignedBB;
3333
import net.minecraft.util.EnumFacing;
3434
import net.minecraft.util.EnumParticleTypes;
@@ -46,7 +46,7 @@
4646
import vazkii.botania.common.Botania;
4747
import vazkii.botania.common.lib.LibBlockNames;
4848

49-
public class TileAltar extends TileSimpleInventory implements ISidedInventory, IPetalApothecary, IUpdatePlayerListBox {
49+
public class TileAltar extends TileSimpleInventory implements ISidedInventory, IPetalApothecary, ITickable {
5050

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

@@ -279,7 +279,7 @@ public void readCustomNBT(NBTTagCompound cmp) {
279279
}
280280

281281
@Override
282-
public String getCommandSenderName() {
282+
public String getName() {
283283
return LibBlockNames.ALTAR;
284284
}
285285

0 commit comments

Comments
 (0)