diff --git a/src/main/java/anightdazingzoroark/prift/compat/mysticalmechanics/blocks/BlockBlowPoweredTurbine.java b/src/main/java/anightdazingzoroark/prift/compat/mysticalmechanics/blocks/BlockBlowPoweredTurbine.java index f8160e01..daad343f 100644 --- a/src/main/java/anightdazingzoroark/prift/compat/mysticalmechanics/blocks/BlockBlowPoweredTurbine.java +++ b/src/main/java/anightdazingzoroark/prift/compat/mysticalmechanics/blocks/BlockBlowPoweredTurbine.java @@ -21,6 +21,7 @@ import net.minecraft.util.EnumHand; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.RayTraceResult; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -111,4 +112,8 @@ public void onBlockHarvested(World worldIn, BlockPos pos, IBlockState state, Ent } super.onBlockHarvested(worldIn, pos, state, player); } + + public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) { + return new ItemStack(RiftMMItems.BLOW_POWERED_TURBINE); + } } diff --git a/src/main/java/anightdazingzoroark/prift/compat/mysticalmechanics/blocks/RiftMMBlocks.java b/src/main/java/anightdazingzoroark/prift/compat/mysticalmechanics/blocks/RiftMMBlocks.java index 0fc58016..f0b92b95 100644 --- a/src/main/java/anightdazingzoroark/prift/compat/mysticalmechanics/blocks/RiftMMBlocks.java +++ b/src/main/java/anightdazingzoroark/prift/compat/mysticalmechanics/blocks/RiftMMBlocks.java @@ -8,7 +8,7 @@ public class RiftMMBlocks { public static Block BLOW_POWERED_TURBINE; public static void registerMMBlocks() { - LEAD_POWERED_CRANK = RiftBlocks.registerBlock(new BlockLeadPoweredCrank(), "lead_powered_crank", true); + LEAD_POWERED_CRANK = RiftBlocks.registerBlock(new BlockLeadPoweredCrank(), "lead_powered_crank", true, false); BLOW_POWERED_TURBINE = RiftBlocks.registerBlock(new BlockBlowPoweredTurbine(), "blow_powered_turbine", false); } } diff --git a/src/main/java/anightdazingzoroark/prift/compat/mysticalmechanics/items/RiftMMItems.java b/src/main/java/anightdazingzoroark/prift/compat/mysticalmechanics/items/RiftMMItems.java index 8e8f7ce9..806d4124 100644 --- a/src/main/java/anightdazingzoroark/prift/compat/mysticalmechanics/items/RiftMMItems.java +++ b/src/main/java/anightdazingzoroark/prift/compat/mysticalmechanics/items/RiftMMItems.java @@ -1,7 +1,6 @@ package anightdazingzoroark.prift.compat.mysticalmechanics.items; import anightdazingzoroark.prift.server.items.RiftItems; -import anightdazingzoroark.prift.server.items.RiftLargeWeaponItem; import net.minecraft.item.Item; public class RiftMMItems { diff --git a/src/main/java/anightdazingzoroark/prift/server/blocks/RiftBlocks.java b/src/main/java/anightdazingzoroark/prift/server/blocks/RiftBlocks.java index 0c09bfbe..f2b7479e 100644 --- a/src/main/java/anightdazingzoroark/prift/server/blocks/RiftBlocks.java +++ b/src/main/java/anightdazingzoroark/prift/server/blocks/RiftBlocks.java @@ -26,11 +26,21 @@ public static void registerBlocks() { } public static Block registerBlock(Block block, String registryName, boolean includeItem) { + return registerBlock(block, registryName, includeItem, true); + } + + public static Block registerBlock(Block block, String registryName, boolean includeItem, boolean itemStackable) { block.setCreativeTab(RiftCreativeTabs.creativeItemsTab); block.setRegistryName(registryName); block.setTranslationKey(registryName); BLOCKS.add(block); - if (includeItem) ITEM_BLOCKS.add((ItemBlock)(new ItemBlock(block).setRegistryName(registryName).setTranslationKey(registryName))); + if (includeItem) { + ItemBlock itemBlock = new ItemBlock(block); + itemBlock.setRegistryName(registryName); + itemBlock.setTranslationKey(registryName); + if (!itemStackable) itemBlock.setMaxStackSize(1); + ITEM_BLOCKS.add(itemBlock); + } return block; } diff --git a/src/main/java/anightdazingzoroark/prift/server/entity/creature/Parasaurolophus.java b/src/main/java/anightdazingzoroark/prift/server/entity/creature/Parasaurolophus.java index d0fffe2a..567783f6 100644 --- a/src/main/java/anightdazingzoroark/prift/server/entity/creature/Parasaurolophus.java +++ b/src/main/java/anightdazingzoroark/prift/server/entity/creature/Parasaurolophus.java @@ -3,12 +3,9 @@ import anightdazingzoroark.prift.compat.mysticalmechanics.blocks.BlockBlowPoweredTurbine; import anightdazingzoroark.prift.compat.mysticalmechanics.blocks.BlockLeadPoweredCrank; import anightdazingzoroark.prift.compat.mysticalmechanics.tileentities.TileEntityBlowPoweredTurbine; -import anightdazingzoroark.prift.config.DimetrodonConfig; import anightdazingzoroark.prift.config.GeneralConfig; -import anightdazingzoroark.prift.config.MegapiranhaConfig; import anightdazingzoroark.prift.server.entity.interfaces.ILeadWorkstationUser; import anightdazingzoroark.prift.server.enums.TameStatusType; -import com.codetaylor.mc.athenaeum.util.Properties; import anightdazingzoroark.prift.RiftInitialize; import anightdazingzoroark.prift.RiftUtil; import anightdazingzoroark.prift.client.RiftSounds; @@ -20,6 +17,7 @@ import com.codetaylor.mc.pyrotech.modules.tech.machine.tile.spi.TileCombustionWorkerStoneBase; import com.google.common.base.Predicate; import net.minecraft.block.Block; +import net.minecraft.block.BlockHorizontal; import net.minecraft.block.state.IBlockState; import net.minecraft.client.renderer.culling.ICamera; import net.minecraft.entity.*; @@ -382,7 +380,7 @@ public BlockPos workstationUseFromPos() { if (te != null) downF = te instanceof TileEntityBlowPoweredTurbine ? -1 : 0; } if (blockState.getMaterial().isSolid()) { - EnumFacing direction = blockState.getValue(Properties.FACING_HORIZONTAL); + EnumFacing direction = blockState.getValue(BlockHorizontal.FACING); switch (direction) { case NORTH: return this.getWorkstationPos().add(0, downF, -4); diff --git a/src/main/java/anightdazingzoroark/prift/server/entity/creature/Tyrannosaurus.java b/src/main/java/anightdazingzoroark/prift/server/entity/creature/Tyrannosaurus.java index 5f1bdae0..725fcbde 100644 --- a/src/main/java/anightdazingzoroark/prift/server/entity/creature/Tyrannosaurus.java +++ b/src/main/java/anightdazingzoroark/prift/server/entity/creature/Tyrannosaurus.java @@ -11,12 +11,11 @@ import anightdazingzoroark.prift.server.entity.interfaces.IApexPredator; import anightdazingzoroark.prift.server.entity.interfaces.IWorkstationUser; import anightdazingzoroark.prift.server.enums.TameStatusType; -import com.codetaylor.mc.athenaeum.util.Properties; -import com.codetaylor.mc.pyrotech.modules.tech.machine.block.spi.BlockCombustionWorkerStoneBase; import com.google.common.base.Predicate; import com.google.common.collect.Lists; import com.google.common.collect.Sets; import net.minecraft.block.Block; +import net.minecraft.block.BlockHorizontal; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.client.renderer.culling.ICamera; @@ -429,7 +428,7 @@ public BlockPos workstationUseFromPos() { if (te != null) downF = te instanceof TileEntityBlowPoweredTurbine ? -1 : 0; } if (blockState.getMaterial().isSolid()) { - EnumFacing direction = blockState.getValue(Properties.FACING_HORIZONTAL); + EnumFacing direction = blockState.getValue(BlockHorizontal.FACING); switch (direction) { case NORTH: return this.getWorkstationPos().add(0, downF, -4); diff --git a/src/main/java/anightdazingzoroark/prift/server/items/RiftItems.java b/src/main/java/anightdazingzoroark/prift/server/items/RiftItems.java index 54024f48..055cc4ba 100644 --- a/src/main/java/anightdazingzoroark/prift/server/items/RiftItems.java +++ b/src/main/java/anightdazingzoroark/prift/server/items/RiftItems.java @@ -2,6 +2,7 @@ import anightdazingzoroark.prift.client.creativetab.RiftCreativeTabs; import anightdazingzoroark.prift.compat.mysticalmechanics.items.RiftMMItems; +import anightdazingzoroark.prift.config.GeneralConfig; import anightdazingzoroark.prift.server.entity.RiftCreatureType; import anightdazingzoroark.prift.server.entity.RiftLargeWeaponType; import anightdazingzoroark.prift.server.entity.projectile.RiftProjectiles; @@ -137,7 +138,7 @@ public static void registerItems() { RiftCreatureType.registerSacs(); //compat items - RiftMMItems.registerMMItems(); + if (GeneralConfig.canUseMM()) RiftMMItems.registerMMItems(); //dont ask why this is here RiftProjectiles.registerProjectiles();