a0454351d5
Deleted PlayerRespawnTracker and removed all references to it - we weren't going to use it anymore anyway. Renamed IDDoorLogic to IDimDoor - abbreviating the "Dim" as D next to the standard I for Interface is confusing. Renamed DDoorBase to BaseDimDoor and made it into an abstract class - that's effectively what it was supposed to be. We should be declaring methods as abstract rather than using empty ones. I renamed the class because the convention for naming abstract classes is to start the name with Base. Cleaned up code in other files.
32 lines
No EOL
891 B
Java
32 lines
No EOL
891 B
Java
package StevenDimDoors.mod_pocketDim.blocks;
|
|
|
|
import net.minecraft.block.material.Material;
|
|
import net.minecraft.item.Item;
|
|
import net.minecraft.world.World;
|
|
import StevenDimDoors.mod_pocketDim.DDProperties;
|
|
import StevenDimDoors.mod_pocketDim.core.LinkTypes;
|
|
import StevenDimDoors.mod_pocketDim.core.NewDimData;
|
|
import StevenDimDoors.mod_pocketDim.core.PocketManager;
|
|
|
|
public class UnstableDoor extends BaseDimDoor
|
|
{
|
|
public UnstableDoor(int blockID, Material material, DDProperties properties)
|
|
{
|
|
super(blockID, material, properties);
|
|
}
|
|
|
|
@Override
|
|
public void placeDimDoor(World world, int x, int y, int z)
|
|
{
|
|
if (!world.isRemote && world.getBlockId(x, y - 1, z) == this.blockID)
|
|
{
|
|
NewDimData dimension = PocketManager.getDimensionData(world);
|
|
dimension.createLink(x, y, z, LinkTypes.RANDOM);
|
|
}
|
|
}
|
|
@Override
|
|
public int getDrops()
|
|
{
|
|
return Item.doorIron.itemID;
|
|
}
|
|
} |