From 6ee039fcc261814d79bee91440c114dad4d69818 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 8 Jan 2016 08:18:27 +0100 Subject: [PATCH] Fix some other minor bugs that I found quickly. I really need to start working on actually repairing the textures. --- .../mod/misc/special/SpecialRenderInit.java | 1 + .../de/ellpeck/actuallyadditions/mod/util/WorldUtil.java | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java index 6fac9afca..e86f3323f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java @@ -68,6 +68,7 @@ public class SpecialRenderInit{ } @SubscribeEvent(priority = EventPriority.HIGHEST) + //TODO Fix floating item public void onPlayerRender(RenderPlayerEvent.Pre event){ if(!specialList.isEmpty()){ for(Map.Entry entry : specialList.entrySet()){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java index 30f08039e..494b19b0c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java @@ -15,6 +15,7 @@ import cofh.api.energy.IEnergyReceiver; import de.ellpeck.actuallyadditions.api.Position; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.item.EntityItem; @@ -363,6 +364,7 @@ public class WorldUtil{ */ public static boolean playerHarvestBlock(World world, Position pos, EntityPlayer player){ Block block = pos.getBlock(world); + IBlockState state = pos.getBlockState(world); int meta = pos.getMetadata(world); //If the Block can be harvested or not boolean canHarvest = block.canHarvestBlock(world, pos, player); @@ -377,7 +379,7 @@ public class WorldUtil{ if(!world.isRemote){ //Server-Side only, special cases - block.onBlockHarvested(world, pos, pos.getBlockState(world), player); + block.onBlockHarvested(world, pos, state, player); } else{ //Shows the Harvest Particles and plays the Block's Sound @@ -389,12 +391,12 @@ public class WorldUtil{ //Actually removes the Block from the World if(removed){ //Before the Block is destroyed, special cases - block.onBlockDestroyedByPlayer(world, pos, pos.getBlockState(world)); + block.onBlockDestroyedByPlayer(world, pos, state); if(!world.isRemote && !player.capabilities.isCreativeMode){ //Actually drops the Block's Items etc. if(canHarvest){ - block.harvestBlock(world, player, pos, pos.getBlockState(world), pos.getTileEntity(world)); + block.harvestBlock(world, player, pos, state, pos.getTileEntity(world)); } //Only drop XP when no Silk Touch is applied if(!EnchantmentHelper.getSilkTouchModifier(player)){