Updated for 1.7.2
This commit is contained in:
parent
cc178e1a3b
commit
29228e18fe
105 changed files with 1939 additions and 2690 deletions
227
.gitignore
vendored
227
.gitignore
vendored
|
|
@ -1,220 +1,9 @@
|
|||
#################
|
||||
## Eclipse
|
||||
#################
|
||||
/*
|
||||
|
||||
*.pydevproject
|
||||
.project
|
||||
.metadata
|
||||
common/bin/
|
||||
tmp/
|
||||
*.tmp
|
||||
*.bak
|
||||
*.swp
|
||||
*~.nib
|
||||
local.properties
|
||||
.classpath
|
||||
.settings/
|
||||
.loadpath
|
||||
|
||||
# External tool builders
|
||||
.externalToolBuilders/
|
||||
|
||||
# Locally stored "Eclipse launch configurations"
|
||||
*.launch
|
||||
|
||||
# CDT-specific
|
||||
.cproject
|
||||
|
||||
# PDT-specific
|
||||
.buildpath
|
||||
|
||||
|
||||
#################
|
||||
## Visual Studio
|
||||
#################
|
||||
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.sln.docstates
|
||||
|
||||
# Build results
|
||||
|
||||
[Dd]ebug/
|
||||
[Rr]elease/
|
||||
x64/
|
||||
build/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
*_i.c
|
||||
*_p.c
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.log
|
||||
*.scc
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# NCrunch
|
||||
*.ncrunch*
|
||||
.*crunch*.local.xml
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.Publish.xml
|
||||
*.pubxml
|
||||
|
||||
# NuGet Packages Directory
|
||||
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
|
||||
#packages/
|
||||
|
||||
# Windows Azure Build Output
|
||||
csx
|
||||
*.build.csdef
|
||||
|
||||
# Windows Store app package directory
|
||||
AppPackages/
|
||||
|
||||
# Others
|
||||
sql/
|
||||
*.Cache
|
||||
ClientBin/
|
||||
[Ss]tyle[Cc]op.*
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.[Pp]ublish.xml
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file to a newer
|
||||
# Visual Studio version. Backup files are not needed, because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
|
||||
# SQL Server files
|
||||
App_Data/*.mdf
|
||||
App_Data/*.ldf
|
||||
|
||||
#############
|
||||
## Windows detritus
|
||||
#############
|
||||
|
||||
# Windows image file caches
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
|
||||
# Folder config file
|
||||
Desktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Mac crap
|
||||
.DS_Store
|
||||
|
||||
|
||||
#############
|
||||
## Python
|
||||
#############
|
||||
|
||||
*.py[co]
|
||||
|
||||
# Packages
|
||||
*.egg
|
||||
*.egg-info
|
||||
dist/
|
||||
build/
|
||||
eggs/
|
||||
parts/
|
||||
var/
|
||||
sdist/
|
||||
develop-eggs/
|
||||
.installed.cfg
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
.coverage
|
||||
.tox
|
||||
|
||||
#Translations
|
||||
*.mo
|
||||
|
||||
#Mr Developer
|
||||
.mr.developer.cfg
|
||||
|
||||
/mcp/*
|
||||
/eclipse/*
|
||||
/api/*
|
||||
/releases/*
|
||||
!/common/assets/
|
||||
!/common/mysticores/
|
||||
!/common/mysticruins/
|
||||
!/common/mysticstones/
|
||||
!/common/mysticworld/
|
||||
!/common/mcmod.info
|
||||
!/common/build.gradle
|
||||
14
common/MysticMods.eml
Normal file
14
common/MysticMods.eml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component inherit-compiler-output="true" inheritJdk="true">
|
||||
<output-test url="file://$MODULE_DIR$/../../MinecraftForge/build/test/MysticMods"/>
|
||||
<exclude-output/>
|
||||
<contentEntry url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/.gradle"/>
|
||||
<excludeFolder url="file://$MODULE_DIR$/.settings"/>
|
||||
<excludeFolder url="file://$MODULE_DIR$/bin"/>
|
||||
<excludeFolder url="file://$MODULE_DIR$/build"/>
|
||||
</contentEntry>
|
||||
<levels>
|
||||
<level name="Gradle: forge-1.6.4-9.11.1.964-mcp" value="project"/>
|
||||
</levels>
|
||||
</component>
|
||||
|
|
@ -8,14 +8,49 @@
|
|||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/api/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/MysticMods" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/eclipse" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" exported="" name="Gradle: forge-1.6.4-9.11.1.964-mcp" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: scala-compiler-2.10.2" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: scala-library-2.10.2" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: trove4j-3.0.3" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: soundsystem-20120107" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: lwjgl-2.9.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: codecwav-20101023" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: lwjgl-platform-2.9.0-natives-osx" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: jinput-2.0.5" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: libraryjavasound-20101123" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: jinput-platform-2.0.5-natives-osx" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: jinput-platform-2.0.5-natives-windows" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: commons-lang3-3.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: asm-debug-all-4.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: gson-2.2.4" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: vecmath-1.3.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: commons-io-2.4" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: lzma-0.0.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: icu4j-core-mojang-51.2" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: launchwrapper-1.9" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: librarylwjglopenal-20100824" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: guava-15.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: log4j-api-2.0-beta9" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: jutils-1.0.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: lwjgl_util-2.9.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: codecjorbis-20101023" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: authlib-1.3" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: lwjgl-platform-2.9.0-natives-windows" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: jopt-simple-4.5" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: lwjgl-platform-2.9.0-natives-linux" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: log4j-core-2.0-beta9" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: netty-all-4.0.10.Final" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: jinput-platform-2.0.5-natives-linux" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: scala-reflect-2.10.2" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: forgeSrc-1.7.2-10.12.0.1032" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
|
|
|
|||
|
|
@ -7,25 +7,30 @@ import mysticores.MysticOres;
|
|||
import mysticores.items.Items;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockBase extends Block {
|
||||
Icon[] textures;
|
||||
IIcon[] textures;
|
||||
|
||||
public BlockBase(int ID) {
|
||||
super(ID, Material.rock);
|
||||
setCreativeTab(MysticOres.MysticOresTab);
|
||||
public BlockBase() {
|
||||
super(Material.rock);
|
||||
setCreativeTab(MysticOres.MysticOresTab);
|
||||
setHarvestLevel("pickaxe", 2);
|
||||
setHarvestLevel("pickaxe", 3, 0);
|
||||
setHarvestLevel("pickaxe", 3, 2);
|
||||
setHarvestLevel("pickaxe", 1, 6);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -74,7 +79,7 @@ public class BlockBase extends Block {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIcon(int side, int meta) {
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return textures[meta];
|
||||
}
|
||||
|
||||
|
|
@ -95,14 +100,14 @@ public class BlockBase extends Block {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(int i, CreativeTabs tab, List list) {
|
||||
for (int meta = 0; meta < ItemBase.BLOCK_NAMES.length; meta++) {
|
||||
public void getSubBlocks(Item i, CreativeTabs tab, List list) {
|
||||
for (int meta = 0; meta < BlockHandler.BLOCK_NAMES.size(); meta++) {
|
||||
list.add(new ItemStack(i, 1, meta));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int idDropped(int par1, Random random, int par3) {
|
||||
public Item getItemDropped(int par1, Random random, int par3) {
|
||||
switch (par1) {
|
||||
case 1:
|
||||
case 2:
|
||||
|
|
@ -111,7 +116,7 @@ public class BlockBase extends Block {
|
|||
case 7:
|
||||
case 11:
|
||||
case 12:
|
||||
return Items.Resource.itemID;
|
||||
return Items.Resource;
|
||||
case 8:
|
||||
return BlackSoulstoneDrops(par1, random, par3);
|
||||
case 9:
|
||||
|
|
@ -119,17 +124,12 @@ public class BlockBase extends Block {
|
|||
case 10:
|
||||
return RedSoulstoneDrops(par1, random, par3);
|
||||
default:
|
||||
return blockID;
|
||||
return super.getItemDropped(par1, random, par3);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int idPicked(World world, int x, int y, int z) {
|
||||
return this.blockID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBlockSolidOnSide(World world, int x, int y, int z, ForgeDirection side) {
|
||||
public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side) {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if (meta == 12)
|
||||
return false;
|
||||
|
|
@ -138,9 +138,9 @@ public class BlockBase extends Block {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
public boolean isOpaqueCube(){
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int quantityDropped(int meta, int fortune, Random random) {
|
||||
|
|
@ -164,79 +164,73 @@ public class BlockBase extends Block {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister register) {
|
||||
textures = new Icon[16];
|
||||
for (int i = 0; i < ItemBase.BLOCK_NAMES.length; i++) {
|
||||
textures[i] = register.registerIcon("mysticores:" + ItemBase.BLOCK_NAMES[i]);
|
||||
public void registerBlockIcons(IIconRegister register) {
|
||||
textures = new IIcon[16];
|
||||
for (int i = 0; i < BlockHandler.BLOCK_NAMES.size(); i++) {
|
||||
textures[i] = register.registerIcon("mysticores:" + BlockHandler.BLOCK_NAMES.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
public boolean renderAsNormalBlock(){
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int par) {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
int blockID = world.getBlockId(x, y, z);
|
||||
if (meta == 12 && blockID == this.blockID)
|
||||
Block blockID = world.getBlock(x, y, z);
|
||||
if (meta == 12 && blockID == this)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canSilkHarvest() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static int BlackSoulstoneDrops(int par1, Random random, int par3) {
|
||||
public static Item BlackSoulstoneDrops(int par1, Random random, int par3) {
|
||||
int rand = random.nextInt(2);
|
||||
switch (rand) {
|
||||
case 0:
|
||||
return Item.coal.itemID;
|
||||
return net.minecraft.init.Items.coal;
|
||||
case 1:
|
||||
return Item.gunpowder.itemID;
|
||||
return net.minecraft.init.Items.gunpowder;
|
||||
default:
|
||||
return Item.sugar.itemID;
|
||||
return net.minecraft.init.Items.sugar;
|
||||
}
|
||||
}
|
||||
|
||||
public static int BlueSoulstoneDrops(int par1, Random random, int par3) {
|
||||
public static Item BlueSoulstoneDrops(int par1, Random random, int par3) {
|
||||
int rand = random.nextInt(5);
|
||||
switch (rand) {
|
||||
case 0:
|
||||
return Item.diamond.itemID;
|
||||
return net.minecraft.init.Items.diamond;
|
||||
case 1:
|
||||
return Block.obsidian.blockID;
|
||||
return Item.getItemFromBlock(Blocks.obsidian);
|
||||
case 2:
|
||||
return Item.gunpowder.itemID;
|
||||
return net.minecraft.init.Items.gunpowder;
|
||||
case 3:
|
||||
return Item.glowstone.itemID;
|
||||
return net.minecraft.init.Items.glowstone_dust;
|
||||
case 4:
|
||||
return Item.blazeRod.itemID;
|
||||
return net.minecraft.init.Items.blaze_rod;
|
||||
case 5:
|
||||
return Item.emerald.itemID;
|
||||
default:
|
||||
return Item.emerald.itemID;
|
||||
return net.minecraft.init.Items.emerald;
|
||||
}
|
||||
}
|
||||
|
||||
public static int RedSoulstoneDrops(int par1, Random random, int par3) {
|
||||
public static Item RedSoulstoneDrops(int par1, Random random, int par3) {
|
||||
int rand = random.nextInt(4);
|
||||
switch (rand) {
|
||||
case 0:
|
||||
return Item.glowstone.itemID;
|
||||
return net.minecraft.init.Items.glowstone_dust;
|
||||
case 1:
|
||||
return Item.gunpowder.itemID;
|
||||
return net.minecraft.init.Items.gunpowder;
|
||||
case 2:
|
||||
return Item.redstone.itemID;
|
||||
return net.minecraft.init.Items.redstone;
|
||||
case 3:
|
||||
return Block.obsidian.blockID;
|
||||
return Item.getItemFromBlock(Blocks.obsidian);
|
||||
default:
|
||||
return Item.blazePowder.itemID;
|
||||
return net.minecraft.init.Items.blaze_powder;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,31 +1,18 @@
|
|||
package mysticores.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class BlockHandler {
|
||||
public static ArrayList<String> BLOCK_NAMES = new ArrayList<String>(Arrays.asList("Adamantine Ore", "Amethyst Ore", "Iridium Ore", "Mithril Ore", "Tourmaline Ore", "Topaz Ore", "Verdite Ore", "Bloodstone", "Black Soulstone",
|
||||
"Blue Soulstone", "Red Soulstone", "Agate Ore", "Tempered Glass"));
|
||||
public static Block BlockBase;
|
||||
public static int BASEID = 540;
|
||||
|
||||
public static void initialize() {
|
||||
BlockBase = new BlockBase(BASEID).setStepSound(Block.soundStoneFootstep);
|
||||
GameRegistry.registerBlock(BlockBase, ItemBase.class, "Base Blocks");
|
||||
setBlockHarvestLevels();
|
||||
}
|
||||
|
||||
private static void setBlockHarvestLevels() {
|
||||
MinecraftForge.setBlockHarvestLevel(BlockBase, 0, "pickaxe", 3);
|
||||
MinecraftForge.setBlockHarvestLevel(BlockBase, 1, "pickaxe", 2);
|
||||
MinecraftForge.setBlockHarvestLevel(BlockBase, 2, "pickaxe", 3);
|
||||
MinecraftForge.setBlockHarvestLevel(BlockBase, 3, "pickaxe", 2);
|
||||
MinecraftForge.setBlockHarvestLevel(BlockBase, 4, "pickaxe", 2);
|
||||
MinecraftForge.setBlockHarvestLevel(BlockBase, 5, "pickaxe", 2);
|
||||
MinecraftForge.setBlockHarvestLevel(BlockBase, 6, "pickaxe", 1);
|
||||
MinecraftForge.setBlockHarvestLevel(BlockBase, 7, "pickaxe", 2);
|
||||
MinecraftForge.setBlockHarvestLevel(BlockBase, 8, "pickaxe", 2);
|
||||
MinecraftForge.setBlockHarvestLevel(BlockBase, 9, "pickaxe", 2);
|
||||
MinecraftForge.setBlockHarvestLevel(BlockBase, 10, "pickaxe", 2);
|
||||
MinecraftForge.setBlockHarvestLevel(BlockBase, 11, "pickaxe", 2);
|
||||
BlockBase = new BlockBase().setStepSound(Block.soundTypeStone);
|
||||
GameRegistry.registerBlock(BlockBase, ItemBase.class, "Base Blocks", "mysticores", BLOCK_NAMES);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,36 +1,22 @@
|
|||
package mysticores.blocks;
|
||||
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlockWithMetadata;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemBase extends ItemBlock {
|
||||
public static String[] BLOCK_NAMES = new String[] { "Adamantine Ore", "Amethyst Ore", "Iridium Ore", "Mithril Ore", "Tourmaline Ore", "Topaz Ore", "Verdite Ore", "Bloodstone", "Black Soulstone",
|
||||
"Blue Soulstone", "Red Soulstone", "Agate Ore", "Tempered Glass" };
|
||||
import java.util.ArrayList;
|
||||
|
||||
public ItemBase(int par1) {
|
||||
super(par1);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIconFromDamage(int par1) {
|
||||
return BlockHandler.BlockBase.getIcon(2, par1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int par1) {
|
||||
return par1;
|
||||
public class ItemBase extends ItemBlockWithMetadata {
|
||||
public final ArrayList<String> names;
|
||||
public ItemBase(Block block, ArrayList<String> names) {
|
||||
super(block, block);
|
||||
this.names = names;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemStack) {
|
||||
int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, BLOCK_NAMES.length);
|
||||
return BLOCK_NAMES[meta];
|
||||
int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, names.size());
|
||||
return names.get(meta);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,22 @@
|
|||
package mysticores.items;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.EnumToolMaterial;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.common.EnumHelper;
|
||||
import net.minecraftforge.common.util.EnumHelper;
|
||||
|
||||
public class EnumTools
|
||||
{
|
||||
static EnumToolMaterial verditeToolMaterial = EnumHelper.addToolMaterial("Verdite", 1, 262, 5.0F, 1, 5);
|
||||
static EnumToolMaterial mithrilToolMaterial = EnumHelper.addToolMaterial("Mithril", 2, 500, 7.0F, 2, 9);
|
||||
static EnumToolMaterial adamantineToolMaterial = EnumHelper.addToolMaterial("Adamantine", 3, 3000, 10.0F, 5, 13);
|
||||
static EnumToolMaterial iridiumToolMaterial = EnumHelper.addToolMaterial("Iridium", 3, 4000, 12.0F, 7, 15);
|
||||
static EnumToolMaterial obsidianToolMaterial = EnumHelper.addToolMaterial("Obsidian", 2, 100, 4.0F, 6, 11);
|
||||
static EnumToolMaterial bloodstoneToolMaterial = EnumHelper.addToolMaterial("Bloodstone", 3, 200, 16.0F, 8, 12);
|
||||
static Item.ToolMaterial verditeToolMaterial = EnumHelper.addToolMaterial("Verdite", 1, 262, 5.0F, 1, 5);
|
||||
static Item.ToolMaterial mithrilToolMaterial = EnumHelper.addToolMaterial("Mithril", 2, 500, 7.0F, 2, 9);
|
||||
static Item.ToolMaterial adamantineToolMaterial = EnumHelper.addToolMaterial("Adamantine", 3, 3000, 10.0F, 5, 13);
|
||||
static Item.ToolMaterial iridiumToolMaterial = EnumHelper.addToolMaterial("Iridium", 3, 4000, 12.0F, 7, 15);
|
||||
static Item.ToolMaterial obsidianToolMaterial = EnumHelper.addToolMaterial("Obsidian", 2, 100, 4.0F, 6, 11);
|
||||
static Item.ToolMaterial bloodstoneToolMaterial = EnumHelper.addToolMaterial("Bloodstone", 3, 200, 16.0F, 8, 12);
|
||||
|
||||
static { verditeToolMaterial.customCraftingMaterial = Item.itemsList[Items.Resource.itemID]; }
|
||||
static { mithrilToolMaterial.customCraftingMaterial = Item.itemsList[Items.Resource.itemID]; }
|
||||
static { adamantineToolMaterial.customCraftingMaterial = Item.itemsList[Items.Resource.itemID]; }
|
||||
static { iridiumToolMaterial.customCraftingMaterial = Item.itemsList[Items.Resource.itemID]; }
|
||||
static { obsidianToolMaterial.customCraftingMaterial = Item.itemsList[Block.obsidian.blockID]; }
|
||||
static { bloodstoneToolMaterial.customCraftingMaterial = Item.itemsList[Items.Resource.itemID]; }
|
||||
static { verditeToolMaterial.customCraftingMaterial = Items.Resource; }
|
||||
static { mithrilToolMaterial.customCraftingMaterial = Items.Resource; }
|
||||
static { adamantineToolMaterial.customCraftingMaterial = Items.Resource; }
|
||||
static { iridiumToolMaterial.customCraftingMaterial = Items.Resource; }
|
||||
static { obsidianToolMaterial.customCraftingMaterial = Item.getItemFromBlock(Blocks.obsidian); }
|
||||
static { bloodstoneToolMaterial.customCraftingMaterial = Items.Resource; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,36 +3,36 @@ package mysticores.items;
|
|||
import java.util.List;
|
||||
|
||||
import mysticores.MysticOres;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemResource extends Item {
|
||||
private Icon[] icons;
|
||||
private IIcon[] icons;
|
||||
private static final String[] RESOURCE_TYPES = new String[] { "Verdite Ingot", "Mithril Ingot", "Adamantine Ingot", "Iridium Ingot", "Iridium Nugget", "Tourmaline Gem", "Agate Gem", "Topaz Gem",
|
||||
"Amethyst Gem", "Mystic Powder", "Bloodstone Shard", "Glass Shard", "Obsidian Shard", "Obsidian Rod" };
|
||||
|
||||
public ItemResource(int id) {
|
||||
super(id);
|
||||
public ItemResource() {
|
||||
super();
|
||||
this.setHasSubtypes(true);
|
||||
this.setCreativeTab(MysticOres.MysticOresTab);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIconFromDamage(int meta) {
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
int j = MathHelper.clamp_int(meta, 0, RESOURCE_TYPES.length);
|
||||
return icons[j];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) {
|
||||
public void getSubItems(Item par1, CreativeTabs par2CreativeTabs, List par3List) {
|
||||
for (int var4 = 0; var4 < RESOURCE_TYPES.length; var4++)
|
||||
par3List.add(new ItemStack(par1, 1, var4));
|
||||
}
|
||||
|
|
@ -45,8 +45,8 @@ public class ItemResource extends Item {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister iconRegister) {
|
||||
icons = new Icon[RESOURCE_TYPES.length];
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
icons = new IIcon[RESOURCE_TYPES.length];
|
||||
for (int i = 0; i < RESOURCE_TYPES.length; ++i)
|
||||
icons[i] = iconRegister.registerIcon("mysticores:" + RESOURCE_TYPES[i]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,15 +9,15 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemSatchel extends Item {
|
||||
public ItemSatchel(int par1) {
|
||||
super(par1);
|
||||
public ItemSatchel() {
|
||||
super();
|
||||
setCreativeTab(MysticOres.MysticOresTab);
|
||||
setMaxStackSize(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean hasEffect(ItemStack par1ItemStack) {
|
||||
public boolean hasEffect(ItemStack par1ItemStack, int i) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,11 +4,8 @@ import java.lang.reflect.Field;
|
|||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import mysticores.MysticOres;
|
||||
import mysticores.lib.ItemID;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemAxe;
|
||||
import net.minecraft.item.ItemHoe;
|
||||
import net.minecraft.item.ItemPickaxe;
|
||||
import net.minecraft.item.ItemSpade;
|
||||
import net.minecraft.item.ItemSword;
|
||||
|
||||
|
|
@ -23,62 +20,62 @@ public class Items {
|
|||
public static Item Satchel;
|
||||
|
||||
public static void initialize() {
|
||||
Resource = new ItemResource(ItemID.RESOURCES);
|
||||
VerditeSword = new ItemSword(ItemID.VERDITESWORD, EnumTools.verditeToolMaterial).setUnlocalizedName("VerditeSword").setTextureName("mysticores:VerditeSword")
|
||||
Resource = new ItemResource();
|
||||
VerditeSword = new ItemSword(EnumTools.verditeToolMaterial).setUnlocalizedName("VerditeSword").setTextureName("mysticores:VerditeSword")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
VerditePickaxe = new ItemPickaxe(ItemID.VERDITEPICKAXE, EnumTools.verditeToolMaterial).setUnlocalizedName("VerditePickaxe").setTextureName("mysticores:VerditePickaxe")
|
||||
VerditePickaxe = new ItemPick(EnumTools.verditeToolMaterial).setUnlocalizedName("VerditePickaxe").setTextureName("mysticores:VerditePickaxe")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
VerditeShovel = new ItemSpade(ItemID.VERDITESHOVEL, EnumTools.verditeToolMaterial).setUnlocalizedName("VerditeShovel").setTextureName("mysticores:VerditeShovel")
|
||||
VerditeShovel = new ItemSpade(EnumTools.verditeToolMaterial).setUnlocalizedName("VerditeShovel").setTextureName("mysticores:VerditeShovel")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
VerditeAxe = new ItemAxe(ItemID.VERDITEAXE, EnumTools.verditeToolMaterial).setUnlocalizedName("VerditeAxe").setTextureName("mysticores:VerditeAxe").setCreativeTab(MysticOres.MysticOresTab);
|
||||
VerditeHoe = new ItemHoe(ItemID.VERDITEHOE, EnumTools.verditeToolMaterial).setUnlocalizedName("VerditeHoe").setTextureName("mysticores:VerditeHoe").setCreativeTab(MysticOres.MysticOresTab);
|
||||
MithrilSword = new ItemSword(ItemID.MITHRILSWORD, EnumTools.mithrilToolMaterial).setUnlocalizedName("MithrilSword").setTextureName("mysticores:MithrilSword")
|
||||
VerditeAxe = new ItemHatchet(EnumTools.verditeToolMaterial).setUnlocalizedName("VerditeAxe").setTextureName("mysticores:VerditeAxe").setCreativeTab(MysticOres.MysticOresTab);
|
||||
VerditeHoe = new ItemHoe(EnumTools.verditeToolMaterial).setUnlocalizedName("VerditeHoe").setTextureName("mysticores:VerditeHoe").setCreativeTab(MysticOres.MysticOresTab);
|
||||
MithrilSword = new ItemSword(EnumTools.mithrilToolMaterial).setUnlocalizedName("MithrilSword").setTextureName("mysticores:MithrilSword")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
MithrilPickaxe = new ItemPickaxe(ItemID.MITHRILPICKAXE, EnumTools.mithrilToolMaterial).setUnlocalizedName("MithrilPickaxe").setTextureName("mysticores:MithrilPickaxe")
|
||||
MithrilPickaxe = new ItemPick(EnumTools.mithrilToolMaterial).setUnlocalizedName("MithrilPickaxe").setTextureName("mysticores:MithrilPickaxe")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
MithrilShovel = new ItemSpade(ItemID.MITHRILSHOVEL, EnumTools.mithrilToolMaterial).setUnlocalizedName("MithrilShovel").setTextureName("mysticores:MithrilShovel")
|
||||
MithrilShovel = new ItemSpade(EnumTools.mithrilToolMaterial).setUnlocalizedName("MithrilShovel").setTextureName("mysticores:MithrilShovel")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
MithrilAxe = new ItemAxe(ItemID.MITHRILAXE, EnumTools.mithrilToolMaterial).setUnlocalizedName("MithrilAxe").setTextureName("mysticores:MithrilAxe").setCreativeTab(MysticOres.MysticOresTab);
|
||||
MithrilHoe = new ItemHoe(ItemID.MITHRILHOE, EnumTools.mithrilToolMaterial).setUnlocalizedName("MithrilHoe").setTextureName("mysticores:MithrilHoe").setCreativeTab(MysticOres.MysticOresTab);
|
||||
AdamantineSword = new ItemSword(ItemID.ADAMANTINESWORD, EnumTools.adamantineToolMaterial).setUnlocalizedName("AdamantineSword").setTextureName("mysticores:AdamantineSword")
|
||||
MithrilAxe = new ItemHatchet(EnumTools.mithrilToolMaterial).setUnlocalizedName("MithrilAxe").setTextureName("mysticores:MithrilAxe").setCreativeTab(MysticOres.MysticOresTab);
|
||||
MithrilHoe = new ItemHoe(EnumTools.mithrilToolMaterial).setUnlocalizedName("MithrilHoe").setTextureName("mysticores:MithrilHoe").setCreativeTab(MysticOres.MysticOresTab);
|
||||
AdamantineSword = new ItemSword(EnumTools.adamantineToolMaterial).setUnlocalizedName("AdamantineSword").setTextureName("mysticores:AdamantineSword")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
AdamantinePickaxe = new ItemPickaxe(ItemID.ADAMANTINEPICKAXE, EnumTools.adamantineToolMaterial).setUnlocalizedName("AdamantinePickaxe").setTextureName("mysticores:AdamantinePickaxe")
|
||||
AdamantinePickaxe = new ItemPick(EnumTools.adamantineToolMaterial).setUnlocalizedName("AdamantinePickaxe").setTextureName("mysticores:AdamantinePickaxe")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
AdamantineShovel = new ItemSpade(ItemID.ADAMANTINESHOVEL, EnumTools.adamantineToolMaterial).setUnlocalizedName("AdamantineShovel").setTextureName("mysticores:AdamantineShovel")
|
||||
AdamantineShovel = new ItemSpade(EnumTools.adamantineToolMaterial).setUnlocalizedName("AdamantineShovel").setTextureName("mysticores:AdamantineShovel")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
AdamantineAxe = new ItemAxe(ItemID.ADAMANTINEAXE, EnumTools.adamantineToolMaterial).setUnlocalizedName("AdamantineAxe").setTextureName("mysticores:AdamantineAxe")
|
||||
AdamantineAxe = new ItemHatchet(EnumTools.adamantineToolMaterial).setUnlocalizedName("AdamantineAxe").setTextureName("mysticores:AdamantineAxe")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
AdamantineHoe = new ItemHoe(ItemID.ADAMANTINEHOE, EnumTools.adamantineToolMaterial).setUnlocalizedName("AdamantineHoe").setTextureName("mysticores:AdamantineHoe")
|
||||
AdamantineHoe = new ItemHoe(EnumTools.adamantineToolMaterial).setUnlocalizedName("AdamantineHoe").setTextureName("mysticores:AdamantineHoe")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
IridiumSword = new ItemSword(ItemID.IRIDIUMSWORD, EnumTools.iridiumToolMaterial).setUnlocalizedName("IridiumSword").setTextureName("mysticores:IridiumSword")
|
||||
IridiumSword = new ItemSword(EnumTools.iridiumToolMaterial).setUnlocalizedName("IridiumSword").setTextureName("mysticores:IridiumSword")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
IridiumPickaxe = new ItemPickaxe(ItemID.IRIDIUMPICKAXE, EnumTools.iridiumToolMaterial).setUnlocalizedName("IridiumPickaxe").setTextureName("mysticores:IridiumPickaxe")
|
||||
IridiumPickaxe = new ItemPick(EnumTools.iridiumToolMaterial).setUnlocalizedName("IridiumPickaxe").setTextureName("mysticores:IridiumPickaxe")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
IridiumShovel = new ItemSpade(ItemID.IRIDIUMSHOVEL, EnumTools.iridiumToolMaterial).setUnlocalizedName("IridiumShovel").setTextureName("mysticores:IridiumShovel")
|
||||
IridiumShovel = new ItemSpade(EnumTools.iridiumToolMaterial).setUnlocalizedName("IridiumShovel").setTextureName("mysticores:IridiumShovel")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
IridiumAxe = new ItemAxe(ItemID.IRIDIUMAXE, EnumTools.iridiumToolMaterial).setUnlocalizedName("IridiumAxe").setTextureName("mysticores:IridiumAxe").setCreativeTab(MysticOres.MysticOresTab);
|
||||
IridiumHoe = new ItemHoe(ItemID.IRIDIUMHOE, EnumTools.iridiumToolMaterial).setUnlocalizedName("IridiumHoe").setTextureName("mysticores:IridiumHoe").setCreativeTab(MysticOres.MysticOresTab);
|
||||
BloodstoneSword = new ItemSword(ItemID.BLOODSTONESWORD, EnumTools.bloodstoneToolMaterial).setUnlocalizedName("BloodstoneSword").setTextureName("mysticores:BloodstoneSword")
|
||||
IridiumAxe = new ItemHatchet(EnumTools.iridiumToolMaterial).setUnlocalizedName("IridiumAxe").setTextureName("mysticores:IridiumAxe").setCreativeTab(MysticOres.MysticOresTab);
|
||||
IridiumHoe = new ItemHoe(EnumTools.iridiumToolMaterial).setUnlocalizedName("IridiumHoe").setTextureName("mysticores:IridiumHoe").setCreativeTab(MysticOres.MysticOresTab);
|
||||
BloodstoneSword = new ItemSword(EnumTools.bloodstoneToolMaterial).setUnlocalizedName("BloodstoneSword").setTextureName("mysticores:BloodstoneSword")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
BloodstonePickaxe = new ItemPickaxe(ItemID.BLOODSTONEPICKAXE, EnumTools.bloodstoneToolMaterial).setUnlocalizedName("BloodstonePickaxe").setTextureName("mysticores:BloodstonePickaxe")
|
||||
BloodstonePickaxe = new ItemPick(EnumTools.bloodstoneToolMaterial).setUnlocalizedName("BloodstonePickaxe").setTextureName("mysticores:BloodstonePickaxe")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
BloodstoneShovel = new ItemSpade(ItemID.BLOODSTONESHOVEL, EnumTools.bloodstoneToolMaterial).setUnlocalizedName("BloodstoneShovel").setTextureName("mysticores:BloodstoneShovel")
|
||||
BloodstoneShovel = new ItemSpade(EnumTools.bloodstoneToolMaterial).setUnlocalizedName("BloodstoneShovel").setTextureName("mysticores:BloodstoneShovel")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
BloodstoneAxe = new ItemAxe(ItemID.BLOODSTONEAXE, EnumTools.bloodstoneToolMaterial).setUnlocalizedName("BloodstoneAxe").setTextureName("mysticores:BloodstoneAxe")
|
||||
BloodstoneAxe = new ItemHatchet(EnumTools.bloodstoneToolMaterial).setUnlocalizedName("BloodstoneAxe").setTextureName("mysticores:BloodstoneAxe")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
BloodstoneHoe = new ItemHoe(ItemID.BLOODSTONEHOE, EnumTools.bloodstoneToolMaterial).setUnlocalizedName("BloodstoneHoe").setTextureName("mysticores:BloodstoneHoe")
|
||||
BloodstoneHoe = new ItemHoe(EnumTools.bloodstoneToolMaterial).setUnlocalizedName("BloodstoneHoe").setTextureName("mysticores:BloodstoneHoe")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
ObsidianSword = new ItemSword(ItemID.OBSIDIANSWORD, EnumTools.obsidianToolMaterial).setUnlocalizedName("ObsidianSword").setTextureName("mysticores:ObsidianSword")
|
||||
ObsidianSword = new ItemSword(EnumTools.obsidianToolMaterial).setUnlocalizedName("ObsidianSword").setTextureName("mysticores:ObsidianSword")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
ObsidianPickaxe = new ItemPickaxe(ItemID.OBSIDIANPICKAXE, EnumTools.obsidianToolMaterial).setUnlocalizedName("ObsidianPickaxe").setTextureName("mysticores:ObsidianPickaxe")
|
||||
ObsidianPickaxe = new ItemPick(EnumTools.obsidianToolMaterial).setUnlocalizedName("ObsidianPickaxe").setTextureName("mysticores:ObsidianPickaxe")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
ObsidianShovel = new ItemSpade(ItemID.OBSIDIANSHOVEL, EnumTools.obsidianToolMaterial).setUnlocalizedName("ObsidianShovel").setTextureName("mysticores:ObsidianShovel")
|
||||
ObsidianShovel = new ItemSpade(EnumTools.obsidianToolMaterial).setUnlocalizedName("ObsidianShovel").setTextureName("mysticores:ObsidianShovel")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
ObsidianAxe = new ItemAxe(ItemID.OBSIDIANAXE, EnumTools.obsidianToolMaterial).setUnlocalizedName("ObsidianAxe").setTextureName("mysticores:ObsidianAxe")
|
||||
ObsidianAxe = new ItemHatchet(EnumTools.obsidianToolMaterial).setUnlocalizedName("ObsidianAxe").setTextureName("mysticores:ObsidianAxe")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
ObsidianHoe = new ItemHoe(ItemID.OBSIDIANHOE, EnumTools.obsidianToolMaterial).setUnlocalizedName("ObsidianHoe").setTextureName("mysticores:ObsidianHoe")
|
||||
ObsidianHoe = new ItemHoe(EnumTools.obsidianToolMaterial).setUnlocalizedName("ObsidianHoe").setTextureName("mysticores:ObsidianHoe")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
Satchel = new ItemSatchel(ItemID.SATCHEL).setUnlocalizedName("Satchel");
|
||||
Satchel = new ItemSatchel().setUnlocalizedName("Satchel");
|
||||
try {
|
||||
for(Field f:Items.class.getFields()){
|
||||
Item it = (Item) f.get(null);
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
package mysticores.lib;
|
||||
|
||||
public class ItemID {
|
||||
public static int VERDITESWORD = 7050, VERDITEPICKAXE = 7051, VERDITESHOVEL = 7052, VERDITEAXE = 7053, VERDITEHOE = 7054;
|
||||
public static int MITHRILSWORD = 7055, MITHRILPICKAXE = 7056, MITHRILSHOVEL = 7057, MITHRILAXE = 7058, MITHRILHOE = 7059;
|
||||
public static int ADAMANTINESWORD = 7060, ADAMANTINEPICKAXE = 7061, ADAMANTINESHOVEL = 7062, ADAMANTINEAXE = 7063, ADAMANTINEHOE = 7064;
|
||||
public static int IRIDIUMSWORD = 7065, IRIDIUMPICKAXE = 7066, IRIDIUMSHOVEL = 7067, IRIDIUMAXE = 7068, IRIDIUMHOE = 7069;
|
||||
public static int OBSIDIANSWORD = 7070, OBSIDIANPICKAXE = 7071, OBSIDIANSHOVEL = 7072, OBSIDIANAXE = 7073, OBSIDIANHOE = 7074;
|
||||
public static int BLOODSTONESWORD = 7075, BLOODSTONEPICKAXE = 7076, BLOODSTONESHOVEL = 7077, BLOODSTONEAXE = 7078, BLOODSTONEHOE = 7079;
|
||||
public static int SATCHEL = 7080;
|
||||
public static int RESOURCES = 7081;
|
||||
}
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
package mysticores;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import mysticores.blocks.BlockHandler;
|
||||
import mysticores.items.Items;
|
||||
import mysticores.util.ConfigurationManager;
|
||||
|
|
@ -7,30 +9,38 @@ import mysticores.util.OreDictManager;
|
|||
import mysticores.util.RecipeManager;
|
||||
import mysticores.worldgen.GeneratorManager;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import cpw.mods.fml.common.IFuelHandler;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.Mod.Instance;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.network.NetworkMod;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
@Mod(modid = "mysticores", name = "Mystic Ores", version = "0.1")
|
||||
@NetworkMod(clientSideRequired = true)
|
||||
public class MysticOres implements IFuelHandler {
|
||||
@Instance("mysticores")
|
||||
public static MysticOres instance;
|
||||
public boolean ENABLE = true;
|
||||
public static final CreativeTabs MysticOresTab = new CreativeTabs("MysticOresTab") {
|
||||
@Override
|
||||
public ItemStack getIconItemStack() {
|
||||
return new ItemStack(BlockHandler.BlockBase, 1, 7);
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public Item getTabIconItem() {
|
||||
return Item.getItemFromBlock(BlockHandler.BlockBase);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int func_151243_f()
|
||||
{
|
||||
return 7;
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public int getBurnTime(ItemStack fuel) {
|
||||
if (fuel.getItem().itemID == Items.Resource.itemID && fuel.getItemDamage() == 4)
|
||||
if (fuel.getItem() == Items.Resource && fuel.getItemDamage() == 4)
|
||||
return 12800;
|
||||
else
|
||||
return 0;
|
||||
|
|
@ -39,11 +49,13 @@ public class MysticOres implements IFuelHandler {
|
|||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
ConfigurationManager.initialize(event.getSuggestedConfigurationFile());
|
||||
BlockHandler.initialize();
|
||||
Items.initialize();
|
||||
OreDictManager.initialize();
|
||||
RecipeManager.initialize();
|
||||
GeneratorManager.initialize();
|
||||
GameRegistry.registerFuelHandler(this);
|
||||
if(ENABLE){
|
||||
BlockHandler.initialize();
|
||||
Items.initialize();
|
||||
OreDictManager.initialize();
|
||||
RecipeManager.initialize();
|
||||
GeneratorManager.initialize();
|
||||
GameRegistry.registerFuelHandler(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,47 +2,14 @@ package mysticores.util;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import mysticores.blocks.BlockHandler;
|
||||
import mysticores.lib.ItemID;
|
||||
import mysticores.MysticOres;
|
||||
import mysticores.lib.Rarity;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
public class ConfigurationManager {
|
||||
public static void initialize(File file) {
|
||||
Configuration config = new Configuration(file);
|
||||
ItemID.RESOURCES = config.getItem("Resource Items", ItemID.RESOURCES).getInt();
|
||||
ItemID.VERDITESWORD = config.getItem("Tools", "Verdite Sword", ItemID.VERDITESWORD).getInt();
|
||||
ItemID.VERDITEPICKAXE = config.getItem("Tools", "Verdite Pickaxe", ItemID.VERDITEPICKAXE).getInt();
|
||||
ItemID.VERDITESHOVEL = config.getItem("Tools", "Verdite Shovel", ItemID.VERDITESHOVEL).getInt();
|
||||
ItemID.VERDITEAXE = config.getItem("Tools", "Verdite Axe", ItemID.VERDITEAXE).getInt();
|
||||
ItemID.VERDITEHOE = config.getItem("Tools", "Verdite Hoe", ItemID.VERDITEHOE).getInt();
|
||||
ItemID.MITHRILSWORD = config.getItem("Tools", "Mithril Sword", ItemID.MITHRILSWORD).getInt();
|
||||
ItemID.MITHRILPICKAXE = config.getItem("Tools", "Mithril Pickaxe", ItemID.MITHRILPICKAXE).getInt();
|
||||
ItemID.MITHRILSHOVEL = config.getItem("Tools", "Mithril Shovel", ItemID.MITHRILSHOVEL).getInt();
|
||||
ItemID.MITHRILAXE = config.getItem("Tools", "Mithril Axe", ItemID.MITHRILAXE).getInt();
|
||||
ItemID.MITHRILHOE = config.getItem("Tools", "Mithril Hoe", ItemID.MITHRILHOE).getInt();
|
||||
ItemID.ADAMANTINESWORD = config.getItem("Tools", "Adamantine Sword", ItemID.ADAMANTINESWORD).getInt();
|
||||
ItemID.ADAMANTINEPICKAXE = config.getItem("Tools", "Adamantine Pickaxe", ItemID.ADAMANTINEPICKAXE).getInt();
|
||||
ItemID.ADAMANTINESHOVEL = config.getItem("Tools", "Adamantine Shovel", ItemID.ADAMANTINESHOVEL).getInt();
|
||||
ItemID.ADAMANTINEAXE = config.getItem("Tools", "Adamantine Axe", ItemID.ADAMANTINEAXE).getInt();
|
||||
ItemID.ADAMANTINEHOE = config.getItem("Tools", "Adamantine Hoe", ItemID.ADAMANTINEHOE).getInt();
|
||||
ItemID.IRIDIUMSWORD = config.getItem("Tools", "Iridium Sword", ItemID.IRIDIUMSWORD).getInt();
|
||||
ItemID.IRIDIUMPICKAXE = config.getItem("Tools", "Iridium Pickaxe", ItemID.IRIDIUMPICKAXE).getInt();
|
||||
ItemID.IRIDIUMSHOVEL = config.getItem("Tools", "Iridium Shovel", ItemID.IRIDIUMSHOVEL).getInt();
|
||||
ItemID.IRIDIUMAXE = config.getItem("Tools", "Iridium Axe", ItemID.IRIDIUMAXE).getInt();
|
||||
ItemID.IRIDIUMHOE = config.getItem("Tools", "Iridium Hoe", ItemID.IRIDIUMHOE).getInt();
|
||||
ItemID.BLOODSTONESWORD = config.getItem("Tools", "Bloodstone Sword", ItemID.BLOODSTONESWORD).getInt();
|
||||
ItemID.BLOODSTONEPICKAXE = config.getItem("Tools", "Bloodstone Pickaxe", ItemID.BLOODSTONEPICKAXE).getInt();
|
||||
ItemID.BLOODSTONESHOVEL = config.getItem("Tools", "Bloodstone Shovel", ItemID.BLOODSTONESHOVEL).getInt();
|
||||
ItemID.BLOODSTONEAXE = config.getItem("Tools", "Bloodstone Axe", ItemID.BLOODSTONEAXE).getInt();
|
||||
ItemID.BLOODSTONEHOE = config.getItem("Tools", "Bloodstone Hoe", ItemID.BLOODSTONEHOE).getInt();
|
||||
ItemID.OBSIDIANSWORD = config.getItem("Tools", "Obsidian Sword", ItemID.OBSIDIANSWORD).getInt();
|
||||
ItemID.OBSIDIANPICKAXE = config.getItem("Tools", "Obsidian Pickaxe", ItemID.OBSIDIANPICKAXE).getInt();
|
||||
ItemID.OBSIDIANSHOVEL = config.getItem("Tools", "Obsidian Shovel", ItemID.OBSIDIANSHOVEL).getInt();
|
||||
ItemID.OBSIDIANAXE = config.getItem("Tools", "Obsidian Axe", ItemID.OBSIDIANAXE).getInt();
|
||||
ItemID.OBSIDIANHOE = config.getItem("Tools", "Obsidian Hoe", ItemID.OBSIDIANHOE).getInt();
|
||||
ItemID.SATCHEL = config.getItem("Satchel ID", ItemID.SATCHEL).getInt();
|
||||
BlockHandler.BASEID = config.getBlock("Base Block ID", BlockHandler.BASEID).getInt();
|
||||
MysticOres.instance.ENABLE = config.get("General", "Enable", true).getBoolean(true);
|
||||
Rarity.VERDITE = config.get("Ore Rarity", "Verdite Ore", Rarity.VERDITE).getInt();
|
||||
Rarity.MITHRIL = config.get("Ore Rarity", "Mithril Ore", Rarity.MITHRIL).getInt();
|
||||
Rarity.ADAMANTINE = config.get("Ore Rarity", "Adamantine Ore", Rarity.ADAMANTINE).getInt();
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@ package mysticores.util;
|
|||
|
||||
import mysticores.blocks.BlockHandler;
|
||||
import mysticores.items.Items;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
|
|
@ -19,31 +18,31 @@ public class RecipeManager {
|
|||
}
|
||||
|
||||
private static void powderRecipes() {
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Block.oreGold, 2), OreDictManager.INGOTS[9], "oreGold"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Block.oreIron, 2), OreDictManager.INGOTS[9], "oreIron"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.gold_ore, 2), OreDictManager.INGOTS[9], "oreGold"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.iron_ore, 2), OreDictManager.INGOTS[9], "oreIron"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.Resource, 2, 10), OreDictManager.INGOTS[9], OreDictManager.INGOTS[10]));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Item.gunpowder, 2), OreDictManager.INGOTS[9], Item.gunpowder));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(net.minecraft.init.Items.gunpowder, 2), OreDictManager.INGOTS[9], net.minecraft.init.Items.gunpowder));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.Resource, 2, 4), OreDictManager.INGOTS[9], OreDictManager.INGOTS[4]));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Block.oreCoal, 2), OreDictManager.INGOTS[9], Block.oreCoal));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Block.oreIron, 3), OreDictManager.INGOTS[9], "oreIron"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Block.oreGold, 3), OreDictManager.INGOTS[9], "oreGold"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Block.oreRedstone, 2), OreDictManager.INGOTS[9], "oreRedstone"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Block.oreLapis, 2), OreDictManager.INGOTS[9], "oreLapis"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Block.oreDiamond, 2), OreDictManager.INGOTS[9], "oreDiamond"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Item.sugar, 18), OreDictManager.INGOTS[9], Item.sugar));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Item.redstone, 12), OreDictManager.INGOTS[9], Item.redstone));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Item.glowstone, 6), OreDictManager.INGOTS[9], Item.glowstone));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Item.gunpowder, 3), OreDictManager.INGOTS[9], Item.gunpowder));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.coal_ore, 2), OreDictManager.INGOTS[9], Blocks.coal_ore));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.iron_ore, 3), OreDictManager.INGOTS[9], "oreIron"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.gold_ore, 3), OreDictManager.INGOTS[9], "oreGold"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.redstone_ore, 2), OreDictManager.INGOTS[9], "oreRedstone"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.lapis_ore, 2), OreDictManager.INGOTS[9], "oreLapis"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.diamond_ore, 2), OreDictManager.INGOTS[9], "oreDiamond"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(net.minecraft.init.Items.sugar, 18), OreDictManager.INGOTS[9], net.minecraft.init.Items.sugar));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(net.minecraft.init.Items.redstone, 12), OreDictManager.INGOTS[9], net.minecraft.init.Items.redstone));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(net.minecraft.init.Items.glowstone_dust, 6), OreDictManager.INGOTS[9], net.minecraft.init.Items.glowstone_dust));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(net.minecraft.init.Items.gunpowder, 3), OreDictManager.INGOTS[9], net.minecraft.init.Items.gunpowder));
|
||||
}
|
||||
|
||||
private static void recipes() {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Block.glass, 1), "##", "##", '#', OreDictManager.INGOTS[11]));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Block.obsidian, 1), "##", "##", '#', OreDictManager.INGOTS[12]));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockHandler.BlockBase, 8, 7), "XXX", "XOX", "XXX", Character.valueOf('X'), Block.dirt, Character.valueOf('O'),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.glass, 1), "##", "##", '#', OreDictManager.INGOTS[11]));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.obsidian, 1), "##", "##", '#', OreDictManager.INGOTS[12]));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockHandler.BlockBase, 8, 7), "XXX", "XOX", "XXX", Character.valueOf('X'), Blocks.dirt, Character.valueOf('O'),
|
||||
OreDictManager.INGOTS[6]));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockHandler.BlockBase, 16, 7), "XXX", "XOX", "XXX", Character.valueOf('X'), OreDictManager.ORES[3], Character.valueOf('O'),
|
||||
OreDictManager.INGOTS[6]));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockHandler.BlockBase, 8, 3), "XXX", "XOX", "XXX", Character.valueOf('X'), Block.dirt, Character.valueOf('O'),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockHandler.BlockBase, 8, 3), "XXX", "XOX", "XXX", Character.valueOf('X'), Blocks.dirt, Character.valueOf('O'),
|
||||
OreDictManager.INGOTS[8]));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockHandler.BlockBase, 8, 12), "###", "#D#", "###", '#', OreDictManager.INGOTS[11], 'D', OreDictManager.INGOTS[12]));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockHandler.BlockBase, 1, 7), "##", "##", '#', OreDictManager.INGOTS[10]));
|
||||
|
|
@ -52,21 +51,21 @@ public class RecipeManager {
|
|||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BlockHandler.BlockBase, 2, 0), OreDictManager.INGOTS[9], OreDictManager.ORES[0]));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.Resource, 2, 13), "#", "#", '#', OreDictManager.INGOTS[12]));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.Resource, 1, 3), "###", "#O#", "###", '#', OreDictManager.INGOTS[4], 'O', OreDictManager.INGOTS[2]));
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.Resource, 4, 11), Block.glass);
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.Resource, 4, 12), Block.obsidian);
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.Resource, 4, 11), Blocks.glass);
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.Resource, 4, 12), Blocks.obsidian);
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.Resource, 8, 9), OreDictManager.INGOTS[5], OreDictManager.INGOTS[7], OreDictManager.INGOTS[8], OreDictManager.INGOTS[6]));
|
||||
}
|
||||
|
||||
private static void smelting() {
|
||||
FurnaceRecipes.smelting().addSmelting(BlockHandler.BlockBase.blockID, 6, new ItemStack(Items.Resource, 1, 0), 0.4F);
|
||||
FurnaceRecipes.smelting().addSmelting(BlockHandler.BlockBase.blockID, 3, new ItemStack(Items.Resource, 1, 1), 0.7F);
|
||||
FurnaceRecipes.smelting().addSmelting(BlockHandler.BlockBase.blockID, 0, new ItemStack(Items.Resource, 1, 2), 0.9F);
|
||||
FurnaceRecipes.smelting().addSmelting(BlockHandler.BlockBase.blockID, 2, new ItemStack(Items.Resource, 1, 4), 0.4F);
|
||||
FurnaceRecipes.smelting().addSmelting(BlockHandler.BlockBase.blockID, 4, new ItemStack(Items.Resource, 1, 5), 0.4F);
|
||||
FurnaceRecipes.smelting().addSmelting(BlockHandler.BlockBase.blockID, 11, new ItemStack(Items.Resource, 1, 6), 0.4F);
|
||||
FurnaceRecipes.smelting().addSmelting(BlockHandler.BlockBase.blockID, 5, new ItemStack(Items.Resource, 1, 7), 0.4F);
|
||||
FurnaceRecipes.smelting().addSmelting(BlockHandler.BlockBase.blockID, 1, new ItemStack(Items.Resource, 1, 8), 0.4F);
|
||||
FurnaceRecipes.smelting().addSmelting(BlockHandler.BlockBase.blockID, 7, new ItemStack(Items.Resource, 1, 10), 0.4F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(BlockHandler.BlockBase,1, 6), new ItemStack(Items.Resource, 1, 0), 0.4F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(BlockHandler.BlockBase,1, 3), new ItemStack(Items.Resource, 1, 1), 0.7F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(BlockHandler.BlockBase,1, 0), new ItemStack(Items.Resource, 1, 2), 0.9F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(BlockHandler.BlockBase,1, 2), new ItemStack(Items.Resource, 1, 4), 0.4F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(BlockHandler.BlockBase,1, 4), new ItemStack(Items.Resource, 1, 5), 0.4F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(BlockHandler.BlockBase,1, 11), new ItemStack(Items.Resource, 1, 6), 0.4F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(BlockHandler.BlockBase,1, 5), new ItemStack(Items.Resource, 1, 7), 0.4F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(BlockHandler.BlockBase,1, 1), new ItemStack(Items.Resource, 1, 8), 0.4F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(BlockHandler.BlockBase,1, 7), new ItemStack(Items.Resource, 1, 10), 0.4F);
|
||||
}
|
||||
|
||||
private static void toolRecipes() {
|
||||
|
|
@ -95,16 +94,16 @@ public class RecipeManager {
|
|||
ToolRecipes.AdvancedShovelRecipe(Items.IridiumShovel, OreDictManager.INGOTS[3]);
|
||||
ToolRecipes.AdvancedAxeRecipe(Items.IridiumAxe, OreDictManager.INGOTS[3]);
|
||||
ToolRecipes.AdvancedHoeRecipe(Items.IridiumHoe, OreDictManager.INGOTS[3]);
|
||||
ToolRecipes.AdvancedSwordRecipe(Items.ObsidianSword, new ItemStack(Block.obsidian));
|
||||
ToolRecipes.AdvancedPickaxeRecipe(Items.ObsidianPickaxe, new ItemStack(Block.obsidian));
|
||||
ToolRecipes.AdvancedShovelRecipe(Items.ObsidianShovel, new ItemStack(Block.obsidian));
|
||||
ToolRecipes.AdvancedAxeRecipe(Items.ObsidianAxe, new ItemStack(Block.obsidian));
|
||||
ToolRecipes.AdvancedHoeRecipe(Items.ObsidianHoe, new ItemStack(Block.obsidian));
|
||||
ToolRecipes.AdvancedSwordRecipe(Items.ObsidianSword, new ItemStack(Blocks.obsidian));
|
||||
ToolRecipes.AdvancedPickaxeRecipe(Items.ObsidianPickaxe, new ItemStack(Blocks.obsidian));
|
||||
ToolRecipes.AdvancedShovelRecipe(Items.ObsidianShovel, new ItemStack(Blocks.obsidian));
|
||||
ToolRecipes.AdvancedAxeRecipe(Items.ObsidianAxe, new ItemStack(Blocks.obsidian));
|
||||
ToolRecipes.AdvancedHoeRecipe(Items.ObsidianHoe, new ItemStack(Blocks.obsidian));
|
||||
ToolRecipes.AdvancedSwordRecipe(Items.BloodstoneSword, OreDictManager.ORES[7]);
|
||||
ToolRecipes.AdvancedPickaxeRecipe(Items.BloodstonePickaxe, OreDictManager.ORES[7]);
|
||||
ToolRecipes.AdvancedShovelRecipe(Items.BloodstoneShovel, OreDictManager.ORES[7]);
|
||||
ToolRecipes.AdvancedAxeRecipe(Items.BloodstoneAxe, OreDictManager.ORES[7]);
|
||||
ToolRecipes.AdvancedHoeRecipe(Items.BloodstoneHoe, OreDictManager.ORES[7]);
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.Satchel, 1), "#$#", "$%$", "#$#", '#', Item.silk, '$', OreDictManager.INGOTS[9], '%', Block.enderChest));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.Satchel, 1), "#$#", "$%$", "#$#", '#', net.minecraft.init.Items.string, '$', OreDictManager.INGOTS[9], '%', Blocks.ender_chest));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
|||
|
||||
public class GeneratorManager {
|
||||
public static void initialize() {
|
||||
GameRegistry.registerWorldGenerator(new WorldGenOres());
|
||||
GameRegistry.registerWorldGenerator(new NetherGenMineable(BlockHandler.BlockBase.blockID, 7, Rarity.BLOODSTONE + 1));
|
||||
GameRegistry.registerWorldGenerator(new NetherGenMineable(BlockHandler.BlockBase.blockID, 8, Rarity.BLACKSOULSTONE + 1));
|
||||
GameRegistry.registerWorldGenerator(new NetherGenMineable(BlockHandler.BlockBase.blockID, 9, Rarity.BLUESOULSTONE + 1));
|
||||
GameRegistry.registerWorldGenerator(new NetherGenMineable(BlockHandler.BlockBase.blockID, 10, Rarity.REDSOULSTONE));
|
||||
GameRegistry.registerWorldGenerator(new WorldGenOres(), 100);
|
||||
GameRegistry.registerWorldGenerator(new NetherGenMineable(BlockHandler.BlockBase, 7, Rarity.BLOODSTONE + 1), 100);
|
||||
GameRegistry.registerWorldGenerator(new NetherGenMineable(BlockHandler.BlockBase, 8, Rarity.BLACKSOULSTONE + 1), 100);
|
||||
GameRegistry.registerWorldGenerator(new NetherGenMineable(BlockHandler.BlockBase, 9, Rarity.BLUESOULSTONE + 1), 100);
|
||||
GameRegistry.registerWorldGenerator(new NetherGenMineable(BlockHandler.BlockBase, 10, Rarity.REDSOULSTONE), 100);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,21 +3,22 @@ package mysticores.worldgen;
|
|||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
||||
public class NetherGenHelper extends WorldGenerator {
|
||||
private int minableBlockId;
|
||||
private Block minableBlockId;
|
||||
private int minableBlockMeta = 0;
|
||||
private int numberOfBlocks;
|
||||
|
||||
public NetherGenHelper(int par1, int par2) {
|
||||
public NetherGenHelper(Block par1, int par2) {
|
||||
this.minableBlockId = par1;
|
||||
this.numberOfBlocks = par2;
|
||||
}
|
||||
|
||||
public NetherGenHelper(int id, int meta, int number) {
|
||||
public NetherGenHelper(Block id, int meta, int number) {
|
||||
this(id, number);
|
||||
minableBlockMeta = meta;
|
||||
}
|
||||
|
|
@ -52,8 +53,8 @@ public class NetherGenHelper extends WorldGenerator {
|
|||
if (var39 * var39 + var42 * var42 < 1.0D) {
|
||||
for (int var44 = var34; var44 <= var37; ++var44) {
|
||||
double var45 = (var44 + 0.5D - var24) / (var28 / 2.0D);
|
||||
int blocktoreplace = par1World.getBlockId(var38, var41, var44);
|
||||
if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D && blocktoreplace == Block.netherrack.blockID) {
|
||||
Block blocktoreplace = par1World.getBlock(var38, var41, var44);
|
||||
if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D && blocktoreplace == Blocks.netherrack) {
|
||||
par1World.setBlock(var38, var41, var44, this.minableBlockId, minableBlockMeta, 3);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package mysticores.worldgen;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
|
@ -10,11 +11,11 @@ import cpw.mods.fml.common.IWorldGenerator;
|
|||
public class NetherGenMineable implements IWorldGenerator {
|
||||
private WorldGenerator helper;
|
||||
|
||||
public NetherGenMineable(int blockId, int numBlocks) {
|
||||
public NetherGenMineable(Block blockId, int numBlocks) {
|
||||
helper = new NetherGenHelper(blockId, numBlocks);
|
||||
}
|
||||
|
||||
public NetherGenMineable(int blockId, int meta, int numBlocks) {
|
||||
public NetherGenMineable(Block blockId, int meta, int numBlocks) {
|
||||
helper = new NetherGenHelper(blockId, meta, numBlocks);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,13 +8,14 @@ import java.util.List;
|
|||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameData;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.WeightedRandom;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraftforge.common.BiomeDictionary;
|
||||
import net.minecraftforge.common.BiomeDictionary.Type;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.common.DungeonHooks.DungeonMob;
|
||||
|
||||
public class Config {
|
||||
|
|
@ -25,10 +26,8 @@ public class Config {
|
|||
public static final String[] allows = { "Ruin allowed dimension id", "Dungeon allowed dimension id", "Ruin allowed biome id", "Dungeon allowed biome id" };
|
||||
public static Set<Type>[] allowType = new HashSet[2];
|
||||
public static List<DungeonMob> dungeonMobs = new ArrayList<DungeonMob>();
|
||||
public static final String commonItems = Item.pickaxeIron.itemID + "," + Item.axeIron.itemID + "," + Item.swordIron.itemID + "," + Item.shovelIron.itemID + "," + Item.ingotGold.itemID + ","
|
||||
+ Item.ingotIron.itemID;
|
||||
public static final String rareItems = Item.enderPearl.itemID + ":4," + Item.diamond.itemID + "," + Item.emerald.itemID + "," + Item.appleGold.itemID + "," + Item.ingotGold.itemID + ","
|
||||
+ Item.ingotIron.itemID;
|
||||
public static final String commonItems = "iron_pickaxe,iron_axe,iron_sword,iron_shovel,gold_ingot,iron_ingot";
|
||||
public static final String rareItems = "ender_pearl:4,diamond,emerald,golden_apple,gold_ingot,iron_ingot";
|
||||
|
||||
public static void addDungeonMob(String name, int rarity) {
|
||||
for (DungeonMob mob : dungeonMobs) {
|
||||
|
|
@ -50,7 +49,7 @@ public class Config {
|
|||
|
||||
public static void initialize(File file) {
|
||||
config = new Configuration(file);
|
||||
config.load();
|
||||
MysticRuins.ENABLE = config.get("General", "Enable", true).getBoolean(true);
|
||||
String[] mobs = config.get("DungeonMobs", "Spawner Type & Relative Chance", "Skeleton-50,Spider-50,Zombie-20,Cavepider-10,Blaze-1", "MobName-RelativeWeight").getString().split(",");
|
||||
String[] mob;
|
||||
for (String txt : mobs) {
|
||||
|
|
@ -121,12 +120,12 @@ public class Config {
|
|||
int j = Integer.parseInt(txt.trim());
|
||||
allowId[i].add(j);
|
||||
if (i > 1) {
|
||||
allowType[i - 2].addAll(Arrays.asList(BiomeDictionary.getTypesForBiome(BiomeGenBase.biomeList[j])));
|
||||
allowType[i - 2].addAll(Arrays.asList(BiomeDictionary.getTypesForBiome(BiomeGenBase.getBiomeGenArray()[j])));
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
if (i > 1) {
|
||||
if (txt.equals("*") || txt.equalsIgnoreCase("ALL")) {
|
||||
for (int j = 0; j < BiomeGenBase.biomeList.length; j++) {
|
||||
for (int j = 0; j < BiomeGenBase.getBiomeGenArray().length; j++) {
|
||||
allowId[i].add(j);
|
||||
}
|
||||
for (Type t : Type.values()) {
|
||||
|
|
@ -151,11 +150,12 @@ public class Config {
|
|||
}
|
||||
|
||||
private static void setChest(String type, String list, List<ItemStack> valuables) {
|
||||
String[] items = config.get("Chests", type, list, "itemid:stacksize:damage").getString().split(",");
|
||||
String[] items = config.get("Chests", type, list, "itemname:stacksize:damage").getString().split(",");
|
||||
String[] item;
|
||||
for (String txt : items) {
|
||||
item = txt.split(":");
|
||||
int id = -1, amount = 1, data = 0;
|
||||
Item id = null;
|
||||
int amount = 1, data = 0;
|
||||
try {
|
||||
switch (item.length) {
|
||||
case 3:
|
||||
|
|
@ -163,7 +163,7 @@ public class Config {
|
|||
case 2:
|
||||
amount = Integer.parseInt(item[1]);
|
||||
case 1:
|
||||
id = Integer.parseInt(item[0]);
|
||||
id = GameData.itemRegistry.get(item[0]);
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
|
|
@ -171,7 +171,7 @@ public class Config {
|
|||
} catch (NumberFormatException n) {
|
||||
continue;
|
||||
}
|
||||
if (id > 0 && amount > 0 && data >= 0) {
|
||||
if (id != null && amount > 0 && data >= 0) {
|
||||
valuables.add(new ItemStack(id, amount, data));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,25 +1,17 @@
|
|||
package mysticruins;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
@Mod(modid = "MysticRuins", name = "Mystic Ruins", version = "0.1")
|
||||
public class MysticRuins {
|
||||
public static File file;
|
||||
|
||||
@EventHandler
|
||||
public void modsLoaded(FMLPostInitializationEvent event) {
|
||||
Config.initialize(file);
|
||||
}
|
||||
|
||||
public static boolean ENABLE = true;
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
file = event.getSuggestedConfigurationFile();
|
||||
GameRegistry.registerWorldGenerator(new WorldGenMystic());
|
||||
Config.initialize(event.getSuggestedConfigurationFile());
|
||||
if(ENABLE)
|
||||
GameRegistry.registerWorldGenerator(new WorldGenMystic(), 20);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -3,6 +3,7 @@ package mysticruins;
|
|||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.tileentity.TileEntityMobSpawner;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
|
@ -20,7 +21,7 @@ public class StructureRuin$1 extends WorldGenerator {
|
|||
if (k1 <= 0) {
|
||||
return false;
|
||||
}
|
||||
if (!world.isAirBlock(j1, k1, l1) || world.getBlockId(j1, k1 - 1, l1) != Block.grass.blockID || !Block.pumpkin.canPlaceBlockAt(world, j1, k1, l1)) {
|
||||
if (!world.isAirBlock(j1, k1, l1) || world.getBlock(j1, k1 - 1, l1) != Blocks.grass || !Blocks.pumpkin.canPlaceBlockAt(world, j1, k1, l1)) {
|
||||
return false;
|
||||
}
|
||||
int i2 = random.nextInt(3) + 1;
|
||||
|
|
@ -39,81 +40,81 @@ public class StructureRuin$1 extends WorldGenerator {
|
|||
} else {
|
||||
j5 = random.nextInt(4) + 5;
|
||||
}
|
||||
setBlock(world, j1, k1 - j5, l1, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1, (k1 - j5) + 1, l1, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1, (k1 - j5) + 2, l1, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1, (k1 - j5) + 2, l1 + 1, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1, (k1 - j5) + 3, l1 + 1, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1, (k1 - j5) + 4, l1 + 1, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1, (k1 - j5) + 5, l1 + 1, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1, (k1 - j5) + 2, l1 + 2, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1, (k1 - j5) + 3, l1 + 2, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1, (k1 - j5) + 4, l1 + 2, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1, k1 - j5, l1 + 3, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1, (k1 - j5) + 1, l1 + 3, Block.stoneBrick.blockID);
|
||||
setBlock(world, j1, (k1 - j5) + 2, l1 + 3, Block.stoneBrick.blockID);
|
||||
setBlock(world, j1, k1 - j5 - k4 - 1, l1 + 2, Block.dirt.blockID);
|
||||
setBlock(world, j1, k1 - j5 - k4, l1 + 2, Block.chest.blockID);
|
||||
ChestFiller.fillWithValuables(world.getBlockTileEntity(j1, k1 - j5 - k4, l1 + 2));
|
||||
setBlock(world, j1, k1 - j5, l1, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1, (k1 - j5) + 1, l1, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1, (k1 - j5) + 2, l1, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1, (k1 - j5) + 2, l1 + 1, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1, (k1 - j5) + 3, l1 + 1, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1, (k1 - j5) + 4, l1 + 1, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1, (k1 - j5) + 5, l1 + 1, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1, (k1 - j5) + 2, l1 + 2, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1, (k1 - j5) + 3, l1 + 2, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1, (k1 - j5) + 4, l1 + 2, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1, k1 - j5, l1 + 3, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1, (k1 - j5) + 1, l1 + 3, Blocks.stonebrick);
|
||||
setBlock(world, j1, (k1 - j5) + 2, l1 + 3, Blocks.stonebrick);
|
||||
setBlock(world, j1, k1 - j5 - k4 - 1, l1 + 2, Blocks.dirt);
|
||||
setBlock(world, j1, k1 - j5 - k4, l1 + 2, Blocks.chest);
|
||||
ChestFiller.fillWithValuables(world.getTileEntity(j1, k1 - j5 - k4, l1 + 2));
|
||||
l6 = 1;
|
||||
i6 = 0;
|
||||
flag = false;
|
||||
do {
|
||||
if (world.isAirBlock(j1 + l3, k1 - j5 - l6, l1 + l3 + 4) || world.isAirBlock(j1 + l3, k1 - j5 - l6, l1 + l3 + 5) || world.isAirBlock(j1 + l3, k1 - j5 - l6, l1 + l3 + 6)
|
||||
|| world.getBlockId(j1 + l3, k1 - j5 - l6, l1 + l3 + 4) == Block.waterStill.blockID || world.getBlockId(j1 + l3, k1 - j5 - l6, l1 + l3 + 5) == Block.waterStill.blockID
|
||||
|| world.getBlockId(j1 + l3, k1 - j5 - l6, l1 + l3 + 6) == Block.waterStill.blockID) {
|
||||
|| world.getBlock(j1 + l3, k1 - j5 - l6, l1 + l3 + 4) == Blocks.water || world.getBlock(j1 + l3, k1 - j5 - l6, l1 + l3 + 5) == Blocks.water
|
||||
|| world.getBlock(j1 + l3, k1 - j5 - l6, l1 + l3 + 6) == Blocks.water) {
|
||||
i6++;
|
||||
} else {
|
||||
flag = true;
|
||||
}
|
||||
} while (!flag && l6++ < 12);
|
||||
setBlock(world, j1 + l3, k1 - j5 - i6, l1 + l3 + 4, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 + l3, ((k1 - j5) + 1) - i6, l1 + l3 + 4, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 + l3 + 1, k1 - j5 - i6, l1 + l3 + 4, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 + l3 + 1, ((k1 - j5) + 1) - i6, l1 + l3 + 4, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 + l3 + 2, k1 - j5 - i6, l1 + l3 + 4, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 + l3 + 3, k1 - j5 - i6, l1 + l3 + 4, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 + l3 + 4, k1 - j5 - i6, l1 + l3 + 4, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 + l3 + 5, k1 - j5 - i6, l1 + l3 + 4, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 + l3, k1 - j5 - i6, l1 + l3 + 5, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 + l3, ((k1 - j5) + 1) - i6, l1 + l3 + 5, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 + l3, ((k1 - j5) + 2) - i6, l1 + l3 + 6, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 + l3, ((k1 - j5) + 3) - i6, l1 + l3 + 6, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 + l3, k1 - j5 - i6, l1 + l3 + 7, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 + l3, ((k1 - j5) + 1) - i6, l1 + l3 + 7, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 + l3, ((k1 - j5) + 2) - i6, l1 + l3 + 7, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 + l3, k1 - j5 - i6, l1 + l3 + 4, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 + l3, ((k1 - j5) + 1) - i6, l1 + l3 + 4, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + l3 + 1, k1 - j5 - i6, l1 + l3 + 4, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + l3 + 1, ((k1 - j5) + 1) - i6, l1 + l3 + 4, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 + l3 + 2, k1 - j5 - i6, l1 + l3 + 4, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 + l3 + 3, k1 - j5 - i6, l1 + l3 + 4, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + l3 + 4, k1 - j5 - i6, l1 + l3 + 4, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 + l3 + 5, k1 - j5 - i6, l1 + l3 + 4, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 + l3, k1 - j5 - i6, l1 + l3 + 5, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 + l3, ((k1 - j5) + 1) - i6, l1 + l3 + 5, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 + l3, ((k1 - j5) + 2) - i6, l1 + l3 + 6, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + l3, ((k1 - j5) + 3) - i6, l1 + l3 + 6, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + l3, k1 - j5 - i6, l1 + l3 + 7, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 + l3, ((k1 - j5) + 1) - i6, l1 + l3 + 7, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 + l3, ((k1 - j5) + 2) - i6, l1 + l3 + 7, Blocks.stonebrick, 1);
|
||||
k7 = random.nextInt(100);
|
||||
if (k7 <= 30) {
|
||||
setBlock(world, j1 + l3, k1 - j5 - i6 - k4, l1 + l3 + 5, Block.mobSpawner.blockID);
|
||||
TileEntityMobSpawner spawner = (TileEntityMobSpawner) world.getBlockTileEntity(j1 + l3, k1 - j5 - i6 - k4, l1 + l3 + 5);
|
||||
setBlock(world, j1 + l3, k1 - j5 - i6 - k4, l1 + l3 + 5, Blocks.mob_spawner);
|
||||
TileEntityMobSpawner spawner = (TileEntityMobSpawner) world.getTileEntity(j1 + l3, k1 - j5 - i6 - k4, l1 + l3 + 5);
|
||||
if (spawner != null) {
|
||||
spawner.getSpawnerLogic().setMobID(DungeonHooks.getRandomDungeonMob(random));
|
||||
spawner.func_145881_a().setEntityName(DungeonHooks.getRandomDungeonMob(random));
|
||||
}
|
||||
setBlock(world, j1 + l3, k1 - j5 - i6 - k4 - 1, l1 + l3 + 5, Block.dirt.blockID);
|
||||
setBlock(world, j1 + l3, k1 - j5 - i6 - k4 - 1, l1 + l3 + 5, Blocks.dirt);
|
||||
}
|
||||
l6 = 1;
|
||||
i6 = 0;
|
||||
flag = false;
|
||||
do {
|
||||
if (world.isAirBlock(j1 - i3, k1 - j5 - l6, l1 - 4) || world.isAirBlock(j1 - i3, k1 - j5 - l6, l1 - 5) || world.isAirBlock(j1 - i3 - 1, k1 - j5 - l6, l1 - 5)
|
||||
|| world.getBlockId(j1 - i3, k1 - j5 - l6, l1 - 4) == Block.waterStill.blockID || world.getBlockId(j1 - i3, k1 - j5 - l6, l1 - 5) == Block.waterStill.blockID
|
||||
|| world.getBlockId(j1 - i3 - 1, k1 - j5 - l6, l1 - 5) == Block.waterStill.blockID) {
|
||||
|| world.getBlock(j1 - i3, k1 - j5 - l6, l1 - 4) == Blocks.water || world.getBlock(j1 - i3, k1 - j5 - l6, l1 - 5) == Blocks.water
|
||||
|| world.getBlock(j1 - i3 - 1, k1 - j5 - l6, l1 - 5) == Blocks.water) {
|
||||
i6++;
|
||||
} else {
|
||||
flag = true;
|
||||
}
|
||||
} while (!flag && l6++ < 12);
|
||||
setBlock(world, j1 - i3, k1 - j5 - i6, l1 - 4, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 - i3, ((k1 - j5) + 1) - i6, l1 - 4, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 - i3, k1 - j5 - i6, l1 - 5, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 - i3 - 1, k1 - j5 - i6, l1 - 5, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 - i3 - 1, ((k1 - j5) + 1) - i6, l1 - 5, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 - i3 - 1, ((k1 - j5) + 2) - i6, l1 - 5, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 - i3 - 2, k1 - j5 - i6, l1 - 5, Block.stoneBrick.blockID);
|
||||
setBlock(world, j1 - i3, k1 - j5 - i6, l1 - 4, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 - i3, ((k1 - j5) + 1) - i6, l1 - 4, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 - i3, k1 - j5 - i6, l1 - 5, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 - i3 - 1, k1 - j5 - i6, l1 - 5, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 - i3 - 1, ((k1 - j5) + 1) - i6, l1 - 5, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 - i3 - 1, ((k1 - j5) + 2) - i6, l1 - 5, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 - i3 - 2, k1 - j5 - i6, l1 - 5, Blocks.stonebrick);
|
||||
k7 = random.nextInt(100);
|
||||
if (k7 <= 60) {
|
||||
setBlock(world, j1 - i3 - 1, k1 - j5 - i6 - k4, l1 - 5, Block.dirt.blockID);
|
||||
setBlock(world, j1 - i3 - 1, k1 - j5 - i6 - k4 - 1, l1 - 5, Block.dirt.blockID);
|
||||
setBlock(world, j1 - i3 - 1, k1 - j5 - i6 - k4, l1 - 5, Blocks.dirt);
|
||||
setBlock(world, j1 - i3 - 1, k1 - j5 - i6 - k4 - 1, l1 - 5, Blocks.dirt);
|
||||
}
|
||||
}
|
||||
if (i2 == 2) {
|
||||
|
|
@ -132,143 +133,143 @@ public class StructureRuin$1 extends WorldGenerator {
|
|||
} else {
|
||||
k5 = random.nextInt(4) + 5;
|
||||
}
|
||||
setBlock(world, j1, k1 - k5, l1, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1, k1 - k5, l1 + 1, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1, k1 - k5, l1 + 2, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1, k1 - k5, l1 + 3, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1, k1 - k5, l1 + 4, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1, (k1 - k5) + 1, l1 + 2, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1, (k1 - k5) + 2, l1 + 2, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1, (k1 - k5) + 3, l1 + 2, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1, (k1 - k5) + 1, l1 + 1, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 + 1, k1 - k5, l1, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 + 2, k1 - k5, l1, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1, k1 - k5 - l4, l1 + 2, Block.dirt.blockID);
|
||||
setBlock(world, j1, k1 - k5 - l4 - 1, l1 + 2, Block.dirt.blockID);
|
||||
setBlock(world, j1, k1 - k5, l1, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1, k1 - k5, l1 + 1, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1, k1 - k5, l1 + 2, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1, k1 - k5, l1 + 3, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1, k1 - k5, l1 + 4, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1, (k1 - k5) + 1, l1 + 2, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1, (k1 - k5) + 2, l1 + 2, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1, (k1 - k5) + 3, l1 + 2, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1, (k1 - k5) + 1, l1 + 1, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + 1, k1 - k5, l1, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + 2, k1 - k5, l1, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1, k1 - k5 - l4, l1 + 2, Blocks.dirt);
|
||||
setBlock(world, j1, k1 - k5 - l4 - 1, l1 + 2, Blocks.dirt);
|
||||
i7 = 1;
|
||||
j6 = 0;
|
||||
flag1 = false;
|
||||
do {
|
||||
if (world.isAirBlock(j1 - k2, k1 - k5 - i7, l1 - 4) || world.isAirBlock(j1 - k2, k1 - k5 - i7, l1 - 5) || world.isAirBlock(j1 - k2 - 1, k1 - k5 - i7, l1 - 5)
|
||||
|| world.getBlockId(j1 - k2, k1 - k5 - i7, l1 - 4) == Block.waterStill.blockID || world.getBlockId(j1 - k2, k1 - k5 - i7, l1 - 5) == Block.waterStill.blockID
|
||||
|| world.getBlockId(j1 - k2 - 1, k1 - k5 - i7, l1 - 5) == Block.waterStill.blockID) {
|
||||
|| world.getBlock(j1 - k2, k1 - k5 - i7, l1 - 4) == Blocks.water || world.getBlock(j1 - k2, k1 - k5 - i7, l1 - 5) == Blocks.water
|
||||
|| world.getBlock(j1 - k2 - 1, k1 - k5 - i7, l1 - 5) == Blocks.water) {
|
||||
j6++;
|
||||
} else {
|
||||
flag1 = true;
|
||||
}
|
||||
} while (!flag1 && i7++ < 12);
|
||||
setBlock(world, j1 - k2, k1 - k5 - j6, l1 - 3, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 - k2, k1 - k5 - j6, l1 - 4, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 - k2, ((k1 - k5) + 1) - j6, l1 - 4, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 - k2, ((k1 - k5) + 2) - j6, l1 - 4, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 - k2, k1 - k5 - j6, l1 - 5, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 - k2, ((k1 - k5) + 1) - j6, l1 - 5, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 - k2, ((k1 - k5) + 2) - j6, l1 - 5, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 - k2, ((k1 - k5) + 3) - j6, l1 - 5, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 - k2, ((k1 - k5) + 4) - j6, l1 - 5, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 - k2 - 1, k1 - k5 - j6, l1 - 5, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 - k2 - 1, ((k1 - k5) + 1) - j6, l1 - 5, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 - k2 - 1, ((k1 - k5) + 2) - j6, l1 - 5, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 - k2 - 2, k1 - k5 - j6, l1 - 5, Block.stoneBrick.blockID);
|
||||
setBlock(world, j1 - k2, k1 - k5 - j6, l1 - 3, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 - k2, k1 - k5 - j6, l1 - 4, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 - k2, ((k1 - k5) + 1) - j6, l1 - 4, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 - k2, ((k1 - k5) + 2) - j6, l1 - 4, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 - k2, k1 - k5 - j6, l1 - 5, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 - k2, ((k1 - k5) + 1) - j6, l1 - 5, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 - k2, ((k1 - k5) + 2) - j6, l1 - 5, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 - k2, ((k1 - k5) + 3) - j6, l1 - 5, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 - k2, ((k1 - k5) + 4) - j6, l1 - 5, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 - k2 - 1, k1 - k5 - j6, l1 - 5, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 - k2 - 1, ((k1 - k5) + 1) - j6, l1 - 5, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 - k2 - 1, ((k1 - k5) + 2) - j6, l1 - 5, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 - k2 - 2, k1 - k5 - j6, l1 - 5, Blocks.stonebrick);
|
||||
l7 = random.nextInt(100);
|
||||
if (l7 <= 30) {
|
||||
setBlock(world, j1 - k2 - 1, k1 - k5 - j6 - l4, l1 - 5, Block.dirt.blockID);
|
||||
setBlock(world, j1 - k2 - 1, k1 - k5 - j6 - l4 - 1, l1 - 5, Block.dirt.blockID);
|
||||
setBlock(world, j1 - k2 - 1, k1 - k5 - j6 - l4, l1 - 5, Blocks.dirt);
|
||||
setBlock(world, j1 - k2 - 1, k1 - k5 - j6 - l4 - 1, l1 - 5, Blocks.dirt);
|
||||
}
|
||||
i7 = 1;
|
||||
j6 = 0;
|
||||
flag1 = false;
|
||||
do {
|
||||
if (world.isAirBlock(j1 + i4, k1 - k5 - i7, l1 + 4) || world.isAirBlock(j1 + i4, k1 - k5 - i7, l1 + 6) || world.isAirBlock(j1 + i4, k1 - k5 - i7, l1 + 8)
|
||||
|| world.getBlockId(j1 + i4, k1 - k5 - i7, l1 + 4) == Block.waterStill.blockID || world.getBlockId(j1 + i4, k1 - k5 - i7, l1 + 6) == Block.waterStill.blockID
|
||||
|| world.getBlockId(j1 + i4, k1 - k5 - i7, l1 + 8) == Block.waterStill.blockID) {
|
||||
|| world.getBlock(j1 + i4, k1 - k5 - i7, l1 + 4) == Blocks.water || world.getBlock(j1 + i4, k1 - k5 - i7, l1 + 6) == Blocks.water
|
||||
|| world.getBlock(j1 + i4, k1 - k5 - i7, l1 + 8) == Blocks.water) {
|
||||
j6++;
|
||||
} else {
|
||||
flag1 = true;
|
||||
}
|
||||
} while (!flag1 && i7++ < 12);
|
||||
setBlock(world, j1 + i4, k1 - k5 - j6, l1 + 4, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 + i4, ((k1 - k5) + 1) - j6, l1 + 4, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 + i4 + 1, k1 - k5 - j6, l1 + 4, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 + i4 + 1, ((k1 - k5) + 1) - j6, l1 + 4, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 + i4 + 2, k1 - k5 - j6, l1 + 4, Block.stoneBrick.blockID);
|
||||
setBlock(world, j1 + i4 + 3, k1 - k5 - j6, l1 + 4, Block.stoneBrick.blockID);
|
||||
setBlock(world, j1 + i4 + 3, ((k1 - k5) + 1) - j6, l1 + 4, Block.stoneBrick.blockID);
|
||||
setBlock(world, j1 + i4 + 4, k1 - k5 - j6, l1 + 4, Block.stoneBrick.blockID);
|
||||
setBlock(world, j1 + i4 + 5, k1 - k5 - j6, l1 + 4, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 + i4, k1 - k5 - j6, l1 + 5, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 + i4, ((k1 - k5) + 1) - j6, l1 + 5, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 + i4, ((k1 - k5) + 2) - j6, l1 + 6, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 + i4, k1 - k5 - j6, l1 + 7, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 + i4, ((k1 - k5) + 1) - j6, l1 + 7, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 + i4, ((k1 - k5) + 2) - j6, l1 + 7, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 + i4, k1 - k5 - j6, l1 + 8, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 + i4, ((k1 - k5) + 1) - j6, l1 + 8, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 + i4, k1 - k5 - j6, l1 + 9, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 + i4, k1 - k5 - j6, l1 + 4, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 + i4, ((k1 - k5) + 1) - j6, l1 + 4, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + i4 + 1, k1 - k5 - j6, l1 + 4, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + i4 + 1, ((k1 - k5) + 1) - j6, l1 + 4, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 + i4 + 2, k1 - k5 - j6, l1 + 4, Blocks.stonebrick);
|
||||
setBlock(world, j1 + i4 + 3, k1 - k5 - j6, l1 + 4, Blocks.stonebrick);
|
||||
setBlock(world, j1 + i4 + 3, ((k1 - k5) + 1) - j6, l1 + 4, Blocks.stonebrick);
|
||||
setBlock(world, j1 + i4 + 4, k1 - k5 - j6, l1 + 4, Blocks.stonebrick);
|
||||
setBlock(world, j1 + i4 + 5, k1 - k5 - j6, l1 + 4, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 + i4, k1 - k5 - j6, l1 + 5, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 + i4, ((k1 - k5) + 1) - j6, l1 + 5, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 + i4, ((k1 - k5) + 2) - j6, l1 + 6, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + i4, k1 - k5 - j6, l1 + 7, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 + i4, ((k1 - k5) + 1) - j6, l1 + 7, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 + i4, ((k1 - k5) + 2) - j6, l1 + 7, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 + i4, k1 - k5 - j6, l1 + 8, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 + i4, ((k1 - k5) + 1) - j6, l1 + 8, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + i4, k1 - k5 - j6, l1 + 9, Blocks.stonebrick, 1);
|
||||
l7 = random.nextInt(100);
|
||||
if (l7 <= 60) {
|
||||
setBlock(world, j1 + i4, k1 - k5 - j6 - l4, l1 + 7, Block.dirt.blockID);
|
||||
setBlock(world, j1 + i4, k1 - k5 - j6 - l4 - 1, l1 + 7, Block.dirt.blockID);
|
||||
setBlock(world, j1 + i4, k1 - k5 - j6 - l4, l1 + 7, Blocks.dirt);
|
||||
setBlock(world, j1 + i4, k1 - k5 - j6 - l4 - 1, l1 + 7, Blocks.dirt);
|
||||
}
|
||||
i7 = 1;
|
||||
j6 = 0;
|
||||
flag1 = false;
|
||||
do {
|
||||
if (world.isAirBlock(j1 - j3, k1 - k5 - i7, l1 + i4) || world.isAirBlock(j1 - j3, k1 - k5 - i7, (l1 + i4) - 2) || world.isAirBlock((j1 - j3) + 1, k1 - k5 - i7, l1 + i4)
|
||||
|| world.getBlockId(j1 - j3, k1 - k5 - i7, l1 + i4) == Block.waterStill.blockID || world.getBlockId(j1 - j3, k1 - k5 - i7, (l1 + i4) - 2) == Block.waterStill.blockID
|
||||
|| world.getBlockId((j1 - j3) + 1, k1 - k5 - i7, l1 + i4) == Block.waterStill.blockID) {
|
||||
|| world.getBlock(j1 - j3, k1 - k5 - i7, l1 + i4) == Blocks.water || world.getBlock(j1 - j3, k1 - k5 - i7, (l1 + i4) - 2) == Blocks.water
|
||||
|| world.getBlock((j1 - j3) + 1, k1 - k5 - i7, l1 + i4) == Blocks.water) {
|
||||
j6++;
|
||||
} else {
|
||||
flag1 = true;
|
||||
}
|
||||
} while (!flag1 && i7++ < 12);
|
||||
setBlock(world, (j1 - j3) + 1, k1 - k5 - j6, l1 + i4, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, (j1 - j3) + 1, ((k1 - k5) + 1) - j6, l1 + i4, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, (j1 - j3) + 1, ((k1 - k5) + 2) - j6, l1 + i4, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, (j1 - j3) + 2, k1 - k5 - j6, l1 + i4, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 - j3, k1 - k5 - j6, (l1 + i4) - 1, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 - j3, ((k1 - k5) + 1) - j6, (l1 + i4) - 1, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 - j3, ((k1 - k5) + 2) - j6, (l1 + i4) - 1, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 - j3, ((k1 - k5) + 3) - j6, (l1 + i4) - 1, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 - j3, ((k1 - k5) + 4) - j6, (l1 + i4) - 1, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 - j3, ((k1 - k5) + 2) - j6, (l1 + i4) - 2, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 - j3, ((k1 - k5) + 3) - j6, (l1 + i4) - 2, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 - j3, ((k1 - k5) + 4) - j6, (l1 + i4) - 2, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 - j3, ((k1 - k5) + 5) - j6, (l1 + i4) - 2, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 - j3, k1 - k5 - j6, (l1 + i4) - 3, Block.stoneBrick.blockID);
|
||||
setBlock(world, j1 - j3, ((k1 - k5) + 1) - j6, (l1 + i4) - 3, Block.stoneBrick.blockID);
|
||||
setBlock(world, j1 - j3, ((k1 - k5) + 2) - j6, (l1 + i4) - 3, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 - j3, ((k1 - k5) + 3) - j6, (l1 + i4) - 3, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, (j1 - j3) + 1, k1 - k5 - j6, l1 + i4, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, (j1 - j3) + 1, ((k1 - k5) + 1) - j6, l1 + i4, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, (j1 - j3) + 1, ((k1 - k5) + 2) - j6, l1 + i4, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, (j1 - j3) + 2, k1 - k5 - j6, l1 + i4, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 - j3, k1 - k5 - j6, (l1 + i4) - 1, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 - j3, ((k1 - k5) + 1) - j6, (l1 + i4) - 1, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 - j3, ((k1 - k5) + 2) - j6, (l1 + i4) - 1, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 - j3, ((k1 - k5) + 3) - j6, (l1 + i4) - 1, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 - j3, ((k1 - k5) + 4) - j6, (l1 + i4) - 1, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 - j3, ((k1 - k5) + 2) - j6, (l1 + i4) - 2, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 - j3, ((k1 - k5) + 3) - j6, (l1 + i4) - 2, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 - j3, ((k1 - k5) + 4) - j6, (l1 + i4) - 2, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 - j3, ((k1 - k5) + 5) - j6, (l1 + i4) - 2, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 - j3, k1 - k5 - j6, (l1 + i4) - 3, Blocks.stonebrick);
|
||||
setBlock(world, j1 - j3, ((k1 - k5) + 1) - j6, (l1 + i4) - 3, Blocks.stonebrick);
|
||||
setBlock(world, j1 - j3, ((k1 - k5) + 2) - j6, (l1 + i4) - 3, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 - j3, ((k1 - k5) + 3) - j6, (l1 + i4) - 3, Blocks.stonebrick, 1);
|
||||
l7 = random.nextInt(100);
|
||||
if (l7 <= 30) {
|
||||
setBlock(world, j1 - j3, k1 - k5 - j6 - l4, (l1 + i4) - 2, Block.dirt.blockID);
|
||||
setBlock(world, j1 - j3, k1 - k5 - j6 - l4 - 1, (l1 + i4) - 2, Block.dirt.blockID);
|
||||
setBlock(world, j1 - j3, k1 - k5 - j6 - l4, (l1 + i4) - 2, Blocks.dirt);
|
||||
setBlock(world, j1 - j3, k1 - k5 - j6 - l4 - 1, (l1 + i4) - 2, Blocks.dirt);
|
||||
}
|
||||
i7 = 1;
|
||||
j6 = 0;
|
||||
flag1 = false;
|
||||
do {
|
||||
if (world.isAirBlock(j1 + j3 + 4, k1 - k5 - i7, l1 - 6) || world.isAirBlock(j1 + j3 + 4, k1 - k5 - i7, l1 - 7) || world.isAirBlock(j1 + j3 + 5, k1 - k5 - i7, l1 - 7)
|
||||
|| world.getBlockId(j1 + j3 + 4, k1 - k5 - i7, l1 - 6) == Block.waterStill.blockID || world.getBlockId(j1 + j3 + 4, k1 - k5 - i7, l1 - 7) == Block.waterStill.blockID
|
||||
|| world.getBlockId(j1 + j3 + 5, k1 - k5 - i7, l1 - 7) == Block.waterStill.blockID) {
|
||||
|| world.getBlock(j1 + j3 + 4, k1 - k5 - i7, l1 - 6) == Blocks.water || world.getBlock(j1 + j3 + 4, k1 - k5 - i7, l1 - 7) == Blocks.water
|
||||
|| world.getBlock(j1 + j3 + 5, k1 - k5 - i7, l1 - 7) == Blocks.water) {
|
||||
j6++;
|
||||
} else {
|
||||
flag1 = true;
|
||||
}
|
||||
} while (!flag1 && i7++ < 12);
|
||||
setBlock(world, j1 + j3 + 4, k1 - k5 - j6, l1 - 6, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 + j3 + 4, ((k1 - k5) + 1) - j6, l1 - 6, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 + j3 + 4, ((k1 - k5) + 2) - j6, l1 - 6, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 + j3 + 4, k1 - k5 - j6, l1 - 7, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 + j3 + 4, ((k1 - k5) + 1) - j6, l1 - 7, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 + j3 + 5, k1 - k5 - j6, l1 - 7, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 + j3 + 5, ((k1 - k5) + 1) - j6, l1 - 7, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 + j3 + 5, ((k1 - k5) + 2) - j6, l1 - 7, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 + j3 + 6, k1 - k5 - j6, l1 - 7, Block.stoneBrick.blockID);
|
||||
setBlock(world, j1 + j3 + 4, k1 - k5 - j6, l1 - 6, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 + j3 + 4, ((k1 - k5) + 1) - j6, l1 - 6, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + j3 + 4, ((k1 - k5) + 2) - j6, l1 - 6, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + j3 + 4, k1 - k5 - j6, l1 - 7, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + j3 + 4, ((k1 - k5) + 1) - j6, l1 - 7, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 + j3 + 5, k1 - k5 - j6, l1 - 7, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 + j3 + 5, ((k1 - k5) + 1) - j6, l1 - 7, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + j3 + 5, ((k1 - k5) + 2) - j6, l1 - 7, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 + j3 + 6, k1 - k5 - j6, l1 - 7, Blocks.stonebrick);
|
||||
l7 = random.nextInt(100);
|
||||
if (l7 <= 30) {
|
||||
setBlock(world, j1 + j3 + 4, k1 - k5 - j6 - l4, l1 - 7, Block.dirt.blockID);
|
||||
setBlock(world, j1 + j3 + 4, k1 - k5 - j6 - l4 - 1, l1 - 7, Block.dirt.blockID);
|
||||
setBlock(world, j1 + j3 + 4, k1 - k5 - j6 - l4, l1 - 7, Blocks.dirt);
|
||||
setBlock(world, j1 + j3 + 4, k1 - k5 - j6 - l4 - 1, l1 - 7, Blocks.dirt);
|
||||
}
|
||||
}
|
||||
if (i2 != 3) {
|
||||
|
|
@ -289,142 +290,154 @@ public class StructureRuin$1 extends WorldGenerator {
|
|||
} else {
|
||||
l5 = random.nextInt(4) + 5;
|
||||
}
|
||||
setBlock(world, j1, k1 - l5, l1, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 - 1, k1 - l5, l1, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 - 1, (k1 - l5) + 1, l1, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 - 1, (k1 - l5) + 2, l1, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 - 1, (k1 - l5) + 3, l1, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1, (k1 - l5) + 1, l1, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1, (k1 - l5) + 2, l1, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1, (k1 - l5) + 3, l1, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1, (k1 - l5) + 4, l1, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1, (k1 - l5) + 5, l1, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1, k1 - l5, l1 + 1, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1, (k1 - l5) + 2, l1 + 1, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1, k1 - l5, l1 + 2, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1, (k1 - l5) + 1, l1 + 2, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1, k1 - l5 - i5, l1 + 1, Block.dirt.blockID);
|
||||
setBlock(world, j1, k1 - l5 - i5 - 1, l1 + 1, Block.dirt.blockID);
|
||||
setBlock(world, j1, k1 - l5, l1, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 - 1, k1 - l5, l1, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 - 1, (k1 - l5) + 1, l1, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 - 1, (k1 - l5) + 2, l1, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 - 1, (k1 - l5) + 3, l1, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1, (k1 - l5) + 1, l1, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1, (k1 - l5) + 2, l1, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1, (k1 - l5) + 3, l1, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1, (k1 - l5) + 4, l1, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1, (k1 - l5) + 5, l1, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1, k1 - l5, l1 + 1, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1, (k1 - l5) + 2, l1 + 1, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1, k1 - l5, l1 + 2, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1, (k1 - l5) + 1, l1 + 2, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1, k1 - l5 - i5, l1 + 1, Blocks.dirt);
|
||||
setBlock(world, j1, k1 - l5 - i5 - 1, l1 + 1, Blocks.dirt);
|
||||
j7 = 1;
|
||||
k6 = 0;
|
||||
flag2 = false;
|
||||
do {
|
||||
if (world.isAirBlock(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 2) || world.isAirBlock(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 3) || world.isAirBlock(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 4)
|
||||
|| world.getBlockId(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 2) == Block.waterStill.blockID || world.getBlockId(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 3) == Block.waterStill.blockID
|
||||
|| world.getBlockId(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 4) == Block.waterStill.blockID) {
|
||||
|| world.getBlock(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 2) == Blocks.water || world.getBlock(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 3) == Blocks.water
|
||||
|| world.getBlock(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 4) == Blocks.water) {
|
||||
k6++;
|
||||
} else {
|
||||
flag2 = true;
|
||||
}
|
||||
} while (!flag2 && j7++ < 12);
|
||||
setBlock(world, j1 + k3 + l2, k1 - l5 - k6, l1 + j4, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 + k3 + l2, ((k1 - l5) + 1) - k6, l1 + j4, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 + k3 + l2 + 1, k1 - l5 - k6, l1 + j4, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 + k3 + l2 + 1, ((k1 - l5) + 1) - k6, l1 + j4, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 + k3 + l2 + 2, k1 - l5 - k6, l1 + j4, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 + k3 + l2 + 3, k1 - l5 - k6, l1 + j4, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 + k3 + l2, k1 - l5 - k6, l1 + j4 + 1, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 + k3 + l2, ((k1 - l5) + 1) - k6, l1 + j4 + 1, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 + k3 + l2, ((k1 - l5) + 2) - k6, l1 + j4 + 1, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 + k3 + l2, ((k1 - l5) + 3) - k6, l1 + j4 + 1, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 + k3 + l2, k1 - l5 - k6, l1 + j4 + 2, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 + k3 + l2, ((k1 - l5) + 2) - k6, l1 + j4 + 2, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 + k3 + l2, k1 - l5 - k6, l1 + j4 + 3, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 + k3 + l2, ((k1 - l5) + 1) - k6, l1 + j4 + 3, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 + k3 + l2, k1 - l5 - k6, l1 + j4 + 4, Block.stoneBrick.blockID);
|
||||
setBlock(world, j1 + k3 + l2, k1 - l5 - k6, l1 + j4 + 6, Block.stoneBrick.blockID);
|
||||
setBlock(world, j1 + k3 + l2, k1 - l5 - k6, l1 + j4, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 + k3 + l2, ((k1 - l5) + 1) - k6, l1 + j4, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + k3 + l2 + 1, k1 - l5 - k6, l1 + j4, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + k3 + l2 + 1, ((k1 - l5) + 1) - k6, l1 + j4, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + k3 + l2 + 2, k1 - l5 - k6, l1 + j4, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + k3 + l2 + 3, k1 - l5 - k6, l1 + j4, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 + k3 + l2, k1 - l5 - k6, l1 + j4 + 1, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 + k3 + l2, ((k1 - l5) + 1) - k6, l1 + j4 + 1, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + k3 + l2, ((k1 - l5) + 2) - k6, l1 + j4 + 1, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + k3 + l2, ((k1 - l5) + 3) - k6, l1 + j4 + 1, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 + k3 + l2, k1 - l5 - k6, l1 + j4 + 2, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 + k3 + l2, ((k1 - l5) + 2) - k6, l1 + j4 + 2, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 + k3 + l2, k1 - l5 - k6, l1 + j4 + 3, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 + k3 + l2, ((k1 - l5) + 1) - k6, l1 + j4 + 3, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 + k3 + l2, k1 - l5 - k6, l1 + j4 + 4, Blocks.stonebrick);
|
||||
setBlock(world, j1 + k3 + l2, k1 - l5 - k6, l1 + j4 + 6, Blocks.stonebrick);
|
||||
i8 = random.nextInt(100);
|
||||
if (i8 <= 30) {
|
||||
setBlock(world, j1 + k3 + l2, k1 - l5 - k6 - i5, l1 + j4 + 1, Block.dirt.blockID);
|
||||
setBlock(world, j1 + k3 + l2, k1 - l5 - k6 - i5 - 1, l1 + j4 + 1, Block.dirt.blockID);
|
||||
setBlock(world, j1 + k3 + l2, k1 - l5 - k6 - i5, l1 + j4 + 1, Blocks.dirt);
|
||||
setBlock(world, j1 + k3 + l2, k1 - l5 - k6 - i5 - 1, l1 + j4 + 1, Blocks.dirt);
|
||||
}
|
||||
j7 = 1;
|
||||
k6 = 0;
|
||||
flag2 = false;
|
||||
do {
|
||||
if (world.isAirBlock(j1 - k3, k1 - l5 - j7, l1 - l2 - 2) || world.isAirBlock(j1 - k3, k1 - l5 - j7, l1 - l2 - 4) || world.isAirBlock(j1 - k3 - 2, k1 - l5 - j7, l1 - l2 - 6)
|
||||
|| world.getBlockId(j1 - k3, k1 - l5 - j7, l1 - l2 - 2) == Block.waterStill.blockID || world.getBlockId(j1 - k3, k1 - l5 - j7, l1 - l2 - 4) == Block.waterStill.blockID
|
||||
|| world.getBlockId(j1 - k3 - 2, k1 - l5 - j7, l1 - l2 - 6) == Block.waterStill.blockID) {
|
||||
|| world.getBlock(j1 - k3, k1 - l5 - j7, l1 - l2 - 2) == Blocks.water || world.getBlock(j1 - k3, k1 - l5 - j7, l1 - l2 - 4) == Blocks.water
|
||||
|| world.getBlock(j1 - k3 - 2, k1 - l5 - j7, l1 - l2 - 6) == Blocks.water) {
|
||||
k6++;
|
||||
} else {
|
||||
flag2 = true;
|
||||
}
|
||||
} while (!flag2 && j7++ < 12);
|
||||
setBlock(world, j1 - k3, k1 - l5 - k6, l1 - l2 - 1, Block.stoneBrick.blockID);
|
||||
setBlock(world, j1 - k3, (k1 - l5 - k6) + 1, l1 - l2 - 1, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 - k3, (k1 - l5 - k6) + 2, l1 - l2 - 1, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 - k3, k1 - l5 - k6, l1 - l2 - 2, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 - k3, ((k1 - l5) + 1) - k6, l1 - l2 - 2, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 - k3, k1 - l5 - k6, l1 - l2 - 3, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 - k3, ((k1 - l5) + 1) - k6, l1 - l2 - 3, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 - k3, k1 - l5 - k6, l1 - l2 - 4, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 - k3 - 1, k1 - l5 - k6, l1 - l2 - 6, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 - k3 - 2, k1 - l5 - k6, l1 - l2 - 6, Block.stoneBrick.blockID);
|
||||
setBlock(world, j1 - k3 - 2, ((k1 - l5) + 1) - k6, l1 - l2 - 6, Block.stoneBrick.blockID);
|
||||
setBlock(world, j1 - k3 - 3, k1 - l5 - k6, l1 - l2 - 6, Block.stoneBrick.blockID);
|
||||
setBlock(world, j1 - k3, k1 - l5 - k6, l1 - l2 - 1, Blocks.stonebrick);
|
||||
setBlock(world, j1 - k3, (k1 - l5 - k6) + 1, l1 - l2 - 1, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 - k3, (k1 - l5 - k6) + 2, l1 - l2 - 1, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 - k3, k1 - l5 - k6, l1 - l2 - 2, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 - k3, ((k1 - l5) + 1) - k6, l1 - l2 - 2, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 - k3, k1 - l5 - k6, l1 - l2 - 3, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 - k3, ((k1 - l5) + 1) - k6, l1 - l2 - 3, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 - k3, k1 - l5 - k6, l1 - l2 - 4, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 - k3 - 1, k1 - l5 - k6, l1 - l2 - 6, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 - k3 - 2, k1 - l5 - k6, l1 - l2 - 6, Blocks.stonebrick);
|
||||
setBlock(world, j1 - k3 - 2, ((k1 - l5) + 1) - k6, l1 - l2 - 6, Blocks.stonebrick);
|
||||
setBlock(world, j1 - k3 - 3, k1 - l5 - k6, l1 - l2 - 6, Blocks.stonebrick);
|
||||
i8 = random.nextInt(100);
|
||||
if (i8 <= 60) {
|
||||
setBlock(world, j1 - k3 - 1, k1 - l5 - k6 - i5, l1 - l2 - 6, Block.dirt.blockID);
|
||||
setBlock(world, j1 - k3 - 1, k1 - l5 - k6 - i5 - 1, l1 - l2 - 6, Block.dirt.blockID);
|
||||
setBlock(world, j1 - k3 - 1, k1 - l5 - k6 - i5, l1 - l2 - 6, Blocks.dirt);
|
||||
setBlock(world, j1 - k3 - 1, k1 - l5 - k6 - i5 - 1, l1 - l2 - 6, Blocks.dirt);
|
||||
}
|
||||
j7 = 1;
|
||||
k6 = 0;
|
||||
flag2 = false;
|
||||
do {
|
||||
if (world.isAirBlock(j1 + l2, k1 - l5 - j7, l1 + j4) || world.isAirBlock(j1 + l2 + 2, k1 - l5 - j7, l1 + j4) || world.isAirBlock(j1 + l2 + 4, k1 - l5 - j7, l1 + j4)
|
||||
|| world.getBlockId(j1 + l2, k1 - l5 - j7, l1 + j4) == Block.waterStill.blockID || world.getBlockId(j1 + l2 + 2, k1 - l5 - j7, l1 + j4) == Block.waterStill.blockID
|
||||
|| world.getBlockId(j1 + l2 + 4, k1 - l5 - j7, l1 + j4) == Block.waterStill.blockID) {
|
||||
|| world.getBlock(j1 + l2, k1 - l5 - j7, l1 + j4) == Blocks.water || world.getBlock(j1 + l2 + 2, k1 - l5 - j7, l1 + j4) == Blocks.water
|
||||
|| world.getBlock(j1 + l2 + 4, k1 - l5 - j7, l1 + j4) == Blocks.water) {
|
||||
k6++;
|
||||
} else {
|
||||
flag2 = true;
|
||||
}
|
||||
} while (!flag2 && j7++ < 12);
|
||||
setBlock(world, j1 + l2, k1 - l5 - k6, l1 + j4, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 + l2 + 1, k1 - l5 - k6, l1 + j4, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 + l2 + 1, ((k1 - l5) + 1) - k6, l1 + j4, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 + l2 + 1, ((k1 - l5) + 2) - k6, l1 + j4, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 + l2 + 1, ((k1 - l5) + 3) - k6, l1 + j4, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 + l2 + 2, k1 - l5 - k6, l1 + j4, Block.stoneBrick.blockID);
|
||||
setBlock(world, j1 + l2 + 2, ((k1 - l5) + 1) - k6, l1 + j4, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 + l2 + 2, ((k1 - l5) + 2) - k6, l1 + j4, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 + l2 + 3, ((k1 - l5) + 2) - k6, l1 + j4, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 + l2 + 4, k1 - l5 - k6, l1 + j4, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 + l2 + 4, ((k1 - l5) + 1) - k6, l1 + j4, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 + l2 + 5, k1 - l5 - k6, l1 + j4, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 + l2, k1 - l5 - k6, l1 + j4, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 + l2 + 1, k1 - l5 - k6, l1 + j4, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + l2 + 1, ((k1 - l5) + 1) - k6, l1 + j4, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 + l2 + 1, ((k1 - l5) + 2) - k6, l1 + j4, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 + l2 + 1, ((k1 - l5) + 3) - k6, l1 + j4, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 + l2 + 2, k1 - l5 - k6, l1 + j4, Blocks.stonebrick);
|
||||
setBlock(world, j1 + l2 + 2, ((k1 - l5) + 1) - k6, l1 + j4, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 + l2 + 2, ((k1 - l5) + 2) - k6, l1 + j4, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 + l2 + 3, ((k1 - l5) + 2) - k6, l1 + j4, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 + l2 + 4, k1 - l5 - k6, l1 + j4, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + l2 + 4, ((k1 - l5) + 1) - k6, l1 + j4, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 + l2 + 5, k1 - l5 - k6, l1 + j4, Blocks.stonebrick, 1);
|
||||
i8 = random.nextInt(100);
|
||||
if (i8 <= 30) {
|
||||
setBlock(world, j1 + l2 + 2, k1 - l5 - k6 - i5, l1 + j4, Block.dirt.blockID);
|
||||
setBlock(world, j1 + l2 + 2, k1 - l5 - k6 - i5 - 1, l1 + j4, Block.dirt.blockID);
|
||||
setBlock(world, j1 + l2 + 2, k1 - l5 - k6 - i5, l1 + j4, Blocks.dirt);
|
||||
setBlock(world, j1 + l2 + 2, k1 - l5 - k6 - i5 - 1, l1 + j4, Blocks.dirt);
|
||||
}
|
||||
j7 = 1;
|
||||
k6 = 0;
|
||||
flag2 = false;
|
||||
do {
|
||||
if (world.isAirBlock(j1 - 3, k1 - l5 - j7, l1 + k3 + 1) || world.isAirBlock(j1 - 3, k1 - l5 - j7, l1 + k3 + 3) || world.isAirBlock(j1 - 3, k1 - l5 - j7, l1 + k3 + 4)
|
||||
|| world.getBlockId(j1 - 3, k1 - l5 - j7, l1 + k3 + 1) == Block.waterStill.blockID || world.getBlockId(j1 - 3, k1 - l5 - j7, l1 + k3 + 3) == Block.waterStill.blockID
|
||||
|| world.getBlockId(j1 - 3, k1 - l5 - j7, l1 + k3 + 4) == Block.waterStill.blockID) {
|
||||
|| world.getBlock(j1 - 3, k1 - l5 - j7, l1 + k3 + 1) == Blocks.water || world.getBlock(j1 - 3, k1 - l5 - j7, l1 + k3 + 3) == Blocks.water
|
||||
|| world.getBlock(j1 - 3, k1 - l5 - j7, l1 + k3 + 4) == Blocks.water) {
|
||||
k6++;
|
||||
} else {
|
||||
flag2 = true;
|
||||
}
|
||||
} while (!flag2 && j7++ < 12);
|
||||
setBlock(world, j1 - 3, k1 - l5 - k6, l1 + k3, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 - 3, ((k1 - l5) + 1) - k6, l1 + k3, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 - 3, ((k1 - l5) + 2) - k6, l1 + k3 + 1, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 - 3, k1 - l5 - k6, l1 + k3 + 2, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 - 3, ((k1 - l5) + 1) - k6, l1 + k3 + 2, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 - 3, ((k1 - l5) + 2) - k6, l1 + k3 + 2, Block.stoneBrick.blockID);
|
||||
setBlock(world, j1 - 3, k1 - l5 - k6, l1 + k3 + 3, Block.stoneBrick.blockID);
|
||||
setBlock(world, j1 - 3, ((k1 - l5) + 1) - k6, l1 + k3 + 3, Block.stoneBrick.blockID);
|
||||
setBlock(world, j1 - 3, k1 - l5 - k6, l1 + k3 + 4, Block.stoneBrick.blockID);
|
||||
setBlockAndMetadata(world, j1 - 3, ((k1 - l5) + 1) - k6, l1 + k3 + 4, Block.stoneBrick.blockID, 1);
|
||||
setBlockAndMetadata(world, j1 - 3, k1 - l5 - k6, l1 + k3 + 5, Block.stoneBrick.blockID, 1);
|
||||
setBlock(world, j1 - 3, k1 - l5 - k6, l1 + k3, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 - 3, ((k1 - l5) + 1) - k6, l1 + k3, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 - 3, ((k1 - l5) + 2) - k6, l1 + k3 + 1, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 - 3, k1 - l5 - k6, l1 + k3 + 2, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 - 3, ((k1 - l5) + 1) - k6, l1 + k3 + 2, Blocks.stonebrick, 1);
|
||||
setBlock(world, j1 - 3, ((k1 - l5) + 2) - k6, l1 + k3 + 2, Blocks.stonebrick);
|
||||
setBlock(world, j1 - 3, k1 - l5 - k6, l1 + k3 + 3, Blocks.stonebrick);
|
||||
setBlock(world, j1 - 3, ((k1 - l5) + 1) - k6, l1 + k3 + 3, Blocks.stonebrick);
|
||||
setBlock(world, j1 - 3, k1 - l5 - k6, l1 + k3 + 4, Blocks.stonebrick);
|
||||
setBlockAndMetadata(world, j1 - 3, ((k1 - l5) + 1) - k6, l1 + k3 + 4, Blocks.stonebrick, 1);
|
||||
setBlockAndMetadata(world, j1 - 3, k1 - l5 - k6, l1 + k3 + 5, Blocks.stonebrick, 1);
|
||||
i8 = random.nextInt(100);
|
||||
if (i8 <= 30) {
|
||||
setBlock(world, j1 - 3, k1 - l5 - k6 - i5 - 1, l1 + k3 + 3, Block.dirt.blockID);
|
||||
setBlock(world, j1 - 3, k1 - l5 - k6 - i5, l1 + k3 + 3, Block.chest.blockID);
|
||||
ChestFiller.fillWithRares(world.getBlockTileEntity(j1 - 3, k1 - l5 - k6 - i5, l1 + k3 + 3));
|
||||
setBlock(world, j1 - 3, k1 - l5 - k6 - i5 - 1, l1 + k3 + 3, Blocks.dirt);
|
||||
setBlock(world, j1 - 3, k1 - l5 - k6 - i5, l1 + k3 + 3, Blocks.chest);
|
||||
ChestFiller.fillWithRares(world.getTileEntity(j1 - 3, k1 - l5 - k6 - i5, l1 + k3 + 3));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private void setBlock(World w, int x, int y, int z){
|
||||
func_150515_a(w, x, y, z, Blocks.air);
|
||||
}
|
||||
|
||||
private void setBlock(World w, int x, int y, int z, Block bl){
|
||||
func_150515_a(w, x, y, z, bl);
|
||||
}
|
||||
|
||||
private void setBlockAndMetadata(World w, int x, int y, int z, Block bl, int meta){
|
||||
setBlockAndNotifyAdequately(w, x, y, z, bl, meta);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package mysticruins;
|
|||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.tileentity.TileEntityMobSpawner;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
|
@ -20,7 +21,7 @@ public class StructureRuin extends WorldGenerator {
|
|||
if (k1 <= 0) {
|
||||
return false;
|
||||
}
|
||||
if (!world.isAirBlock(j1, k1, l1) || world.getBlockId(j1, k1 - 1, l1) != Block.grass.blockID || !Block.pumpkin.canPlaceBlockAt(world, j1, k1, l1)) {
|
||||
if (!world.isAirBlock(j1, k1, l1) || world.getBlock(j1, k1 - 1, l1) != Blocks.grass || !Blocks.pumpkin.canPlaceBlockAt(world, j1, k1, l1)) {
|
||||
return false;
|
||||
}
|
||||
int i2 = random.nextInt(3) + 1;
|
||||
|
|
@ -28,11 +29,7 @@ public class StructureRuin extends WorldGenerator {
|
|||
int i3 = random.nextInt(8) + 5;
|
||||
int l3 = random.nextInt(8) + 5;
|
||||
int k4 = random.nextInt(4) + 3;
|
||||
int j5 = 1;
|
||||
int i6 = 0;
|
||||
int l6 = 1;
|
||||
boolean flag = false;
|
||||
int k7 = random.nextInt(100);
|
||||
int j5;
|
||||
int j8 = random.nextInt(100);
|
||||
if (j8 <= 20) {
|
||||
j5 = 0;
|
||||
|
|
@ -50,16 +47,16 @@ public class StructureRuin extends WorldGenerator {
|
|||
}
|
||||
}
|
||||
setBlock(world,j1, (k1 - j5) + 5, l1 + 1, pickBlock(random));
|
||||
setBlock(world,j1, k1 - j5 - k4 - 1, l1 + 2, Block.dirt.blockID);
|
||||
setBlock(world,j1, k1 - j5 - k4, l1 + 2, Block.chest.blockID);
|
||||
ChestFiller.fillWithValuables(world.getBlockTileEntity(j1, k1 - j5 - k4, l1 + 2));
|
||||
l6 = 1;
|
||||
i6 = 0;
|
||||
flag = false;
|
||||
setBlock(world,j1, k1 - j5 - k4 - 1, l1 + 2, Blocks.dirt);
|
||||
setBlock(world,j1, k1 - j5 - k4, l1 + 2, Blocks.chest);
|
||||
ChestFiller.fillWithValuables(world.getTileEntity(j1, k1 - j5 - k4, l1 + 2));
|
||||
int l6 = 1;
|
||||
int i6 = 0;
|
||||
boolean flag = false;
|
||||
do {
|
||||
if (world.isAirBlock(j1 + l3, k1 - j5 - l6, l1 + l3 + 4) || world.isAirBlock(j1 + l3, k1 - j5 - l6, l1 + l3 + 5) || world.isAirBlock(j1 + l3, k1 - j5 - l6, l1 + l3 + 6)
|
||||
|| world.getBlockId(j1 + l3, k1 - j5 - l6, l1 + l3 + 4) == Block.waterStill.blockID || world.getBlockId(j1 + l3, k1 - j5 - l6, l1 + l3 + 5) == Block.waterStill.blockID
|
||||
|| world.getBlockId(j1 + l3, k1 - j5 - l6, l1 + l3 + 6) == Block.waterStill.blockID) {
|
||||
|| world.getBlock(j1 + l3, k1 - j5 - l6, l1 + l3 + 4) == Blocks.water || world.getBlock(j1 + l3, k1 - j5 - l6, l1 + l3 + 5) == Blocks.water
|
||||
|| world.getBlock(j1 + l3, k1 - j5 - l6, l1 + l3 + 6) == Blocks.water) {
|
||||
i6++;
|
||||
} else {
|
||||
flag = true;
|
||||
|
|
@ -80,22 +77,22 @@ public class StructureRuin extends WorldGenerator {
|
|||
setBlock(world,j1 + l3, k1 - j5 - i6, l1 + l3 + 7, pickBlock(random));
|
||||
setBlock(world,j1 + l3, ((k1 - j5) + 1) - i6, l1 + l3 + 7, pickBlock(random));
|
||||
setBlock(world,j1 + l3, ((k1 - j5) + 2) - i6, l1 + l3 + 7, pickBlock(random));
|
||||
k7 = random.nextInt(100);
|
||||
int k7 = random.nextInt(100);
|
||||
if (k7 <= 30) {
|
||||
setBlock(world,j1 + l3, k1 - j5 - i6 - k4, l1 + l3 + 5, Block.mobSpawner.blockID);
|
||||
TileEntityMobSpawner spawner = (TileEntityMobSpawner) world.getBlockTileEntity(j1 + l3, k1 - j5 - i6 - k4, l1 + l3 + 5);
|
||||
setBlock(world,j1 + l3, k1 - j5 - i6 - k4, l1 + l3 + 5, Blocks.mob_spawner);
|
||||
TileEntityMobSpawner spawner = (TileEntityMobSpawner) world.getTileEntity(j1 + l3, k1 - j5 - i6 - k4, l1 + l3 + 5);
|
||||
if (spawner != null) {
|
||||
spawner.getSpawnerLogic().setMobID(DungeonHooks.getRandomDungeonMob(random));
|
||||
spawner.func_145881_a().setEntityName(DungeonHooks.getRandomDungeonMob(random));
|
||||
}
|
||||
setBlock(world,j1 + l3, k1 - j5 - i6 - k4 - 1, l1 + l3 + 5, Block.dirt.blockID);
|
||||
setBlock(world,j1 + l3, k1 - j5 - i6 - k4 - 1, l1 + l3 + 5, Blocks.dirt);
|
||||
}
|
||||
l6 = 1;
|
||||
i6 = 0;
|
||||
flag = false;
|
||||
do {
|
||||
if (world.isAirBlock(j1 - i3, k1 - j5 - l6, l1 - 4) || world.isAirBlock(j1 - i3, k1 - j5 - l6, l1 - 5) || world.isAirBlock(j1 - i3 - 1, k1 - j5 - l6, l1 - 5)
|
||||
|| world.getBlockId(j1 - i3, k1 - j5 - l6, l1 - 4) == Block.waterStill.blockID || world.getBlockId(j1 - i3, k1 - j5 - l6, l1 - 5) == Block.waterStill.blockID
|
||||
|| world.getBlockId(j1 - i3 - 1, k1 - j5 - l6, l1 - 5) == Block.waterStill.blockID) {
|
||||
|| world.getBlock(j1 - i3, k1 - j5 - l6, l1 - 4) == Blocks.water || world.getBlock(j1 - i3, k1 - j5 - l6, l1 - 5) == Blocks.water
|
||||
|| world.getBlock(j1 - i3 - 1, k1 - j5 - l6, l1 - 5) == Blocks.water) {
|
||||
i6++;
|
||||
} else {
|
||||
flag = true;
|
||||
|
|
@ -110,19 +107,15 @@ public class StructureRuin extends WorldGenerator {
|
|||
setBlock(world,j1 - i3 - 2, k1 - j5 - i6, l1 - 5, pickBlock(random));
|
||||
k7 = random.nextInt(100);
|
||||
if (k7 <= 60) {
|
||||
setBlock(world,j1 - i3 - 1, k1 - j5 - i6 - k4, l1 - 5, Block.dirt.blockID);
|
||||
setBlock(world,j1 - i3 - 1, k1 - j5 - i6 - k4 - 1, l1 - 5, Block.dirt.blockID);
|
||||
setBlock(world,j1 - i3 - 1, k1 - j5 - i6 - k4, l1 - 5, Blocks.dirt);
|
||||
setBlock(world,j1 - i3 - 1, k1 - j5 - i6 - k4 - 1, l1 - 5, Blocks.dirt);
|
||||
}
|
||||
} else if (i2 == 2) {
|
||||
int k2 = random.nextInt(8) + 5;
|
||||
int j3 = random.nextInt(8) + 5;
|
||||
int i4 = random.nextInt(8) + 5;
|
||||
int l4 = random.nextInt(4) + 3;
|
||||
int k5 = 1;
|
||||
int j6 = 0;
|
||||
int i7 = 1;
|
||||
boolean flag1 = false;
|
||||
int l7 = random.nextInt(100);
|
||||
int k5;
|
||||
int k8 = random.nextInt(100);
|
||||
if (k8 <= 20) {
|
||||
k5 = 0;
|
||||
|
|
@ -140,15 +133,15 @@ public class StructureRuin extends WorldGenerator {
|
|||
setBlock(world,j1, (k1 - k5) + 1, l1 + 1, pickBlock(random));
|
||||
setBlock(world,j1 + 1, k1 - k5, l1, pickBlock(random));
|
||||
setBlock(world,j1 + 2, k1 - k5, l1, pickBlock(random));
|
||||
setBlock(world,j1, k1 - k5 - l4, l1 + 2, Block.dirt.blockID);
|
||||
setBlock(world,j1, k1 - k5 - l4 - 1, l1 + 2, Block.dirt.blockID);
|
||||
i7 = 1;
|
||||
j6 = 0;
|
||||
flag1 = false;
|
||||
setBlock(world,j1, k1 - k5 - l4, l1 + 2, Blocks.dirt);
|
||||
setBlock(world,j1, k1 - k5 - l4 - 1, l1 + 2, Blocks.dirt);
|
||||
int i7 = 1;
|
||||
int j6 = 0;
|
||||
boolean flag1 = false;
|
||||
do {
|
||||
if (world.isAirBlock(j1 - k2, k1 - k5 - i7, l1 - 4) || world.isAirBlock(j1 - k2, k1 - k5 - i7, l1 - 5) || world.isAirBlock(j1 - k2 - 1, k1 - k5 - i7, l1 - 5)
|
||||
|| world.getBlockId(j1 - k2, k1 - k5 - i7, l1 - 4) == Block.waterStill.blockID || world.getBlockId(j1 - k2, k1 - k5 - i7, l1 - 5) == Block.waterStill.blockID
|
||||
|| world.getBlockId(j1 - k2 - 1, k1 - k5 - i7, l1 - 5) == Block.waterStill.blockID) {
|
||||
|| world.getBlock(j1 - k2, k1 - k5 - i7, l1 - 4) == Blocks.water || world.getBlock(j1 - k2, k1 - k5 - i7, l1 - 5) == Blocks.water
|
||||
|| world.getBlock(j1 - k2 - 1, k1 - k5 - i7, l1 - 5) == Blocks.water) {
|
||||
j6++;
|
||||
} else {
|
||||
flag1 = true;
|
||||
|
|
@ -167,18 +160,18 @@ public class StructureRuin extends WorldGenerator {
|
|||
setBlock(world,j1 - k2 - 1, ((k1 - k5) + 1) - j6, l1 - 5, pickBlock(random));
|
||||
setBlock(world,j1 - k2 - 1, ((k1 - k5) + 2) - j6, l1 - 5, pickBlock(random));
|
||||
setBlock(world,j1 - k2 - 2, k1 - k5 - j6, l1 - 5, pickBlock(random));
|
||||
l7 = random.nextInt(100);
|
||||
int l7 = random.nextInt(100);
|
||||
if (l7 <= 30) {
|
||||
setBlock(world,j1 - k2 - 1, k1 - k5 - j6 - l4, l1 - 5, Block.dirt.blockID);
|
||||
setBlock(world,j1 - k2 - 1, k1 - k5 - j6 - l4 - 1, l1 - 5, Block.dirt.blockID);
|
||||
setBlock(world,j1 - k2 - 1, k1 - k5 - j6 - l4, l1 - 5, Blocks.dirt);
|
||||
setBlock(world,j1 - k2 - 1, k1 - k5 - j6 - l4 - 1, l1 - 5, Blocks.dirt);
|
||||
}
|
||||
i7 = 1;
|
||||
j6 = 0;
|
||||
flag1 = false;
|
||||
do {
|
||||
if (world.isAirBlock(j1 + i4, k1 - k5 - i7, l1 + 4) || world.isAirBlock(j1 + i4, k1 - k5 - i7, l1 + 6) || world.isAirBlock(j1 + i4, k1 - k5 - i7, l1 + 8)
|
||||
|| world.getBlockId(j1 + i4, k1 - k5 - i7, l1 + 4) == Block.waterStill.blockID || world.getBlockId(j1 + i4, k1 - k5 - i7, l1 + 6) == Block.waterStill.blockID
|
||||
|| world.getBlockId(j1 + i4, k1 - k5 - i7, l1 + 8) == Block.waterStill.blockID) {
|
||||
|| world.getBlock(j1 + i4, k1 - k5 - i7, l1 + 4) == Blocks.water || world.getBlock(j1 + i4, k1 - k5 - i7, l1 + 6) == Blocks.water
|
||||
|| world.getBlock(j1 + i4, k1 - k5 - i7, l1 + 8) == Blocks.water) {
|
||||
j6++;
|
||||
} else {
|
||||
flag1 = true;
|
||||
|
|
@ -204,16 +197,16 @@ public class StructureRuin extends WorldGenerator {
|
|||
setBlock(world,j1 + i4, k1 - k5 - j6, l1 + 9, pickBlock(random));
|
||||
l7 = random.nextInt(100);
|
||||
if (l7 <= 60) {
|
||||
setBlock(world,j1 + i4, k1 - k5 - j6 - l4, l1 + 7, Block.dirt.blockID);
|
||||
setBlock(world,j1 + i4, k1 - k5 - j6 - l4 - 1, l1 + 7, Block.dirt.blockID);
|
||||
setBlock(world,j1 + i4, k1 - k5 - j6 - l4, l1 + 7, Blocks.dirt);
|
||||
setBlock(world,j1 + i4, k1 - k5 - j6 - l4 - 1, l1 + 7, Blocks.dirt);
|
||||
}
|
||||
i7 = 1;
|
||||
j6 = 0;
|
||||
flag1 = false;
|
||||
do {
|
||||
if (world.isAirBlock(j1 - j3, k1 - k5 - i7, l1 + i4) || world.isAirBlock(j1 - j3, k1 - k5 - i7, (l1 + i4) - 2) || world.isAirBlock((j1 - j3) + 1, k1 - k5 - i7, l1 + i4)
|
||||
|| world.getBlockId(j1 - j3, k1 - k5 - i7, l1 + i4) == Block.waterStill.blockID || world.getBlockId(j1 - j3, k1 - k5 - i7, (l1 + i4) - 2) == Block.waterStill.blockID
|
||||
|| world.getBlockId((j1 - j3) + 1, k1 - k5 - i7, l1 + i4) == Block.waterStill.blockID) {
|
||||
|| world.getBlock(j1 - j3, k1 - k5 - i7, l1 + i4) == Blocks.water || world.getBlock(j1 - j3, k1 - k5 - i7, (l1 + i4) - 2) == Blocks.water
|
||||
|| world.getBlock((j1 - j3) + 1, k1 - k5 - i7, l1 + i4) == Blocks.water) {
|
||||
j6++;
|
||||
} else {
|
||||
flag1 = true;
|
||||
|
|
@ -238,16 +231,16 @@ public class StructureRuin extends WorldGenerator {
|
|||
setBlock(world,j1 - j3, ((k1 - k5) + 3) - j6, (l1 + i4) - 3, pickBlock(random));
|
||||
l7 = random.nextInt(100);
|
||||
if (l7 <= 30) {
|
||||
setBlock(world,j1 - j3, k1 - k5 - j6 - l4, (l1 + i4) - 2, Block.dirt.blockID);
|
||||
setBlock(world,j1 - j3, k1 - k5 - j6 - l4 - 1, (l1 + i4) - 2, Block.dirt.blockID);
|
||||
setBlock(world,j1 - j3, k1 - k5 - j6 - l4, (l1 + i4) - 2, Blocks.dirt);
|
||||
setBlock(world,j1 - j3, k1 - k5 - j6 - l4 - 1, (l1 + i4) - 2, Blocks.dirt);
|
||||
}
|
||||
i7 = 1;
|
||||
j6 = 0;
|
||||
flag1 = false;
|
||||
do {
|
||||
if (world.isAirBlock(j1 + j3 + 4, k1 - k5 - i7, l1 - 6) || world.isAirBlock(j1 + j3 + 4, k1 - k5 - i7, l1 - 7) || world.isAirBlock(j1 + j3 + 5, k1 - k5 - i7, l1 - 7)
|
||||
|| world.getBlockId(j1 + j3 + 4, k1 - k5 - i7, l1 - 6) == Block.waterStill.blockID || world.getBlockId(j1 + j3 + 4, k1 - k5 - i7, l1 - 7) == Block.waterStill.blockID
|
||||
|| world.getBlockId(j1 + j3 + 5, k1 - k5 - i7, l1 - 7) == Block.waterStill.blockID) {
|
||||
|| world.getBlock(j1 + j3 + 4, k1 - k5 - i7, l1 - 6) == Blocks.water || world.getBlock(j1 + j3 + 4, k1 - k5 - i7, l1 - 7) == Blocks.water
|
||||
|| world.getBlock(j1 + j3 + 5, k1 - k5 - i7, l1 - 7) == Blocks.water) {
|
||||
j6++;
|
||||
} else {
|
||||
flag1 = true;
|
||||
|
|
@ -264,8 +257,8 @@ public class StructureRuin extends WorldGenerator {
|
|||
setBlock(world,j1 + j3 + 6, k1 - k5 - j6, l1 - 7, pickBlock(random));
|
||||
l7 = random.nextInt(100);
|
||||
if (l7 <= 30) {
|
||||
setBlock(world,j1 + j3 + 4, k1 - k5 - j6 - l4, l1 - 7, Block.dirt.blockID);
|
||||
setBlock(world,j1 + j3 + 4, k1 - k5 - j6 - l4 - 1, l1 - 7, Block.dirt.blockID);
|
||||
setBlock(world,j1 + j3 + 4, k1 - k5 - j6 - l4, l1 - 7, Blocks.dirt);
|
||||
setBlock(world,j1 + j3 + 4, k1 - k5 - j6 - l4 - 1, l1 - 7, Blocks.dirt);
|
||||
}
|
||||
}
|
||||
if (i2 != 3) {
|
||||
|
|
@ -275,11 +268,7 @@ public class StructureRuin extends WorldGenerator {
|
|||
int k3 = random.nextInt(8) + 5;
|
||||
int j4 = random.nextInt(8) + 5;
|
||||
int i5 = random.nextInt(4) + 3;
|
||||
int l5 = 1;
|
||||
int k6 = 0;
|
||||
int j7 = 1;
|
||||
boolean flag2 = false;
|
||||
int i8 = random.nextInt(100);
|
||||
int l5;
|
||||
int l8 = random.nextInt(100);
|
||||
if (l8 <= 20) {
|
||||
l5 = 0;
|
||||
|
|
@ -300,15 +289,15 @@ public class StructureRuin extends WorldGenerator {
|
|||
setBlock(world,j1, (k1 - l5) + 2, l1 + 1, pickBlock(random));
|
||||
setBlock(world,j1, k1 - l5, l1 + 2, pickBlock(random));
|
||||
setBlock(world,j1, (k1 - l5) + 1, l1 + 2, pickBlock(random));
|
||||
setBlock(world,j1, k1 - l5 - i5, l1 + 1, Block.dirt.blockID);
|
||||
setBlock(world,j1, k1 - l5 - i5 - 1, l1 + 1, Block.dirt.blockID);
|
||||
j7 = 1;
|
||||
k6 = 0;
|
||||
flag2 = false;
|
||||
setBlock(world,j1, k1 - l5 - i5, l1 + 1, Blocks.dirt);
|
||||
setBlock(world,j1, k1 - l5 - i5 - 1, l1 + 1, Blocks.dirt);
|
||||
int j7 = 1;
|
||||
int k6 = 0;
|
||||
boolean flag2 = false;
|
||||
do {
|
||||
if (world.isAirBlock(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 2) || world.isAirBlock(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 3) || world.isAirBlock(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 4)
|
||||
|| world.getBlockId(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 2) == Block.waterStill.blockID || world.getBlockId(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 3) == Block.waterStill.blockID
|
||||
|| world.getBlockId(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 4) == Block.waterStill.blockID) {
|
||||
|| world.getBlock(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 2) == Blocks.water || world.getBlock(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 3) == Blocks.water
|
||||
|| world.getBlock(j1 + k3 + l2, k1 - l5 - j7, l1 + j4 + 4) == Blocks.water) {
|
||||
k6++;
|
||||
} else {
|
||||
flag2 = true;
|
||||
|
|
@ -330,18 +319,18 @@ public class StructureRuin extends WorldGenerator {
|
|||
setBlock(world,j1 + k3 + l2, ((k1 - l5) + 1) - k6, l1 + j4 + 3, pickBlock(random));
|
||||
setBlock(world,j1 + k3 + l2, k1 - l5 - k6, l1 + j4 + 4, pickBlock(random));
|
||||
setBlock(world,j1 + k3 + l2, k1 - l5 - k6, l1 + j4 + 6, pickBlock(random));
|
||||
i8 = random.nextInt(100);
|
||||
int i8 = random.nextInt(100);
|
||||
if (i8 <= 30) {
|
||||
setBlock(world,j1 + k3 + l2, k1 - l5 - k6 - i5, l1 + j4 + 1, Block.dirt.blockID);
|
||||
setBlock(world,j1 + k3 + l2, k1 - l5 - k6 - i5 - 1, l1 + j4 + 1, Block.dirt.blockID);
|
||||
setBlock(world,j1 + k3 + l2, k1 - l5 - k6 - i5, l1 + j4 + 1, Blocks.dirt);
|
||||
setBlock(world,j1 + k3 + l2, k1 - l5 - k6 - i5 - 1, l1 + j4 + 1, Blocks.dirt);
|
||||
}
|
||||
j7 = 1;
|
||||
k6 = 0;
|
||||
flag2 = false;
|
||||
do {
|
||||
if (world.isAirBlock(j1 - k3, k1 - l5 - j7, l1 - l2 - 2) || world.isAirBlock(j1 - k3, k1 - l5 - j7, l1 - l2 - 4) || world.isAirBlock(j1 - k3 - 2, k1 - l5 - j7, l1 - l2 - 6)
|
||||
|| world.getBlockId(j1 - k3, k1 - l5 - j7, l1 - l2 - 2) == Block.waterStill.blockID || world.getBlockId(j1 - k3, k1 - l5 - j7, l1 - l2 - 4) == Block.waterStill.blockID
|
||||
|| world.getBlockId(j1 - k3 - 2, k1 - l5 - j7, l1 - l2 - 6) == Block.waterStill.blockID) {
|
||||
|| world.getBlock(j1 - k3, k1 - l5 - j7, l1 - l2 - 2) == Blocks.water || world.getBlock(j1 - k3, k1 - l5 - j7, l1 - l2 - 4) == Blocks.water
|
||||
|| world.getBlock(j1 - k3 - 2, k1 - l5 - j7, l1 - l2 - 6) == Blocks.water) {
|
||||
k6++;
|
||||
} else {
|
||||
flag2 = true;
|
||||
|
|
@ -361,16 +350,16 @@ public class StructureRuin extends WorldGenerator {
|
|||
setBlock(world,j1 - k3 - 3, k1 - l5 - k6, l1 - l2 - 6, pickBlock(random));
|
||||
i8 = random.nextInt(100);
|
||||
if (i8 <= 60) {
|
||||
setBlock(world,j1 - k3 - 1, k1 - l5 - k6 - i5, l1 - l2 - 6, Block.dirt.blockID);
|
||||
setBlock(world,j1 - k3 - 1, k1 - l5 - k6 - i5 - 1, l1 - l2 - 6, Block.dirt.blockID);
|
||||
setBlock(world,j1 - k3 - 1, k1 - l5 - k6 - i5, l1 - l2 - 6, Blocks.dirt);
|
||||
setBlock(world,j1 - k3 - 1, k1 - l5 - k6 - i5 - 1, l1 - l2 - 6, Blocks.dirt);
|
||||
}
|
||||
j7 = 1;
|
||||
k6 = 0;
|
||||
flag2 = false;
|
||||
do {
|
||||
if (world.isAirBlock(j1 + l2, k1 - l5 - j7, l1 + j4) || world.isAirBlock(j1 + l2 + 2, k1 - l5 - j7, l1 + j4) || world.isAirBlock(j1 + l2 + 4, k1 - l5 - j7, l1 + j4)
|
||||
|| world.getBlockId(j1 + l2, k1 - l5 - j7, l1 + j4) == Block.waterStill.blockID || world.getBlockId(j1 + l2 + 2, k1 - l5 - j7, l1 + j4) == Block.waterStill.blockID
|
||||
|| world.getBlockId(j1 + l2 + 4, k1 - l5 - j7, l1 + j4) == Block.waterStill.blockID) {
|
||||
|| world.getBlock(j1 + l2, k1 - l5 - j7, l1 + j4) == Blocks.water || world.getBlock(j1 + l2 + 2, k1 - l5 - j7, l1 + j4) == Blocks.water
|
||||
|| world.getBlock(j1 + l2 + 4, k1 - l5 - j7, l1 + j4) == Blocks.water) {
|
||||
k6++;
|
||||
} else {
|
||||
flag2 = true;
|
||||
|
|
@ -390,16 +379,16 @@ public class StructureRuin extends WorldGenerator {
|
|||
setBlock(world,j1 + l2 + 5, k1 - l5 - k6, l1 + j4, pickBlock(random));
|
||||
i8 = random.nextInt(100);
|
||||
if (i8 <= 30) {
|
||||
setBlock(world,j1 + l2 + 2, k1 - l5 - k6 - i5, l1 + j4, Block.dirt.blockID);
|
||||
setBlock(world,j1 + l2 + 2, k1 - l5 - k6 - i5 - 1, l1 + j4, Block.dirt.blockID);
|
||||
setBlock(world,j1 + l2 + 2, k1 - l5 - k6 - i5, l1 + j4, Blocks.dirt);
|
||||
setBlock(world,j1 + l2 + 2, k1 - l5 - k6 - i5 - 1, l1 + j4, Blocks.dirt);
|
||||
}
|
||||
j7 = 1;
|
||||
k6 = 0;
|
||||
flag2 = false;
|
||||
do {
|
||||
if (world.isAirBlock(j1 - 3, k1 - l5 - j7, l1 + k3 + 1) || world.isAirBlock(j1 - 3, k1 - l5 - j7, l1 + k3 + 3) || world.isAirBlock(j1 - 3, k1 - l5 - j7, l1 + k3 + 4)
|
||||
|| world.getBlockId(j1 - 3, k1 - l5 - j7, l1 + k3 + 1) == Block.waterStill.blockID || world.getBlockId(j1 - 3, k1 - l5 - j7, l1 + k3 + 3) == Block.waterStill.blockID
|
||||
|| world.getBlockId(j1 - 3, k1 - l5 - j7, l1 + k3 + 4) == Block.waterStill.blockID) {
|
||||
|| world.getBlock(j1 - 3, k1 - l5 - j7, l1 + k3 + 1) == Blocks.water || world.getBlock(j1 - 3, k1 - l5 - j7, l1 + k3 + 3) == Blocks.water
|
||||
|| world.getBlock(j1 - 3, k1 - l5 - j7, l1 + k3 + 4) == Blocks.water) {
|
||||
k6++;
|
||||
} else {
|
||||
flag2 = true;
|
||||
|
|
@ -418,14 +407,26 @@ public class StructureRuin extends WorldGenerator {
|
|||
setBlock(world,j1 - 3, k1 - l5 - k6, l1 + k3 + 5, pickBlock(random));
|
||||
i8 = random.nextInt(100);
|
||||
if (i8 <= 30) {
|
||||
setBlock(world,j1 - 3, k1 - l5 - k6 - i5 - 1, l1 + k3 + 3, Block.dirt.blockID);
|
||||
setBlock(world,j1 - 3, k1 - l5 - k6 - i5, l1 + k3 + 3, Block.chest.blockID);
|
||||
ChestFiller.fillWithRares(world.getBlockTileEntity(j1 - 3, k1 - l5 - k6 - i5, l1 + k3 + 3));
|
||||
setBlock(world,j1 - 3, k1 - l5 - k6 - i5 - 1, l1 + k3 + 3, Blocks.dirt);
|
||||
setBlock(world,j1 - 3, k1 - l5 - k6 - i5, l1 + k3 + 3, Blocks.chest);
|
||||
ChestFiller.fillWithRares(world.getTileEntity(j1 - 3, k1 - l5 - k6 - i5, l1 + k3 + 3));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private static int pickBlock(Random random) {
|
||||
return random.nextBoolean() ? Block.cobblestone.blockID : Block.cobblestoneMossy.blockID;
|
||||
private static Block pickBlock(Random random) {
|
||||
return random.nextBoolean() ? Blocks.cobblestone : Blocks.mossy_cobblestone;
|
||||
}
|
||||
|
||||
private void setBlock(World w, int x, int y, int z){
|
||||
func_150515_a(w, x, y, z, Blocks.air);
|
||||
}
|
||||
|
||||
private void setBlock(World w, int x, int y, int z, Block bl){
|
||||
func_150515_a(w, x, y, z, bl);
|
||||
}
|
||||
|
||||
private void setBlockAndMetadata(World w, int x, int y, int z, Block bl, int meta){
|
||||
setBlockAndNotifyAdequately(w, x, y, z, bl, meta);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,27 +1,28 @@
|
|||
package mysticstones.blocks;
|
||||
|
||||
import mysticstones.MysticStones;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockPlanks extends BlockMulti {
|
||||
public BlockPlanks(int ID) {
|
||||
super(ID, Material.wood);
|
||||
setHardness(2.5F);
|
||||
setResistance(10F);
|
||||
setUnlocalizedName("BlockMysticPlanks");
|
||||
setStepSound(Block.soundWoodFootstep);
|
||||
public BlockPlanks() {
|
||||
super(Material.wood);
|
||||
setHardness(2.5F);
|
||||
setResistance(10F);
|
||||
setBlockName("BlockMysticPlanks");
|
||||
setStepSound(Block.soundTypeWood);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister iconRegister) {
|
||||
textures = new Icon[ItemPlanks.PLANK_TYPE.length];
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
textures = new IIcon[MysticStones.PLANK_TYPE.size()];
|
||||
for (int i = 0; i < textures.length; i++) {
|
||||
textures[i] = iconRegister.registerIcon("mysticstones:" + ItemPlanks.PLANK_TYPE[i]);
|
||||
textures[i] = iconRegister.registerIcon("mysticstones:" + MysticStones.PLANK_TYPE.get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,32 +2,32 @@ package mysticstones.blocks;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockReinforced extends BlockMulti {
|
||||
public BlockReinforced(int ID) {
|
||||
super(ID, Material.iron);
|
||||
setHardness(4F);
|
||||
setResistance(2000F);
|
||||
setUnlocalizedName("BlockMysticReinforcedBrick");
|
||||
setStepSound(Block.soundMetalFootstep);
|
||||
public BlockReinforced() {
|
||||
super(Material.iron);
|
||||
setHardness(4F);
|
||||
setResistance(2000F);
|
||||
setBlockName("BlockMysticReinforcedBrick");
|
||||
setStepSound(Block.soundTypeMetal);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBeaconBase(World worldObj, int x, int y, int z, int beaconX, int beaconY, int beaconZ) {
|
||||
public boolean isBeaconBase(IBlockAccess worldObj, int x, int y, int z, int beaconX, int beaconY, int beaconZ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister iconRegister) {
|
||||
textures = new Icon[ItemReinforced.BRICK_TYPE.length];
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
textures = new IIcon[ItemReinforced.BRICK_TYPE.size()];
|
||||
for (int i = 0; i < textures.length; i++) {
|
||||
textures[i] = iconRegister.registerIcon("mysticstones:" + ItemReinforced.BRICK_TYPE[i]);
|
||||
textures[i] = iconRegister.registerIcon("mysticstones:" + ItemReinforced.BRICK_TYPE.get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,27 +1,28 @@
|
|||
package mysticstones.blocks;
|
||||
|
||||
import mysticstones.MysticStones;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockStoneBricks extends BlockMulti {
|
||||
public BlockStoneBricks(int ID) {
|
||||
super(ID, Material.rock);
|
||||
setHardness(2F);
|
||||
setResistance(5F);
|
||||
setUnlocalizedName("BlockMysticStoneBricks");
|
||||
setStepSound(Block.soundStoneFootstep);
|
||||
public BlockStoneBricks() {
|
||||
super(Material.rock);
|
||||
setHardness(2F);
|
||||
setResistance(5F);
|
||||
setBlockName("BlockMysticStoneBricks");
|
||||
setStepSound(Block.soundTypeStone);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister iconRegister) {
|
||||
textures = new Icon[ItemStoneBricks.STONEBRICK_TYPES.length];
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
textures = new IIcon[MysticStones.STONEBRICK_TYPES.size()];
|
||||
for (int i = 0; i < textures.length; i++) {
|
||||
textures[i] = iconRegister.registerIcon("mysticstones:" + ItemStoneBricks.STONEBRICK_TYPES[i]);
|
||||
textures[i] = iconRegister.registerIcon("mysticstones:" + MysticStones.STONEBRICK_TYPES.get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,23 @@
|
|||
package mysticstones.blocks;
|
||||
|
||||
import mysticstones.MysticStones;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockStones extends BlockMulti {
|
||||
public BlockStones(int ID) {
|
||||
super(ID, Material.rock);
|
||||
setHardness(1F);
|
||||
setResistance(5F);
|
||||
setUnlocalizedName("BlockMysticStones");
|
||||
setStepSound(Block.soundStoneFootstep);
|
||||
public BlockStones() {
|
||||
super(Material.rock);
|
||||
setHardness(1F);
|
||||
setResistance(5F);
|
||||
setBlockName("BlockMysticStones");
|
||||
setStepSound(Block.soundTypeStone);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -48,15 +49,10 @@ public class BlockStones extends BlockMulti {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister iconRegister) {
|
||||
textures = new Icon[ItemStones.STONE_TYPES.length];
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
textures = new IIcon[MysticStones.STONE_TYPES.size()];
|
||||
for (int i = 0; i < textures.length; i++) {
|
||||
textures[i] = iconRegister.registerIcon("mysticstones:" + ItemStones.STONE_TYPES[i]);
|
||||
textures[i] = iconRegister.registerIcon("mysticstones:" + MysticStones.STONE_TYPES.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canSilkHarvest() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
package mysticstones.blocks;
|
||||
|
||||
import mysticstones.MysticStones;
|
||||
|
||||
public class ItemPlanks extends ItemBlockMulti {
|
||||
public static final String[] PLANK_TYPE = new String[] { "Purple Planks", "Green Planks", "Black Planks", "Orange Planks", "Red Planks", "Blue Planks", "Yellow Planks" };
|
||||
|
||||
public ItemPlanks(int par1) {
|
||||
super(par1, MysticStones.planks, PLANK_TYPE);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,24 +1,27 @@
|
|||
package mysticstones.blocks;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import mysticstones.MysticStones;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemReinforced extends ItemBlockMulti {
|
||||
public static final String[] BRICK_TYPE = new String[] { "Mithril Bricks", "Verdite Bricks", "Iridium Bricks", "Adamantine Bricks", "Tourmaline Bricks", "Topaz Bricks", "Amethyst Bricks",
|
||||
"Agate Bricks" };
|
||||
public static final ArrayList<String> BRICK_TYPE = new ArrayList<String>(Arrays.asList("Mithril Bricks", "Verdite Bricks", "Iridium Bricks", "Adamantine Bricks", "Tourmaline Bricks", "Topaz Bricks", "Amethyst Bricks",
|
||||
"Agate Bricks"));
|
||||
|
||||
public ItemReinforced(int par1) {
|
||||
super(par1, MysticStones.reinforcedBricks, BRICK_TYPE);
|
||||
public ItemReinforced(Block block) {
|
||||
super(block, BRICK_TYPE);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
super.addInformation(par1ItemStack, par2EntityPlayer, par3List, par4);
|
||||
if (par4) {
|
||||
par3List.add("Works As A Beacon Block Too!");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
package mysticstones.blocks;
|
||||
|
||||
import mysticstones.MysticStones;
|
||||
|
||||
public class ItemStoneBricks extends ItemBlockMulti {
|
||||
public static final String[] STONEBRICK_TYPES = new String[] { "Anorthosite Bricks", "Limestone Bricks", "Marble Bricks", "Migmatite Bricks", "Orthogneiss Bricks", "Slate Bricks",
|
||||
"Travertine Bricks" };
|
||||
|
||||
public ItemStoneBricks(int par1) {
|
||||
super(par1, MysticStones.stoneBricks, STONEBRICK_TYPES);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
package mysticstones.blocks;
|
||||
|
||||
import mysticstones.MysticStones;
|
||||
|
||||
public class ItemStones extends ItemBlockMulti {
|
||||
public static final String[] STONE_TYPES = new String[] { "Smooth Anorthosite", "Anorthosite", "Smooth Limestone", "Limestone", "Smooth Marble", "Marble", "Smooth Migmatite", "Migmatite",
|
||||
"Smooth Orthogneiss", "Orthogneiss", "Smooth Slate", "Slate", "Smooth Travertine", "Travertine" };
|
||||
|
||||
public ItemStones(int par1) {
|
||||
super(par1, MysticStones.stones, STONE_TYPES);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,54 +1,65 @@
|
|||
package mysticstones;
|
||||
|
||||
import mysticstones.blocks.BlockPlanks;
|
||||
import mysticstones.blocks.BlockReinforced;
|
||||
import mysticstones.blocks.BlockStoneBricks;
|
||||
import mysticstones.blocks.BlockStones;
|
||||
import mysticstones.blocks.ItemPlanks;
|
||||
import mysticstones.blocks.ItemReinforced;
|
||||
import mysticstones.blocks.ItemStoneBricks;
|
||||
import mysticstones.blocks.ItemStones;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import mysticstones.blocks.*;
|
||||
import mysticstones.util.Config;
|
||||
import mysticstones.util.RecipeHandler;
|
||||
import mysticstones.worldgen.WorldGeneratorStones;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Item;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.Mod.Instance;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.network.NetworkMod;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
@Mod(modid = "mysticstones", name = "Mystic Stones", version = "0.1")
|
||||
@NetworkMod(clientSideRequired = true)
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Mod(modid = "mysticstones", name = "Mystic Stones", version = "0.2")
|
||||
public class MysticStones {
|
||||
@Instance("mysticstones")
|
||||
public static MysticStones instance;
|
||||
public static boolean ENABLE = true;
|
||||
public static Block planks, stones, stoneBricks, reinforcedBricks;
|
||||
public static final CreativeTabs MysticStonesTab = new CreativeTabs("MysticStonesTab") {
|
||||
@Override
|
||||
public ItemStack getIconItemStack() {
|
||||
return new ItemStack(MysticStones.reinforcedBricks, 1, 4);
|
||||
}
|
||||
};
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int func_151243_f()
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
@Override
|
||||
public Item getTabIconItem() {
|
||||
return Item.getItemFromBlock(MysticStones.reinforcedBricks);
|
||||
}
|
||||
};
|
||||
public static final ArrayList<String> PLANK_TYPE = new ArrayList<String>(Arrays.asList("Purple Planks", "Green Planks", "Black Planks", "Orange Planks", "Red Planks", "Blue Planks", "Yellow Planks"));
|
||||
public static final ArrayList<String> STONEBRICK_TYPES = new ArrayList<String>(Arrays.asList("Anorthosite Bricks", "Limestone Bricks", "Marble Bricks", "Migmatite Bricks", "Orthogneiss Bricks", "Slate Bricks",
|
||||
"Travertine Bricks"));
|
||||
public static final ArrayList<String> STONE_TYPES = new ArrayList<String>(Arrays.asList("Smooth Anorthosite", "Anorthosite", "Smooth Limestone", "Limestone", "Smooth Marble", "Marble", "Smooth Migmatite", "Migmatite",
|
||||
"Smooth Orthogneiss", "Orthogneiss", "Smooth Slate", "Slate", "Smooth Travertine", "Travertine"));
|
||||
|
||||
@EventHandler
|
||||
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
Config.initialize(event.getSuggestedConfigurationFile());
|
||||
planks = new BlockPlanks(Config.planksID);
|
||||
stones = new BlockStones(Config.stonesID);
|
||||
stoneBricks = new BlockStoneBricks(Config.stoneBricksID);
|
||||
reinforcedBricks = new BlockReinforced(Config.reinforcedBricksID);
|
||||
GameRegistry.registerBlock(planks, ItemPlanks.class, "Planks");
|
||||
GameRegistry.registerBlock(stones, ItemStones.class, "Stones");
|
||||
GameRegistry.registerBlock(stoneBricks, ItemStoneBricks.class, "StoneBricks");
|
||||
GameRegistry.registerBlock(reinforcedBricks, ItemReinforced.class, "Reinforcedbricks");
|
||||
RecipeHandler.craftPlanks();
|
||||
RecipeHandler.craftStoneBricks();
|
||||
RecipeHandler.craftReinforced();
|
||||
RecipeHandler.craftElse();
|
||||
GameRegistry.registerWorldGenerator(new WorldGeneratorStones());
|
||||
if(ENABLE){
|
||||
planks = new BlockPlanks();
|
||||
stones = new BlockStones();
|
||||
stoneBricks = new BlockStoneBricks();
|
||||
reinforcedBricks = new BlockReinforced();
|
||||
GameRegistry.registerBlock(planks, ItemBlockMulti.class, "Planks", "mysticstones", PLANK_TYPE);
|
||||
GameRegistry.registerBlock(stones, ItemBlockMulti.class, "Stones", "mysticstones", STONE_TYPES);
|
||||
GameRegistry.registerBlock(stoneBricks, ItemBlockMulti.class, "StoneBricks", "mysticstones", STONEBRICK_TYPES);
|
||||
GameRegistry.registerBlock(reinforcedBricks, ItemReinforced.class, "Reinforcedbricks", "mysticstones");
|
||||
RecipeHandler.craftPlanks();
|
||||
RecipeHandler.craftStoneBricks();
|
||||
RecipeHandler.craftReinforced();
|
||||
RecipeHandler.craftElse();
|
||||
GameRegistry.registerWorldGenerator(new WorldGeneratorStones(), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,24 +4,17 @@ import java.util.List;
|
|||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import mysticstones.MysticStones;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
public class Config {
|
||||
public static final String[] keys = { "anorthosite", "limestone", "marble", "migmatite", "orthogneiss", "slate", "travertine" };
|
||||
public static int planksID;
|
||||
public static int stonesID;
|
||||
public static int stoneBricksID;
|
||||
public static int reinforcedBricksID;
|
||||
public static int[] rare = new int[keys.length];
|
||||
public static List<Integer> allowed = new ArrayList<Integer>();
|
||||
|
||||
public static void initialize(File file) {
|
||||
Configuration config = new Configuration(file);
|
||||
config.load();
|
||||
planksID = config.getBlock("Plank IDs", 509).getInt();
|
||||
stonesID = config.getBlock("Stone IDs", 510).getInt();
|
||||
stoneBricksID = config.getBlock("Stone Brick IDs", 511).getInt();
|
||||
reinforcedBricksID = config.getBlock("Reinforced Brick IDs", 512).getInt();
|
||||
MysticStones.ENABLE = config.get("General", "Enable", true).getBoolean(true);
|
||||
for (int i = 0; i < rare.length; i++) {
|
||||
rare[i] = config.get("Generation", "Rarity of " + keys[i], 3).getInt();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ public class RecipeHandler {
|
|||
public static void craftElse() {
|
||||
//smelting
|
||||
for (int i = 1; i < 14; i += 2) {
|
||||
FurnaceRecipes.smelting().addSmelting(MysticStones.stones.blockID, i, new ItemStack(MysticStones.stones, 1, i - 1), 0.1F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(MysticStones.stones, 1, i), new ItemStack(MysticStones.stones, 1, i - 1), 0.1F);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
package mysticworld.biome;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
|
||||
public class BiomeGenBasic extends BiomeGenBase {
|
||||
public BiomeGenBasic(int id, int blockTop, int blockFiller) {
|
||||
public BiomeGenBasic(int id, Block blockTop, Block blockFiller) {
|
||||
super(id);
|
||||
this.topBlock = (byte) blockTop;
|
||||
this.fillerBlock = (byte) blockFiller;
|
||||
this.topBlock = blockTop;
|
||||
this.fillerBlock = blockFiller;
|
||||
}
|
||||
|
||||
public BiomeGenBasic(int id, int treesChunk, int grassChunk, int flowerChunk, int reedsChunk) {
|
||||
|
|
@ -17,9 +18,9 @@ public class BiomeGenBasic extends BiomeGenBase {
|
|||
this.theBiomeDecorator.reedsPerChunk = reedsChunk;
|
||||
}
|
||||
|
||||
public BiomeGenBasic(int id, int treesChunk, int grassChunk, int flowerChunk, int reedsChunk, int blockTop, int blockFiller) {
|
||||
public BiomeGenBasic(int id, int treesChunk, int grassChunk, int flowerChunk, int reedsChunk, Block blockTop, Block blockFiller) {
|
||||
this(id, treesChunk, grassChunk, flowerChunk, reedsChunk);
|
||||
this.topBlock = (byte) blockTop;
|
||||
this.fillerBlock = (byte) blockFiller;
|
||||
this.topBlock = blockTop;
|
||||
this.fillerBlock = blockFiller;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
package mysticworld.biome;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public class BiomeGenGlacier extends BiomeGenTundra {
|
||||
public BiomeGenGlacier(int id, int treesChunk, int grassChunk, int flowerChunk, int reedsChunk, int blockTop, int blockFiller) {
|
||||
public BiomeGenGlacier(int id, int treesChunk, int grassChunk, int flowerChunk, int reedsChunk, Block blockTop, Block blockFiller) {
|
||||
super(id, treesChunk, grassChunk, flowerChunk, reedsChunk, blockTop, blockFiller);
|
||||
this.waterColorMultiplier = 15397370;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,20 @@
|
|||
package mysticworld.biome;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||
import net.minecraft.world.gen.feature.WorldGenHugeTrees;
|
||||
import net.minecraft.world.gen.feature.WorldGenMegaJungle;
|
||||
import net.minecraft.world.gen.feature.WorldGenTrees;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
||||
public class BiomeGenJungle extends net.minecraft.world.biome.BiomeGenJungle {
|
||||
public BiomeGenJungle(int par1) {
|
||||
super(par1);
|
||||
super(par1, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WorldGenerator getRandomWorldGenForTrees(Random par1Random) {
|
||||
return par1Random.nextInt(10) == 0 ? this.worldGeneratorBigTree : (par1Random.nextInt(2) == 0 ? new WorldGenHugeTrees(false, 10 + par1Random.nextInt(20), 3, 3) : new WorldGenTrees(false,
|
||||
public WorldGenAbstractTree func_150567_a(Random par1Random) {
|
||||
return par1Random.nextInt(10) == 0 ? this.worldGeneratorBigTree : (par1Random.nextInt(2) == 0 ? new WorldGenMegaJungle(false, 10, 20, 3, 3) : new WorldGenTrees(false,
|
||||
4 + par1Random.nextInt(7), 3, 3, true));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
package mysticworld.biome;
|
||||
|
||||
import net.minecraft.world.biome.SpawnListEntry;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public class BiomeGenTundra extends BiomeGenBasic {
|
||||
public BiomeGenTundra(int id, int treesChunk, int grassChunk, int flowerChunk, int reedsChunk, int blockTop, int blockFiller) {
|
||||
public BiomeGenTundra(int id, int treesChunk, int grassChunk, int flowerChunk, int reedsChunk, Block blockTop, Block blockFiller) {
|
||||
super(id, treesChunk, grassChunk, flowerChunk, reedsChunk, blockTop, blockFiller);
|
||||
this.spawnableCreatureList.clear();
|
||||
this.spawnableMonsterList.clear();
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
package mysticworld.biome;
|
||||
|
||||
import mysticworld.lib.Booleans;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraftforge.common.BiomeManager;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class BiomeHandler {
|
||||
public static BiomeGenBase Mountain;
|
||||
|
|
@ -13,48 +12,33 @@ public class BiomeHandler {
|
|||
public static BiomeGenBase Glacier;
|
||||
public static BiomeGenBase Jungle;
|
||||
|
||||
public static void init() {
|
||||
initializeBiomes();
|
||||
registerBiomes();
|
||||
}
|
||||
|
||||
public static void initializeBiomes() {
|
||||
Mountain = new BiomeGenBasic(23, Block.stone.blockID, Block.stone.blockID).setColor(9286496).setBiomeName("Mountain").setEnableSnow().setTemperatureRainfall(0.05F, 0.8F)
|
||||
.setMinMaxHeight(0.5F, 1.0F);
|
||||
Tundra = new BiomeGenTundra(24, 0, 0, 0, 0, Block.blockSnow.blockID, Block.blockSnow.blockID).setColor(9286496).setBiomeName("Tundra").setEnableSnow().setTemperatureRainfall(0.05F, 0.8F)
|
||||
.setMinMaxHeight(0.8F, 0.4F);
|
||||
Steppe = new BiomeGenBasic(25, 0, 2, 2, 3, Block.grass.blockID, Block.dirt.blockID).setColor(5470985).setBiomeName("Steppe").setMinMaxHeight(0.1F, 0.1F);
|
||||
Glacier = new BiomeGenGlacier(26, 0, 0, 0, 0, Block.ice.blockID, Block.ice.blockID).setColor(9474208).setBiomeName("Glacier").setEnableSnow().setTemperatureRainfall(0.05F, 0.8F)
|
||||
.setMinMaxHeight(0.5F, 0.7F);
|
||||
Jungle = new BiomeGenJungle(27).setColor(5470985).setBiomeName("Jungle").func_76733_a(5470985).setTemperatureRainfall(1.2F, 0.9F).setMinMaxHeight(0.2F, 0.4F);
|
||||
}
|
||||
|
||||
public static void registerBiomes() {
|
||||
public static void init(){
|
||||
if (Booleans.ENABLE_JUNGLE_REWRITE) {
|
||||
GameRegistry.removeBiome(BiomeGenBase.jungle);
|
||||
GameRegistry.removeBiome(BiomeGenBase.jungleHills);
|
||||
GameRegistry.addBiome(Jungle);
|
||||
Jungle = new BiomeGenJungle(21).setColor(5470985).setBiomeName("Jungle").func_76733_a(5470985).setTemperatureRainfall(1.2F, 0.9F).setHeight(new BiomeGenBase.Height(0.2F, 0.4F));
|
||||
BiomeManager.addSpawnBiome(Jungle);
|
||||
BiomeManager.addStrongholdBiome(Jungle);
|
||||
}
|
||||
if (Booleans.ENABLE_GLACIER_GEN) {
|
||||
GameRegistry.addBiome(Glacier);
|
||||
BiomeManager.addStrongholdBiome(Glacier);
|
||||
}
|
||||
if (Booleans.ENABLE_MOUNTAIN_GEN) {
|
||||
GameRegistry.addBiome(Mountain);
|
||||
Mountain = new BiomeGenBasic(53, Blocks.stone, Blocks.stone).setColor(9286496).setBiomeName("Mountain").setEnableSnow().setTemperatureRainfall(0.05F, 0.8F)
|
||||
.setHeight(new BiomeGenBase.Height(0.5F, 1.0F));
|
||||
BiomeManager.addSpawnBiome(Mountain);
|
||||
BiomeManager.addStrongholdBiome(Mountain);
|
||||
}
|
||||
if (Booleans.ENABLE_TUNDRA_GEN) {
|
||||
GameRegistry.addBiome(Tundra);
|
||||
Tundra = new BiomeGenTundra(54, 0, 0, 0, 0, Blocks.snow, Blocks.snow).setColor(9286496).setBiomeName("Tundra").setEnableSnow().setTemperatureRainfall(0.05F, 0.8F)
|
||||
.setHeight(new BiomeGenBase.Height(0.8F, 0.4F));
|
||||
BiomeManager.addStrongholdBiome(Tundra);
|
||||
}
|
||||
if (Booleans.ENABLE_STEPPE_GEN) {
|
||||
GameRegistry.addBiome(Steppe);
|
||||
Steppe = new BiomeGenBasic(55, 0, 2, 2, 3, Blocks.grass, Blocks.dirt).setColor(5470985).setBiomeName("Steppe").setHeight(new BiomeGenBase.Height(0.1F, 0.1F));
|
||||
BiomeManager.addSpawnBiome(Steppe);
|
||||
BiomeManager.addVillageBiome(Steppe, true);
|
||||
BiomeManager.addStrongholdBiome(Steppe);
|
||||
}
|
||||
if (Booleans.ENABLE_GLACIER_GEN) {
|
||||
Glacier = new BiomeGenGlacier(56, 0, 0, 0, 0, Blocks.ice, Blocks.ice).setColor(9474208).setBiomeName("Glacier").setEnableSnow().setTemperatureRainfall(0.05F, 0.8F)
|
||||
.setHeight(new BiomeGenBase.Height(0.5F, 0.7F));
|
||||
BiomeManager.addStrongholdBiome(Glacier);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,38 +1,26 @@
|
|||
package mysticworld.blocks;
|
||||
|
||||
import mysticworld.lib.BlockIds;
|
||||
import mysticworld.lib.Strings;
|
||||
import mysticworld.util.Reference;
|
||||
import net.minecraft.block.Block;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class BlockHandler {
|
||||
public static Block oreImbuedStone;
|
||||
public static Block bush;
|
||||
public static Block lightCube;
|
||||
public static Block pillarPlatform;
|
||||
public static Block pillar;
|
||||
public static Block pillarInsert;
|
||||
public static final ArrayList<String> IMBUED_STONE_TYPE = new ArrayList<String>(Arrays.asList(Strings.IMBUED_STONE_NAME+"Fire", Strings.IMBUED_STONE_NAME+"Water", Strings.IMBUED_STONE_NAME+"Earth", Strings.IMBUED_STONE_NAME+"Air", Strings.IMBUED_STONE_NAME+"Energy"));
|
||||
public static final ArrayList<String> BUSH_TYPES = new ArrayList<String>(Arrays.asList(Strings.BUSH_NAME, Strings.POISON_BUSH_NAME, Strings.WEAKNESS_BUSH_NAME, Strings.SLOWNESS_BUSH_NAME, Strings.HARMING_BUSH_NAME,
|
||||
Strings.WITHER_BUSH_NAME, Strings.HEALTH_BUSH_NAME, Strings.SPEED_BUSH_NAME, Strings.FIRE_RESISTANCE_BUSH_NAME, Strings.REGEN_BUSH_NAME, Strings.NIGHT_VISION_BUSH_NAME,
|
||||
Strings.INVISIBILITY_BUSH_NAME));
|
||||
public static Block oreImbuedStone, bush, lightCube, pillarPlatform, pillar, pillarInsert;
|
||||
|
||||
public static void init() {
|
||||
oreImbuedStone = new BlockImbuedStone(BlockIds.ORE_STONE_1).setUnlocalizedName(Strings.IMBUED_STONE_NAME);
|
||||
bush = new BlockBush(BlockIds.BUSH).setUnlocalizedName(Strings.BUSH_NAME);
|
||||
lightCube = new BlockLightCube(BlockIds.LIGHT_CUBE).setUnlocalizedName(Strings.LIGHT_CUBE_NAME).setTextureName("mysticworld:lightCube");
|
||||
pillarPlatform = new BlockPlatform(BlockIds.PLATFORM).setUnlocalizedName(Strings.PLATFORM_NAME).setTextureName("mysticworld:Platform");
|
||||
pillar = new BlockPillar(BlockIds.PILLAR).setUnlocalizedName(Strings.PILLAR_NAME).setTextureName("mysticworld:Pillar");
|
||||
pillarInsert = new BlockPillarInsert(BlockIds.PILLAR_INSERT).setUnlocalizedName(Strings.PILLAR_INSERT_NAME);
|
||||
registerBlocks();
|
||||
setBlockHarvestLevels();
|
||||
}
|
||||
|
||||
private static void registerBlocks() {
|
||||
GameRegistry.registerBlock(oreImbuedStone, ItemImbuedStone.class, Strings.IMBUED_STONE_NAME);
|
||||
GameRegistry.registerBlock(bush, ItemBush.class, Strings.BUSH_NAME);
|
||||
GameRegistry.registerBlock(lightCube, Strings.LIGHT_CUBE_NAME);
|
||||
GameRegistry.registerBlock(pillarPlatform, Strings.PLATFORM_NAME);
|
||||
GameRegistry.registerBlock(pillar, Strings.PILLAR_NAME);
|
||||
GameRegistry.registerBlock(pillarInsert, Strings.PILLAR_INSERT_NAME);
|
||||
}
|
||||
|
||||
private static void setBlockHarvestLevels() {
|
||||
oreImbuedStone = GameRegistry.registerBlock(new BlockImbuedStone().setBlockName(Strings.IMBUED_STONE_NAME), ItemBlockMulti.class, Strings.IMBUED_STONE_NAME, Reference.MOD_ID, IMBUED_STONE_TYPE);
|
||||
bush = GameRegistry.registerBlock(new BlockBushes().setBlockName(Strings.BUSH_NAME), ItemBlockMulti.class, Strings.BUSH_NAME, Reference.MOD_ID, BUSH_TYPES);
|
||||
lightCube = GameRegistry.registerBlock(new BlockLightCube().setBlockName(Strings.LIGHT_CUBE_NAME).setBlockTextureName("mysticworld:lightCube"), Strings.LIGHT_CUBE_NAME);
|
||||
pillarPlatform = GameRegistry.registerBlock(new BlockPlatform().setBlockName(Strings.PLATFORM_NAME).setBlockTextureName("mysticworld:Platform"), Strings.PLATFORM_NAME);
|
||||
pillar = GameRegistry.registerBlock(new BlockPillar().setBlockName(Strings.PILLAR_NAME).setBlockTextureName("mysticworld:Pillar"), Strings.PILLAR_NAME);
|
||||
pillarInsert = GameRegistry.registerBlock(new BlockPillarInsert().setBlockName(Strings.PILLAR_INSERT_NAME), Strings.PILLAR_INSERT_NAME);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,29 +8,30 @@ import mysticworld.items.ItemHandler;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockFence;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockImbuedStone extends Block {
|
||||
Icon[] textures;
|
||||
IIcon[] textures;
|
||||
|
||||
public BlockImbuedStone(int ID) {
|
||||
super(ID, Material.rock);
|
||||
setHardness(0.5F);
|
||||
setResistance(5F);
|
||||
public BlockImbuedStone() {
|
||||
super(Material.rock);
|
||||
setHardness(0.5F);
|
||||
setResistance(5F);
|
||||
setCreativeTab(MysticWorld.MysticWorldTab);
|
||||
setBlockBounds(0.25F, 0.0F, 0.25F, 0.75F, 0.125F, 0.75F);
|
||||
setLightValue(0.625f);
|
||||
setBlockBounds(0.25F, 0.0F, 0.25F, 0.75F, 0.125F, 0.75F);
|
||||
setLightLevel(0.625f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) {
|
||||
return par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4);
|
||||
return World.doesBlockHaveSolidTopSurface(par1World, par2, par3 - 1, par4);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -44,25 +45,20 @@ public class BlockImbuedStone extends Block {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Icon getIcon(int side, int meta) {
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return textures[meta];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(int i, CreativeTabs tab, List list) {
|
||||
public void getSubBlocks(Item i, CreativeTabs tab, List list) {
|
||||
for (int j = 0; j < 5; j++) {
|
||||
list.add(new ItemStack(i, 1, j));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int idDropped(int par1, Random par2Random, int par3) {
|
||||
return ItemHandler.imbuedShard.itemID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
public Item getItemDropped(int par1, Random par2Random, int par3) {
|
||||
return ItemHandler.imbuedShard;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -71,9 +67,9 @@ public class BlockImbuedStone extends Block {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5) {
|
||||
public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, Block par5) {
|
||||
boolean flag = false;
|
||||
if (!par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && !BlockFence.isIdAFence(par1World.getBlockId(par2, par3 - 1, par4))) {
|
||||
if (!World.doesBlockHaveSolidTopSurface(par1World, par2, par3 - 1, par4) && !BlockFence.func_149825_a(par1World.getBlock(par2, par3 - 1, par4))) {
|
||||
flag = true;
|
||||
}
|
||||
if (flag) {
|
||||
|
|
@ -84,24 +80,24 @@ public class BlockImbuedStone extends Block {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister iconRegister) {
|
||||
textures = new Icon[16];
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
textures = new IIcon[16];
|
||||
for (int i = 0; i < 5; i++) {
|
||||
textures[i] = iconRegister.registerIcon("mysticworld:" + ItemImbuedStone.IMBUED_STONE_TYPE[i] + " Imbued Stone");
|
||||
textures[i] = iconRegister.registerIcon("mysticworld:" + BlockHandler.IMBUED_STONE_TYPE.get(i).substring(11) + " Imbued Stone");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean renderAsNormalBlock(){
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube(){
|
||||
return false;
|
||||
}
|
||||
|
||||
public int xpDropAmount(int j) {
|
||||
return 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canSilkHarvest() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -5,24 +5,20 @@ import java.util.Random;
|
|||
import mysticworld.MysticWorld;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockLightCube extends Block {
|
||||
public BlockLightCube(int id) {
|
||||
super(id, Material.circuits);
|
||||
setBlockBounds(0.25F, 0.25F, 0.25F, 0.75F, 0.75F, 0.75F);
|
||||
setLightValue(1.0F);
|
||||
this.setTickRandomly(true);
|
||||
public BlockLightCube() {
|
||||
super(Material.circuits);
|
||||
setBlockBounds(0.25F, 0.25F, 0.25F, 0.75F, 0.75F, 0.75F);
|
||||
setLightLevel(1.0F);
|
||||
setTickRandomly(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int idDropped(int par1, Random par2Random, int par3) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
public Item getItemDropped(int par1, Random par2Random, int par3) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -31,13 +27,13 @@ public class BlockLightCube extends Block {
|
|||
MysticWorld.proxy.lightCubeFX(world, x + random.nextDouble(), y + 0.75D, z + random.nextDouble(), 0.0D, 0.0D, 0.0D, 1.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean renderAsNormalBlock(){
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canSilkHarvest() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean isOpaqueCube(){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,23 +3,24 @@ package mysticworld.blocks;
|
|||
import mysticworld.MysticWorld;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
public class BlockPillar extends Block {
|
||||
public BlockPillar(int id) {
|
||||
super(id, Material.rock);
|
||||
setBlockUnbreakable();
|
||||
setResistance(6000000.0F);
|
||||
public BlockPillar() {
|
||||
super(Material.rock);
|
||||
setBlockUnbreakable();
|
||||
setResistance(6000000.0F);
|
||||
setCreativeTab(MysticWorld.MysticWorldTab);
|
||||
setBlockBounds(0.15F, 0.0F, 0.15F, 0.85F, 1.0F, 0.85F);
|
||||
setBlockBounds(0.15F, 0.0F, 0.15F, 0.85F, 1.0F, 0.85F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isOpaqueCube(){
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean renderAsNormalBlock(){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,28 +4,33 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import mysticworld.MysticWorld;
|
||||
import mysticworld.tiles.TileEntityPillarInsert;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockPillarInsert extends BlockContainer {
|
||||
public class BlockPillarInsert extends Block {
|
||||
public static int RENDER_PILLAR_INSERT;
|
||||
|
||||
public BlockPillarInsert(int id) {
|
||||
super(id, Material.rock);
|
||||
public BlockPillarInsert() {
|
||||
super(Material.rock);
|
||||
this.setBlockUnbreakable();
|
||||
this.setResistance(6000000.0F);
|
||||
this.setCreativeTab(MysticWorld.MysticWorldTab);
|
||||
setBlockBounds(0.125F, 0.0F, 0.125F, 0.875F, 1.0F, 0.875F);
|
||||
setBlockBounds(0.125F, 0.0F, 0.125F, 0.875F, 1.0F, 0.875F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasTileEntity(int i){
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world) {
|
||||
public TileEntity createTileEntity(World world, int i) {
|
||||
return new TileEntityPillarInsert();
|
||||
}
|
||||
|
||||
|
|
@ -39,16 +44,11 @@ public class BlockPillarInsert extends BlockContainer {
|
|||
return RENDER_PILLAR_INSERT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer entityPlayer, int par6, float par7, float par8, float par9) {
|
||||
if (!world.isRemote) {
|
||||
if (Item.enderPearl.itemID == entityPlayer.inventory.getCurrentItem().itemID) {
|
||||
TileEntity te = world.getBlockTileEntity(x, y, z);
|
||||
if (Items.ender_pearl == entityPlayer.inventory.getCurrentItem().getItem()) {
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
@ -56,15 +56,21 @@ public class BlockPillarInsert extends BlockContainer {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister) {
|
||||
public void registerBlockIcons(IIconRegister par1IconRegister) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
public boolean renderAsNormalBlock(){
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube(){
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean shouldSideBeRendered(IBlockAccess blockAccess, int x, int y, int z, int i) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,18 +9,13 @@ import net.minecraft.entity.Entity;
|
|||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockPillarPlatform extends Block {
|
||||
public BlockPillarPlatform(int id) {
|
||||
super(id, Material.rock);
|
||||
public BlockPillarPlatform() {
|
||||
super(Material.rock);
|
||||
this.setBlockUnbreakable();
|
||||
this.setResistance(6000000.0F);
|
||||
this.setTickRandomly(true);
|
||||
setCreativeTab(MysticWorld.MysticWorldTab);
|
||||
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.15F, 1.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.15F, 1.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -40,10 +35,15 @@ public class BlockPillarPlatform extends Block {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean renderAsNormalBlock(){
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube(){
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int tickRate(World par1World) {
|
||||
|
|
@ -57,11 +57,11 @@ public class BlockPillarPlatform extends Block {
|
|||
}
|
||||
|
||||
private boolean isTowersNearby(World world, int x, int y, int z) {
|
||||
int block = BlockHandler.pillar.blockID;
|
||||
if (world.getBlockId(x - 2, y, z - 2) == block && world.getBlockId(x - 2, y, z + 2) == block && world.getBlockId(x + 2, y, z + 2) == block && world.getBlockId(x + 2, y, z - 2) == block
|
||||
&& world.getBlockId(x - 2, y + 1, z - 2) == block && world.getBlockId(x - 2, y + 1, z + 2) == block && world.getBlockId(x + 2, y + 1, z + 2) == block
|
||||
&& world.getBlockId(x + 2, y + 1, z - 2) == block && world.getBlockId(x - 2, y + 2, z - 2) == block && world.getBlockId(x - 2, y + 2, z + 2) == block
|
||||
&& world.getBlockId(x + 2, y + 2, z + 2) == block && world.getBlockId(x + 2, y + 2, z - 2) == block) {
|
||||
Block block = BlockHandler.pillar;
|
||||
if (world.getBlock(x - 2, y, z - 2) == block && world.getBlock(x - 2, y, z + 2) == block && world.getBlock(x + 2, y, z + 2) == block && world.getBlock(x + 2, y, z - 2) == block
|
||||
&& world.getBlock(x - 2, y + 1, z - 2) == block && world.getBlock(x - 2, y + 1, z + 2) == block && world.getBlock(x + 2, y + 1, z + 2) == block
|
||||
&& world.getBlock(x + 2, y + 1, z - 2) == block && world.getBlock(x - 2, y + 2, z - 2) == block && world.getBlock(x - 2, y + 2, z + 2) == block
|
||||
&& world.getBlock(x + 2, y + 2, z + 2) == block && world.getBlock(x + 2, y + 2, z - 2) == block) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -5,21 +5,21 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.block.material.Material;
|
||||
|
||||
public class BlockPillarTower extends Block {
|
||||
public BlockPillarTower(int id) {
|
||||
super(id, Material.rock);
|
||||
setBlockUnbreakable();
|
||||
setResistance(6000000.0F);
|
||||
setCreativeTab(MysticWorld.MysticWorldTab);
|
||||
setBlockBounds(0.15F, 0.0F, 0.15F, 0.85F, 1.0F, 0.85F);
|
||||
public BlockPillarTower() {
|
||||
super(Material.rock);
|
||||
setBlockUnbreakable();
|
||||
setResistance(6000000.0F);
|
||||
setCreativeTab(MysticWorld.MysticWorldTab);
|
||||
setBlockBounds(0.15F, 0.0F, 0.15F, 0.85F, 1.0F, 0.85F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isOpaqueCube(){
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean renderAsNormalBlock(){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,23 +8,27 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockPlatform extends Block {
|
||||
public BlockPlatform(int id) {
|
||||
super(id, Material.rock);
|
||||
this.setBlockUnbreakable();
|
||||
this.setResistance(6000000.0F);
|
||||
this.setTickRandomly(true);
|
||||
public BlockPlatform() {
|
||||
super(Material.rock);
|
||||
setBlockUnbreakable();
|
||||
setResistance(6000000.0F);
|
||||
setTickRandomly(true);
|
||||
setCreativeTab(MysticWorld.MysticWorldTab);
|
||||
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.15F, 1.0F);
|
||||
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.15F, 1.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isOpaqueCube(){
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock(){
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void randomDisplayTick(World world, int x, int y, int z, Random rand) {
|
||||
int block = BlockHandler.pillar.blockID;
|
||||
double posX = x;
|
||||
double posY = y;
|
||||
double posZ = z;
|
||||
|
|
@ -39,11 +43,6 @@ public class BlockPlatform extends Block {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int tickRate(World par1World) {
|
||||
return 30;
|
||||
|
|
@ -54,12 +53,12 @@ public class BlockPlatform extends Block {
|
|||
}
|
||||
|
||||
private boolean isTowersNearby(World world, int x, int y, int z) {
|
||||
int pillar = BlockHandler.pillar.blockID;
|
||||
int insert = BlockHandler.pillarInsert.blockID;
|
||||
if (world.getBlockId(x - 2, y, z - 2) == pillar && world.getBlockId(x - 2, y, z + 2) == pillar && world.getBlockId(x + 2, y, z + 2) == pillar && world.getBlockId(x + 2, y, z - 2) == pillar
|
||||
&& world.getBlockId(x - 2, y + 1, z - 2) == insert && world.getBlockId(x - 2, y + 1, z + 2) == insert && world.getBlockId(x + 2, y + 1, z + 2) == insert
|
||||
&& world.getBlockId(x + 2, y + 1, z - 2) == insert && world.getBlockId(x - 2, y + 2, z - 2) == pillar && world.getBlockId(x - 2, y + 2, z + 2) == pillar
|
||||
&& world.getBlockId(x + 2, y + 2, z + 2) == pillar && world.getBlockId(x + 2, y + 2, z - 2) == pillar) {
|
||||
Block pillar = BlockHandler.pillar;
|
||||
Block insert = BlockHandler.pillarInsert;
|
||||
if (world.getBlock(x - 2, y, z - 2) == pillar && world.getBlock(x - 2, y, z + 2) == pillar && world.getBlock(x + 2, y, z + 2) == pillar && world.getBlock(x + 2, y, z - 2) == pillar
|
||||
&& world.getBlock(x - 2, y + 1, z - 2) == insert && world.getBlock(x - 2, y + 1, z + 2) == insert && world.getBlock(x + 2, y + 1, z + 2) == insert
|
||||
&& world.getBlock(x + 2, y + 1, z - 2) == insert && world.getBlock(x - 2, y + 2, z - 2) == pillar && world.getBlock(x - 2, y + 2, z + 2) == pillar
|
||||
&& world.getBlock(x + 2, y + 2, z + 2) == pillar && world.getBlock(x + 2, y + 2, z - 2) == pillar) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -1,38 +0,0 @@
|
|||
package mysticworld.blocks;
|
||||
|
||||
import mysticworld.lib.Strings;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemBush extends ItemBlock {
|
||||
public static String[] BUSH_TYPES = new String[] { Strings.BUSH_NAME, Strings.POISON_BUSH_NAME, Strings.WEAKNESS_BUSH_NAME, Strings.SLOWNESS_BUSH_NAME, Strings.HARMING_BUSH_NAME,
|
||||
Strings.WITHER_BUSH_NAME, Strings.HEALTH_BUSH_NAME, Strings.SPEED_BUSH_NAME, Strings.FIRE_RESISTANCE_BUSH_NAME, Strings.REGEN_BUSH_NAME, Strings.NIGHT_VISION_BUSH_NAME,
|
||||
Strings.INVISIBILITY_BUSH_NAME };
|
||||
|
||||
public ItemBush(int par1) {
|
||||
super(par1);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIconFromDamage(int par1) {
|
||||
return BlockHandler.bush.getIcon(2, par1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int par1) {
|
||||
return par1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemStack) {
|
||||
int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, BUSH_TYPES.length);
|
||||
return BUSH_TYPES[meta];
|
||||
}
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
package mysticworld.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class ItemImbuedStone extends ItemBlock {
|
||||
|
||||
public static String[] IMBUED_STONE_TYPE = new String[] {"Fire", "Water", "Earth", "Air", "Energy"};
|
||||
|
||||
public ItemImbuedStone(int par1) {
|
||||
super(par1);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemStack) {
|
||||
int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, IMBUED_STONE_TYPE.length);
|
||||
return super.getUnlocalizedName() + IMBUED_STONE_TYPE[meta];
|
||||
}
|
||||
|
||||
|
||||
public int getMetadata(int par1)
|
||||
{
|
||||
return par1;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIconFromDamage(int par1)
|
||||
{
|
||||
return BlockHandler.oreImbuedStone.getIcon(2, par1);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -15,6 +15,7 @@ import mysticworld.items.ItemHandler;
|
|||
import mysticworld.renderer.*;
|
||||
import mysticworld.tiles.TileEntityPillarInsert;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
|
@ -25,11 +26,6 @@ public class ClientProxy extends CommonProxy {
|
|||
public final Minecraft mc = Minecraft.getMinecraft();
|
||||
public static final ResourceLocation particle = new ResourceLocation("textures/particle/particles.png");
|
||||
|
||||
@Override
|
||||
public int addArmor(String armor) {
|
||||
return RenderingRegistry.addNewArmourRendererPrefix(armor);
|
||||
}
|
||||
|
||||
//particles
|
||||
@Override
|
||||
public void airFeetFX(World worldObj, double x, double y, double z, float scale, int age) {
|
||||
|
|
@ -64,17 +60,17 @@ public class ClientProxy extends CommonProxy {
|
|||
@Override
|
||||
public void registerRenders() {
|
||||
BlockPillarInsert.RENDER_PILLAR_INSERT = RenderingRegistry.getNextAvailableRenderId();
|
||||
MinecraftForgeClient.registerItemRenderer(BlockHandler.pillarInsert.blockID, new BlockPillarInsertRenderer());
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler.fireStaff.itemID, new StaffItemRenderer("Fire"));
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler.earthStaff.itemID, new StaffItemRenderer("Earth"));
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler.airStaff.itemID, new StaffItemRenderer("Air"));
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler.energyStaff.itemID, new StaffItemRenderer("Energy"));
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler.waterStaff.itemID, new StaffItemRenderer("Water"));
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler.fireOrb.itemID, new OrbItemRenderer("Fire"));
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler.earthOrb.itemID, new OrbItemRenderer("Earth"));
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler.airOrb.itemID, new OrbItemRenderer("Air"));
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler.energyOrb.itemID, new OrbItemRenderer("Energy"));
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler.waterOrb.itemID, new OrbItemRenderer("Water"));
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockHandler.pillarInsert), new BlockPillarInsertRenderer());
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler.fireStaff, new StaffItemRenderer("Fire"));
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler.earthStaff, new StaffItemRenderer("Earth"));
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler.airStaff, new StaffItemRenderer("Air"));
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler.energyStaff, new StaffItemRenderer("Energy"));
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler.waterStaff, new StaffItemRenderer("Water"));
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler.fireOrb, new OrbItemRenderer("Fire"));
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler.earthOrb, new OrbItemRenderer("Earth"));
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler.airOrb, new OrbItemRenderer("Air"));
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler.energyOrb, new OrbItemRenderer("Energy"));
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler.waterOrb, new OrbItemRenderer("Water"));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityChargeFire.class, new RenderStaffPower(0));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityChargeWater.class, new RenderStaffPower(1));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityChargeEarth.class, new RenderStaffPower(2));
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public class EntityChargeAir extends Entity {
|
|||
super.onUpdate();
|
||||
Vec3 vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ);
|
||||
Vec3 vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
||||
MovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks_do_do(vec3, vec31, true, true);
|
||||
MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec3, vec31, true, true, false);
|
||||
vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ);
|
||||
vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
||||
if (movingobjectposition != null) {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ import net.minecraft.entity.boss.EntityDragon;
|
|||
import net.minecraft.entity.boss.EntityWither;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
|
@ -79,7 +81,7 @@ public class EntityChargeEarth extends Entity {
|
|||
super.onUpdate();
|
||||
Vec3 vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ);
|
||||
Vec3 vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
||||
MovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks_do_do(vec3, vec31, true, true);
|
||||
MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec3, vec31, true, true, false);
|
||||
vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ);
|
||||
vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
||||
if (movingobjectposition != null) {
|
||||
|
|
@ -143,15 +145,15 @@ public class EntityChargeEarth extends Entity {
|
|||
par1MovingObjectPosition.entityHit.addVelocity(this.motionX * 1 * 0.6000000238418579D / f3, 0.1D, this.motionZ * 1 * 0.6000000238418579D / f3);
|
||||
}
|
||||
par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.magic, 20);
|
||||
this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Item.seeds, rand.nextInt(4))));
|
||||
this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Block.mushroomBrown, rand.nextInt(2))));
|
||||
this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Item.appleRed, rand.nextInt(2))));
|
||||
this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Block.sapling, rand.nextInt(2), 0)));
|
||||
this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Item.pumpkinSeeds, rand.nextInt(2))));
|
||||
this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Block.sapling, rand.nextInt(2), 1)));
|
||||
this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Block.sapling, rand.nextInt(2), 2)));
|
||||
this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Block.sapling, rand.nextInt(2), 3)));
|
||||
this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Item.melonSeeds, rand.nextInt(3))));
|
||||
this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Items.wheat_seeds, rand.nextInt(4))));
|
||||
this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Blocks.brown_mushroom, rand.nextInt(2))));
|
||||
this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Items.apple, rand.nextInt(2))));
|
||||
this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Blocks.sapling, rand.nextInt(2), 0)));
|
||||
this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Items.pumpkin_seeds, rand.nextInt(2))));
|
||||
this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Blocks.sapling, rand.nextInt(2), 1)));
|
||||
this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Blocks.sapling, rand.nextInt(2), 2)));
|
||||
this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Blocks.sapling, rand.nextInt(2), 3)));
|
||||
this.worldObj.spawnEntityInWorld(new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(Items.melon_seeds, rand.nextInt(3))));
|
||||
} else {
|
||||
int i = par1MovingObjectPosition.blockX;
|
||||
int j = par1MovingObjectPosition.blockY;
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ public class EntityChargeEnergy extends Entity {
|
|||
super.onUpdate();
|
||||
Vec3 vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ);
|
||||
Vec3 vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
||||
MovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks_do_do(vec3, vec31, true, true);
|
||||
MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec3, vec31, true, true, false);
|
||||
vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ);
|
||||
vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
||||
if (movingobjectposition != null) {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import mysticworld.MysticWorld;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
|
|
@ -70,7 +71,7 @@ public class EntityChargeFire extends Entity {
|
|||
super.onUpdate();
|
||||
Vec3 vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ);
|
||||
Vec3 vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
||||
MovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks_do_do(vec3, vec31, true, true);
|
||||
MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec3, vec31, true, true, false);
|
||||
vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ);
|
||||
vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
||||
if (movingobjectposition != null) {
|
||||
|
|
@ -160,7 +161,7 @@ public class EntityChargeFire extends Entity {
|
|||
++i;
|
||||
}
|
||||
if (this.worldObj.isAirBlock(i, j, k)) {
|
||||
this.worldObj.setBlock(i, j, k, Block.fire.blockID);
|
||||
this.worldObj.setBlock(i, j, k, Blocks.fire);
|
||||
}
|
||||
}
|
||||
this.setDead();
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ public class EntityChargeWater extends Entity {
|
|||
super.onUpdate();
|
||||
Vec3 vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ);
|
||||
Vec3 vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
||||
MovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks_do_do(vec3, vec31, true, true);
|
||||
MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec3, vec31, true, true, false);
|
||||
vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ);
|
||||
vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
||||
if (movingobjectposition != null) {
|
||||
|
|
|
|||
|
|
@ -1,20 +1,21 @@
|
|||
package mysticworld.entity;
|
||||
|
||||
import mysticworld.MysticWorld;
|
||||
import mysticworld.lib.EntityIds;
|
||||
import mysticworld.lib.Strings;
|
||||
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
|
||||
public class EntityHandler {
|
||||
//Entity IDs
|
||||
public static int ENTITY_AIR_CHARGE = 1;
|
||||
public static int ENTITY_FIREBALL = 2;
|
||||
public static int ENTITY_EARTH_CHARGE = 3;
|
||||
public static int ENTITY_ENERGY_CHARGE = 4;
|
||||
public static int ENTITY_WATER_CHARGE = 5;
|
||||
public static void init() {
|
||||
registerEntities();
|
||||
}
|
||||
|
||||
public static void registerEntities() {
|
||||
EntityRegistry.registerModEntity(EntityChargeAir.class, Strings.ENTITY_AIR_CHARGE_NAME, EntityIds.ENTITY_AIR_CHARGE, MysticWorld.instance, 80, 3, false);
|
||||
EntityRegistry.registerModEntity(EntityChargeFire.class, Strings.ENTITY_FIREBALL_NAME, EntityIds.ENTITY_FIREBALL, MysticWorld.instance, 80, 3, false);
|
||||
EntityRegistry.registerModEntity(EntityChargeEarth.class, Strings.ENTITY_EARTH_CHARGE_NAME, EntityIds.ENTITY_EARTH_CHARGE, MysticWorld.instance, 80, 3, false);
|
||||
EntityRegistry.registerModEntity(EntityChargeEnergy.class, Strings.ENTITY_ENERGY_CHARGE_NAME, EntityIds.ENTITY_ENERGY_CHARGE, MysticWorld.instance, 80, 3, false);
|
||||
EntityRegistry.registerModEntity(EntityChargeWater.class, Strings.ENTITY_WATER_CHARGE_NAME, EntityIds.ENTITY_WATER_CHARGE, MysticWorld.instance, 80, 3, false);
|
||||
EntityRegistry.registerModEntity(EntityChargeAir.class, Strings.ENTITY_AIR_CHARGE_NAME, ENTITY_AIR_CHARGE, MysticWorld.instance, 80, 3, false);
|
||||
EntityRegistry.registerModEntity(EntityChargeFire.class, Strings.ENTITY_FIREBALL_NAME, ENTITY_FIREBALL, MysticWorld.instance, 80, 3, false);
|
||||
EntityRegistry.registerModEntity(EntityChargeEarth.class, Strings.ENTITY_EARTH_CHARGE_NAME, ENTITY_EARTH_CHARGE, MysticWorld.instance, 80, 3, false);
|
||||
EntityRegistry.registerModEntity(EntityChargeEnergy.class, Strings.ENTITY_ENERGY_CHARGE_NAME, ENTITY_ENERGY_CHARGE, MysticWorld.instance, 80, 3, false);
|
||||
EntityRegistry.registerModEntity(EntityChargeWater.class, Strings.ENTITY_WATER_CHARGE_NAME, ENTITY_WATER_CHARGE, MysticWorld.instance, 80, 3, false);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
package mysticworld.items;
|
||||
|
||||
import net.minecraft.item.EnumArmorMaterial;
|
||||
import net.minecraftforge.common.EnumHelper;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraftforge.common.util.EnumHelper;
|
||||
|
||||
public class EnumArmor
|
||||
{
|
||||
static EnumArmorMaterial Verdite = EnumHelper.addArmorMaterial("Verdite", 262, new int[]{2, 5, 4, 1}, 5);
|
||||
static EnumArmorMaterial Mithril = EnumHelper.addArmorMaterial("Mithril", 500, new int[]{2, 7, 6, 2}, 9);
|
||||
static EnumArmorMaterial Adamantine = EnumHelper.addArmorMaterial("Adamantine", 3000, new int[]{4, 9, 6, 4}, 13);
|
||||
static EnumArmorMaterial Iridium = EnumHelper.addArmorMaterial("Iridium", 4000, new int[]{4, 10, 7, 5}, 15);
|
||||
static ItemArmor.ArmorMaterial Verdite = EnumHelper.addArmorMaterial("Verdite", 262, new int[]{2, 5, 4, 1}, 5);
|
||||
static ItemArmor.ArmorMaterial Mithril = EnumHelper.addArmorMaterial("Mithril", 500, new int[]{2, 7, 6, 2}, 9);
|
||||
static ItemArmor.ArmorMaterial Adamantine = EnumHelper.addArmorMaterial("Adamantine", 3000, new int[]{4, 9, 6, 4}, 13);
|
||||
static ItemArmor.ArmorMaterial Iridium = EnumHelper.addArmorMaterial("Iridium", 4000, new int[]{4, 10, 7, 5}, 15);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,30 +1,29 @@
|
|||
package mysticworld.items;
|
||||
|
||||
import mysticworld.MysticWorld;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.EnumArmorMaterial;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemArmorAdamantine extends ItemArmor {
|
||||
int ArmorType;
|
||||
|
||||
public ItemArmorAdamantine(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) {
|
||||
super(par1, par2EnumArmorMaterial, par3, par4);
|
||||
public ItemArmorAdamantine(ArmorMaterial par2EnumArmorMaterial, int par4) {
|
||||
super(par2EnumArmorMaterial, 0, par4);
|
||||
this.ArmorType = par4;
|
||||
this.setMaxDamage(3000);
|
||||
this.setCreativeTab(MysticWorld.MysticWorldTab);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer) {
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layer) {
|
||||
int suffix = this.armorType == 2 ? 2 : 1;
|
||||
return "mysticworld:textures/models/armor/Adamantine_layer_" + suffix + ".png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IconRegister iconRegister) {
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
itemIcon = iconRegister.registerIcon("mysticworld:AdamantineArmor_" + ArmorType);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
package mysticworld.items;
|
||||
|
||||
import mysticworld.MysticWorld;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumArmorMaterial;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
|
|
@ -14,44 +13,44 @@ import net.minecraft.world.World;
|
|||
public class ItemArmorIridium extends ItemArmor {
|
||||
int ArmorType;
|
||||
|
||||
public ItemArmorIridium(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) {
|
||||
super(par1, par2EnumArmorMaterial, par3, par4);
|
||||
public ItemArmorIridium(ArmorMaterial par2EnumArmorMaterial, int par4) {
|
||||
super(par2EnumArmorMaterial, 0, par4);
|
||||
this.ArmorType = par4;
|
||||
this.setMaxDamage(4000);
|
||||
this.setCreativeTab(MysticWorld.MysticWorldTab);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer) {
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layer) {
|
||||
int suffix = this.armorType == 2 ? 2 : 1;
|
||||
return "mysticworld:textures/models/armor/Iridium_layer_" + suffix + ".png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArmorTickUpdate(World world, EntityPlayer player, ItemStack itemStack) {
|
||||
ItemStack helmet = player.getCurrentItemOrArmor(4);
|
||||
ItemStack plate = player.getCurrentItemOrArmor(3);
|
||||
ItemStack legs = player.getCurrentItemOrArmor(2);
|
||||
ItemStack boots = player.getCurrentItemOrArmor(1);
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
|
||||
ItemStack helmet = player.getEquipmentInSlot(4);
|
||||
ItemStack plate = player.getEquipmentInSlot(3);
|
||||
ItemStack legs = player.getEquipmentInSlot(2);
|
||||
ItemStack boots = player.getEquipmentInSlot(1);
|
||||
if (helmet != null) {
|
||||
if (helmet.itemID == ItemHandler.iridiumHelmet.itemID) {
|
||||
if (helmet.getItem() == ItemHandler.iridiumHelmet) {
|
||||
player.addPotionEffect((new PotionEffect(Potion.nightVision.getId(), 200, 0)));
|
||||
}
|
||||
}
|
||||
if (plate != null) {
|
||||
if (plate.itemID == ItemHandler.iridiumChestplate.itemID) {
|
||||
if (plate.getItem() == ItemHandler.iridiumChestplate) {
|
||||
player.addPotionEffect((new PotionEffect(Potion.regeneration.getId(), 200, 0)));
|
||||
}
|
||||
}
|
||||
if (legs != null) {
|
||||
if (legs.itemID == ItemHandler.iridiumLeggings.itemID) {
|
||||
if (legs.getItem() == ItemHandler.iridiumLeggings) {
|
||||
player.addPotionEffect((new PotionEffect(Potion.moveSpeed.getId(), 200, 2)));
|
||||
player.addVelocity(0.0005, 0, 0.0005);
|
||||
player.stepHeight = 1.001F;
|
||||
}
|
||||
}
|
||||
if (boots != null) {
|
||||
if (boots.itemID == ItemHandler.iridiumBoots.itemID) {
|
||||
if (boots.getItem() == ItemHandler.iridiumBoots) {
|
||||
player.fallDistance = 0.0F;
|
||||
player.addPotionEffect((new PotionEffect(Potion.jump.getId(), 200, 2)));
|
||||
}
|
||||
|
|
@ -59,7 +58,7 @@ public class ItemArmorIridium extends ItemArmor {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IconRegister iconRegister) {
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
itemIcon = iconRegister.registerIcon("mysticworld:IridiumArmor_" + ArmorType);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,30 +1,29 @@
|
|||
package mysticworld.items;
|
||||
|
||||
import mysticworld.MysticWorld;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.EnumArmorMaterial;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemArmorMithril extends ItemArmor {
|
||||
int ArmorType;
|
||||
|
||||
public ItemArmorMithril(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) {
|
||||
super(par1, par2EnumArmorMaterial, par3, par4);
|
||||
public ItemArmorMithril(ArmorMaterial par2EnumArmorMaterial, int par4) {
|
||||
super(par2EnumArmorMaterial, 0, par4);
|
||||
this.ArmorType = par4;
|
||||
this.setMaxDamage(500);
|
||||
this.setCreativeTab(MysticWorld.MysticWorldTab);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer) {
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layer) {
|
||||
int suffix = this.armorType == 2 ? 2 : 1;
|
||||
return "mysticworld:textures/models/armor/Mithril_layer_" + suffix + ".png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IconRegister iconRegister) {
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
itemIcon = iconRegister.registerIcon("mysticworld:MithrilArmor_" + ArmorType);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,30 +1,29 @@
|
|||
package mysticworld.items;
|
||||
|
||||
import mysticworld.MysticWorld;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.EnumArmorMaterial;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemArmorVerdite extends ItemArmor {
|
||||
int ArmorType;
|
||||
|
||||
public ItemArmorVerdite(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) {
|
||||
super(par1, par2EnumArmorMaterial, par3, par4);
|
||||
public ItemArmorVerdite(ArmorMaterial par2EnumArmorMaterial, int par4) {
|
||||
super(par2EnumArmorMaterial, 0, par4);
|
||||
this.ArmorType = par4;
|
||||
this.setMaxDamage(262);
|
||||
this.setCreativeTab(MysticWorld.MysticWorldTab);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer) {
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layer) {
|
||||
int suffix = this.armorType == 2 ? 2 : 1;
|
||||
return "mysticworld:textures/models/armor/Verdite_layer_" + suffix + ".png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IconRegister iconRegister) {
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
itemIcon = iconRegister.registerIcon("mysticworld:VerditeArmor_" + ArmorType);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,26 +3,27 @@ package mysticworld.items;
|
|||
import java.util.List;
|
||||
|
||||
import mysticworld.MysticWorld;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemFood;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemBushFruit extends ItemFood {
|
||||
private Icon[] icons;
|
||||
private IIcon[] icons;
|
||||
private static final String[] FRUIT_TYPES = new String[] { "Mundane", "Poison", "Weakness", "Slowness", "Harming", "Wither", "Health", "Speed", "FireResistance", "Regen", "NightVision",
|
||||
"Invisibility" };
|
||||
|
||||
public ItemBushFruit(int id, int health) {
|
||||
super(id, health, 0.6F, false);
|
||||
public ItemBushFruit(int health) {
|
||||
super(health, 0.6F, false);
|
||||
this.setHasSubtypes(true);
|
||||
this.setCreativeTab(MysticWorld.MysticWorldTab);
|
||||
maxStackSize = 64;
|
||||
|
|
@ -32,7 +33,7 @@ public class ItemBushFruit extends ItemFood {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIconFromDamage(int meta) {
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
int j = MathHelper.clamp_int(meta, 0, FRUIT_TYPES.length);
|
||||
return icons[j];
|
||||
}
|
||||
|
|
@ -44,7 +45,7 @@ public class ItemBushFruit extends ItemFood {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) {
|
||||
public void getSubItems(Item par1, CreativeTabs par2CreativeTabs, List par3List) {
|
||||
for (int var4 = 0; var4 < FRUIT_TYPES.length; var4++) {
|
||||
par3List.add(new ItemStack(par1, 1, var4));
|
||||
}
|
||||
|
|
@ -60,8 +61,8 @@ public class ItemBushFruit extends ItemFood {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister iconRegister) {
|
||||
icons = new Icon[FRUIT_TYPES.length];
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
icons = new IIcon[FRUIT_TYPES.length];
|
||||
for (int i = 0; i < FRUIT_TYPES.length; ++i) {
|
||||
icons[i] = iconRegister.registerIcon("mysticworld:Fruit" + FRUIT_TYPES[i]);
|
||||
}
|
||||
|
|
@ -76,77 +77,77 @@ public class ItemBushFruit extends ItemFood {
|
|||
case 1:
|
||||
potion = player.getActivePotionEffect(Potion.poison);
|
||||
if (potion != null) {
|
||||
duration = potion.duration;
|
||||
duration = potion.getDuration();
|
||||
}
|
||||
player.addPotionEffect(new PotionEffect(Potion.poison.id, duration + 160, 0));
|
||||
break;
|
||||
case 2:
|
||||
potion = player.getActivePotionEffect(Potion.weakness);
|
||||
if (potion != null) {
|
||||
duration = potion.duration;
|
||||
duration = potion.getDuration();
|
||||
}
|
||||
player.addPotionEffect(new PotionEffect(Potion.weakness.id, duration + 160, 0));
|
||||
break;
|
||||
case 3:
|
||||
potion = player.getActivePotionEffect(Potion.moveSlowdown);
|
||||
if (potion != null) {
|
||||
duration = potion.duration;
|
||||
duration = potion.getDuration();
|
||||
}
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, duration + 160, 0));
|
||||
break;
|
||||
case 4:
|
||||
potion = player.getActivePotionEffect(Potion.harm);
|
||||
if (potion != null) {
|
||||
duration = potion.duration;
|
||||
duration = potion.getDuration();
|
||||
}
|
||||
player.addPotionEffect(new PotionEffect(Potion.harm.id, duration + 1, 0));
|
||||
break;
|
||||
case 5:
|
||||
potion = player.getActivePotionEffect(Potion.wither);
|
||||
if (potion != null) {
|
||||
duration = potion.duration;
|
||||
duration = potion.getDuration();
|
||||
}
|
||||
player.addPotionEffect(new PotionEffect(Potion.wither.id, duration + 160, 0));
|
||||
break;
|
||||
case 6:
|
||||
potion = player.getActivePotionEffect(Potion.heal);
|
||||
if (potion != null) {
|
||||
duration = potion.duration;
|
||||
duration = potion.getDuration();
|
||||
}
|
||||
player.addPotionEffect(new PotionEffect(Potion.heal.id, duration + 1, 0));
|
||||
break;
|
||||
case 7:
|
||||
potion = player.getActivePotionEffect(Potion.moveSpeed);
|
||||
if (potion != null) {
|
||||
duration = potion.duration;
|
||||
duration = potion.getDuration();
|
||||
}
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, duration + 160, 0));
|
||||
break;
|
||||
case 8:
|
||||
potion = player.getActivePotionEffect(Potion.fireResistance);
|
||||
if (potion != null) {
|
||||
duration = potion.duration;
|
||||
duration = potion.getDuration();
|
||||
}
|
||||
player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, duration + 160, 0));
|
||||
break;
|
||||
case 9:
|
||||
potion = player.getActivePotionEffect(Potion.regeneration);
|
||||
if (potion != null) {
|
||||
duration = potion.duration;
|
||||
duration = potion.getDuration();
|
||||
}
|
||||
player.addPotionEffect(new PotionEffect(Potion.regeneration.id, duration + 160, 0));
|
||||
break;
|
||||
case 10:
|
||||
potion = player.getActivePotionEffect(Potion.nightVision);
|
||||
if (potion != null) {
|
||||
duration = potion.duration;
|
||||
duration = potion.getDuration();
|
||||
}
|
||||
player.addPotionEffect(new PotionEffect(Potion.nightVision.id, duration + 160, 0));
|
||||
break;
|
||||
case 11:
|
||||
potion = player.getActivePotionEffect(Potion.invisibility);
|
||||
if (potion != null) {
|
||||
duration = potion.duration;
|
||||
duration = potion.getDuration();
|
||||
}
|
||||
player.addPotionEffect(new PotionEffect(Potion.invisibility.id, duration + 160, 0));
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -4,21 +4,21 @@ import java.util.List;
|
|||
|
||||
import mysticworld.MysticWorld;
|
||||
import mysticworld.lib.Strings;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemImbuedShard extends Item {
|
||||
private Icon[] icons;
|
||||
private IIcon[] icons;
|
||||
private static final String[] SHARD_TYPES = new String[] { "Fire", "Water", "Earth", "Air", "Energy" };
|
||||
|
||||
public ItemImbuedShard(int id) {
|
||||
super(id);
|
||||
public ItemImbuedShard() {
|
||||
super();
|
||||
this.setHasSubtypes(true);
|
||||
this.setUnlocalizedName(Strings.IMBUED_SHARD_NAME);
|
||||
this.setCreativeTab(MysticWorld.MysticWorldTab);
|
||||
|
|
@ -26,14 +26,14 @@ public class ItemImbuedShard extends Item {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIconFromDamage(int meta) {
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
int j = MathHelper.clamp_int(meta, 0, 5);
|
||||
return icons[j];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) {
|
||||
public void getSubItems(Item par1, CreativeTabs par2CreativeTabs, List par3List) {
|
||||
for (int var4 = 0; var4 < SHARD_TYPES.length; var4++) {
|
||||
par3List.add(new ItemStack(par1, 1, var4));
|
||||
}
|
||||
|
|
@ -47,8 +47,8 @@ public class ItemImbuedShard extends Item {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister iconRegister) {
|
||||
icons = new Icon[SHARD_TYPES.length];
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
icons = new IIcon[SHARD_TYPES.length];
|
||||
for (int i = 0; i < SHARD_TYPES.length; ++i) {
|
||||
icons[i] = iconRegister.registerIcon("mysticworld:Shard" + SHARD_TYPES[i]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,14 +6,14 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import mysticworld.MysticWorld;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
public class ItemOrb extends Item {
|
||||
Random rand = new Random();
|
||||
|
||||
public ItemOrb(int id) {
|
||||
super(id);
|
||||
public ItemOrb() {
|
||||
super();
|
||||
this.setMaxStackSize(1);
|
||||
this.setMaxDamage(200);
|
||||
this.setCreativeTab(MysticWorld.MysticWorldTab);
|
||||
|
|
@ -21,6 +21,6 @@ public class ItemOrb extends Item {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister) {
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ import net.minecraft.world.World;
|
|||
import org.lwjgl.input.Mouse;
|
||||
|
||||
public class ItemOrbAir extends ItemOrb {
|
||||
public ItemOrbAir(int id) {
|
||||
super(id);
|
||||
public ItemOrbAir() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -1,26 +1,15 @@
|
|||
package mysticworld.items;
|
||||
|
||||
import mysticworld.MysticWorld;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockCocoa;
|
||||
import net.minecraft.block.BlockCrops;
|
||||
import net.minecraft.block.BlockDirectional;
|
||||
import net.minecraft.block.BlockMushroom;
|
||||
import net.minecraft.block.BlockSapling;
|
||||
import net.minecraft.block.BlockStem;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemDye;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.Event.Result;
|
||||
import net.minecraftforge.event.entity.player.BonemealEvent;
|
||||
|
||||
public class ItemOrbEarth extends ItemOrb {
|
||||
public ItemOrbEarth(int id) {
|
||||
super(id);
|
||||
public ItemOrbEarth() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -47,113 +36,6 @@ public class ItemOrbEarth extends ItemOrb {
|
|||
}
|
||||
|
||||
public static boolean applyBonemeal(ItemStack itemStack, World par1World, int par2, int par3, int par4, EntityPlayer player) {
|
||||
int l = par1World.getBlockId(par2, par3, par4);
|
||||
BonemealEvent event = new BonemealEvent(player, par1World, l, par2, par3, par4);
|
||||
if (MinecraftForge.EVENT_BUS.post(event)) {
|
||||
return false;
|
||||
}
|
||||
if (event.getResult() == Result.ALLOW) {
|
||||
itemStack.damageItem(1, player);
|
||||
return true;
|
||||
}
|
||||
if (l == Block.sapling.blockID) {
|
||||
if (!par1World.isRemote) {
|
||||
if (par1World.rand.nextFloat() < 0.45D) {
|
||||
((BlockSapling) Block.sapling).markOrGrowMarked(par1World, par2, par3, par4, par1World.rand);
|
||||
}
|
||||
itemStack.damageItem(1, player);
|
||||
}
|
||||
return true;
|
||||
} else if (l == Block.cobblestone.blockID) {
|
||||
if (!par1World.isRemote) {
|
||||
par1World.setBlock(par2, par3, par4, Block.cobblestoneMossy.blockID);
|
||||
}
|
||||
itemStack.damageItem(1, player);
|
||||
} else if (l == Block.deadBush.blockID) {
|
||||
if (!par1World.isRemote) {
|
||||
par1World.setBlock(par2, par3, par4, 0);
|
||||
par1World.spawnEntityInWorld(new EntityItem(par1World, par2, par3, par4, new ItemStack(Block.sapling, 1)));
|
||||
}
|
||||
itemStack.damageItem(1, player);
|
||||
} else if (l != Block.mushroomBrown.blockID && l != Block.mushroomRed.blockID) {
|
||||
if (l != Block.melonStem.blockID && l != Block.pumpkinStem.blockID) {
|
||||
if (l > 0 && Block.blocksList[l] instanceof BlockCrops) {
|
||||
if (par1World.getBlockMetadata(par2, par3, par4) == 7) {
|
||||
return false;
|
||||
} else {
|
||||
if (!par1World.isRemote) {
|
||||
((BlockCrops) Block.blocksList[l]).fertilize(par1World, par2, par3, par4);
|
||||
itemStack.damageItem(1, player);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
int i1;
|
||||
int j1;
|
||||
int k1;
|
||||
if (l == Block.cocoaPlant.blockID) {
|
||||
i1 = par1World.getBlockMetadata(par2, par3, par4);
|
||||
j1 = BlockDirectional.getDirection(i1);
|
||||
k1 = BlockCocoa.func_72219_c(i1);
|
||||
if (k1 >= 2) {
|
||||
return false;
|
||||
} else {
|
||||
if (!par1World.isRemote) {
|
||||
++k1;
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, k1 << 2 | j1, 2);
|
||||
itemStack.damageItem(1, player);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
} else if (l != Block.grass.blockID) {
|
||||
return false;
|
||||
} else {
|
||||
if (!par1World.isRemote) {
|
||||
itemStack.damageItem(1, player);
|
||||
label102: for (i1 = 0; i1 < 128; ++i1) {
|
||||
j1 = par2;
|
||||
k1 = par3 + 1;
|
||||
int l1 = par4;
|
||||
for (int i2 = 0; i2 < i1 / 16; ++i2) {
|
||||
j1 += itemRand.nextInt(3) - 1;
|
||||
k1 += (itemRand.nextInt(3) - 1) * itemRand.nextInt(3) / 2;
|
||||
l1 += itemRand.nextInt(3) - 1;
|
||||
if (par1World.getBlockId(j1, k1 - 1, l1) != Block.grass.blockID || par1World.isBlockNormalCube(j1, k1, l1)) {
|
||||
continue label102;
|
||||
}
|
||||
}
|
||||
if (par1World.getBlockId(j1, k1, l1) == 0) {
|
||||
if (itemRand.nextInt(10) != 0) {
|
||||
if (Block.tallGrass.canBlockStay(par1World, j1, k1, l1)) {
|
||||
par1World.setBlock(j1, k1, l1, Block.tallGrass.blockID, 1, 3);
|
||||
}
|
||||
} else {
|
||||
ForgeHooks.plantGrass(par1World, j1, k1, l1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} else if (par1World.getBlockMetadata(par2, par3, par4) == 7) {
|
||||
return false;
|
||||
} else {
|
||||
if (!par1World.isRemote) {
|
||||
((BlockStem) Block.blocksList[l]).fertilizeStem(par1World, par2, par3, par4);
|
||||
itemStack.damageItem(1, player);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if (!par1World.isRemote) {
|
||||
if (par1World.rand.nextFloat() < 0.4D) {
|
||||
((BlockMushroom) Block.blocksList[l]).fertilizeMushroom(par1World, par2, par3, par4, par1World.rand);
|
||||
}
|
||||
itemStack.damageItem(1, player);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
return ItemDye.applyBonemeal(itemStack, par1World, par2, par3, par4, player);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,16 +2,18 @@ package mysticworld.items;
|
|||
|
||||
import mysticworld.MysticWorld;
|
||||
import mysticworld.blocks.BlockHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemOrbEnergy extends ItemOrb {
|
||||
public ItemOrbEnergy(int id) {
|
||||
super(id);
|
||||
public ItemOrbEnergy() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -37,10 +39,10 @@ public class ItemOrbEnergy extends ItemOrb {
|
|||
if (!entityPlayer.canPlayerEdit(par4, par5, par6, par7, itemStack)) {
|
||||
return false;
|
||||
} else {
|
||||
int i1 = world.getBlockId(par4, par5, par6);
|
||||
if (i1 == 0) {
|
||||
Block i1 = world.getBlock(par4, par5, par6);
|
||||
if (i1 == Blocks.air) {
|
||||
world.playSoundEffect(par4 + 0.5D, par5 + 0.5D, par6 + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
|
||||
world.setBlock(par4, par5, par6, BlockHandler.lightCube.blockID);
|
||||
world.setBlock(par4, par5, par6, BlockHandler.lightCube);
|
||||
}
|
||||
itemStack.damageItem(1, entityPlayer);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
|
|
@ -12,8 +13,8 @@ import net.minecraft.util.DamageSource;
|
|||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemOrbFire extends ItemOrb {
|
||||
public ItemOrbFire(int id) {
|
||||
super(id);
|
||||
public ItemOrbFire() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -49,7 +50,7 @@ public class ItemOrbFire extends ItemOrb {
|
|||
} else {
|
||||
if (par3World.isAirBlock(par4, par5, par6)) {
|
||||
par3World.playSoundEffect(par4 + 0.5D, par5 + 0.5D, par6 + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
|
||||
par3World.setBlock(par4, par5, par6, Block.fire.blockID);
|
||||
par3World.setBlock(par4, par5, par6, Blocks.fire);
|
||||
}
|
||||
par1ItemStack.damageItem(1, par2EntityPlayer);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -5,14 +5,14 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumMovingObjectType;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemOrbWater extends ItemOrb {
|
||||
public ItemOrbWater(int id) {
|
||||
super(id);
|
||||
public ItemOrbWater() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -21,7 +21,7 @@ public class ItemOrbWater extends ItemOrb {
|
|||
if (movingobjectposition == null) {
|
||||
return itemStack;
|
||||
} else {
|
||||
if (movingobjectposition.typeOfHit == EnumMovingObjectType.TILE) {
|
||||
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
|
||||
int i = movingobjectposition.blockX;
|
||||
int j = movingobjectposition.blockY;
|
||||
int k = movingobjectposition.blockZ;
|
||||
|
|
@ -31,7 +31,7 @@ public class ItemOrbWater extends ItemOrb {
|
|||
if (!entityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, itemStack)) {
|
||||
return itemStack;
|
||||
}
|
||||
if (world.getBlockMaterial(i, j, k) == Material.water && world.getBlockMetadata(i, j, k) == 0) {
|
||||
if (world.getBlock(i, j, k).getMaterial() == Material.water && world.getBlockMetadata(i, j, k) == 0) {
|
||||
world.playSoundEffect(i + 0.5D, j + 0.5D, k + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
|
||||
world.setBlockToAir(i, j, k);
|
||||
itemStack.damageItem(1, entityPlayer);
|
||||
|
|
@ -58,10 +58,10 @@ public class ItemOrbWater extends ItemOrb {
|
|||
if (!entityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, itemStack)) {
|
||||
return itemStack;
|
||||
} else {
|
||||
int i1 = world.getBlockId(i, j, k);
|
||||
if (i1 == 0) {
|
||||
Block i1 = world.getBlock(i, j, k);
|
||||
if (i1 == Blocks.air) {
|
||||
world.playSoundEffect(i + 0.5D, j + 0.5D, k + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
|
||||
world.setBlock(i, j, k, Block.waterMoving.blockID);
|
||||
world.setBlock(i, j, k, Blocks.flowing_water);
|
||||
itemStack.damageItem(1, entityPlayer);
|
||||
}
|
||||
return itemStack;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package mysticworld.items;
|
|||
import java.util.Random;
|
||||
|
||||
import mysticworld.MysticWorld;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
|
@ -11,8 +11,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
public class ItemStaff extends Item {
|
||||
Random rand = new Random();
|
||||
|
||||
public ItemStaff(int id) {
|
||||
super(id);
|
||||
public ItemStaff() {
|
||||
super();
|
||||
this.setMaxStackSize(1);
|
||||
this.setMaxDamage(200);
|
||||
this.setCreativeTab(MysticWorld.MysticWorldTab);
|
||||
|
|
@ -26,6 +26,6 @@ public class ItemStaff extends Item {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister) {
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ import net.minecraft.world.World;
|
|||
import org.lwjgl.input.Mouse;
|
||||
|
||||
public class ItemStaffAir extends ItemStaff {
|
||||
public ItemStaffAir(int id) {
|
||||
super(id);
|
||||
public ItemStaffAir() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -33,13 +33,13 @@ public class ItemStaffAir extends ItemStaff {
|
|||
ItemStack currentItem = player.inventory.getCurrentItem();
|
||||
itemStack.stackTagCompound.setInteger("maxChargeTime", 3 * 20);
|
||||
if (currentItem != null) {
|
||||
if (currentItem.itemID == itemStack.itemID) {
|
||||
if (currentItem.getItem() == itemStack.getItem()) {
|
||||
player.fallDistance = 0.0F;
|
||||
chargeEffect(itemStack, world, player);
|
||||
if (!Mouse.isButtonDown(1)) {
|
||||
if (itemStack.stackTagCompound.getInteger("chargeTime") > 0) {
|
||||
if (!world.isRemote) {
|
||||
world.playAuxSFXAtEntity((EntityPlayer) null, 1009, (int) player.posX, (int) player.posY, (int) player.posZ, 0);
|
||||
world.playAuxSFXAtEntity(null, 1009, (int) player.posX, (int) player.posY, (int) player.posZ, 0);
|
||||
world.spawnEntityInWorld(new EntityChargeAir(world, player, 1.0f + ((itemStack.stackTagCompound.getInteger("chargeTime")) * (5.0f * (1 / (float) itemStack.stackTagCompound
|
||||
.getInteger("maxChargeTime")))), (itemStack.stackTagCompound.getInteger("chargeTime")) * (2.5D * (1.0D / itemStack.stackTagCompound.getInteger("maxChargeTime")))));
|
||||
itemStack.damageItem(1, player);
|
||||
|
|
|
|||
|
|
@ -2,40 +2,26 @@ package mysticworld.items;
|
|||
|
||||
import mysticworld.MysticWorld;
|
||||
import mysticworld.entity.EntityChargeEarth;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockCocoa;
|
||||
import net.minecraft.block.BlockCrops;
|
||||
import net.minecraft.block.BlockDirectional;
|
||||
import net.minecraft.block.BlockMushroom;
|
||||
import net.minecraft.block.BlockSapling;
|
||||
import net.minecraft.block.BlockStem;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemDye;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumMovingObjectType;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.Event.Result;
|
||||
import net.minecraftforge.event.entity.player.BonemealEvent;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
public class ItemStaffEarth extends ItemStaff {
|
||||
public ItemStaffEarth(int id) {
|
||||
super(id);
|
||||
public ItemStaffEarth() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer) {
|
||||
if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
if (entityPlayer.isSneaking()) {
|
||||
MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, entityPlayer, true);
|
||||
if (movingobjectposition == null) {
|
||||
return itemStack;
|
||||
} else {
|
||||
if (movingobjectposition.typeOfHit == EnumMovingObjectType.TILE) {
|
||||
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
|
||||
int i = movingobjectposition.blockX;
|
||||
int j = movingobjectposition.blockY;
|
||||
int k = movingobjectposition.blockZ;
|
||||
|
|
@ -55,7 +41,7 @@ public class ItemStaffEarth extends ItemStaff {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
world.playAuxSFXAtEntity((EntityPlayer) null, 1009, (int) entityPlayer.posX, (int) entityPlayer.posY, (int) entityPlayer.posZ, 0);
|
||||
world.playAuxSFXAtEntity(null, 1009, (int) entityPlayer.posX, (int) entityPlayer.posY, (int) entityPlayer.posZ, 0);
|
||||
if (!world.isRemote) {
|
||||
world.spawnEntityInWorld(new EntityChargeEarth(world, entityPlayer));
|
||||
itemStack.damageItem(1, entityPlayer);
|
||||
|
|
@ -74,113 +60,6 @@ public class ItemStaffEarth extends ItemStaff {
|
|||
}
|
||||
|
||||
public static boolean applyBonemeal(ItemStack itemStack, World par1World, int par2, int par3, int par4, EntityPlayer player) {
|
||||
int l = par1World.getBlockId(par2, par3, par4);
|
||||
BonemealEvent event = new BonemealEvent(player, par1World, l, par2, par3, par4);
|
||||
if (MinecraftForge.EVENT_BUS.post(event)) {
|
||||
return false;
|
||||
}
|
||||
if (event.getResult() == Result.ALLOW) {
|
||||
itemStack.damageItem(1, player);
|
||||
return true;
|
||||
}
|
||||
if (l == Block.sapling.blockID) {
|
||||
if (!par1World.isRemote) {
|
||||
if (par1World.rand.nextFloat() < 0.45D) {
|
||||
((BlockSapling) Block.sapling).markOrGrowMarked(par1World, par2, par3, par4, par1World.rand);
|
||||
}
|
||||
itemStack.damageItem(1, player);
|
||||
}
|
||||
return true;
|
||||
} else if (l == Block.cobblestone.blockID) {
|
||||
if (!par1World.isRemote) {
|
||||
par1World.setBlock(par2, par3, par4, Block.cobblestoneMossy.blockID);
|
||||
}
|
||||
itemStack.damageItem(1, player);
|
||||
} else if (l == Block.deadBush.blockID) {
|
||||
if (!par1World.isRemote) {
|
||||
par1World.setBlock(par2, par3, par4, 0);
|
||||
par1World.spawnEntityInWorld(new EntityItem(par1World, par2, par3, par4, new ItemStack(Block.sapling, 1)));
|
||||
}
|
||||
itemStack.damageItem(1, player);
|
||||
} else if (l != Block.mushroomBrown.blockID && l != Block.mushroomRed.blockID) {
|
||||
if (l != Block.melonStem.blockID && l != Block.pumpkinStem.blockID) {
|
||||
if (l > 0 && Block.blocksList[l] instanceof BlockCrops) {
|
||||
if (par1World.getBlockMetadata(par2, par3, par4) == 7) {
|
||||
return false;
|
||||
} else {
|
||||
if (!par1World.isRemote) {
|
||||
((BlockCrops) Block.blocksList[l]).fertilize(par1World, par2, par3, par4);
|
||||
itemStack.damageItem(1, player);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
int i1;
|
||||
int j1;
|
||||
int k1;
|
||||
if (l == Block.cocoaPlant.blockID) {
|
||||
i1 = par1World.getBlockMetadata(par2, par3, par4);
|
||||
j1 = BlockDirectional.getDirection(i1);
|
||||
k1 = BlockCocoa.func_72219_c(i1);
|
||||
if (k1 >= 2) {
|
||||
return false;
|
||||
} else {
|
||||
if (!par1World.isRemote) {
|
||||
++k1;
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, k1 << 2 | j1, 2);
|
||||
itemStack.damageItem(1, player);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
} else if (l != Block.grass.blockID) {
|
||||
return false;
|
||||
} else {
|
||||
if (!par1World.isRemote) {
|
||||
itemStack.damageItem(1, player);
|
||||
label102: for (i1 = 0; i1 < 128; ++i1) {
|
||||
j1 = par2;
|
||||
k1 = par3 + 1;
|
||||
int l1 = par4;
|
||||
for (int i2 = 0; i2 < i1 / 16; ++i2) {
|
||||
j1 += itemRand.nextInt(3) - 1;
|
||||
k1 += (itemRand.nextInt(3) - 1) * itemRand.nextInt(3) / 2;
|
||||
l1 += itemRand.nextInt(3) - 1;
|
||||
if (par1World.getBlockId(j1, k1 - 1, l1) != Block.grass.blockID || par1World.isBlockNormalCube(j1, k1, l1)) {
|
||||
continue label102;
|
||||
}
|
||||
}
|
||||
if (par1World.getBlockId(j1, k1, l1) == 0) {
|
||||
if (itemRand.nextInt(10) != 0) {
|
||||
if (Block.tallGrass.canBlockStay(par1World, j1, k1, l1)) {
|
||||
par1World.setBlock(j1, k1, l1, Block.tallGrass.blockID, 1, 3);
|
||||
}
|
||||
} else {
|
||||
ForgeHooks.plantGrass(par1World, j1, k1, l1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} else if (par1World.getBlockMetadata(par2, par3, par4) == 7) {
|
||||
return false;
|
||||
} else {
|
||||
if (!par1World.isRemote) {
|
||||
((BlockStem) Block.blocksList[l]).fertilizeStem(par1World, par2, par3, par4);
|
||||
itemStack.damageItem(1, player);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if (!par1World.isRemote) {
|
||||
if (par1World.rand.nextFloat() < 0.4D) {
|
||||
((BlockMushroom) Block.blocksList[l]).fertilizeMushroom(par1World, par2, par3, par4, par1World.rand);
|
||||
}
|
||||
itemStack.damageItem(1, player);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
return ItemDye.applyBonemeal(itemStack, par1World, par2, par3, par4, player);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,25 +8,22 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.EnumMovingObjectType;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
public class ItemStaffEnegy extends ItemStaff {
|
||||
public ItemStaffEnegy(int id) {
|
||||
super(id);
|
||||
public ItemStaffEnegy() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer) {
|
||||
if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
if (entityPlayer.isSneaking()) {
|
||||
MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, entityPlayer, true);
|
||||
if (movingobjectposition == null) {
|
||||
return itemStack;
|
||||
} else {
|
||||
if (movingobjectposition.typeOfHit == EnumMovingObjectType.TILE) {
|
||||
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
|
||||
int i = movingobjectposition.blockX;
|
||||
int j = movingobjectposition.blockY;
|
||||
int k = movingobjectposition.blockZ;
|
||||
|
|
@ -59,7 +56,7 @@ public class ItemStaffEnegy extends ItemStaff {
|
|||
} else {
|
||||
if (world.isAirBlock(i, j, k)) {
|
||||
world.playSoundEffect(i + 0.5D, j + 0.5D, k + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
|
||||
world.setBlock(i, j, k, BlockHandler.lightCube.blockID);
|
||||
world.setBlock(i, j, k, BlockHandler.lightCube);
|
||||
}
|
||||
itemStack.damageItem(1, entityPlayer);
|
||||
return itemStack;
|
||||
|
|
@ -68,7 +65,7 @@ public class ItemStaffEnegy extends ItemStaff {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
world.playAuxSFXAtEntity((EntityPlayer) null, 1009, (int) entityPlayer.posX, (int) entityPlayer.posY, (int) entityPlayer.posZ, 0);
|
||||
world.playAuxSFXAtEntity(null, 1009, (int) entityPlayer.posX, (int) entityPlayer.posY, (int) entityPlayer.posZ, 0);
|
||||
if (!world.isRemote) {
|
||||
world.spawnEntityInWorld(new EntityChargeEnergy(world, entityPlayer));
|
||||
itemStack.damageItem(1, entityPlayer);
|
||||
|
|
|
|||
|
|
@ -6,25 +6,23 @@ import net.minecraft.entity.Entity;
|
|||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumMovingObjectType;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
public class ItemStaffFire extends ItemStaff {
|
||||
public ItemStaffFire(int id) {
|
||||
super(id);
|
||||
public ItemStaffFire() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean itemInteractionForEntity(ItemStack itemStack, EntityPlayer entityPlayer, EntityLivingBase entityLiving) {
|
||||
if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
if (entityPlayer.isSneaking()) {
|
||||
entityLiving.setFire(5);
|
||||
entityLiving.attackEntityFrom(DamageSource.magic, 7);
|
||||
itemStack.damageItem(1, entityLiving);
|
||||
|
|
@ -35,12 +33,12 @@ public class ItemStaffFire extends ItemStaff {
|
|||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer) {
|
||||
if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
if (entityPlayer.isSneaking()) {
|
||||
MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, entityPlayer, true);
|
||||
if (movingobjectposition == null) {
|
||||
return itemStack;
|
||||
} else {
|
||||
if (movingobjectposition.typeOfHit == EnumMovingObjectType.TILE) {
|
||||
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
|
||||
int i = movingobjectposition.blockX;
|
||||
int j = movingobjectposition.blockY;
|
||||
int k = movingobjectposition.blockZ;
|
||||
|
|
@ -50,12 +48,12 @@ public class ItemStaffFire extends ItemStaff {
|
|||
if (!entityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, itemStack)) {
|
||||
return itemStack;
|
||||
} else {
|
||||
ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(new ItemStack(world.getBlockId(i, j, k), 1, world.getBlockMetadata(i, j, k)));
|
||||
if (!world.isRemote && !(result == null)) {
|
||||
int id = result.itemID;
|
||||
ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(new ItemStack(world.getBlock(i, j, k), 1, world.getBlockMetadata(i, j, k)));
|
||||
if (!world.isRemote && result != null) {
|
||||
Item id = result.getItem();
|
||||
int meta = result.getItemDamage();
|
||||
world.playSoundEffect(i + 0.5D, j + 0.5D, k + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
|
||||
world.setBlock(i, j, k, 0);
|
||||
world.setBlockToAir(i, j, k);
|
||||
world.spawnEntityInWorld(new EntityItem(world, i, j, k, new ItemStack(id, 1, meta)));
|
||||
itemStack.damageItem(1, entityPlayer);
|
||||
}
|
||||
|
|
@ -63,7 +61,7 @@ public class ItemStaffFire extends ItemStaff {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
world.playAuxSFXAtEntity((EntityPlayer) null, 1009, (int) entityPlayer.posX, (int) entityPlayer.posY, (int) entityPlayer.posZ, 0);
|
||||
world.playAuxSFXAtEntity(null, 1009, (int) entityPlayer.posX, (int) entityPlayer.posY, (int) entityPlayer.posZ, 0);
|
||||
if (!world.isRemote) {
|
||||
world.spawnEntityInWorld(new EntityChargeFire(world, entityPlayer));
|
||||
itemStack.damageItem(1, entityPlayer);
|
||||
|
|
|
|||
|
|
@ -3,35 +3,35 @@ package mysticworld.items;
|
|||
import java.util.List;
|
||||
|
||||
import mysticworld.MysticWorld;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemStaffParts extends Item {
|
||||
private Icon[] icons;
|
||||
private IIcon[] icons;
|
||||
private static final String[] STAFF_PARTS = new String[] { "Staff", "Hilt", "Handle", "Head" };
|
||||
|
||||
public ItemStaffParts(int id) {
|
||||
super(id);
|
||||
public ItemStaffParts() {
|
||||
super();
|
||||
this.setHasSubtypes(true);
|
||||
this.setCreativeTab(MysticWorld.MysticWorldTab);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIconFromDamage(int meta) {
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
int j = MathHelper.clamp_int(meta, 0, STAFF_PARTS.length);
|
||||
return icons[j];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) {
|
||||
public void getSubItems(Item par1, CreativeTabs par2CreativeTabs, List par3List) {
|
||||
for (int var4 = 0; var4 < STAFF_PARTS.length; var4++) {
|
||||
par3List.add(new ItemStack(par1, 1, var4));
|
||||
}
|
||||
|
|
@ -51,8 +51,8 @@ public class ItemStaffParts extends Item {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister iconRegister) {
|
||||
icons = new Icon[STAFF_PARTS.length];
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
icons = new IIcon[STAFF_PARTS.length];
|
||||
for (int i = 0; i < STAFF_PARTS.length; ++i) {
|
||||
icons[i] = iconRegister.registerIcon("mysticworld:StaffPart_" + STAFF_PARTS[i]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
package mysticworld.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemStaffPower extends Item {
|
||||
private Icon[] icons;
|
||||
private IIcon[] icons;
|
||||
private static final String[] CHARGE_NAMES = new String[] { "Fire", "Water", "Earth", "Air", "Energy" };
|
||||
|
||||
public ItemStaffPower(int id) {
|
||||
super(id);
|
||||
public ItemStaffPower() {
|
||||
super();
|
||||
this.setHasSubtypes(true);
|
||||
this.setCreativeTab(null);
|
||||
maxStackSize = 64;
|
||||
|
|
@ -21,7 +21,7 @@ public class ItemStaffPower extends Item {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIconFromDamage(int meta) {
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
int j = MathHelper.clamp_int(meta, 0, 5);
|
||||
return icons[j];
|
||||
}
|
||||
|
|
@ -34,8 +34,8 @@ public class ItemStaffPower extends Item {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister iconRegister) {
|
||||
icons = new Icon[CHARGE_NAMES.length];
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
icons = new IIcon[CHARGE_NAMES.length];
|
||||
for (int i = 0; i < CHARGE_NAMES.length; ++i) {
|
||||
icons[i] = iconRegister.registerIcon("mysticworld:Charge" + CHARGE_NAMES[i]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,16 +6,14 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumMovingObjectType;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
public class ItemStaffWater extends ItemStaff {
|
||||
public ItemStaffWater(int id) {
|
||||
super(id);
|
||||
public ItemStaffWater() {
|
||||
super();
|
||||
this.setMaxStackSize(1);
|
||||
this.setMaxDamage(200);
|
||||
this.setCreativeTab(MysticWorld.MysticWorldTab);
|
||||
|
|
@ -23,12 +21,12 @@ public class ItemStaffWater extends ItemStaff {
|
|||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer) {
|
||||
if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
if (entityPlayer.isSneaking()) {
|
||||
MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, entityPlayer, true);
|
||||
if (movingobjectposition == null) {
|
||||
return itemStack;
|
||||
} else {
|
||||
if (movingobjectposition.typeOfHit == EnumMovingObjectType.TILE) {
|
||||
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
|
||||
int i = movingobjectposition.blockX;
|
||||
int j = movingobjectposition.blockY;
|
||||
int k = movingobjectposition.blockZ;
|
||||
|
|
@ -38,7 +36,7 @@ public class ItemStaffWater extends ItemStaff {
|
|||
if (!entityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, itemStack)) {
|
||||
return itemStack;
|
||||
}
|
||||
if (world.getBlockMaterial(i, j, k) == Material.water && world.getBlockMetadata(i, j, k) == 0) {
|
||||
if (world.getBlock(i, j, k).getMaterial() == Material.water && world.getBlockMetadata(i, j, k) == 0) {
|
||||
world.playSoundEffect(i + 0.5D, j + 0.5D, k + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
|
||||
world.setBlockToAir(i, j, k);
|
||||
itemStack.damageItem(1, entityPlayer);
|
||||
|
|
@ -65,10 +63,10 @@ public class ItemStaffWater extends ItemStaff {
|
|||
if (!entityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, itemStack)) {
|
||||
return itemStack;
|
||||
} else {
|
||||
int i1 = world.getBlockId(i, j, k);
|
||||
if (i1 == 0) {
|
||||
Block i1 = world.getBlock(i, j, k);
|
||||
if (i1 == Blocks.air) {
|
||||
world.playSoundEffect(i + 0.5D, j + 0.5D, k + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
|
||||
world.setBlock(i, j, k, Block.waterMoving.blockID);
|
||||
world.setBlock(i, j, k, Blocks.flowing_water);
|
||||
itemStack.damageItem(1, entityPlayer);
|
||||
}
|
||||
return itemStack;
|
||||
|
|
@ -78,7 +76,7 @@ public class ItemStaffWater extends ItemStaff {
|
|||
return itemStack;
|
||||
}
|
||||
} else {
|
||||
world.playAuxSFXAtEntity((EntityPlayer) null, 1009, (int) entityPlayer.posX, (int) entityPlayer.posY, (int) entityPlayer.posZ, 0);
|
||||
world.playAuxSFXAtEntity(null, 1009, (int) entityPlayer.posX, (int) entityPlayer.posY, (int) entityPlayer.posZ, 0);
|
||||
if (!world.isRemote) {
|
||||
world.spawnEntityInWorld(new EntityChargeWater(world, entityPlayer));
|
||||
itemStack.damageItem(1, entityPlayer);
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemVoidShard extends Item {
|
||||
public ItemVoidShard(int id) {
|
||||
super(id);
|
||||
public ItemVoidShard() {
|
||||
super();
|
||||
this.setMaxStackSize(1);
|
||||
this.setCreativeTab(MysticWorld.MysticWorldTab);
|
||||
this.setMaxDamage(1);
|
||||
|
|
@ -28,7 +28,7 @@ public class ItemVoidShard extends Item {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean hasEffect(ItemStack itemStack) {
|
||||
public boolean hasEffect(ItemStack itemStack, int i) {
|
||||
if (itemStack.stackTagCompound == null)
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
if (itemStack.stackTagCompound.hasKey("filled")) {
|
||||
|
|
@ -44,7 +44,7 @@ public class ItemVoidShard extends Item {
|
|||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
int experience = entityPlayer.experienceLevel;
|
||||
int experienceSubtract = entityPlayer.experienceLevel - 30;
|
||||
if (itemStack.stackTagCompound.getBoolean("filled") == false) {
|
||||
if (!itemStack.stackTagCompound.getBoolean("filled")) {
|
||||
if (experience > 0 && experience <= 30) {
|
||||
entityPlayer.experienceLevel = 0;
|
||||
itemStack.stackTagCompound.setInteger("xpStored", experience);
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
package mysticworld.lib;
|
||||
|
||||
public class BlockIds {
|
||||
public static int ORE_STONE_1 = 600;
|
||||
public static int BUSH = 601;
|
||||
public static int POISON_BUSH = 602;
|
||||
public static int WEAKNESS_BUSH = 603;
|
||||
public static int SLOWNESS_BUSH = 604;
|
||||
public static int HARMING_BUSH = 605;
|
||||
public static int WITHER_BUSH = 606;
|
||||
public static int HEALTH_BUSH = 607;
|
||||
public static int SPEED_BUSH = 608;
|
||||
public static int FIRE_RESISTANCE_BUSH = 609;
|
||||
public static int REGEN_BUSH = 610;
|
||||
public static int NIGHT_VISION_BUSH = 611;
|
||||
public static int INVISIBILITY_BUSH = 612;
|
||||
public static int LIGHT_CUBE = 613;
|
||||
public static int PLATFORM = 614;
|
||||
public static int PILLAR = 615;
|
||||
public static int PILLAR_INSERT = 616;
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
package mysticworld.lib;
|
||||
|
||||
public class EntityIds {
|
||||
|
||||
//Entity IDs
|
||||
public static int ENTITY_AIR_CHARGE = 1;
|
||||
public static int ENTITY_FIREBALL = 2;
|
||||
public static int ENTITY_EARTH_CHARGE = 3;
|
||||
public static int ENTITY_ENERGY_CHARGE = 4;
|
||||
public static int ENTITY_WATER_CHARGE = 5;
|
||||
|
||||
public static int ENTITY_PIGMAN = 6;
|
||||
|
||||
}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
package mysticworld.lib;
|
||||
|
||||
public class ItemIds {
|
||||
public static int STAFF_PARTS = 5503;
|
||||
public static int IMBUED_SHARD = 5504;
|
||||
public static int FIRE_STAFF = 5505;
|
||||
public static int WATER_STAFF = 5506;
|
||||
public static int EARTH_STAFF = 5507;
|
||||
public static int AIR_STAFF = 5508;
|
||||
public static int ENERGY_STAFF = 5509;
|
||||
public static int STAFF_POWER = 5510;
|
||||
public static int BUSH_FRUIT = 5511;
|
||||
public static int VERDITE_HELMET = 5512;
|
||||
public static int VERDITE_CHESTPLATE = 5513;
|
||||
public static int VERDITE_LEGGINGS = 5514;
|
||||
public static int VERDITE_BOOTS = 5515;
|
||||
public static int MITHRIL_HELMET = 5516;
|
||||
public static int MITHRIL_CHESTPLATE = 5517;
|
||||
public static int MITHRIL_LEGGINGS = 5518;
|
||||
public static int MITHRIL_BOOTS = 5519;
|
||||
public static int ADAMANTINE_HELMET = 5520;
|
||||
public static int ADAMANTINE_CHESTPLATE = 5521;
|
||||
public static int ADAMANTINE_LEGGINGS = 5522;
|
||||
public static int ADAMANTINE_BOOTS = 5523;
|
||||
public static int IRIDIUM_HELMET = 5524;
|
||||
public static int IRIDIUM_CHESTPLATE = 5525;
|
||||
public static int IRIDIUM_LEGGINGS = 5526;
|
||||
public static int IRIDIUM_BOOTS = 5527;
|
||||
public static int FIRE_ORB = 5528;
|
||||
public static int WATER_ORB = 5529;
|
||||
public static int EARTH_ORB = 5530;
|
||||
public static int AIR_ORB = 5531;
|
||||
public static int ENERGY_ORB = 5532;
|
||||
public static int VOID_SHARD = 5533;
|
||||
}
|
||||
|
|
@ -80,7 +80,4 @@ public class Strings {
|
|||
//Tile Entity Names
|
||||
public static final String PILLAR_INSERT_TE_NAME = "pillarInsert";
|
||||
|
||||
//Config Category Names
|
||||
public static final String ENTITY_CATEGORY = "entity";
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,16 @@
|
|||
package mysticworld.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
public class ModelOrb extends ModelBase {
|
||||
private static final ResourceLocation orb = new ResourceLocation("mysticworld", "models/orb.obj");
|
||||
private IModelCustom modelOrb;
|
||||
|
||||
public ModelOrb() {
|
||||
modelOrb = AdvancedModelLoader.loadModel("/assets/mysticworld/models/orb.obj");
|
||||
modelOrb = AdvancedModelLoader.loadModel(orb);
|
||||
}
|
||||
|
||||
public void render() {
|
||||
|
|
|
|||
|
|
@ -70,10 +70,5 @@ public class ModelPillarInsert extends ModelBase
|
|||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
|
||||
{
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -142,9 +142,4 @@ public class ModelStaff extends ModelBase
|
|||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
|
||||
{
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,61 +1,60 @@
|
|||
package mysticworld;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import mysticworld.biome.BiomeHandler;
|
||||
import mysticworld.blocks.BlockHandler;
|
||||
import mysticworld.entity.EntityHandler;
|
||||
import mysticworld.items.ItemHandler;
|
||||
import mysticworld.lib.Booleans;
|
||||
import mysticworld.tiles.TileEntityHandler;
|
||||
import mysticworld.util.Config;
|
||||
import mysticworld.util.RecipeHandler;
|
||||
import mysticworld.util.Reference;
|
||||
import mysticworld.util.TickHandler;
|
||||
import mysticworld.worldgen.WorldGenBushes;
|
||||
import mysticworld.worldgen.WorldGenStones;
|
||||
import mysticworld.worldgen.WorldGenerators;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Item;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.Mod.Instance;
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.network.NetworkMod;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.common.registry.TickRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
@Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = Reference.VERSION_NUMBER)
|
||||
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
|
||||
public class MysticWorld {
|
||||
@Instance(Reference.MOD_ID)
|
||||
public static MysticWorld instance;
|
||||
@SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.SERVER_PROXY_CLASS)
|
||||
public static CommonProxy proxy;
|
||||
public static final CreativeTabs MysticWorldTab = new CreativeTabs("MysticWorldTab") {
|
||||
@Override
|
||||
public ItemStack getIconItemStack() {
|
||||
return new ItemStack(ItemHandler.earthStaff, 1);
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public Item getTabIconItem() {
|
||||
return ItemHandler.earthStaff;
|
||||
}
|
||||
};
|
||||
public boolean ENABLE = true;
|
||||
|
||||
@EventHandler
|
||||
public void load(FMLInitializationEvent event) {
|
||||
TickRegistry.registerTickHandler(new TickHandler(), Side.SERVER);
|
||||
BlockHandler.init();
|
||||
ItemHandler.init();
|
||||
TileEntityHandler.init();
|
||||
if (Booleans.ENABLE_BUSH_GEN)
|
||||
GameRegistry.registerWorldGenerator(new WorldGenBushes());
|
||||
GameRegistry.registerWorldGenerator(new WorldGenStones());
|
||||
EntityHandler.init();
|
||||
RecipeHandler.init();
|
||||
proxy.registerRenders();
|
||||
if(ENABLE){
|
||||
FMLCommonHandler.instance().bus().register(new TickHandler());
|
||||
GameRegistry.registerWorldGenerator(new WorldGenerators(), 100);
|
||||
EntityHandler.init();
|
||||
proxy.registerRenders();
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
Config.initialize(event.getSuggestedConfigurationFile());
|
||||
BiomeHandler.init();
|
||||
if(ENABLE){
|
||||
BiomeHandler.init();
|
||||
BlockHandler.init();
|
||||
ItemHandler.init();
|
||||
TileEntityHandler.init();
|
||||
RecipeHandler.init();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import net.minecraft.client.renderer.Tessellator;
|
|||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
|
@ -28,7 +28,7 @@ public class RenderStaffPower extends Render {
|
|||
this.bindEntityTexture(entity);
|
||||
GL11.glTranslatef((float) par2, (float) par4, (float) par6);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
Icon icon = ItemHandler.staffPower.getIconFromDamage(this.meta);
|
||||
IIcon icon = ItemHandler.staffPower.getIconFromDamage(this.meta);
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
float f3 = icon.getMinU();
|
||||
float f4 = icon.getMaxU();
|
||||
|
|
|
|||
|
|
@ -2,17 +2,16 @@ package mysticworld.util;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import mysticworld.lib.BlockIds;
|
||||
import mysticworld.MysticWorld;
|
||||
import mysticworld.lib.Booleans;
|
||||
import mysticworld.lib.ItemIds;
|
||||
import mysticworld.lib.Strings;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
public class Config {
|
||||
public static Configuration config;
|
||||
|
||||
public static void initialize(File file) {
|
||||
config = new Configuration(file);
|
||||
MysticWorld.instance.ENABLE = config.get("General", "Enable", true).getBoolean(true);
|
||||
//Boolean Configurations
|
||||
Booleans.ENABLE_BUSH_GEN = config.get("World Generation", "Enable Bush Generation", true).getBoolean(true);
|
||||
Booleans.ENABLE_GLACIER_GEN = config.get("World Generation", "Enable Glacier Biome", true).getBoolean(true);
|
||||
|
|
@ -20,45 +19,6 @@ public class Config {
|
|||
Booleans.ENABLE_MOUNTAIN_GEN = config.get("World Generation", "Enable Mountain Biome", true).getBoolean(true);
|
||||
Booleans.ENABLE_STEPPE_GEN = config.get("World Generation", "Enable Steppe Biome", true).getBoolean(true);
|
||||
Booleans.ENABLE_TUNDRA_GEN = config.get("World Generation", "Enable Tundra Biome", true).getBoolean(true);
|
||||
//Block Configuration
|
||||
BlockIds.ORE_STONE_1 = config.getBlock(Strings.IMBUED_STONE_NAME, BlockIds.ORE_STONE_1).getInt(BlockIds.ORE_STONE_1);
|
||||
BlockIds.BUSH = config.getBlock(Strings.BUSH_NAME, BlockIds.BUSH).getInt(BlockIds.BUSH);
|
||||
BlockIds.LIGHT_CUBE = config.getBlock(Strings.LIGHT_CUBE_NAME, BlockIds.LIGHT_CUBE).getInt(BlockIds.LIGHT_CUBE);
|
||||
BlockIds.PLATFORM = config.getBlock(Strings.PLATFORM_NAME, BlockIds.PLATFORM).getInt(BlockIds.PLATFORM);
|
||||
BlockIds.PILLAR = config.getBlock(Strings.PILLAR_NAME, BlockIds.PILLAR).getInt(BlockIds.PILLAR);
|
||||
BlockIds.PILLAR_INSERT = config.getBlock(Strings.PILLAR_INSERT_NAME, BlockIds.PILLAR_INSERT).getInt(BlockIds.PILLAR_INSERT);
|
||||
//Item Configuration
|
||||
ItemIds.IMBUED_SHARD = config.getItem(Strings.IMBUED_SHARD_NAME, ItemIds.IMBUED_SHARD).getInt(ItemIds.IMBUED_SHARD);
|
||||
ItemIds.STAFF_PARTS = config.getItem(Strings.STAFF_NAME, ItemIds.STAFF_PARTS).getInt(ItemIds.STAFF_PARTS);
|
||||
ItemIds.FIRE_STAFF = config.getItem(Strings.FIRE_STAFF_NAME, ItemIds.FIRE_STAFF).getInt(ItemIds.FIRE_STAFF);
|
||||
ItemIds.WATER_STAFF = config.getItem(Strings.WATER_STAFF_NAME, ItemIds.WATER_STAFF).getInt(ItemIds.WATER_STAFF);
|
||||
ItemIds.EARTH_STAFF = config.getItem(Strings.EARTH_STAFF_NAME, ItemIds.EARTH_STAFF).getInt(ItemIds.EARTH_STAFF);
|
||||
ItemIds.AIR_STAFF = config.getItem(Strings.AIR_STAFF_NAME, ItemIds.AIR_STAFF).getInt(ItemIds.AIR_STAFF);
|
||||
ItemIds.ENERGY_STAFF = config.getItem(Strings.ENERGY_STAFF_NAME, ItemIds.ENERGY_STAFF).getInt(ItemIds.ENERGY_STAFF);
|
||||
ItemIds.STAFF_POWER = config.getItem(Strings.POWER_STAFF_NAME, ItemIds.STAFF_POWER).getInt(ItemIds.STAFF_POWER);
|
||||
ItemIds.BUSH_FRUIT = config.getItem(Strings.BUSH_FRUIT_NAME, ItemIds.BUSH_FRUIT).getInt(ItemIds.BUSH_FRUIT);
|
||||
ItemIds.VERDITE_HELMET = config.getItem(Strings.VERDITE_HELMET_NAME, ItemIds.VERDITE_HELMET).getInt(ItemIds.VERDITE_HELMET);
|
||||
ItemIds.VERDITE_CHESTPLATE = config.getItem(Strings.VERDITE_CHESTPLATE_NAME, ItemIds.VERDITE_CHESTPLATE).getInt(ItemIds.VERDITE_CHESTPLATE);
|
||||
ItemIds.VERDITE_LEGGINGS = config.getItem(Strings.VERDITE_LEGGINGS_NAME, ItemIds.VERDITE_LEGGINGS).getInt(ItemIds.VERDITE_LEGGINGS);
|
||||
ItemIds.VERDITE_BOOTS = config.getItem(Strings.VERDITE_BOOTS_NAME, ItemIds.VERDITE_BOOTS).getInt(ItemIds.VERDITE_BOOTS);
|
||||
ItemIds.MITHRIL_HELMET = config.getItem(Strings.MITHRIL_HELMET_NAME, ItemIds.MITHRIL_HELMET).getInt(ItemIds.MITHRIL_HELMET);
|
||||
ItemIds.MITHRIL_CHESTPLATE = config.getItem(Strings.MITHRIL_CHESTPLATE_NAME, ItemIds.MITHRIL_CHESTPLATE).getInt(ItemIds.MITHRIL_CHESTPLATE);
|
||||
ItemIds.MITHRIL_LEGGINGS = config.getItem(Strings.MITHRIL_LEGGINGS_NAME, ItemIds.MITHRIL_LEGGINGS).getInt(ItemIds.MITHRIL_LEGGINGS);
|
||||
ItemIds.MITHRIL_BOOTS = config.getItem(Strings.MITHRIL_BOOTS_NAME, ItemIds.MITHRIL_BOOTS).getInt(ItemIds.MITHRIL_BOOTS);
|
||||
ItemIds.ADAMANTINE_HELMET = config.getItem(Strings.ADAMANTINE_HELMET_NAME, ItemIds.ADAMANTINE_HELMET).getInt(ItemIds.ADAMANTINE_HELMET);
|
||||
ItemIds.ADAMANTINE_CHESTPLATE = config.getItem(Strings.ADAMANTINE_CHESTPLATE_NAME, ItemIds.ADAMANTINE_CHESTPLATE).getInt(ItemIds.ADAMANTINE_CHESTPLATE);
|
||||
ItemIds.ADAMANTINE_LEGGINGS = config.getItem(Strings.ADAMANTINE_LEGGINGS_NAME, ItemIds.ADAMANTINE_LEGGINGS).getInt(ItemIds.ADAMANTINE_LEGGINGS);
|
||||
ItemIds.ADAMANTINE_BOOTS = config.getItem(Strings.ADAMANTINE_BOOTS_NAME, ItemIds.ADAMANTINE_BOOTS).getInt(ItemIds.ADAMANTINE_BOOTS);
|
||||
ItemIds.IRIDIUM_HELMET = config.getItem(Strings.IRIDIUM_HELMET_NAME, ItemIds.IRIDIUM_HELMET).getInt(ItemIds.IRIDIUM_HELMET);
|
||||
ItemIds.IRIDIUM_CHESTPLATE = config.getItem(Strings.IRIDIUM_CHESTPLATE_NAME, ItemIds.IRIDIUM_CHESTPLATE).getInt(ItemIds.IRIDIUM_CHESTPLATE);
|
||||
ItemIds.IRIDIUM_LEGGINGS = config.getItem(Strings.IRIDIUM_LEGGINGS_NAME, ItemIds.IRIDIUM_LEGGINGS).getInt(ItemIds.IRIDIUM_LEGGINGS);
|
||||
ItemIds.IRIDIUM_BOOTS = config.getItem(Strings.IRIDIUM_BOOTS_NAME, ItemIds.IRIDIUM_BOOTS).getInt(ItemIds.IRIDIUM_BOOTS);
|
||||
ItemIds.FIRE_ORB = config.getItem(Strings.FIRE_ORB_NAME, ItemIds.FIRE_ORB).getInt(ItemIds.FIRE_ORB);
|
||||
ItemIds.WATER_ORB = config.getItem(Strings.WATER_ORB_NAME, ItemIds.WATER_ORB).getInt(ItemIds.WATER_ORB);
|
||||
ItemIds.EARTH_ORB = config.getItem(Strings.EARTH_ORB_NAME, ItemIds.EARTH_ORB).getInt(ItemIds.EARTH_ORB);
|
||||
ItemIds.AIR_ORB = config.getItem(Strings.AIR_ORB_NAME, ItemIds.AIR_ORB).getInt(ItemIds.AIR_ORB);
|
||||
ItemIds.ENERGY_ORB = config.getItem(Strings.ENERGY_ORB_NAME, ItemIds.ENERGY_ORB).getInt(ItemIds.ENERGY_ORB);
|
||||
ItemIds.VOID_SHARD = config.getItem(Strings.VOID_SHARD_NAME, ItemIds.VOID_SHARD).getInt(ItemIds.VOID_SHARD);
|
||||
config.save();
|
||||
}
|
||||
}
|
||||
|
|
@ -13,27 +13,27 @@ public class RecipeHandler {
|
|||
}
|
||||
|
||||
private static void bootsRecipe(Item output, ItemStack input) {
|
||||
GameRegistry.addRecipe(new ItemStack(output), new Object[] { "# #", "# #", '#', input });
|
||||
GameRegistry.addRecipe(new ItemStack(output), "# #", "# #", '#', input);
|
||||
}
|
||||
|
||||
private static void chestplateRecipe(Item output, ItemStack input) {
|
||||
GameRegistry.addRecipe(new ItemStack(output), new Object[] { "# #", "###", "###", '#', input });
|
||||
GameRegistry.addRecipe(new ItemStack(output), "# #", "###", "###", '#', input);
|
||||
}
|
||||
|
||||
private static void helmetRecipe(Item output, ItemStack input) {
|
||||
GameRegistry.addRecipe(new ItemStack(output), new Object[] { "###", "# #", '#', input });
|
||||
GameRegistry.addRecipe(new ItemStack(output), "###", "# #", '#', input);
|
||||
}
|
||||
|
||||
private static void itemRecipes() {
|
||||
//Staff Hilt Recipe
|
||||
GameRegistry.addRecipe(new ItemStack(ItemHandler.staffParts, 1, 1), new Object[] { " # ", "#$#", " # ", '#', Item.ingotGold, '$', Item.diamond });
|
||||
GameRegistry.addRecipe(new ItemStack(ItemHandler.staffParts, 1, 1), " # ", "#$#", " # ", '#', net.minecraft.init.Items.gold_ingot, '$', net.minecraft.init.Items.diamond);
|
||||
//Staff Handle Recipe
|
||||
GameRegistry.addRecipe(new ItemStack(ItemHandler.staffParts, 1, 2), new Object[] { "#", "$", "S", '#', Item.goldNugget, '$', Item.stick, 'S', Item.dyePowder });
|
||||
GameRegistry.addRecipe(new ItemStack(ItemHandler.staffParts, 1, 2), "#", "$", "S", '#', net.minecraft.init.Items.gold_nugget, '$', net.minecraft.init.Items.stick, 'S', net.minecraft.init.Items.dye);
|
||||
//Staff Topper Recipe
|
||||
GameRegistry.addRecipe(new ItemStack(ItemHandler.staffParts, 1, 3), new Object[] { " # ", "#$#", " # ", '#', Item.ingotGold, '$', Item.netherStar });
|
||||
GameRegistry.addRecipe(new ItemStack(ItemHandler.staffParts, 1, 3), " # ", "#$#", " # ", '#', net.minecraft.init.Items.gold_ingot, '$', net.minecraft.init.Items.nether_star);
|
||||
//Staff Recipe
|
||||
GameRegistry.addRecipe(new ItemStack(ItemHandler.staffParts, 1, 0), new Object[] { " #", " X ", "Y ", '#', new ItemStack(ItemHandler.staffParts, 1, 3), 'X',
|
||||
new ItemStack(ItemHandler.staffParts, 1, 2), 'Y', new ItemStack(ItemHandler.staffParts, 1, 1) });
|
||||
GameRegistry.addRecipe(new ItemStack(ItemHandler.staffParts, 1, 0), " #", " X ", "Y ", '#', new ItemStack(ItemHandler.staffParts, 1, 3), 'X',
|
||||
new ItemStack(ItemHandler.staffParts, 1, 2), 'Y', new ItemStack(ItemHandler.staffParts, 1, 1));
|
||||
//Orb Recipes
|
||||
orbRecipe(ItemHandler.fireOrb, new ItemStack(ItemHandler.imbuedShard, 1, 0));
|
||||
orbRecipe(ItemHandler.waterOrb, new ItemStack(ItemHandler.imbuedShard, 1, 1));
|
||||
|
|
@ -69,15 +69,15 @@ public class RecipeHandler {
|
|||
}
|
||||
|
||||
private static void itemSmelting() {
|
||||
GameRegistry.addSmelting(ItemHandler.imbuedShard.itemID, new ItemStack(ItemHandler.voidShard), 0.5f);
|
||||
GameRegistry.addSmelting(ItemHandler.imbuedShard, new ItemStack(ItemHandler.voidShard), 0.5f);
|
||||
}
|
||||
|
||||
private static void leggingsRecipe(Item output, ItemStack input) {
|
||||
GameRegistry.addRecipe(new ItemStack(output), new Object[] { "###", "# #", "# #", '#', input });
|
||||
GameRegistry.addRecipe(new ItemStack(output), "###", "# #", "# #", '#', input);
|
||||
}
|
||||
|
||||
private static void orbRecipe(Item output, ItemStack input) {
|
||||
GameRegistry.addRecipe(new ItemStack(output), new Object[] { "##", "##", '#', input });
|
||||
GameRegistry.addRecipe(new ItemStack(output), "##", "##", '#', input);
|
||||
}
|
||||
|
||||
private static void staffRecipe(Item output, ItemStack input) {
|
||||
|
|
|
|||
|
|
@ -1,56 +1,36 @@
|
|||
package mysticworld.util;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent;
|
||||
import mysticworld.blocks.BlockHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.common.IScheduledTickHandler;
|
||||
import cpw.mods.fml.common.TickType;
|
||||
|
||||
public class TickHandler implements IScheduledTickHandler {
|
||||
public class TickHandler {
|
||||
public static final Enchantment[] enchantmentsPick = { Enchantment.efficiency, Enchantment.fortune, Enchantment.silkTouch, Enchantment.unbreaking };
|
||||
|
||||
@Override
|
||||
public String getLabel() {
|
||||
return "mystic world tick";
|
||||
@SubscribeEvent
|
||||
public void tickStart(TickEvent.PlayerTickEvent event) {
|
||||
if(event.phase== TickEvent.Phase.START && event.side.isServer() && event.player.worldObj.getWorldTime()%20==0)
|
||||
pillarTick(event.player, event.player.worldObj, new Random());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int nextTickSpacing() {
|
||||
return 20;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tickEnd(EnumSet<TickType> type, Object... tickData) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumSet<TickType> ticks() {
|
||||
return EnumSet.of(TickType.PLAYER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tickStart(EnumSet<TickType> type, Object... tickData) {
|
||||
EntityPlayer player = (EntityPlayer) tickData[0];
|
||||
pillarTick(player, player.worldObj, player.inventory, new Random());
|
||||
}
|
||||
|
||||
private static void pillarTick(EntityPlayer player, World world, InventoryPlayer inventory, Random rand) {
|
||||
ItemStack itemStack = inventory.getCurrentItem();
|
||||
private static void pillarTick(EntityPlayer player, World world, Random rand) {
|
||||
ItemStack itemStack = player.inventory.getCurrentItem();
|
||||
int blockX = (int) player.posX - 1;
|
||||
int blockY = (int) (player.posY - 0.15D);
|
||||
int blockZ = (int) player.posZ - 1;
|
||||
int blockId = world.getBlockId(blockX, blockY, blockZ);
|
||||
Block blockId = world.getBlock(blockX, blockY, blockZ);
|
||||
int blockMeta = world.getBlockMetadata(blockX, blockY, blockZ);
|
||||
if (blockId == BlockHandler.pillarPlatform.blockID) {
|
||||
if (blockId == BlockHandler.pillarPlatform) {
|
||||
switch (blockMeta) {
|
||||
//food
|
||||
case 0:
|
||||
|
|
@ -85,8 +65,8 @@ public class TickHandler implements IScheduledTickHandler {
|
|||
//enchanter
|
||||
case 7:
|
||||
if (itemStack != null
|
||||
&& (itemStack.itemID == Item.pickaxeWood.itemID || itemStack.itemID == Item.pickaxeStone.itemID || itemStack.itemID == Item.pickaxeIron.itemID
|
||||
|| itemStack.itemID == Item.pickaxeGold.itemID || itemStack.itemID == Item.pickaxeDiamond.itemID)) {
|
||||
&& (itemStack.getItem() == Items.wooden_pickaxe || itemStack.getItem() == Items.stone_pickaxe || itemStack.getItem() == Items.iron_pickaxe
|
||||
|| itemStack.getItem() == Items.golden_pickaxe || itemStack.getItem() == Items.diamond_pickaxe)) {
|
||||
if (itemStack.isItemEnchanted() != true && player.experienceLevel >= 10) {
|
||||
player.experienceLevel -= 10;
|
||||
itemStack.addEnchantment(enchantmentsPick[rand.nextInt(3)], rand.nextInt(4) + 1);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package mysticworld.worldgen;
|
|||
import java.util.Random;
|
||||
|
||||
import mysticworld.blocks.BlockHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
||||
|
|
@ -15,8 +15,8 @@ public class BushesGen extends WorldGenerator {
|
|||
int i1 = par3 + par2Random.nextInt(8) - par2Random.nextInt(8);
|
||||
int j1 = par4 + par2Random.nextInt(4) - par2Random.nextInt(4);
|
||||
int k1 = par5 + par2Random.nextInt(8) - par2Random.nextInt(8);
|
||||
if (par1World.isAirBlock(i1, j1, k1) && par1World.getBlockId(i1, j1 - 1, k1) == Block.grass.blockID && BlockHandler.bush.canPlaceBlockAt(par1World, i1, j1, k1)) {
|
||||
par1World.setBlock(i1, j1, k1, BlockHandler.bush.blockID, bushType, 2);
|
||||
if (par1World.isAirBlock(i1, j1, k1) && par1World.getBlock(i1, j1 - 1, k1) == Blocks.grass && BlockHandler.bush.canPlaceBlockAt(par1World, i1, j1, k1)) {
|
||||
par1World.setBlock(i1, j1, k1, BlockHandler.bush, bushType, 2);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package mysticworld.worldgen;
|
|||
import java.util.Random;
|
||||
|
||||
import mysticworld.blocks.BlockHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
||||
|
|
@ -14,8 +14,8 @@ public class StonesGen extends WorldGenerator {
|
|||
int i1 = par3 + par2Random.nextInt(8) - par2Random.nextInt(8);
|
||||
int j1 = par4 + par2Random.nextInt(4) - par2Random.nextInt(4);
|
||||
int k1 = par5 + par2Random.nextInt(8) - par2Random.nextInt(8);
|
||||
if (par1World.isAirBlock(i1, j1, k1) && par1World.getBlockId(i1, j1 - 1, k1) == Block.grass.blockID && BlockHandler.oreImbuedStone.canPlaceBlockAt(par1World, i1, j1, k1)) {
|
||||
par1World.setBlock(i1, j1, k1, BlockHandler.oreImbuedStone.blockID, par2Random.nextInt(5), 2);
|
||||
if (par1World.isAirBlock(i1, j1, k1) && par1World.getBlock(i1, j1 - 1, k1) == Blocks.grass && BlockHandler.oreImbuedStone.canPlaceBlockAt(par1World, i1, j1, k1)) {
|
||||
par1World.setBlock(i1, j1, k1, BlockHandler.oreImbuedStone, par2Random.nextInt(5), 2);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -1,30 +0,0 @@
|
|||
package mysticworld.worldgen;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
||||
import cpw.mods.fml.common.IWorldGenerator;
|
||||
|
||||
public class WorldGenStones implements IWorldGenerator {
|
||||
public static final WorldGenerator stones = new StonesGen();
|
||||
|
||||
@Override
|
||||
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
|
||||
switch (world.provider.dimensionId) {
|
||||
case 0:
|
||||
generateSurface(world, random, chunkX * 16, chunkZ * 16);
|
||||
}
|
||||
}
|
||||
|
||||
private void generateSurface(World world, Random random, int blockX, int blockZ) {
|
||||
for (int i = 0; i < 1; i++) {
|
||||
int Xcoord1 = blockX + random.nextInt(16) + 8;
|
||||
int Ycoord1 = random.nextInt(11) + 60;
|
||||
int Zcoord1 = blockZ + random.nextInt(16) + 8;
|
||||
stones.generate(world, random, Xcoord1, Ycoord1, Zcoord1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
tile.imbuedStoneFire.name=Magmatischer Felsbrocken
|
||||
tile.imbuedStoneWater.name=Aquatischer Felsbrocken
|
||||
tile.imbuedStoneEarth.name=Fruchtbarer Felsbrocken
|
||||
tile.imbuedStoneAir.name=Durchlüfteter Felsbrocken
|
||||
tile.imbuedStoneEnergy.name=Kinetischer Felsbrocken
|
||||
imbuedStoneFire.name=Magmatischer Felsbrocken
|
||||
imbuedStoneWater.name=Aquatischer Felsbrocken
|
||||
imbuedStoneEarth.name=Fruchtbarer Felsbrocken
|
||||
imbuedStoneAir.name=Durchlüfteter Felsbrocken
|
||||
imbuedStoneEnergy.name=Kinetischer Felsbrocken
|
||||
|
||||
Bush.name=Gewöhnlicher Busch
|
||||
Poisonous Bush.name=Giftiger Busch
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
tile.imbuedStoneFire.name=Magmatic Stone Chunk
|
||||
tile.imbuedStoneWater.name=Aquatic Stone Chunk
|
||||
tile.imbuedStoneEarth.name=Fertile Stone Chunk
|
||||
tile.imbuedStoneAir.name=Aerated Stone Chunk
|
||||
tile.imbuedStoneEnergy.name=Kinetic Stone Chunk
|
||||
imbuedStoneFire.name=Magmatic Stone Chunk
|
||||
imbuedStoneWater.name=Aquatic Stone Chunk
|
||||
imbuedStoneEarth.name=Fertile Stone Chunk
|
||||
imbuedStoneAir.name=Aerated Stone Chunk
|
||||
imbuedStoneEnergy.name=Kinetic Stone Chunk
|
||||
|
||||
Bush.name=Mundane Bush
|
||||
Poisonous Bush.name=Poisonous Bush
|
||||
|
|
|
|||
9
common/mysticores/Items/ItemHatchet.java
Normal file
9
common/mysticores/Items/ItemHatchet.java
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
package mysticores.items;
|
||||
|
||||
import net.minecraft.item.ItemAxe;
|
||||
|
||||
public class ItemHatchet extends ItemAxe{
|
||||
public ItemHatchet(ToolMaterial mat) {
|
||||
super(mat);
|
||||
}
|
||||
}
|
||||
9
common/mysticores/Items/ItemPick.java
Normal file
9
common/mysticores/Items/ItemPick.java
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
package mysticores.items;
|
||||
|
||||
import net.minecraft.item.ItemPickaxe;
|
||||
|
||||
public class ItemPick extends ItemPickaxe{
|
||||
public ItemPick(ToolMaterial mat) {
|
||||
super(mat);
|
||||
}
|
||||
}
|
||||
|
|
@ -4,21 +4,21 @@ import java.util.Random;
|
|||
|
||||
import mysticores.blocks.BlockHandler;
|
||||
import mysticores.lib.Rarity;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.gen.feature.WorldGenMinable;
|
||||
import cpw.mods.fml.common.IWorldGenerator;
|
||||
|
||||
public class WorldGenOres implements IWorldGenerator {
|
||||
public static final WorldGenMinable adamantine = new WorldGenMinable(BlockHandler.BlockBase.blockID, 0, 3);
|
||||
public static final WorldGenMinable amethyst = new WorldGenMinable(BlockHandler.BlockBase.blockID, 1, 4, Block.stone.blockID);
|
||||
public static final WorldGenMinable iridium = new WorldGenMinable(BlockHandler.BlockBase.blockID, 2, 6, Block.stone.blockID);
|
||||
public static final WorldGenMinable mithril = new WorldGenMinable(BlockHandler.BlockBase.blockID, 3, 6, Block.stone.blockID);
|
||||
public static final WorldGenMinable tourmaline = new WorldGenMinable(BlockHandler.BlockBase.blockID, 4, 4, Block.stone.blockID);
|
||||
public static final WorldGenMinable topaz = new WorldGenMinable(BlockHandler.BlockBase.blockID, 5, 4, Block.stone.blockID);
|
||||
public static final WorldGenMinable verdite = new WorldGenMinable(BlockHandler.BlockBase.blockID, 6, 9, Block.stone.blockID);
|
||||
public static final WorldGenMinable agate = new WorldGenMinable(BlockHandler.BlockBase.blockID, 11, 4, Block.stone.blockID);
|
||||
public static final WorldGenMinable adamantine = new WorldGenMinable(BlockHandler.BlockBase, 0, 3, Blocks.stone);
|
||||
public static final WorldGenMinable amethyst = new WorldGenMinable(BlockHandler.BlockBase, 1, 4, Blocks.stone);
|
||||
public static final WorldGenMinable iridium = new WorldGenMinable(BlockHandler.BlockBase, 2, 6, Blocks.stone);
|
||||
public static final WorldGenMinable mithril = new WorldGenMinable(BlockHandler.BlockBase, 3, 6, Blocks.stone);
|
||||
public static final WorldGenMinable tourmaline = new WorldGenMinable(BlockHandler.BlockBase, 4, 4, Blocks.stone);
|
||||
public static final WorldGenMinable topaz = new WorldGenMinable(BlockHandler.BlockBase, 5, 4, Blocks.stone);
|
||||
public static final WorldGenMinable verdite = new WorldGenMinable(BlockHandler.BlockBase, 6, 9, Blocks.stone);
|
||||
public static final WorldGenMinable agate = new WorldGenMinable(BlockHandler.BlockBase, 11, 4, Blocks.stone);
|
||||
|
||||
@Override
|
||||
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockMulti extends Block {
|
||||
Icon[] textures;
|
||||
IIcon[] textures;
|
||||
|
||||
public BlockMulti(int par1, Material par2Material) {
|
||||
super(par1, par2Material);
|
||||
public BlockMulti(Material par2Material) {
|
||||
super(par2Material);
|
||||
setCreativeTab(MysticStones.MysticStonesTab);
|
||||
}
|
||||
|
||||
|
|
@ -29,26 +29,22 @@ public class BlockMulti extends Block {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIcon(int side, int meta) {
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return textures[meta];
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
|
||||
int id = idPicked(world, x, y, z);
|
||||
if (id == 0) {
|
||||
return null;
|
||||
}
|
||||
Item item = Item.itemsList[id];
|
||||
Item item = getItem(world, x, y, z);
|
||||
if (item == null) {
|
||||
return null;
|
||||
}
|
||||
return new ItemStack(id, 1, getDamageValue(world, x, y, z));
|
||||
return new ItemStack(item, 1, getDamageValue(world, x, y, z));
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(int i, CreativeTabs tab, List list) {
|
||||
public void getSubBlocks(Item i, CreativeTabs tab, List list) {
|
||||
for (int j = 0; j < textures.length; j++) {
|
||||
list.add(new ItemStack(i, 1, j));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,39 +1,22 @@
|
|||
package mysticstones.blocks;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemBlockWithMetadata;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class ItemBlockMulti extends ItemBlock {
|
||||
private String[] types;
|
||||
private Block block;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public ItemBlockMulti(int par1, Block block, String[] names) {
|
||||
super(par1);
|
||||
public class ItemBlockMulti extends ItemBlockWithMetadata {
|
||||
private ArrayList<String> types;
|
||||
public ItemBlockMulti(Block block, ArrayList<String> names) {
|
||||
super(block, block);
|
||||
this.types = names;
|
||||
this.block = block;
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIconFromDamage(int par1) {
|
||||
return block.getIcon(2, par1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int par1) {
|
||||
return par1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemStack) {
|
||||
int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, types.length);
|
||||
return types[meta];
|
||||
int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, types.size());
|
||||
return types.get(meta);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,20 +4,20 @@ import java.util.Random;
|
|||
|
||||
import mysticstones.MysticStones;
|
||||
import mysticstones.util.Config;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.gen.feature.WorldGenMinable;
|
||||
import cpw.mods.fml.common.IWorldGenerator;
|
||||
|
||||
public class WorldGeneratorStones implements IWorldGenerator {
|
||||
public static final WorldGenMinable anorthosite = new WorldGenMinable(MysticStones.stones.blockID, 0, 24, Block.stone.blockID);
|
||||
public static final WorldGenMinable limestone = new WorldGenMinable(MysticStones.stones.blockID, 2, 48, Block.stone.blockID);
|
||||
public static final WorldGenMinable marble = new WorldGenMinable(MysticStones.stones.blockID, 4, 24, Block.stone.blockID);
|
||||
public static final WorldGenMinable migmatite = new WorldGenMinable(MysticStones.stones.blockID, 6, 48, Block.stone.blockID);
|
||||
public static final WorldGenMinable orthogneiss = new WorldGenMinable(MysticStones.stones.blockID, 8, 48, Block.stone.blockID);
|
||||
public static final WorldGenMinable slate = new WorldGenMinable(MysticStones.stones.blockID, 10, 24, Block.stone.blockID);
|
||||
public static final WorldGenMinable travertine = new WorldGenMinable(MysticStones.stones.blockID, 12, 24, Block.stone.blockID);
|
||||
public static final WorldGenMinable anorthosite = new WorldGenMinable(MysticStones.stones, 0, 24, Blocks.stone);
|
||||
public static final WorldGenMinable limestone = new WorldGenMinable(MysticStones.stones, 2, 48, Blocks.stone);
|
||||
public static final WorldGenMinable marble = new WorldGenMinable(MysticStones.stones, 4, 24, Blocks.stone);
|
||||
public static final WorldGenMinable migmatite = new WorldGenMinable(MysticStones.stones, 6, 48, Blocks.stone);
|
||||
public static final WorldGenMinable orthogneiss = new WorldGenMinable(MysticStones.stones, 8, 48, Blocks.stone);
|
||||
public static final WorldGenMinable slate = new WorldGenMinable(MysticStones.stones, 10, 24, Blocks.stone);
|
||||
public static final WorldGenMinable travertine = new WorldGenMinable(MysticStones.stones, 12, 24, Blocks.stone);
|
||||
|
||||
@Override
|
||||
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue