Merge pull request #128 from SenseiKiwi/master

Various Updates
This commit is contained in:
StevenRS11 2014-01-19 22:32:34 -08:00
commit b788458c4f
15 changed files with 119 additions and 184 deletions

View file

@ -9,41 +9,25 @@ import static StevenDimDoors.mod_pocketDim.mod_pocketDim.*;
public class CraftingManager
{
public static void registerRecipies()
{
Item coreCraftingItem = Item.enderPearl;
if(properties.enableServerMode)
{
coreCraftingItem = itemWorldThread;
}
public static void registerRecipes(DDProperties properties)
{
if (properties.CraftingDimensionalDoorAllowed)
{
GameRegistry.addRecipe(new ItemStack(itemDimDoor, 1), new Object[]
{
" ", "yxy", " ", 'x', coreCraftingItem, 'y', Item.doorIron
});
GameRegistry.addRecipe(new ItemStack(itemDimDoor, 1), new Object[]
GameRegistry.addRecipe(new ItemStack(itemDimensionalDoor, 1), new Object[]
{
" ", "yxy", " ", 'x', mod_pocketDim.itemStableFabric, 'y', Item.doorIron
});
}
if(properties.CraftingUnstableDoorAllowed)
{
GameRegistry.addRecipe(new ItemStack(itemChaosDoor, 1), new Object[]
GameRegistry.addRecipe(new ItemStack(itemUnstableDoor, 1), new Object[]
{
" ", "yxy", " ", 'x', Item.eyeOfEnder, 'y', mod_pocketDim.itemDimDoor
" ", "yxy", " ", 'x', Item.eyeOfEnder, 'y', mod_pocketDim.itemDimensionalDoor
});
}
if(properties.CraftingWarpDoorAllowed)
{
GameRegistry.addRecipe(new ItemStack(itemExitDoor, 1), new Object[]
{
" ", "yxy", " ", 'x', coreCraftingItem, 'y', Item.doorWood
});
GameRegistry.addRecipe(new ItemStack(itemExitDoor, 1), new Object[]
GameRegistry.addRecipe(new ItemStack(itemWarpDoor, 1), new Object[]
{
" ", "yxy", " ", 'x', mod_pocketDim.itemStableFabric, 'y', Item.doorWood
});
@ -52,22 +36,12 @@ public class CraftingManager
{
GameRegistry.addRecipe(new ItemStack(transTrapdoor, 1), new Object[]
{
" y ", " x ", " y ", 'x', coreCraftingItem, 'y', Block.trapdoor
});
GameRegistry.addRecipe(new ItemStack(transTrapdoor, 1), new Object[]
{
" y ", " x ", " y ", 'x', mod_pocketDim.itemStableFabric, 'y', Block.trapdoor
" y ", " x ", " y ", 'x', mod_pocketDim.itemStableFabric, 'y', Block.trapdoor
});
}
if(properties.CraftingRiftSignatureAllowed)
{
GameRegistry.addRecipe(new ItemStack(itemLinkSignature, 1), new Object[]
{
" y ", "yxy", " y ", 'x', coreCraftingItem, 'y', Item.ingotIron
});
GameRegistry.addRecipe(new ItemStack(itemLinkSignature, 1), new Object[]
GameRegistry.addRecipe(new ItemStack(itemRiftSignature, 1), new Object[]
{
" y ", "yxy", " y ", 'x', mod_pocketDim.itemStableFabric, 'y', Item.ingotIron
});
@ -77,20 +51,15 @@ public class CraftingManager
{
GameRegistry.addRecipe(new ItemStack(itemRiftRemover, 1), new Object[]
{
" y ", "yxy", " y ", 'x', coreCraftingItem, 'y', Item.ingotGold
});
GameRegistry.addRecipe(new ItemStack(itemRiftRemover, 1), new Object[]
{
"yyy", "yxy", "yyy", 'x', mod_pocketDim.itemStableFabric, 'y', Item.ingotGold
"yyy", "yxy", "yyy", 'x', mod_pocketDim.itemStableFabric, 'y', Item.ingotGold
});
}
if (properties.CraftingRiftBladeAllowed)
{
GameRegistry.addRecipe(new ItemStack(itemRiftBlade, 1), new Object[]
{
" x ", " x ", " y ", 'x', coreCraftingItem, 'y',mod_pocketDim.itemRiftRemover
" x ", " x ", " y ", 'x', mod_pocketDim.itemStableFabric, 'y', Item.blazeRod
});
}
@ -98,7 +67,7 @@ public class CraftingManager
{
GameRegistry.addRecipe(new ItemStack(itemStableFabric, 1), new Object[]
{
"yyy", "yxy", "yyy", 'x', coreCraftingItem, 'y', mod_pocketDim.itemWorldThread
"yyy", "yxy", "yyy", 'x', Item.enderPearl, 'y', mod_pocketDim.itemWorldThread
});
}
@ -106,30 +75,23 @@ public class CraftingManager
{
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.itemStabilizedLinkSignature,1), new Object[]
{
" y ", "yxy", " y ", 'x', mod_pocketDim.itemLinkSignature, 'y', mod_pocketDim.itemStableFabric
" y ", "yxy", " y ", 'x', mod_pocketDim.itemRiftSignature, 'y', mod_pocketDim.itemStableFabric
});
}
if (properties.CraftingGoldDimDoorAllowed)
if (properties.CraftingGoldenDimensionalDoorAllowed)
{
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.itemGoldDimDoor,1), new Object[]
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.itemGoldenDimensionalDoor,1), new Object[]
{
" ", "xyx", " ", 'x', mod_pocketDim.itemGoldDoor, 'y', Item.eyeOfEnder
" ", "xyx", " ", 'x', mod_pocketDim.itemGoldenDoor, 'y', Item.eyeOfEnder
});
}
if (properties.CraftingGoldDoorAllowed)
if (properties.CraftingGoldenDoorAllowed)
{
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.itemGoldDoor,1), new Object[]
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.itemGoldenDoor, 1), new Object[]
{
"yy ", "yy ", "yy ", 'y', Item.ingotGold
});
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.itemGoldDoor,1), new Object[]
{
" yy", " yy", " yy", 'y', Item.ingotGold
});
}
}
}

View file

@ -3,6 +3,7 @@ package StevenDimDoors.mod_pocketDim;
import java.util.ArrayList;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
@ -50,7 +51,7 @@ public class DDLoot {
addContent(true, items, Item.appleGold.itemID, 10);
addContent(properties.FabricOfRealityLootEnabled, items, mod_pocketDim.blockDimWall.blockID, 80, 4, 16);
addContent(properties.StableFabricLootEnabled, items, mod_pocketDim.itemStableFabric.itemID, 40);
addContent(properties.WorldThreadLootEnabled, items, mod_pocketDim.itemWorldThread.itemID, 80);
// Add all the items to our dungeon chest
addItemsToContainer(DungeonChestInfo, items);
@ -189,11 +190,19 @@ public class DDLoot {
addModifiedEquipment( getRandomItem(Item.bootsIron, Item.bootsChain, null, 25, 10, random) , stacks, random);
// Insert other random stuff
// 40% chance for a name tag, 35% chance for a glass bottle, and 5% chance for record 11
// 40% chance for a name tag, 35% chance for a glass bottle
// 30% chance for an ender pearl, 5% chance for record 11
addItemWithChance(stacks, random, 40, Item.nameTag, 1);
addItemWithChance(stacks, random, 35, Item.glassBottle, 1);
addItemWithChance(stacks, random, 30, Item.enderPearl, 1);
addItemWithChance(stacks, random, 5, Item.record11, 1);
// Finally, there is a 3% chance of adding a player head
if (random.nextInt(100) < 50) // FIXME: SET TO 50% FOR TESTING, CHANGE TO 3%
{
stacks.add( new ItemStack(Block.skull) );
}
fillChest(stacks, inventory, random);
}

View file

@ -14,13 +14,14 @@ public class DDProperties
public final int UnstableDoorID;
public final int DimensionalDoorID;
public final int GoldDoorID;
public final int GoldDimDoorID;
public final int GoldenDoorID;
public final int GoldenDimensionalDoorID;
public final int WarpDoorID;
public final int TransTrapdoorID;
public final int TransientDoorID;
public final int FabricBlockID;
public final int RiftBlockID;
public final int CoriumBlockID;
/**
* World Generation Block IDs
@ -35,15 +36,15 @@ public class DDProperties
public final int RiftBladeItemID;
public final int RiftSignatureItemID;
public final int GoldDimDoorItemID;
public final int GoldDoorItemID;
public final int GoldenDimensionalDoorItemID;
public final int GoldenDoorItemID;
public final int RiftRemoverItemID;
public final int StableFabricItemID;
public final int StabilizedRiftSignatureItemID;
public final int DimensionalDoorItemID;
public final int UnstableDoorItemID;
public final int WarpDoorItemID;
public final int ItemWorldThreadID;
public final int WorldThreadItemID;
/**
@ -71,29 +72,21 @@ public class DDProperties
public final boolean CraftingTransTrapdoorAllowed;
public final boolean CraftingStabilizedRiftSignatureAllowed;
public final boolean CraftingStableFabricAllowed;
public final boolean CraftingGoldDimDoorAllowed;
public final boolean CraftingGoldDoorAllowed;
public final boolean CraftingGoldenDimensionalDoorAllowed;
public final boolean CraftingGoldenDoorAllowed;
/**
* Loot Flags
*/
public final boolean DimensionalDoorLootEnabled;
public final boolean WarpDoorLootEnabled;
public final boolean UnstableDoorLootEnabled;
public final boolean TransTrapdoorLootEnabled;
public final boolean RiftSignatureLootEnabled;
public final boolean RiftRemoverLootEnabled;
public final boolean StabilizedRiftSignatureLootEnabled;
public final boolean RiftBladeLootEnabled;
public final boolean StableFabricLootEnabled;
public final boolean FabricOfRealityLootEnabled;
public final boolean WorldThreadLootEnabled;
/**
* Other Flags
*/
public final boolean enableServerMode;
public final boolean WorldRiftGenerationEnabled;
public final boolean RiftSpreadEnabled;
public final boolean RiftGriefingEnabled;
@ -122,7 +115,6 @@ public class DDProperties
//Path for custom dungeons within configuration directory
private final String CUSTOM_SCHEMATIC_SUBDIRECTORY = "/DimDoors_Custom_schematics";
//Names of categories
private final String CATEGORY_SERVERMODE = "server mode";
private final String CATEGORY_CRAFTING = "crafting";
private final String CATEGORY_ENTITY = "entity";
private final String CATEGORY_DIMENSION = "dimension";
@ -148,20 +140,13 @@ public class DDProperties
CraftingStabilizedRiftSignatureAllowed = config.get(CATEGORY_CRAFTING, "Allow Crafting Stabilized Rift Signature", true).getBoolean(true);
CraftingRiftBladeAllowed = config.get(CATEGORY_CRAFTING, "Allow Crafting Rift Blade", true).getBoolean(true);
CraftingStableFabricAllowed = config.get(CATEGORY_CRAFTING, "Allow Crafting Stable Fabric", true).getBoolean(true);
CraftingGoldDimDoorAllowed = config.get(CATEGORY_CRAFTING, "Allow Crafting Golden Dimensional Door", true).getBoolean(true);
CraftingGoldDoorAllowed = config.get(CATEGORY_CRAFTING, "Allow Golden Door", true).getBoolean(true);
CraftingGoldenDoorAllowed = config.get(CATEGORY_CRAFTING, "Allow Crafting Golden Door", true).getBoolean(true);
CraftingGoldenDimensionalDoorAllowed = config.get(CATEGORY_CRAFTING, "Allow Crafting Golden Dimensional Door", true).getBoolean(true);
DimensionalDoorLootEnabled = config.get(CATEGORY_LOOT, "Enable Dimensional Door Loot", true).getBoolean(true);
WarpDoorLootEnabled = config.get(CATEGORY_LOOT, "Enable Warp Door Loot", false).getBoolean(false);
UnstableDoorLootEnabled = config.get(CATEGORY_LOOT, "Enable Unstable Door Loot", false).getBoolean(false);
TransTrapdoorLootEnabled = config.get(CATEGORY_LOOT, "Enable Transdimensional Trapdoor Loot", false).getBoolean(false);
RiftSignatureLootEnabled = config.get(CATEGORY_LOOT, "Enable Rift Signature Loot", true).getBoolean(true);
RiftRemoverLootEnabled = config.get(CATEGORY_LOOT, "Enable Rift Remover Loot", true).getBoolean(true);
StabilizedRiftSignatureLootEnabled = config.get(CATEGORY_LOOT, "Enable Stabilized Rift Signature Loot", false).getBoolean(false);
RiftBladeLootEnabled = config.get(CATEGORY_LOOT, "Enable Rift Blade Loot", true).getBoolean(true);
StableFabricLootEnabled = config.get(CATEGORY_LOOT, "Enable Stable Fabric Loot", false).getBoolean(false);
FabricOfRealityLootEnabled = config.get(CATEGORY_LOOT, "Enable Fabric of Reality Loot", true).getBoolean(true);
WorldThreadLootEnabled = config.get(CATEGORY_LOOT, "Enable World Thread Loot", true).getBoolean(true);
RiftGriefingEnabled = config.get(Configuration.CATEGORY_GENERAL, "Enable Rift Griefing", true,
"Sets whether rifts destroy blocks around them or not").getBoolean(true);
RiftSpreadEnabled = config.get(Configuration.CATEGORY_GENERAL, "Enable Rift Spread", true,
@ -184,12 +169,7 @@ public class DDProperties
"Weighs the chance that a block will not be TNT. Must be greater than or equal to 0. " +
"EXPLOSIONS must be set to true for this to have any effect.").getInt();
enableServerMode = config.get(CATEGORY_SERVERMODE, "Server Mode", false,
"Enables servermode, changing all crafting recipies to require stabilized fabric. " +
"Stabilized fabric, in turn, requires the item World Thread, which is not craftable or obtainable at all. "+
"It is up to the server manager on how to distribute it.").getBoolean(false);
DoorRenderEntityID=config.get(CATEGORY_ENTITY, "Door Render Entity ID", 89).getInt();
DoorRenderEntityID = config.get(CATEGORY_ENTITY, "Door Render Entity ID", 89).getInt();
MonolithEntityID = config.get(CATEGORY_ENTITY, "Monolith Entity ID", 125).getInt();
DimensionalDoorID = config.getBlock("Dimensional Door Block ID", 1970).getInt();
@ -199,8 +179,10 @@ public class DDProperties
RiftBlockID = config.getBlock("Rift Block ID", 1977).getInt();
UnstableDoorID = config.getBlock("Unstable Door Block ID", 1978).getInt();
TransientDoorID = config.getBlock("Transient Door Block ID", 1979).getInt();
GoldDoorID = config.getBlock("Gold Door Block ID", 1980).getInt();
GoldDimDoorID = config.getBlock("Gold Dim Door Block ID", 1981).getInt();
GoldenDoorID = config.getBlock("Gold Door Block ID", 1980).getInt();
GoldenDimensionalDoorID = config.getBlock("Gold Dim Door Block ID", 1981).getInt();
CoriumBlockID = config.getBlock("Corium Block ID", 900).getInt();
WarpDoorItemID = config.getItem("Warp Door Item ID", 5670).getInt();
RiftRemoverItemID = config.getItem("Rift Remover Item ID", 5671).getInt();
@ -210,9 +192,9 @@ public class DDProperties
RiftSignatureItemID = config.getItem("Rift Signature Item ID", 5675).getInt();
RiftBladeItemID = config.getItem("Rift Blade Item ID", 5676).getInt();
StabilizedRiftSignatureItemID = config.getItem("Stabilized Rift Signature Item ID", 5677).getInt();
GoldDoorItemID = config.getItem("Gold Door Item ID", 5678).getInt();
GoldDimDoorItemID = config.getItem("Gold Dim Door Item ID", 5679).getInt();
ItemWorldThreadID = config.getItem("World Thread Item ID", 5680).getInt();
GoldenDoorItemID = config.getItem("Gold Door Item ID", 5678).getInt();
GoldenDimensionalDoorItemID = config.getItem("Gold Dim Door Item ID", 5679).getInt();
WorldThreadItemID = config.getItem("World Thread Item ID", 5680).getInt();
LimboBlockID = config.getTerrainBlock("World Generation Block IDs - must be less than 256", "Limbo Block ID", 217,
"Blocks used for the terrain in Limbo").getInt();

View file

@ -44,19 +44,16 @@ public abstract class BaseDimDoor extends BlockDoor implements IDimDoor, ITileEn
this.blockIconBottom = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName()+"_bottom");
}
@Override
@SideOnly(Side.CLIENT)
/**
/**
* From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
*/
public Icon getIcon(int par1, int par2)
@Override
@SideOnly(Side.CLIENT)
public Icon getIcon(int par1, int par2)
{
return this.blockIcon;
}
@Override
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity)
{
@ -66,11 +63,9 @@ public abstract class BaseDimDoor extends BlockDoor implements IDimDoor, ITileEn
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ)
{
boolean shouldOpen=true;
//System.out.println(String.valueOf(par1World.getBlockMetadata(par2, par3, par4)));
if(player.inventory.getCurrentItem()!=null)
boolean shouldOpen = true;
if (player.inventory.getCurrentItem()!=null)
{
if(player.inventory.getCurrentItem().getItem() == mod_pocketDim.itemRiftBlade)
{
@ -392,8 +387,6 @@ public abstract class BaseDimDoor extends BlockDoor implements IDimDoor, ITileEn
}
if (canUse)
{
// Teleport the entity through the link, if it exists
DimLink link = PocketManager.getLink(x, y, z, world.provider.dimensionId);
if (link != null)
@ -402,12 +395,11 @@ public abstract class BaseDimDoor extends BlockDoor implements IDimDoor, ITileEn
{
DDTeleporter.traverseDimDoor(world, link, entity, this);
}
catch(Exception e)
catch (Exception e)
{
System.err.println("Something when wrong teleporting to a dim:");
System.err.println("Something went wrong teleporting to a dimension:");
e.printStackTrace();
}
}
// Close the door only after the entity goes through

View file

@ -15,16 +15,11 @@ import net.minecraft.world.IBlockAccess;
public class BlockDoorGold extends BlockDoor
{
private Icon blockIconBottom;
@SuppressWarnings("unused") // ??
private DDProperties properties;
public BlockDoorGold(int par1, Material par2Material,DDProperties properties)
public BlockDoorGold(int par1, Material par2Material)
{
super(par1, par2Material);
this.properties=properties;
}
@Override
@ -36,7 +31,7 @@ public class BlockDoorGold extends BlockDoor
public int idDropped(int par1, Random par2Random, int par3)
{
return mod_pocketDim.itemGoldDoor.itemID;
return mod_pocketDim.itemGoldenDoor.itemID;
}
@Override
@ -49,7 +44,7 @@ public class BlockDoorGold extends BlockDoor
@SideOnly(Side.CLIENT)
public Icon getBlockTexture(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
{
if(par1IBlockAccess.getBlockId(par2, par3-1, par4) == this.blockID)
if (par1IBlockAccess.getBlockId(par2, par3-1, par4) == this.blockID)
{
return this.blockIcon;
}

View file

@ -12,12 +12,11 @@ import net.minecraft.block.material.Material;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
@SuppressWarnings("deprecation")
public class BlockGoldDimDoor extends BaseDimDoor
{
public BlockGoldDimDoor(int blockID, Material material,
DDProperties properties) {
public BlockGoldDimDoor(int blockID, Material material, DDProperties properties)
{
super(blockID, material, properties);
}
@ -38,7 +37,7 @@ public class BlockGoldDimDoor extends BaseDimDoor
@Override
public int getDrops()
{
return mod_pocketDim.itemGoldDoor.itemID;
return mod_pocketDim.itemGoldenDoor.itemID;
}
@Override

View file

@ -56,8 +56,8 @@ public class BlockRift extends Block implements ITileEntityProvider
this.blocksImmuneToRift.add(properties.UnstableDoorID);
this.blocksImmuneToRift.add(properties.RiftBlockID);
this.blocksImmuneToRift.add(properties.TransientDoorID);
this.blocksImmuneToRift.add(properties.GoldDimDoorID);
this.blocksImmuneToRift.add(properties.GoldDoorID);
this.blocksImmuneToRift.add(properties.GoldenDimensionalDoorID);
this.blocksImmuneToRift.add(properties.GoldenDoorID);
this.blocksImmuneToRift.add(Block.blockIron.blockID);
this.blocksImmuneToRift.add(Block.blockDiamond.blockID);

View file

@ -254,7 +254,7 @@ public class DDTeleporter
int blockID = world.getBlockId(door.getX(), door.getY() - 1, door.getZ());
if (blockID != properties.DimensionalDoorID && blockID != properties.WarpDoorID &&
blockID != properties.TransientDoorID && blockID != properties.UnstableDoorID
&& blockID != properties.GoldDimDoorID)
&& blockID != properties.GoldenDimensionalDoorID)
{
//Return the pocket's orientation instead
return PocketManager.getDimensionData(door.getDimension()).orientation();

View file

@ -27,7 +27,7 @@ public class ChunkLoaderHelper implements LoadingCallback
int goldDimDoorX = ticket.getModData().getInteger("goldDimDoorX");
int goldDimDoorY = ticket.getModData().getInteger("goldDimDoorY");
int goldDimDoorZ = ticket.getModData().getInteger("goldDimDoorZ");
if(world.getBlockId(goldDimDoorX, goldDimDoorY, goldDimDoorZ)!=mod_pocketDim.properties.GoldDimDoorID)
if(world.getBlockId(goldDimDoorX, goldDimDoorY, goldDimDoorZ) != mod_pocketDim.properties.GoldenDimensionalDoorID)
{
ForgeChunkManager.releaseTicket(ticket);
}

View file

@ -21,16 +21,16 @@ public class ItemGoldDimDoor extends BaseItemDoor
@Override
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
{
par3List.add("Similar to a Iron Dim Door");
par3List.add("But if present in a pocket dim");
par3List.add("it will keep it loaded.");
par3List.add("Similar to a Dimensional Door");
par3List.add("but keeps a pocket dimension");
par3List.add("loaded if placed on the inside.");
}
@Override
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y,
int z, int par7, float par8, float par9, float par10)
{
return tryItemUse(mod_pocketDim.goldDimDoor, stack, player, world, x, y, z, par7, false, true);
return tryItemUse(mod_pocketDim.goldenDimensionalDoor, stack, player, world, x, y, z, par7, false, true);
}
@Override
@ -38,7 +38,7 @@ public class ItemGoldDimDoor extends BaseItemDoor
{
if (!world.isRemote)
{
if (tryPlacingDoor(mod_pocketDim.goldDimDoor, world, player, stack) &&
if (tryPlacingDoor(mod_pocketDim.goldenDimensionalDoor, world, player, stack) &&
!player.capabilities.isCreativeMode)
{
stack.stackSize--;

View file

@ -33,7 +33,7 @@ public class ItemGoldDoor extends ItemDoor
else
{
++par5;
Block block = mod_pocketDim.goldDoor;
Block block = mod_pocketDim.goldenDoor;
if (par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack) && par2EntityPlayer.canPlayerEdit(par4, par5 + 1, par6, par7, par1ItemStack))
{

View file

@ -31,9 +31,9 @@ public class ItemRiftBlade extends ItemSword
{
private final DDProperties properties;
public ItemRiftBlade(int itemID, EnumToolMaterial material, DDProperties properties)
public ItemRiftBlade(int itemID, DDProperties properties)
{
super(itemID, material);
super(itemID, EnumToolMaterial.EMERALD);
this.setCreativeTab(mod_pocketDim.dimDoorsCreativeTab);
this.setMaxStackSize(1);
@ -211,7 +211,7 @@ public class ItemRiftBlade extends ItemSword
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
{
//Don't include a call to super.getIsRepairable()!
//That would cause this sword to accept gold as a repair material (since we set material = Gold).
//That would cause this sword to accept diamonds as a repair material (since we set material = Diamond).
return mod_pocketDim.itemStableFabric.itemID == par2ItemStack.itemID ? true : false;
}

View file

@ -54,10 +54,10 @@ public class ItemStabilizedRiftSignature extends ItemRiftSignature
if (source != null)
{
// Yes, it's initialized. Check if the player is in creative
// or if the player can pay an Ender Pearl to create a rift.
if (!player.capabilities.isCreativeMode && !player.inventory.hasItem(Item.enderPearl.itemID))
// or if the player can pay with Stable Fabric to create a rift.
if (!player.capabilities.isCreativeMode && !player.inventory.hasItem(mod_pocketDim.itemStableFabric.itemID))
{
mod_pocketDim.sendChat(player,"You don't have any Ender Pearls!");
mod_pocketDim.sendChat(player, "You don't have any Stable Fabric!");
// I won't do this, but this is the chance to localize chat
// messages sent to the player; look at ChatMessageComponent
// and how MFR does it with items like the safari net launcher
@ -88,7 +88,7 @@ public class ItemStabilizedRiftSignature extends ItemRiftSignature
if (!player.capabilities.isCreativeMode)
{
player.inventory.consumeInventoryItem(Item.enderPearl.itemID);
player.inventory.consumeInventoryItem(mod_pocketDim.itemStableFabric.itemID);
}
mod_pocketDim.sendChat(player,"Rift Created");
world.playSoundAtEntity(player,"mods.DimDoors.sfx.riftEnd", 0.6f, 1);
@ -97,7 +97,7 @@ public class ItemStabilizedRiftSignature extends ItemRiftSignature
{
//The link signature has not been used. Store its current target as the first location.
setSource(stack, x, adjustedY, z, orientation, PocketManager.getDimensionData(world));
mod_pocketDim.sendChat(player,"Location Stored in Rift Signature");
mod_pocketDim.sendChat(player,"Location Stored in Stabilized Rift Signature");
world.playSoundAtEntity(player,"mods.DimDoors.sfx.riftStart", 0.6f, 1);
}
return true;

View file

@ -111,8 +111,8 @@ public class mod_pocketDim
public static Block transientDoor;
public static Block warpDoor;
public static Block goldDoor;
public static Block goldDimDoor;
public static Block goldenDoor;
public static Block goldenDimensionalDoor;
public static Block unstableDoor;
public static Block blockLimbo;
public static DimensionalDoor dimensionalDoor;
@ -121,17 +121,17 @@ public class mod_pocketDim
public static Block blockDimWallPerm;
public static BlockRift blockRift;
public static Item itemGoldDimDoor;
public static Item itemGoldDoor;
public static Item itemGoldenDimensionalDoor;
public static Item itemGoldenDoor;
public static Item itemWorldThread;
public static Item itemRiftBlade;
public static Item itemDimDoor;
public static Item itemExitDoor;
public static Item itemDimensionalDoor;
public static Item itemWarpDoor;
public static Item itemRiftRemover;
public static Item itemLinkSignature;
public static Item itemRiftSignature;
public static Item itemStableFabric;
public static Item itemChaosDoor;
public static Item itemUnstableDoor;
public static Item itemStabilizedLinkSignature;
public static BiomeGenBase limboBiome;
@ -152,7 +152,7 @@ public class mod_pocketDim
@Override
public ItemStack getIconItemStack()
{
return new ItemStack(mod_pocketDim.itemDimDoor, 1, 0);
return new ItemStack(mod_pocketDim.itemDimensionalDoor, 1, 0);
}
@Override
@ -192,9 +192,9 @@ public class mod_pocketDim
LimboDecay decay = new LimboDecay(commonTickHandler, properties);
transientDoor = new TransientDoor(properties.TransientDoorID, Material.iron, properties).setHardness(1.0F) .setUnlocalizedName("transientDoor");
goldDimDoor = new BlockGoldDimDoor(properties.GoldDimDoorID, Material.iron, properties).setHardness(1.0F) .setUnlocalizedName("dimDoorGold");
goldenDimensionalDoor = new BlockGoldDimDoor(properties.GoldenDimensionalDoorID, Material.iron, properties).setHardness(1.0F) .setUnlocalizedName("dimDoorGold");
goldDoor = new BlockDoorGold(properties.GoldDoorID, Material.iron, properties).setHardness(0.1F).setUnlocalizedName("doorGold");
goldenDoor = new BlockDoorGold(properties.GoldenDoorID, Material.iron).setHardness(0.1F).setUnlocalizedName("doorGold");
blockDimWall = new BlockDimWall(properties.FabricBlockID, 0, Material.iron).setLightValue(1.0F).setHardness(0.1F).setUnlocalizedName("blockDimWall");
blockDimWallPerm = (new BlockDimWallPerm(properties.PermaFabricBlockID, 0, Material.iron)).setLightValue(1.0F).setBlockUnbreakable().setResistance(6000000.0F).setUnlocalizedName("blockDimWallPerm");
warpDoor = new WarpDoor(properties.WarpDoorID, Material.wood, properties).setHardness(1.0F) .setUnlocalizedName("dimDoorWarp");
@ -204,19 +204,19 @@ public class mod_pocketDim
dimensionalDoor = (DimensionalDoor) (new DimensionalDoor(properties.DimensionalDoorID, Material.iron, properties).setHardness(1.0F).setResistance(2000.0F) .setUnlocalizedName("dimDoor"));
transTrapdoor = (TransTrapdoor) (new TransTrapdoor(properties.TransTrapdoorID, Material.wood).setHardness(1.0F) .setUnlocalizedName("dimHatch"));
itemGoldDimDoor = (new ItemGoldDimDoor(properties.GoldDimDoorItemID, Material.iron)).setUnlocalizedName("itemGoldDimDoor");
itemGoldDoor = (new ItemGoldDoor(properties.GoldDoorID, Material.wood)).setUnlocalizedName("itemGoldDoor");
itemDimDoor = (new ItemDimensionalDoor(properties.DimensionalDoorItemID, Material.iron)).setUnlocalizedName("itemDimDoor");
itemExitDoor = (new ItemWarpDoor(properties.WarpDoorItemID, Material.wood)).setUnlocalizedName("itemDimDoorWarp");
itemLinkSignature = (new ItemRiftSignature(properties.RiftSignatureItemID)).setUnlocalizedName("itemLinkSignature");
itemGoldenDimensionalDoor = (new ItemGoldDimDoor(properties.GoldenDimensionalDoorItemID, Material.iron)).setUnlocalizedName("itemGoldDimDoor");
itemGoldenDoor = (new ItemGoldDoor(properties.GoldenDoorID, Material.wood)).setUnlocalizedName("itemGoldDoor");
itemDimensionalDoor = (new ItemDimensionalDoor(properties.DimensionalDoorItemID, Material.iron)).setUnlocalizedName("itemDimDoor");
itemWarpDoor = (new ItemWarpDoor(properties.WarpDoorItemID, Material.wood)).setUnlocalizedName("itemDimDoorWarp");
itemRiftSignature = (new ItemRiftSignature(properties.RiftSignatureItemID)).setUnlocalizedName("itemLinkSignature");
itemRiftRemover = (new itemRiftRemover(properties.RiftRemoverItemID, Material.wood)).setUnlocalizedName("itemRiftRemover");
itemStableFabric = (new ItemStableFabric(properties.StableFabricItemID, 0)).setUnlocalizedName("itemStableFabric");
itemChaosDoor = (new ItemUnstableDoor(properties.UnstableDoorItemID, Material.iron)).setUnlocalizedName("itemChaosDoor");
itemRiftBlade = (new ItemRiftBlade(properties.RiftBladeItemID, EnumToolMaterial.GOLD, properties)).setUnlocalizedName("ItemRiftBlade");
itemUnstableDoor = (new ItemUnstableDoor(properties.UnstableDoorItemID, Material.iron)).setUnlocalizedName("itemChaosDoor");
itemRiftBlade = (new ItemRiftBlade(properties.RiftBladeItemID, properties)).setUnlocalizedName("ItemRiftBlade");
itemStabilizedLinkSignature = (new ItemStabilizedRiftSignature(properties.StabilizedRiftSignatureItemID)).setUnlocalizedName("itemStabilizedRiftSig");
itemWorldThread = (new ItemWorldThread(properties.ItemWorldThreadID)).setUnlocalizedName("itemWorldThread");
itemWorldThread = (new ItemWorldThread(properties.WorldThreadItemID)).setUnlocalizedName("itemWorldThread");
mod_pocketDim.limboBiome = (new BiomeGenLimbo(properties.LimboBiomeID));
mod_pocketDim.pocketBiome = (new BiomeGenPocket(properties.PocketBiomeID));
@ -224,8 +224,8 @@ public class mod_pocketDim
tracker = new PlayerTracker();
GameRegistry.registerPlayerTracker(tracker);
GameRegistry.registerBlock(goldDoor, "Golden Door");
GameRegistry.registerBlock(goldDimDoor, "Golden Dimensional Door");
GameRegistry.registerBlock(goldenDoor, "Golden Door");
GameRegistry.registerBlock(goldenDimensionalDoor, "Golden Dimensional Door");
GameRegistry.registerBlock(unstableDoor, "Unstable Door");
GameRegistry.registerBlock(warpDoor, "Warp Door");
GameRegistry.registerBlock(blockRift, "Rift");
@ -241,9 +241,9 @@ public class mod_pocketDim
DimensionManager.registerProviderType(properties.LimboProviderID, LimboProvider.class, false);
DimensionManager.registerDimension(properties.LimboDimensionID, properties.LimboProviderID);
LanguageRegistry.addName(goldDoor, "Golden Door");
LanguageRegistry.addName(goldDimDoor, "Golden Dimensional Door");
LanguageRegistry.addName(transientDoor , "transientDoor");
LanguageRegistry.addName(goldenDoor, "Golden Door");
LanguageRegistry.addName(goldenDimensionalDoor, "Golden Dimensional Door");
LanguageRegistry.addName(transientDoor , "Transient Door");
LanguageRegistry.addName(blockRift , "Rift");
LanguageRegistry.addName(blockLimbo , "Unraveled Fabric");
LanguageRegistry.addName(warpDoor , "Warp Door");
@ -253,16 +253,16 @@ public class mod_pocketDim
LanguageRegistry.addName(dimensionalDoor, "Dimensional Door");
LanguageRegistry.addName(transTrapdoor, "Transdimensional Trapdoor");
LanguageRegistry.addName(itemExitDoor, "Warp Door");
LanguageRegistry.addName(itemLinkSignature , "Rift Signature");
LanguageRegistry.addName(itemGoldDoor, "Golden Door");
LanguageRegistry.addName(itemGoldDimDoor , "Golden Dimensional Door");
LanguageRegistry.addName(itemWarpDoor, "Warp Door");
LanguageRegistry.addName(itemRiftSignature, "Rift Signature");
LanguageRegistry.addName(itemGoldenDoor, "Golden Door");
LanguageRegistry.addName(itemGoldenDimensionalDoor, "Golden Dimensional Door");
LanguageRegistry.addName(itemStabilizedLinkSignature, "Stabilized Rift Signature");
LanguageRegistry.addName(itemRiftRemover , "Rift Remover");
LanguageRegistry.addName(itemStableFabric , "Stable Fabric");
LanguageRegistry.addName(itemChaosDoor , "Unstable Door");
LanguageRegistry.addName(itemDimDoor, "Dimensional Door");
LanguageRegistry.addName(itemRiftBlade , "Rift Blade");
LanguageRegistry.addName(itemRiftRemover, "Rift Remover");
LanguageRegistry.addName(itemStableFabric, "Stable Fabric");
LanguageRegistry.addName(itemUnstableDoor, "Unstable Door");
LanguageRegistry.addName(itemDimensionalDoor, "Dimensional Door");
LanguageRegistry.addName(itemRiftBlade, "Rift Blade");
LanguageRegistry.addName(itemWorldThread, "World Thread");
@ -286,20 +286,16 @@ public class mod_pocketDim
LanguageRegistry.instance().addStringLocalization("entity.DimDoors.Obelisk.name", "Monolith");
CraftingManager.registerRecipies();
CraftingManager.registerRecipes(properties);
DungeonHelper.initialize();
this.riftGen.initGateways();
coriumFluid = new LiquidCorium("Corium").setDensity(1000).setTemperature(3473).setDensity(9400).setLuminosity(6).setRarity(EnumRarity.rare);
coriumBlock = new LiquidCoriumBlock(900, coriumFluid, Material.lava).setQuantaPerBlock(16).setTickRate(20).setTickRandomly(true).setUnlocalizedName("Corium");
coriumBlock = new LiquidCoriumBlock(properties.CoriumBlockID, coriumFluid, Material.lava).setQuantaPerBlock(16).setTickRate(20).setTickRandomly(true).setUnlocalizedName("Corium");
FluidRegistry.registerFluid(coriumFluid);
GameRegistry.registerBlock(coriumBlock,"Corium");
LanguageRegistry.addName(coriumBlock, "Corium");
// Register loot chests
DDLoot.registerInfo(properties);
proxy.loadTextures();

View file

@ -349,7 +349,7 @@ public class PocketBuilder
int blockID = world.getBlockId(source.getX(), source.getY() - 1, source.getZ());
if (blockID != properties.DimensionalDoorID && blockID != properties.WarpDoorID &&
blockID != properties.TransientDoorID &&
blockID != properties.GoldDimDoorID)
blockID != properties.GoldenDimensionalDoorID)
{
throw new IllegalStateException("The link's source is not a door block. It should be impossible to traverse a rift without a door!");
}