It runs!
This commit is contained in:
parent
51e10eaad2
commit
ed27873fbe
42 changed files with 3606 additions and 3648 deletions
|
@ -3,6 +3,7 @@ package WayofTime.bloodmagic.block;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import WayofTime.bloodmagic.block.base.BlockInteger;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
@ -23,7 +24,9 @@ import WayofTime.bloodmagic.ritual.portal.LocationsHandler;
|
|||
import WayofTime.bloodmagic.ritual.portal.Teleports;
|
||||
import WayofTime.bloodmagic.tile.TileDimensionalPortal;
|
||||
|
||||
public class BlockDimensionalPortal extends BlockIntegerContainer
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class BlockDimensionalPortal extends BlockInteger
|
||||
{
|
||||
protected static final AxisAlignedBB AABB_0 = new AxisAlignedBB(0.0D, 0.0D, 0.375D, 1.0D, 1.0D, 0.625D);
|
||||
protected static final AxisAlignedBB AABB_1 = new AxisAlignedBB(0.375D, 0.0D, 0.0D, 0.625D, 1.0D, 1.0D);
|
||||
|
@ -38,12 +41,6 @@ public class BlockDimensionalPortal extends BlockIntegerContainer
|
|||
setLightOpacity(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World worldIn, int meta)
|
||||
{
|
||||
return new TileDimensionalPortal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isNormalCube(IBlockState state, IBlockAccess world, BlockPos pos)
|
||||
{
|
||||
|
@ -57,13 +54,13 @@ public class BlockDimensionalPortal extends BlockIntegerContainer
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isVisuallyOpaque()
|
||||
public boolean causesSuffocation(IBlockState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBox(IBlockState state, World world, BlockPos pos)
|
||||
public AxisAlignedBB getCollisionBoundingBox(IBlockState state, IBlockAccess world, BlockPos pos)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@ -170,6 +167,17 @@ public class BlockDimensionalPortal extends BlockIntegerContainer
|
|||
this.spawnParticles(world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasTileEntity(IBlockState state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public TileEntity createTileEntity(World world, IBlockState state) {
|
||||
return new TileDimensionalPortal();
|
||||
}
|
||||
|
||||
private void spawnParticles(World world, int x, int y, int z)
|
||||
{
|
||||
Random random = world.rand;
|
||||
|
|
|
@ -12,6 +12,8 @@ import WayofTime.bloodmagic.BloodMagic;
|
|||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.tile.routing.TileInputRoutingNode;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class BlockInputRoutingNode extends BlockRoutingNode
|
||||
{
|
||||
public BlockInputRoutingNode()
|
||||
|
@ -21,12 +23,6 @@ public class BlockInputRoutingNode extends BlockRoutingNode
|
|||
setUnlocalizedName(Constants.Mod.MODID + ".inputRouting");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World worldIn, int meta)
|
||||
{
|
||||
return new TileInputRoutingNode();
|
||||
}
|
||||
|
||||
@Override
|
||||
//TODO: Combine BlockInputRoutingNode and BlockInputRoutingNode so they have the same superclass
|
||||
public void breakBlock(World world, BlockPos pos, IBlockState state)
|
||||
|
@ -50,4 +46,15 @@ public class BlockInputRoutingNode extends BlockRoutingNode
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasTileEntity(IBlockState state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public TileEntity createTileEntity(World world, IBlockState state) {
|
||||
return new TileInputRoutingNode();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,8 @@ import WayofTime.bloodmagic.api.Constants;
|
|||
import WayofTime.bloodmagic.tile.routing.TileItemRoutingNode;
|
||||
import WayofTime.bloodmagic.tile.routing.TileRoutingNode;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class BlockItemRoutingNode extends BlockRoutingNode
|
||||
{
|
||||
public BlockItemRoutingNode()
|
||||
|
@ -17,12 +19,6 @@ public class BlockItemRoutingNode extends BlockRoutingNode
|
|||
setUnlocalizedName(Constants.Mod.MODID + ".itemRouting");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World worldIn, int meta)
|
||||
{
|
||||
return new TileItemRoutingNode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, BlockPos pos, IBlockState state)
|
||||
{
|
||||
|
@ -33,4 +29,15 @@ public class BlockItemRoutingNode extends BlockRoutingNode
|
|||
}
|
||||
super.breakBlock(world, pos, state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasTileEntity(IBlockState state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public TileEntity createTileEntity(World world, IBlockState state) {
|
||||
return new TileItemRoutingNode();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
package WayofTime.bloodmagic.block;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.tile.routing.TileMasterRoutingNode;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class BlockMasterRoutingNode extends BlockRoutingNode
|
||||
{
|
||||
public BlockMasterRoutingNode()
|
||||
|
@ -20,12 +23,17 @@ public class BlockMasterRoutingNode extends BlockRoutingNode
|
|||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World worldIn, int meta)
|
||||
{
|
||||
public boolean hasTileEntity(IBlockState state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public TileEntity createTileEntity(World world, IBlockState state) {
|
||||
return new TileMasterRoutingNode();
|
||||
}
|
||||
|
||||
// @Override
|
||||
// @Override
|
||||
// public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ)
|
||||
// {
|
||||
// if (world.getTileEntity(pos) instanceof TileMasterRoutingNode)
|
||||
|
|
|
@ -5,6 +5,7 @@ import java.util.List;
|
|||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import WayofTime.bloodmagic.block.base.BlockEnum;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
|
@ -39,7 +40,7 @@ import WayofTime.bloodmagic.util.ChatUtil;
|
|||
import amerifrance.guideapi.api.IGuideLinked;
|
||||
|
||||
@Optional.Interface(modid = "guideapi", iface = "amerifrance.guideapi.api.IGuideLinked")
|
||||
public class BlockRitualController extends BlockEnumContainer<EnumRitualController> implements IVariantProvider, IGuideLinked
|
||||
public class BlockRitualController extends BlockEnum<EnumRitualController> implements IVariantProvider, IGuideLinked
|
||||
{
|
||||
public BlockRitualController()
|
||||
{
|
||||
|
@ -54,13 +55,14 @@ public class BlockRitualController extends BlockEnumContainer<EnumRitualControll
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ)
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
ItemStack heldItem = player.getHeldItem(hand);
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
|
||||
if (getMetaFromState(state) == 0 && tile instanceof TileMasterRitualStone)
|
||||
{
|
||||
if (heldItem != null && heldItem.getItem() == ModItems.ACTIVATION_CRYSTAL)
|
||||
if (heldItem.getItem() == ModItems.ACTIVATION_CRYSTAL)
|
||||
{
|
||||
String key = RitualHelper.getValidRitual(world, pos);
|
||||
EnumFacing direction = RitualHelper.getDirectionOfRitual(world, pos, key);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue