From c68bf539238b7e98ca13cb1073ef2ae6b5817aff Mon Sep 17 00:00:00 2001 From: avlad171 Date: Fri, 15 Nov 2019 10:48:21 +0200 Subject: [PATCH] Added to github --- README.md | 1 + build.gradle | 78 ++ gradle.properties | 3 + .../com/myuki69/enderquarry/EnderMarker.java | 110 +++ .../com/myuki69/enderquarry/EnderQuarry.java | 110 +++ .../myuki69/enderquarry/EnderQuarryMod.java | 106 +++ .../QuarryChunkLoadingCallback.java | 44 + .../myuki69/enderquarry/TileEnderMarker.java | 130 +++ .../myuki69/enderquarry/TileEnderQuarry.java | 867 ++++++++++++++++++ .../com/myuki69/enderquarry/UpgradeBlock.java | 104 +++ .../blockstates/endermarker.json | 8 + .../blockstates/enderquarry.json | 7 + .../blockstates/upgradefortunei.json | 25 + .../blockstates/upgradefortuneii.json | 25 + .../blockstates/upgradefortuneiii.json | 25 + .../blockstates/upgradepump.json | 25 + .../blockstates/upgradesilk.json | 25 + .../blockstates/upgradespeedi.json | 25 + .../blockstates/upgradespeedii.json | 25 + .../blockstates/upgradespeediii.json | 25 + .../blockstates/upgradevoid.json | 25 + .../assets/enderquarrymod/lang/en_us.lang | 11 + .../models/block/endermarker.json | 54 ++ .../models/block/enderquarry.json | 55 ++ .../models/block/upgradeblockbase.json | 53 ++ .../models/block/upgradefortunei.json | 6 + .../models/block/upgradefortuneii.json | 6 + .../models/block/upgradefortuneiii.json | 6 + .../models/block/upgradepump.json | 6 + .../models/block/upgradeside.json | 51 ++ .../models/block/upgradesilk.json | 6 + .../models/block/upgradespeedi.json | 6 + .../models/block/upgradespeedii.json | 6 + .../models/block/upgradespeediii.json | 6 + .../models/block/upgradevoid.json | 6 + .../models/item/endermarker.json | 3 + .../models/item/enderquarry.json | 3 + .../models/item/upgradefortunei.json | 3 + .../models/item/upgradefortuneii.json | 3 + .../models/item/upgradefortuneiii.json | 3 + .../models/item/upgradepump.json | 3 + .../models/item/upgradesilk.json | 3 + .../models/item/upgradespeedi.json | 3 + .../models/item/upgradespeedii.json | 3 + .../models/item/upgradespeediii.json | 3 + .../models/item/upgradevoid.json | 3 + .../textures/blocks/endermarker.png | Bin 0 -> 368 bytes .../textures/blocks/enderquarry.png | Bin 0 -> 3509 bytes .../textures/blocks/enderquarrytop.png | Bin 0 -> 801 bytes .../textures/blocks/upgradearm.png | Bin 0 -> 336 bytes .../textures/blocks/upgradefortunei.png | Bin 0 -> 634 bytes .../textures/blocks/upgradefortuneii.png | Bin 0 -> 617 bytes .../textures/blocks/upgradefortuneiii.png | Bin 0 -> 642 bytes .../textures/blocks/upgradepump.png | Bin 0 -> 651 bytes .../textures/blocks/upgradesilk.png | Bin 0 -> 639 bytes .../textures/blocks/upgradespeedi.png | Bin 0 -> 631 bytes .../textures/blocks/upgradespeedii.png | Bin 0 -> 636 bytes .../textures/blocks/upgradespeediii.png | Bin 0 -> 638 bytes .../textures/blocks/upgradevoid.png | Bin 0 -> 692 bytes src/main/resources/mcmod.info | 16 + src/main/resources/pack.mcmeta | 7 + 61 files changed, 2127 insertions(+) create mode 100644 README.md create mode 100644 build.gradle create mode 100644 gradle.properties create mode 100644 src/main/java/com/myuki69/enderquarry/EnderMarker.java create mode 100644 src/main/java/com/myuki69/enderquarry/EnderQuarry.java create mode 100644 src/main/java/com/myuki69/enderquarry/EnderQuarryMod.java create mode 100644 src/main/java/com/myuki69/enderquarry/QuarryChunkLoadingCallback.java create mode 100644 src/main/java/com/myuki69/enderquarry/TileEnderMarker.java create mode 100644 src/main/java/com/myuki69/enderquarry/TileEnderQuarry.java create mode 100644 src/main/java/com/myuki69/enderquarry/UpgradeBlock.java create mode 100644 src/main/resources/assets/enderquarrymod/blockstates/endermarker.json create mode 100644 src/main/resources/assets/enderquarrymod/blockstates/enderquarry.json create mode 100644 src/main/resources/assets/enderquarrymod/blockstates/upgradefortunei.json create mode 100644 src/main/resources/assets/enderquarrymod/blockstates/upgradefortuneii.json create mode 100644 src/main/resources/assets/enderquarrymod/blockstates/upgradefortuneiii.json create mode 100644 src/main/resources/assets/enderquarrymod/blockstates/upgradepump.json create mode 100644 src/main/resources/assets/enderquarrymod/blockstates/upgradesilk.json create mode 100644 src/main/resources/assets/enderquarrymod/blockstates/upgradespeedi.json create mode 100644 src/main/resources/assets/enderquarrymod/blockstates/upgradespeedii.json create mode 100644 src/main/resources/assets/enderquarrymod/blockstates/upgradespeediii.json create mode 100644 src/main/resources/assets/enderquarrymod/blockstates/upgradevoid.json create mode 100644 src/main/resources/assets/enderquarrymod/lang/en_us.lang create mode 100644 src/main/resources/assets/enderquarrymod/models/block/endermarker.json create mode 100644 src/main/resources/assets/enderquarrymod/models/block/enderquarry.json create mode 100644 src/main/resources/assets/enderquarrymod/models/block/upgradeblockbase.json create mode 100644 src/main/resources/assets/enderquarrymod/models/block/upgradefortunei.json create mode 100644 src/main/resources/assets/enderquarrymod/models/block/upgradefortuneii.json create mode 100644 src/main/resources/assets/enderquarrymod/models/block/upgradefortuneiii.json create mode 100644 src/main/resources/assets/enderquarrymod/models/block/upgradepump.json create mode 100644 src/main/resources/assets/enderquarrymod/models/block/upgradeside.json create mode 100644 src/main/resources/assets/enderquarrymod/models/block/upgradesilk.json create mode 100644 src/main/resources/assets/enderquarrymod/models/block/upgradespeedi.json create mode 100644 src/main/resources/assets/enderquarrymod/models/block/upgradespeedii.json create mode 100644 src/main/resources/assets/enderquarrymod/models/block/upgradespeediii.json create mode 100644 src/main/resources/assets/enderquarrymod/models/block/upgradevoid.json create mode 100644 src/main/resources/assets/enderquarrymod/models/item/endermarker.json create mode 100644 src/main/resources/assets/enderquarrymod/models/item/enderquarry.json create mode 100644 src/main/resources/assets/enderquarrymod/models/item/upgradefortunei.json create mode 100644 src/main/resources/assets/enderquarrymod/models/item/upgradefortuneii.json create mode 100644 src/main/resources/assets/enderquarrymod/models/item/upgradefortuneiii.json create mode 100644 src/main/resources/assets/enderquarrymod/models/item/upgradepump.json create mode 100644 src/main/resources/assets/enderquarrymod/models/item/upgradesilk.json create mode 100644 src/main/resources/assets/enderquarrymod/models/item/upgradespeedi.json create mode 100644 src/main/resources/assets/enderquarrymod/models/item/upgradespeedii.json create mode 100644 src/main/resources/assets/enderquarrymod/models/item/upgradespeediii.json create mode 100644 src/main/resources/assets/enderquarrymod/models/item/upgradevoid.json create mode 100644 src/main/resources/assets/enderquarrymod/textures/blocks/endermarker.png create mode 100644 src/main/resources/assets/enderquarrymod/textures/blocks/enderquarry.png create mode 100644 src/main/resources/assets/enderquarrymod/textures/blocks/enderquarrytop.png create mode 100644 src/main/resources/assets/enderquarrymod/textures/blocks/upgradearm.png create mode 100644 src/main/resources/assets/enderquarrymod/textures/blocks/upgradefortunei.png create mode 100644 src/main/resources/assets/enderquarrymod/textures/blocks/upgradefortuneii.png create mode 100644 src/main/resources/assets/enderquarrymod/textures/blocks/upgradefortuneiii.png create mode 100644 src/main/resources/assets/enderquarrymod/textures/blocks/upgradepump.png create mode 100644 src/main/resources/assets/enderquarrymod/textures/blocks/upgradesilk.png create mode 100644 src/main/resources/assets/enderquarrymod/textures/blocks/upgradespeedi.png create mode 100644 src/main/resources/assets/enderquarrymod/textures/blocks/upgradespeedii.png create mode 100644 src/main/resources/assets/enderquarrymod/textures/blocks/upgradespeediii.png create mode 100644 src/main/resources/assets/enderquarrymod/textures/blocks/upgradevoid.png create mode 100644 src/main/resources/mcmod.info create mode 100644 src/main/resources/pack.mcmeta diff --git a/README.md b/README.md new file mode 100644 index 0000000..885a152 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# Ender-Quarry-Mod diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..0aa8285 --- /dev/null +++ b/build.gradle @@ -0,0 +1,78 @@ +buildscript { + repositories { + jcenter() + maven { url = "https://files.minecraftforge.net/maven" } + + } + dependencies { + classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' + } +} +apply plugin: 'net.minecraftforge.gradle.forge' +//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. + + +version = "1.0.5" +group = "com.yourname.enderquarrymod" // http://maven.apache.org/guides/mini/guide-naming-conventions.html +archivesBaseName = "enderquarrymod" + +sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. +compileJava { + sourceCompatibility = targetCompatibility = '1.8' +} + +minecraft { + version = "1.12.2-14.23.5.2824" + runDir = "run" + + // the mappings can be changed at any time, and must be in the following format. + // snapshot_YYYYMMDD snapshot are built nightly. + // stable_# stables are built at the discretion of the MCP team. + // Use non-default mappings at your own risk. they may not always work. + // simply re-run your setup task after changing the mappings to update your workspace. + mappings = "snapshot_20171003" + // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. +} + +dependencies { + // you may put jars on which you depend on in ./libs + // or you may define them like so.. + //compile "some.group:artifact:version:classifier" + //compile "some.group:artifact:version" + + // real examples + //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env + //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env + + // the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime. + //provided 'com.mod-buildcraft:buildcraft:6.0.8:dev' + + // the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided, + // except that these dependencies get remapped to your current MCP mappings + //deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev' + //deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev' + + // for more info... + // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html + // http://www.gradle.org/docs/current/userguide/dependency_management.html + +} + +processResources { + // this will ensure that this task is redone when the versions change. + inputs.property "version", project.version + inputs.property "mcversion", project.minecraft.version + + // replace stuff in mcmod.info, nothing else + from(sourceSets.main.resources.srcDirs) { + include 'mcmod.info' + + // replace version and mcversion + expand 'version':project.version, 'mcversion':project.minecraft.version + } + + // copy everything else except the mcmod.info + from(sourceSets.main.resources.srcDirs) { + exclude 'mcmod.info' + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..e9b9fd5 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,3 @@ +# Sets default memory used for gradle commands. Can be overridden by user or command line properties. +# This is required to provide enough memory for the Minecraft decompilation process. +org.gradle.jvmargs=-Xmx3G diff --git a/src/main/java/com/myuki69/enderquarry/EnderMarker.java b/src/main/java/com/myuki69/enderquarry/EnderMarker.java new file mode 100644 index 0000000..d2d6d6b --- /dev/null +++ b/src/main/java/com/myuki69/enderquarry/EnderMarker.java @@ -0,0 +1,110 @@ +package com.myuki69.enderquarry; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.block.properties.IProperty; +import net.minecraft.block.properties.PropertyBool; +import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockStateContainer; +import net.minecraft.block.state.IBlockState; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumParticleTypes; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +public class EnderMarker extends Block +{ + public static int[] dx = { 0, 0, 1, -1 }; + public static int[] dz = { 1, -1, 0, 0 }; + + public static final PropertyInteger META = PropertyInteger.create("meta", 0, 32); + protected static final AxisAlignedBB STANDING_AABB = new AxisAlignedBB(0.4000000059604645D, 0.0D, 0.4000000059604645D, 0.6000000238418579D, 0.8D, 0.6000000238418579D); + + private static final String UNLOCALIZED_NAME = "endermarker"; + + public int meta; + + public EnderMarker() + { + super(Material.ROCK); + + this.setUnlocalizedName(UNLOCALIZED_NAME); + this.setRegistryName(UNLOCALIZED_NAME); + this.setDefaultState(this.blockState.getBaseState().withProperty(META, 0)); + this.setTickRandomly(true); + this.setCreativeTab(CreativeTabs.REDSTONE); + this.setHardness(2.0F); + } + + public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) + { + return STANDING_AABB; + } + + @Override + public boolean hasTileEntity(IBlockState state) + { + return true; + } + + @Override + public TileEntity createTileEntity(World world, IBlockState state) + { + return new TileEnderMarker(); + } + + @Override + protected BlockStateContainer createBlockState () + { + return new BlockStateContainer(this, new IProperty[] { META }); + } + + @Override + public int getMetaFromState (IBlockState state) + { + return 0; + } + + @SideOnly(Side.CLIENT) + public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand) + { + meta = state.getValue(META); + //System.out.println("Meta = " + meta); + for (int i = 0; i < 4; i++) + { + if ((meta & 1 << i) != 0) + { + for (int l = 0; l < 3; l++) + world.spawnParticle(EnumParticleTypes.REDSTONE, pos.getX() + 0.5D + dx[i] * rand.nextDouble() * rand.nextDouble(), pos.getY() + 0.5D, pos.getZ() + 0.5D + dz[i] * rand.nextDouble() * rand.nextDouble(), 0.501D, 0.0D, 1.0D); + + } + } + } + + + @SideOnly(Side.CLIENT) + public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) + { + return true; + } + + @Override + public boolean isOpaqueCube(IBlockState iState) + { + return false; + } + + @Override + public boolean isFullCube(IBlockState iState) + { + return false; + } +} diff --git a/src/main/java/com/myuki69/enderquarry/EnderQuarry.java b/src/main/java/com/myuki69/enderquarry/EnderQuarry.java new file mode 100644 index 0000000..00b531b --- /dev/null +++ b/src/main/java/com/myuki69/enderquarry/EnderQuarry.java @@ -0,0 +1,110 @@ +package com.myuki69.enderquarry; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.text.TextComponentString; +import net.minecraft.util.BlockRenderLayer; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumHand; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +public class EnderQuarry extends Block { + private static final String UNLOCALIZED_NAME = "enderquarry"; + + public EnderQuarry() { + super(Material.ROCK); + + this.setUnlocalizedName(UNLOCALIZED_NAME); + this.setRegistryName(UNLOCALIZED_NAME); + this.setHardness(5.0F); + this.setCreativeTab(CreativeTabs.REDSTONE); + } + + @Override + public boolean hasTileEntity(IBlockState state) + { + return true; + } + + + @Override + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) + { + if (!world.isRemote) + { + TileEntity tile = world.getTileEntity(pos); + if(tile instanceof TileEnderQuarry) + { + TileEnderQuarry quarry = (TileEnderQuarry) tile; + + if(quarry.finished) + { + player.sendMessage(new TextComponentString("Quarry has finished")); + return true; + } + if(quarry.started) + { + int x = (quarry.chunk_x << 4) + quarry.dx; + int z = (quarry.chunk_z << 4) + quarry.dz; + int y = quarry.dy; + + if(quarry.hasRedstoneSignal()) + { + player.sendMessage(new TextComponentString("Quarry stopped due to redstone signal!")); + } + player.sendMessage(new TextComponentString("Stored energy: " + quarry.energy.getEnergyStored() + "/" + quarry.energy.getMaxEnergyStored())); + player.sendMessage(new TextComponentString("Mining at: " + x + ", " + y + ", " + z)); + player.sendMessage(new TextComponentString("" + quarry.progress + " blocks scanned.")); + if(quarry.tank.getFluid() != null && quarry.tank.getFluidAmount() > 0) + { + player.sendMessage(new TextComponentString("Stored liquid: " + quarry.tank.getFluid().getLocalizedName() + ": " + quarry.tank.getFluidAmount() + "/" + quarry.tank.getCapacity())); + } + else + { + player.sendMessage(new TextComponentString("Tank empty")); + } + + } + else + { + player.sendMessage(new TextComponentString("Analyzing Fence boundary")); + if(!quarry.checkForMarkers(player)) + { + player.sendMessage(new TextComponentString("Failed to set up quarry")); + } + } + + } + + } + return true; + } + + @Override + public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos) + { + TileEntity tile; + if ((tile = worldIn.getTileEntity(pos)) instanceof TileEnderQuarry) + ((TileEnderQuarry)tile).checkSurroundings(); + } + + @Override + public TileEntity createTileEntity(World world, IBlockState state) + { + return new TileEnderQuarry(); + } + + @SideOnly(Side.CLIENT) + public BlockRenderLayer getBlockLayer() + { + return BlockRenderLayer.SOLID; + } +} \ No newline at end of file diff --git a/src/main/java/com/myuki69/enderquarry/EnderQuarryMod.java b/src/main/java/com/myuki69/enderquarry/EnderQuarryMod.java new file mode 100644 index 0000000..3483293 --- /dev/null +++ b/src/main/java/com/myuki69/enderquarry/EnderQuarryMod.java @@ -0,0 +1,106 @@ +package com.myuki69.enderquarry; + +import net.minecraft.item.ItemBlock; +import net.minecraftforge.client.model.ModelLoader; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.block.model.ModelResourceLocation; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.common.Mod.EventHandler; +import net.minecraftforge.fml.common.event.FMLInitializationEvent; +import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; +import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; +import net.minecraftforge.common.ForgeChunkManager; +import net.minecraftforge.fml.common.registry.ForgeRegistries; +import net.minecraftforge.fml.common.registry.GameRegistry; + +@Mod(modid = EnderQuarryMod.MODID, name = EnderQuarryMod.NAME, version = EnderQuarryMod.VERSION) +public class EnderQuarryMod +{ + @Mod.Instance("enderquarrymod") + public static EnderQuarryMod instance; + public static final String MODID = "enderquarrymod"; + public static final String NAME = "Ender Quarry Mod"; + public static final String VERSION = "1.0.0"; + + + public static EnderQuarry enderQuarry; + public static EnderMarker enderMarker; + public static UpgradeBlock upgradeVoid; + public static UpgradeBlock upgradeSilk; + public static UpgradeBlock upgradeFortune1; + public static UpgradeBlock upgradeFortune2; + public static UpgradeBlock upgradeFortune3; + public static UpgradeBlock upgradeSpeed1; + public static UpgradeBlock upgradeSpeed2; + public static UpgradeBlock upgradeSpeed3; + public static UpgradeBlock upgradePump; + + public static ItemBlock itemEnderQuarry; + public static ItemBlock itemEnderMarker; + public static ItemBlock itemUpgradeVoid; + public static ItemBlock itemUpgradeSilk; + public static ItemBlock itemUpgradeFortune1; + public static ItemBlock itemUpgradeFortune2; + public static ItemBlock itemUpgradeFortune3; + public static ItemBlock itemUpgradeSpeed1; + public static ItemBlock itemUpgradeSpeed2; + public static ItemBlock itemUpgradeSpeed3; + public static ItemBlock itemUpgradePump; + + private void registerUpgrade(UpgradeBlock block, ItemBlock itemblock, String name, int type) + { + block = new UpgradeBlock(name, type); + ForgeRegistries.BLOCKS.register(block); + itemblock = new ItemBlock(block); + itemblock.setRegistryName(block.getRegistryName()); + ForgeRegistries.ITEMS.register(itemblock); + ModelLoader.setCustomModelResourceLocation(itemblock, 0, new ModelResourceLocation(itemblock.getRegistryName(), "inventory")); + + } + @EventHandler + public void preInit(FMLPreInitializationEvent event) + { + enderQuarry = new EnderQuarry(); + ForgeRegistries.BLOCKS.register(enderQuarry); + + itemEnderQuarry = new ItemBlock(enderQuarry); + itemEnderQuarry.setRegistryName(enderQuarry.getRegistryName()); + ForgeRegistries.ITEMS.register(itemEnderQuarry); + ModelLoader.setCustomModelResourceLocation(itemEnderQuarry, 0, new ModelResourceLocation(itemEnderQuarry.getRegistryName(), "inventory")); + + GameRegistry.registerTileEntity(TileEnderQuarry.class, enderQuarry.getRegistryName().toString()); + + enderMarker = new EnderMarker(); + ForgeRegistries.BLOCKS.register(enderMarker); + itemEnderMarker = new ItemBlock(enderMarker); + itemEnderMarker.setRegistryName(enderMarker.getRegistryName()); + ForgeRegistries.ITEMS.register(itemEnderMarker); + ModelLoader.setCustomModelResourceLocation(itemEnderMarker, 0, new ModelResourceLocation(itemEnderMarker.getRegistryName(), "inventory")); + + GameRegistry.registerTileEntity(TileEnderMarker.class, enderMarker.getRegistryName().toString()); + + registerUpgrade(upgradeVoid, itemUpgradeVoid, "upgradevoid", 1); + registerUpgrade(upgradeSilk, itemUpgradeSilk, "upgradesilk", 2); + registerUpgrade(upgradeFortune1, itemUpgradeFortune1, "upgradefortunei", 3); + registerUpgrade(upgradeFortune2, itemUpgradeFortune2, "upgradefortuneii", 4); + registerUpgrade(upgradeFortune3, itemUpgradeFortune3, "upgradefortuneiii", 5); + registerUpgrade(upgradeSpeed1, itemUpgradeSpeed1, "upgradespeedi", 6); + registerUpgrade(upgradeSpeed2, itemUpgradeSpeed2, "upgradespeedii", 7); + registerUpgrade(upgradeSpeed3, itemUpgradeSpeed3, "upgradespeediii", 8); + registerUpgrade(upgradePump, itemUpgradePump, "upgradepump", 9); + + } + + @EventHandler + public void init(FMLInitializationEvent event) + { + + } + + @EventHandler + public void postInit(FMLPostInitializationEvent event) + { + ForgeChunkManager.setForcedChunkLoadingCallback(instance, new QuarryChunkLoadingCallback()); + } + +} \ No newline at end of file diff --git a/src/main/java/com/myuki69/enderquarry/QuarryChunkLoadingCallback.java b/src/main/java/com/myuki69/enderquarry/QuarryChunkLoadingCallback.java new file mode 100644 index 0000000..c1dc3b8 --- /dev/null +++ b/src/main/java/com/myuki69/enderquarry/QuarryChunkLoadingCallback.java @@ -0,0 +1,44 @@ +package com.myuki69.enderquarry; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraftforge.common.ForgeChunkManager; +import net.minecraftforge.common.ForgeChunkManager.Ticket; + +import com.google.common.collect.Lists; + + +public class QuarryChunkLoadingCallback implements ForgeChunkManager.OrderedLoadingCallback +{ + @Override + public void ticketsLoaded(List tickets, World world) + { + + } + + @Override + public List ticketsLoaded(List tickets, World world, int maxTicketCount) + { + List validTickets = Lists.newArrayList(); + for(Ticket ticket: tickets) + { + String type = ticket.getModData().getString("id"); + if(type == "quarry") + { + int blockX = ticket.getModData().getInteger("x"); + int blockY = ticket.getModData().getInteger("y"); + int blockZ = ticket.getModData().getInteger("z"); + + BlockPos quarryPos = new BlockPos(blockX, blockY, blockZ); + TileEntity te1 = world.getTileEntity(quarryPos); + if(te1 instanceof TileEnderQuarry) + validTickets.add(ticket); + } + } + return validTickets; + } +} \ No newline at end of file diff --git a/src/main/java/com/myuki69/enderquarry/TileEnderMarker.java b/src/main/java/com/myuki69/enderquarry/TileEnderMarker.java new file mode 100644 index 0000000..0cc6005 --- /dev/null +++ b/src/main/java/com/myuki69/enderquarry/TileEnderMarker.java @@ -0,0 +1,130 @@ +package com.myuki69.enderquarry; + +import java.util.ArrayList; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumParticleTypes; +import net.minecraft.util.ITickable; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.WorldProvider; + +public class TileEnderMarker extends TileEntity implements ITickable +{ + public static List markers = new ArrayList(); + public boolean init = false; + private int cnt = 0; + public static int[] getCoord(TileEntity tile) + { + BlockPos thisBlockPos = tile.getPos(); + return new int[] { tile.getWorld().provider.getDimension(), thisBlockPos.getX(), thisBlockPos.getY(), thisBlockPos.getZ() }; + } + + public int[] getCoord() + { + return getCoord(this); + } + + @Override + public void update() + { + if (!init) + onChunkLoad(); + } + + @Override + public boolean shouldRefresh(World world, BlockPos pos, IBlockState oldState, IBlockState newSate) + { + return oldState.getBlock() != newSate.getBlock(); + } + + @Override + public void invalidate() + { + super.invalidate(); + if (world.isRemote) + return; + + //System.out.println("Invalidated tile at: " + this.getPos().getX() + " " + this.getPos().getZ()); + + int[] myCoord = getCoord(); + + List toUpdate = new ArrayList(); + for (int i = 0; i < markers.size(); i++) + { + int[] coord = (int[])markers.get(i); + if ((myCoord[0] == coord[0]) && (myCoord[2] == coord[2])) + { + if ((myCoord[3] == coord[3]) && (myCoord[1] == coord[1])) + { + markers.remove(i); + i--; + } + else if ((myCoord[3] == coord[3]) || (myCoord[1] == coord[1])) + { + toUpdate.add(coord); + } + } + } + for (int[] coord : toUpdate) + { + TileEntity tile = world.getTileEntity(new BlockPos(coord[1], coord[2], coord[3])); + if ((tile instanceof TileEnderMarker)) + ((TileEnderMarker)tile).recheck(); + } + + } + + public void recheck() //this func updates block info for the game to know which particles to spawn later + { + //System.out.println("Rechecking at " + this.getPos().getX() + " " + this.getPos().getZ()); + int[] myCoord = getCoord(); + int flag = 0; + for (int[] coord : markers) + { + if ((myCoord[0] == coord[0]) && (myCoord[2] == coord[2]) && ((myCoord[1] != coord[1]) || (myCoord[3] != coord[3]))) + { + if (myCoord[1] == coord[1]) + flag |= (myCoord[3] < coord[3] ? 1 : 2); + else if (myCoord[3] == coord[3]) + flag |= (myCoord[1] < coord[1] ? 4 : 8); + } + } + + IBlockState state = world.getBlockState(this.getPos()); + world.setBlockState(this.getPos(), state.withProperty(EnderMarker.META, flag)); + } + + public void onChunkLoad() + { + if (init) + return; + init = true; + if ((world == null) || (world.isRemote)) + return; + + int[] myCoord = getCoord(); + List toUpdate = new ArrayList(); + for (int[] coord : markers) + { + if ((myCoord[0] == coord[0]) && (myCoord[2] == coord[2])) + { + if ((myCoord[3] == coord[3]) && (myCoord[1] == coord[1])) + return; + if ((myCoord[3] == coord[3]) || (myCoord[1] == coord[1])) + toUpdate.add(coord); + } + } + markers.add(myCoord); + recheck(); + for (int[] coord : toUpdate) + { + TileEntity tile = world.getTileEntity(new BlockPos(coord[1], coord[2], coord[3])); + if ((tile instanceof TileEnderMarker)) + ((TileEnderMarker)tile).recheck(); + + } + } +} \ No newline at end of file diff --git a/src/main/java/com/myuki69/enderquarry/TileEnderQuarry.java b/src/main/java/com/myuki69/enderquarry/TileEnderQuarry.java new file mode 100644 index 0000000..ae5b55c --- /dev/null +++ b/src/main/java/com/myuki69/enderquarry/TileEnderQuarry.java @@ -0,0 +1,867 @@ +package com.myuki69.enderquarry; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockLiquid; +import net.minecraft.block.IGrowable; +import net.minecraft.block.state.IBlockState; +import net.minecraft.enchantment.*; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.init.Enchantments; +import net.minecraft.inventory.EntityEquipmentSlot; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.ITickable; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.ChunkPos; +import net.minecraft.util.text.TextComponentString; +import net.minecraft.world.World; +import net.minecraft.world.WorldServer; +import net.minecraftforge.common.ForgeChunkManager; +import net.minecraftforge.common.IPlantable; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.common.util.FakePlayer; +import net.minecraftforge.common.util.FakePlayerFactory; +import net.minecraftforge.energy.CapabilityEnergy; +import net.minecraftforge.energy.EnergyStorage; +import net.minecraftforge.energy.IEnergyStorage; +import net.minecraftforge.event.ForgeEventFactory; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTank; +import net.minecraftforge.fluids.IFluidBlock; +import net.minecraftforge.fluids.IFluidTank; +import net.minecraftforge.fluids.capability.CapabilityFluidHandler; +import net.minecraftforge.fluids.capability.IFluidHandler; +import net.minecraftforge.fluids.capability.wrappers.BlockLiquidWrapper; +import net.minecraftforge.fluids.capability.wrappers.FluidBlockWrapper; +import net.minecraftforge.items.CapabilityItemHandler; +import net.minecraftforge.items.IItemHandler; +import net.minecraftforge.items.ItemStackHandler; +import net.minecraftforge.items.ItemHandlerHelper; + +public class TileEnderQuarry + extends TileEntity + implements ITickable, IItemHandler +{ + private static final Random rand = new Random(); + public static int baseDrain = 1800; + public static float hardnessDrain = 200.0F; + + public ArrayList items = new ArrayList(); + public FluidTank tank = new FluidTank(32000); + public EnergyStorage energy = new EnergyStorage(10000000); + public int neededEnergy = -1; + public int config = -1; + + public long progress = 0L; + public boolean started = false; + public boolean finished = false; + + + public int dx = 1; + public int dy = 0; + public int dz = 0; + + int chunk_x = 0; + int chunk_z = 0; + int chunk_y = 0; + + int xCoord; + int yCoord; + int zCoord; + + int min_x; + int max_x; + int min_z; + int max_z; + + private ForgeChunkManager.Ticket chunkTicket; + private EntityPlayer owner; + + public static double[] powerMultipliers = { 1.0D, 1.0D, 1.5D, 5.0D, 20.0D, 80.0D, 1.0D, 1.5D, 2.0D, 1.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D }; + public boolean[] upgrades = new boolean[16]; + public static final int UPGRADE_BLANK = 0; + public static final int UPGRADE_VOID = 1; + public static final int UPGRADE_SILK = 2; + public static final int UPGRADE_FORTUNE1 = 3; + public static final int UPGRADE_FORTUNE2 = 4; + public static final int UPGRADE_FORTUNE3 = 5; + public static final int UPGRADE_SPEED1 = 6; + public static final int UPGRADE_SPEED2 = 7; + public static final int UPGRADE_SPEED3 = 8; + public static final int UPGRADE_FLUID = 9; + + public TileEnderQuarry() + { + + tank.setCanFill(false); + } + + @Override + public void readFromNBT(NBTTagCompound tags) + { + this.energy.receiveEnergy(tags.getInteger("energy"), false); + int n = tags.getInteger("item_no"); + this.items.clear(); + for (int i = 0; i < n; i++) + { + NBTTagCompound t = tags.getCompoundTag("item_" + i); + this.items.add(new ItemStack(t)); + } + if (tags.hasKey("fluid")) + tank.fillInternal(FluidStack.loadFluidStackFromNBT(tags.getCompoundTag("fluid")), true); + + this.finished = tags.getBoolean("finished"); + if (this.finished) + return; + + this.started = tags.getBoolean("started"); + if (!this.started) + return; + + min_x = tags.getInteger("min_x"); + min_z = tags.getInteger("min_z"); + max_x = tags.getInteger("max_x"); + max_z = tags.getInteger("max_z"); + chunk_x = tags.getInteger("chunk_x"); + chunk_y = tags.getInteger("chunk_y"); + chunk_z = tags.getInteger("chunk_z"); + dx = tags.getInteger("dx"); + dy = tags.getInteger("dy"); + dz = tags.getInteger("dz"); + progress = tags.getLong("progress"); + super.readFromNBT(tags); + } + + @Override + public NBTTagCompound writeToNBT(NBTTagCompound tags) + { + tags.setInteger("energy", energy.getEnergyStored()); + for (int i = 0; i < items.size(); i++) + { + while (i < items.size() && items.get(i) == null) + items.remove(i); + + if (i < items.size()) + { + NBTTagCompound t = new NBTTagCompound(); + ((ItemStack)items.get(i)).writeToNBT(t); + tags.setTag("item_" + i, t); + } + } + tags.setInteger("item_no", items.size()); + if (tank.getFluid() != null) + { + NBTTagCompound t = new NBTTagCompound(); + tank.getFluid().writeToNBT(t); + tags.setTag("fluid", t); + } + if (finished) + { + tags.setBoolean("finished", true); + } + else if (started) + { + tags.setBoolean("started", true); + tags.setInteger("min_x", min_x); + tags.setInteger("max_x", max_x); + tags.setInteger("min_z", min_z); + tags.setInteger("max_z", max_z); + tags.setInteger("chunk_x", chunk_x); + tags.setInteger("chunk_y", chunk_y); + tags.setInteger("chunk_z", chunk_z); + tags.setInteger("dx", dx); + tags.setInteger("dy", dy); + tags.setInteger("dz", dz); + tags.setLong("progress", progress); + } + return super.writeToNBT(tags); + } + + public boolean checkForMarkers(EntityPlayer player) + { + BlockPos thisBlockPos = this.getPos(); + System.out.println("Quarry checking at: " + thisBlockPos.getX() + " " + thisBlockPos.getY() + " " + thisBlockPos.getZ()); + for (EnumFacing face : EnumFacing.HORIZONTALS) + { + BlockPos vecin = thisBlockPos.offset(face); + int offsetX = vecin.getX() - thisBlockPos.getX(); + int offsetZ = vecin.getZ() - thisBlockPos.getZ(); + + int[] test = { this.world.provider.getDimension(), vecin.getX(), vecin.getY(), vecin.getZ() }; + int[] test_forward = null; + int[] test_side = null; + + boolean foundAttached = false; + for (int[] a : TileEnderMarker.markers) + { + if (isIntEqual(a, test)) + { + foundAttached = true; + break; + } + } + if (foundAttached) + { + player.sendMessage(new TextComponentString("Found attached ender-marker")); + for (int[] a : TileEnderMarker.markers) + { + if ((a[0] == test[0]) && (a[2] == test[2]) && ((a[1] != test[1]) || (a[3] != test[3]))) + { + if ((sign(a[1] - test[1]) == offsetX) && (sign(a[3] - test[3]) == offsetZ)) + { + if (test_forward == null) + test_forward = a; + else if (!isIntEqual(a, test_forward)) + player.sendMessage(new TextComponentString("Quarry marker square is ambiguous - multiple markers found at (" + a[1] + "," + a[3] + ") and (" + test_forward[1] + "," + test_forward[3] + ")")); + } + if (((offsetX == 0) && (a[3] == test[3])) || ((offsetZ == 0) && (a[1] == test[1]))) + { + if (test_side == null) + test_side = a; + else if (!isIntEqual(a, test_side)) + player.sendMessage(new TextComponentString("Quarry marker square is ambiguous - multiple markers found at (" + a[1] + "," + a[3] + ") and (" + test_side[1] + "," + test_side[3] + ")")); + } + } + } + if (test_forward == null) + { + player.sendMessage(new TextComponentString("Quarry marker square is incomplete")); + return false; + } + if (test_side == null) + { + player.sendMessage(new TextComponentString("Quarry marker square is incomplete")); + return false; + } + int amin_x = Math.min(Math.min(test[1], test_forward[1]), test_side[1]); + int amax_x = Math.max(Math.max(test[1], test_forward[1]), test_side[1]); + int amin_z = Math.min(Math.min(test[3], test_forward[3]), test_side[3]); + int amax_z = Math.max(Math.max(test[3], test_forward[3]), test_side[3]); + if ((amax_x - amin_x <= 2) || (amax_z - amin_z <= 2)) + { + player.sendMessage(new TextComponentString("Region created by ender markers is too small")); + return false; + } + player.sendMessage(new TextComponentString("Sucessfully established boundary")); + + chunk_y = this.getPos().getY(); + min_x = amin_x; + max_x = amax_x; + min_z = amin_z; + max_z = amax_z; + + startDig(); + + return true; + } + } + return false; + } + + public static boolean isIntEqual(int[] a, int[] b) + { + if (a == b) + return true; + for (int i = 0; i < 4; i++) + { + if (a[i] != b[i]) + return false; + } + return true; + } + + public static int sign(int d) + { + if (d == 0) + return 0; + if (d > 0) + return 1; + return -1; + } + + public void startDig() + { + System.out.println("Ender quarry started digging at (" + min_x + ", " + min_z + "), (" + max_x + ", " + max_z + ")"); + + this.started = true; + //this.chunk_y = yCoord; + this.chunk_x = (this.min_x + 1 >> 4); + this.chunk_z = (this.min_z + 1 >> 4); + this.dx = Math.max(0, this.min_x + 1 - (this.chunk_x << 4)); + this.dy = this.chunk_y; + this.dz = Math.max(0, this.min_z + 1 - (this.chunk_z << 4)); + if (!stopHere()) + nextBlock(); + + } + + @Override + public void update() + { + xCoord = this.getPos().getX(); + yCoord = this.getPos().getY(); + zCoord = this.getPos().getZ(); + + if(this.world.isRemote) + return; + if(config == -1) + checkSurroundings(); + + if (!started || finished) + return; + + if (chunkTicket == null) + { + chunkTicket = ForgeChunkManager.requestTicket(EnderQuarryMod.instance, this.world, ForgeChunkManager.Type.NORMAL); + if (chunkTicket == null) + { + if (owner != null) + owner.sendMessage(new TextComponentString("Problem registering chunk-preserving method")); + this.finished = true; + return; + } + chunkTicket.getModData().setString("id", "quarry"); + chunkTicket.getModData().setInteger("x", xCoord); + chunkTicket.getModData().setInteger("y", yCoord); + chunkTicket.getModData().setInteger("z", zCoord); + + ForgeChunkManager.forceChunk(chunkTicket, new ChunkPos(xCoord, zCoord)); + + loadChunk(); + } + + int nr = getSpeedStack(); //operations per tick + for (int k = 0; k < nr; k++) + { + if (hasRedstoneSignal() || (!items.isEmpty()) || (tank.getFluid() != null && tank.getFluidAmount() > 31000)) + { + } + + else if (energy.getEnergyStored() >= neededEnergy && energy.extractEnergy(baseDrain, true) == baseDrain) + { + int x = (chunk_x << 4) + dx; + int z = (chunk_z << 4) + dz; + int y = dy; + if (y >= 0) + { + if (mineBlock(x, y, z, upgrades[1] == false)) + { + this.neededEnergy = -1; + nextBlock(); + } + } + else + { + nextBlock(); + } + } + + if (!items.isEmpty() && config > 0) + { + int side_id = 0; + BlockPos thisBlockPos = this.getPos(); + for (EnumFacing face : EnumFacing.values()) + { + BlockPos vecin = thisBlockPos.offset(face); + TileEntity tile = this.world.getTileEntity(vecin); + if(tile != null && tile.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, face.getOpposite())) //am gasit un cufar sau cv + { + //System.out.println("Trying to put item at: " + vecin.getX() + ", " + vecin.getY() + ", " + vecin.getZ()); + IItemHandler itemhandler = tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, face.getOpposite()); + for(int i = 0; i < items.size(); ++i) + { + ItemStack remainder = ItemHandlerHelper.insertItemStacked(itemhandler, (ItemStack)items.get(i), false); + if(remainder.isEmpty()) + { + items.remove(i); + --i; + } + } + } + } + } + if (tank.getFluid() != null && tank.getFluidAmount() > 0 && config > 0) + { + BlockPos thisBlockPos = this.getPos(); + for (EnumFacing face : EnumFacing.values()) + { + BlockPos vecin = thisBlockPos.offset(face); + TileEntity tile = this.world.getTileEntity(vecin); + if(tile != null && tile.hasCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, face.getOpposite())) + { + IFluidHandler handler = tile.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, face.getOpposite()); + int transfer = tank.getFluidAmount(); + + tank.drain(handler.fill(tank.getFluid(), true), true); + } + + } + } + } + } + + public boolean mineBlock(int x, int y, int z, boolean replaceWithDirt) + { + BlockPos miningPos = new BlockPos (x, y, z); + IFluidHandler handler = null; + + IBlockState toBeMinedState = this.world.getBlockState(miningPos); + Block toBeMined = toBeMinedState.getBlock(); + + if (this.world.isAirBlock(miningPos)) + return true; + + if (toBeMined instanceof BlockLiquid) + handler = new BlockLiquidWrapper((BlockLiquid) toBeMined, this.world, miningPos); + else if (toBeMined instanceof IFluidBlock) { + handler = new FluidBlockWrapper((IFluidBlock) toBeMined, this.world, miningPos); + } + + if (handler != null) //fluid block + { + if(upgrades[9]) + { + FluidStack drained = handler.drain(16000, false); + + if (drained != null && tank.fillInternal(drained, false) == drained.amount) + { + tank.fillInternal(handler.drain(16000, true), true); + world.setBlockState(miningPos, Blocks.AIR.getDefaultState()); + //System.out.println("Draining " + drained.amount + " from " + x + ", " + y + ", " + z); + return true; + } + //if(drained != null) + //System.out.println("DEBUG: draining failed: " + toBeMined.getLocalizedName() + " " + drained.getLocalizedName() + " " + drained.amount); + //else + if(drained == null) + { + System.out.println("WARNING: Draining block at " + x + ", " + y + ", " + z + " - " + toBeMined.getLocalizedName() + " returned null! Skipping!"); + return true; + } + return false; + } + else + return true; + } + + if(toBeMined == Blocks.BEDROCK) + return true; + + if (replaceWithDirt && (toBeMined.isLeaves(toBeMinedState, this.world, miningPos) || toBeMined.isFoliage(this.world, miningPos) || toBeMined.isWood(this.world, miningPos) || (toBeMined instanceof IPlantable) || (toBeMined instanceof IGrowable))) + { + return true; + } + + int meta = toBeMined.getMetaFromState(toBeMinedState); + float hardness = toBeMinedState.getBlockHardness(this.world, miningPos); + + + if (hardness < 0.0F) + { + return true; + } + + int amount = (int)Math.ceil(baseDrain + hardness * hardnessDrain * getPowerMultiplier()); //cat RF o sa consume pentru acest block + if (amount > this.energy.getMaxEnergyStored()) + { + amount = this.energy.getMaxEnergyStored(); + } + + if (this.energy.extractEnergy(amount, true) < amount) + { + this.neededEnergy = amount; + return false; + } + this.energy.extractEnergy(amount, false); + + if(toBeMined == Blocks.GRASS && this.world.canSeeSky(miningPos)) + { + return true; + } + + return harvestBlock(toBeMinedState, miningPos, meta, replaceWithDirt, getDigType()); + } + + public boolean harvestBlock(IBlockState toBeMinedState, BlockPos miningPos, int meta, boolean replaceWithDirt, DigType digType) + { + Block toBeMined = toBeMinedState.getBlock(); + boolean isOpaque = toBeMinedState.isOpaqueCube(); + FakePlayer fakePlayer = FakePlayerFactory.getMinecraft((WorldServer) this.world); + fakePlayer.setItemStackToSlot(EntityEquipmentSlot.MAINHAND, digType.newStack(Items.DIAMOND_PICKAXE)); + try + { + boolean flag; + + + Object i = new ArrayList(); + if ((digType.isSilkTouch()) && (toBeMined.canSilkHarvest(this.world, miningPos, toBeMinedState, fakePlayer))) + { + int j = 0; + Item item = Item.getItemFromBlock(toBeMined); + if (item != null) + { + if (item.getHasSubtypes()) + j = meta; + ItemStack itemstack = new ItemStack(item, 1, j); + ((ArrayList)i).add(itemstack); + } + } + else + { + ((ArrayList)i).addAll(toBeMined.getDrops(this.world, miningPos, toBeMinedState, digType.getFortuneModifier())); + + } + float p = ForgeEventFactory.fireBlockHarvesting((ArrayList)i, this.world, miningPos, toBeMinedState, digType.getFortuneModifier(), 1.0F, digType.isSilkTouch(), fakePlayer); + if ((p > 0.0F) && (!((ArrayList)i).isEmpty()) && ((p == 1.0F) || (rand.nextFloat() < p))) + this.items.addAll((Collection)i); + + if(replaceWithDirt) + { + if(toBeMined != Blocks.DIRT) + flag = this.world.setBlockState(miningPos, Blocks.DIRT.getDefaultState()); + else + return true; + } + else + flag = this.world.setBlockState(miningPos, Blocks.AIR.getDefaultState()); + + if (!flag) + { + System.out.println("Error in setting block at mining pos!"); + return false; + } + + return true; + } + finally + { + fakePlayer.setItemStackToSlot(EntityEquipmentSlot.MAINHAND, new ItemStack(Blocks.DIRT)); + } + + } + + private DigType getDigType() + { + if (this.upgrades[2] == true) + return DigType.SILK; + + if (this.upgrades[3] == true) + return DigType.FORTUNE; + + if (this.upgrades[4] == true) + return DigType.FORTUNE2; + + if (this.upgrades[5] == true) + return DigType.FORTUNE3; + + return DigType.NORMAL; + } + + public void nextBlock() + { + nextSubBlock(); + while (!stopHere()) + nextSubBlock(); + } + + public void nextSubBlock() + { + this.progress += 1L; + this.dy -= 1; + if (this.dy <= 0) + { + this.dx += 1; + if ((this.dx >= 16) || ((this.chunk_x << 4) + this.dx >= this.max_x)) + { + this.dx = Math.max(0, this.min_x + 1 - (this.chunk_x << 4)); + this.dz += 1; + if ((this.dz >= 16) || ((this.chunk_z << 4) + this.dz >= this.max_z)) + { + nextChunk(); + this.dx = Math.max(0, this.min_x + 1 - (this.chunk_x << 4)); + this.dz = Math.max(0, this.min_z + 1 - (this.chunk_z << 4)); + } + } + this.dy = this.chunk_y; + } + } + + public void nextChunk() + { + unloadChunk(); + this.chunk_x += 1; + if (this.chunk_x << 4 >= this.max_x) + { + this.chunk_x = (this.min_x + 1 >> 4); + this.chunk_z += 1; + if (this.chunk_z << 4 >= this.max_z) + { + this.finished = true; + //this.world.setBlockMetadataWithNotify(this.xCoord, this.yCoord, this.zCoord, 2, 2); + ForgeChunkManager.releaseTicket(this.chunkTicket); + return; + } + } + this.dy = this.chunk_y; + loadChunk(); + } + + public boolean stopHere() + { + return (this.finished) || (isValid((this.chunk_x << 4) + this.dx, (this.chunk_z << 4) + this.dz)); + } + + private boolean isValid(int x, int z) + { + return (this.min_x < x) && (x < this.max_x) && (this.min_z < z) && (z < this.max_z); + } + + private double getPowerMultiplier() + { + double multiplier = 1.0D; + for (int i = 0; i < 16; i++) + { + if (upgrades[i]) + multiplier *= powerMultipliers[i]; + } + return multiplier; + } + + private int getSpeedStack() + { + if (upgrades[6]) + return 1; + + if (upgrades[7]) + return 3; + + if (upgrades[8]) + return 9; + + return 1; + } + + private void loadChunk() + { + + ChunkPos base = new ChunkPos(xCoord, zCoord); + if(base.x != chunk_x || base.z != chunk_z) + ForgeChunkManager.forceChunk(chunkTicket, new ChunkPos(chunk_x, chunk_z)); + + } + + private void unloadChunk() + { + ChunkPos base = new ChunkPos(xCoord, zCoord); + if(base.x != chunk_x || base.z != chunk_z) + ForgeChunkManager.unforceChunk(chunkTicket, new ChunkPos(chunk_x, chunk_z)); //ne asiguram ca nu stergem din ram chunkul in care e ender quarry + } + + public void checkSurroundings() + { + config = 1; + for(int i = 0; i <= 10; ++i) + upgrades[i] = false; + + BlockPos thisBlockPos = this.getPos(); + for (EnumFacing face : EnumFacing.values()) + { + BlockPos vecin = thisBlockPos.offset(face); + if (world.getBlockState(vecin).getBlock() instanceof UpgradeBlock) + { + upgrades[((UpgradeBlock)world.getBlockState(vecin).getBlock()).upgradeType] = true; + //System.out.println("Found an upgrade of type " + ((UpgradeBlock)world.getBlockState(vecin).getBlock()).upgradeType); + } + } + } + + public boolean hasRedstoneSignal() + { + for (EnumFacing enumfacing : EnumFacing.values()) + { + if (world.isSidePowered(pos.offset(enumfacing), enumfacing)) + { + return true; + } + } + + if (world.isSidePowered(pos, EnumFacing.DOWN)) + { + return true; + } + else + { + BlockPos blockpos = pos.up(); + + for (EnumFacing enumfacing1 : EnumFacing.values()) + { + if (enumfacing1 != EnumFacing.DOWN && world.isSidePowered(blockpos.offset(enumfacing1), enumfacing1)) + { + return true; + } + } + + return false; + } + } + + public int invInsert(IItemHandler itemhandler, ItemStack toBeInserted) + { + for(int i = 0; i < itemhandler.getSlots(); ++i) + { + ItemStack cur = itemhandler.getStackInSlot(i); + if(cur.isEmpty()) + { + itemhandler.insertItem(i, toBeInserted, false); + return 1; + } + else + { + if(ItemStack.areItemsEqual(toBeInserted, cur)) + { + if(cur.getCount() == cur.getMaxStackSize()) + continue; + if(cur.getCount() + toBeInserted.getCount() <= cur.getMaxStackSize()) + { + itemhandler.insertItem(i, toBeInserted, false); + return 1; + } + else + { + int ammount = cur.getMaxStackSize() - cur.getCount(); + ItemStack remainder = toBeInserted; + remainder.shrink(ammount); + toBeInserted.setCount(ammount); + items.add(remainder); + } + } + } + } + return 0; + } + + public static enum DigType + { + NORMAL(null, 0), SILK(Enchantments.SILK_TOUCH, 1), FORTUNE(Enchantments.FORTUNE, 1), FORTUNE2(Enchantments.FORTUNE, 2), FORTUNE3(Enchantments.FORTUNE, 3), SPEED(Enchantments.EFFICIENCY, 1), SPEED2(Enchantments.EFFICIENCY, 3), SPEED3(Enchantments.EFFICIENCY, 5); + + public Enchantment ench; + public int level; + + private DigType(Enchantment ench, int level) + { + this.ench = ench; + this.level = level; + } + + public int getFortuneModifier() + { + if (this.ench == Enchantments.FORTUNE) + return this.level; + return 0; + } + + public ItemStack newStack(Item pick) + { + ItemStack stack = new ItemStack(pick); + if (ench != null) + stack.addEnchantment(this.ench, this.level); + return stack; + } + + public boolean isSilkTouch() + { + return this.ench == Enchantments.SILK_TOUCH; + } + } + + @Override + public boolean hasCapability(Capability capability, EnumFacing facing) + { + if (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) + return true; + if(capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) + return true; + if(capability == CapabilityEnergy.ENERGY) + return true; + return super.hasCapability(capability, facing); + } + + @Override + public T getCapability(Capability capability, EnumFacing facing) + { + if(capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) + return (T) this; + if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) + return (T) tank; + if (capability == CapabilityEnergy.ENERGY) + return (T) energy; + + return super.getCapability(capability, facing); + } + + //useless stuff so pipes connect to quarry + @Override + public int getSlots() + { + return 1; + } + + @Override + public ItemStack getStackInSlot(int slot) + { + if(slot != 0) + return ItemStack.EMPTY; + + for(int i = 0; i < items.size(); ++i) + return (ItemStack)items.get(i); + + return ItemStack.EMPTY; + } + + @Override + public ItemStack insertItem(int slot, ItemStack stack, boolean simulate) { + return stack; + } + + @Override + public ItemStack extractItem(int slot, int amount, boolean simulate) + { + ItemStack eject; + for(int i = 0; i < items.size(); ++i) + { + eject = (ItemStack)items.get(i); + if(simulate == false) + { + items.remove(i); + --i; + } + return eject; + } + return ItemStack.EMPTY; + } + + @Override + public int getSlotLimit(int slot) + { + ItemStack firstStack; + for(int i = 0; i < items.size(); ++i) + { + firstStack = (ItemStack)items.get(i); + return firstStack.getMaxStackSize(); + } + return 64; + } + +} diff --git a/src/main/java/com/myuki69/enderquarry/UpgradeBlock.java b/src/main/java/com/myuki69/enderquarry/UpgradeBlock.java new file mode 100644 index 0000000..0e137fd --- /dev/null +++ b/src/main/java/com/myuki69/enderquarry/UpgradeBlock.java @@ -0,0 +1,104 @@ +package com.myuki69.enderquarry; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockFenceGate; +import net.minecraft.block.material.Material; +import net.minecraft.block.properties.IProperty; +import net.minecraft.block.properties.PropertyBool; +import net.minecraft.block.state.BlockFaceShape; +import net.minecraft.block.state.BlockStateContainer; +import net.minecraft.block.state.IBlockState; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.util.BlockRenderLayer; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +public class UpgradeBlock extends Block +{ + public static final PropertyBool NORTH = PropertyBool.create("north"); + public static final PropertyBool EAST = PropertyBool.create("east"); + public static final PropertyBool SOUTH = PropertyBool.create("south"); + public static final PropertyBool WEST = PropertyBool.create("west"); + public static final PropertyBool UP = PropertyBool.create("up"); + public static final PropertyBool DOWN = PropertyBool.create("down"); + protected static final AxisAlignedBB CUSTOM_AABB = new AxisAlignedBB(0.0625D, 0.0625D, 0.0625D, 0.9375D, 0.9375D, 0.9375D); + + public int upgradeType = 0; + public UpgradeBlock(String name, int type) + { + super(Material.ROCK); + this.setCreativeTab(CreativeTabs.REDSTONE); + this.setHardness(4.0F); + this.setUnlocalizedName(name); + this.setRegistryName(name); + this.upgradeType = type; + + this.setDefaultState(this.blockState.getBaseState().withProperty(NORTH, false).withProperty(EAST, false).withProperty(SOUTH, false).withProperty(WEST, false).withProperty(UP, false).withProperty(DOWN, false)); + } + + public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) + { + return CUSTOM_AABB; + } + + public boolean canConnectTo(IBlockAccess world, BlockPos pos, EnumFacing facing) + { + IBlockState iblockstate = world.getBlockState(pos); + Block block = iblockstate.getBlock(); + if(block instanceof EnderQuarry) + return true; + return false; + } + + @Override + public boolean canBeConnectedTo(IBlockAccess world, BlockPos pos, EnumFacing facing) + { + return canConnectTo(world, pos.offset(facing), facing.getOpposite()); + } + + @Override + public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos) + { + return state.withProperty(NORTH, canBeConnectedTo(worldIn, pos, EnumFacing.NORTH)) + .withProperty(EAST, canBeConnectedTo(worldIn, pos, EnumFacing.EAST)) + .withProperty(SOUTH, canBeConnectedTo(worldIn, pos, EnumFacing.SOUTH)) + .withProperty(WEST, canBeConnectedTo(worldIn, pos, EnumFacing.WEST)) + .withProperty(UP, canBeConnectedTo(worldIn, pos, EnumFacing.UP)) + .withProperty(DOWN, canBeConnectedTo(worldIn, pos, EnumFacing.DOWN)); + } + + @Override + protected BlockStateContainer createBlockState () + { + return new BlockStateContainer(this, new IProperty[] { DOWN, UP, NORTH, SOUTH, WEST, EAST }); + } + + @Override + public int getMetaFromState (IBlockState state) + { + return 0; + } + + @SideOnly(Side.CLIENT) + public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) + { + return true; + } + + @Override + public boolean isOpaqueCube(IBlockState iState) + { + return false; + } + + @Override + public boolean isFullCube(IBlockState iState) + { + return false; + } + +} diff --git a/src/main/resources/assets/enderquarrymod/blockstates/endermarker.json b/src/main/resources/assets/enderquarrymod/blockstates/endermarker.json new file mode 100644 index 0000000..9466c52 --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/blockstates/endermarker.json @@ -0,0 +1,8 @@ +{ + "multipart": + [ + { + "apply": { "model": "enderquarrymod:endermarker" } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/enderquarrymod/blockstates/enderquarry.json b/src/main/resources/assets/enderquarrymod/blockstates/enderquarry.json new file mode 100644 index 0000000..25bbe76 --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/blockstates/enderquarry.json @@ -0,0 +1,7 @@ +{ + "variants": { + "normal": [ + { "model": "enderquarrymod:enderquarry" } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/enderquarrymod/blockstates/upgradefortunei.json b/src/main/resources/assets/enderquarrymod/blockstates/upgradefortunei.json new file mode 100644 index 0000000..75753a0 --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/blockstates/upgradefortunei.json @@ -0,0 +1,25 @@ +{ + "multipart": + [ + { + "apply": { "model": "enderquarrymod:upgradefortunei" }}, + { "when": { "north": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "uvlock": true } + }, + { "when": { "east": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "y": 90, "uvlock": true } + }, + { "when": { "south": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "y": 180, "uvlock": true } + }, + { "when": { "west": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "y": 270, "uvlock": true } + }, + { "when": { "up": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "x": 270, "uvlock": true } + }, + { "when": { "down": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "x": 90, "uvlock": true } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/enderquarrymod/blockstates/upgradefortuneii.json b/src/main/resources/assets/enderquarrymod/blockstates/upgradefortuneii.json new file mode 100644 index 0000000..e7ad9c4 --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/blockstates/upgradefortuneii.json @@ -0,0 +1,25 @@ +{ + "multipart": + [ + { + "apply": { "model": "enderquarrymod:upgradefortuneii" }}, + { "when": { "north": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "uvlock": true } + }, + { "when": { "east": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "y": 90, "uvlock": true } + }, + { "when": { "south": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "y": 180, "uvlock": true } + }, + { "when": { "west": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "y": 270, "uvlock": true } + }, + { "when": { "up": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "x": 270, "uvlock": true } + }, + { "when": { "down": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "x": 90, "uvlock": true } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/enderquarrymod/blockstates/upgradefortuneiii.json b/src/main/resources/assets/enderquarrymod/blockstates/upgradefortuneiii.json new file mode 100644 index 0000000..6a242f9 --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/blockstates/upgradefortuneiii.json @@ -0,0 +1,25 @@ +{ + "multipart": + [ + { + "apply": { "model": "enderquarrymod:upgradefortuneiii" }}, + { "when": { "north": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "uvlock": true } + }, + { "when": { "east": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "y": 90, "uvlock": true } + }, + { "when": { "south": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "y": 180, "uvlock": true } + }, + { "when": { "west": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "y": 270, "uvlock": true } + }, + { "when": { "up": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "x": 270, "uvlock": true } + }, + { "when": { "down": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "x": 90, "uvlock": true } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/enderquarrymod/blockstates/upgradepump.json b/src/main/resources/assets/enderquarrymod/blockstates/upgradepump.json new file mode 100644 index 0000000..0083dd1 --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/blockstates/upgradepump.json @@ -0,0 +1,25 @@ +{ + "multipart": + [ + { + "apply": { "model": "enderquarrymod:upgradepump" }}, + { "when": { "north": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "uvlock": true } + }, + { "when": { "east": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "y": 90, "uvlock": true } + }, + { "when": { "south": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "y": 180, "uvlock": true } + }, + { "when": { "west": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "y": 270, "uvlock": true } + }, + { "when": { "up": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "x": 270, "uvlock": true } + }, + { "when": { "down": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "x": 90, "uvlock": true } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/enderquarrymod/blockstates/upgradesilk.json b/src/main/resources/assets/enderquarrymod/blockstates/upgradesilk.json new file mode 100644 index 0000000..d805551 --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/blockstates/upgradesilk.json @@ -0,0 +1,25 @@ +{ + "multipart": + [ + { + "apply": { "model": "enderquarrymod:upgradesilk" }}, + { "when": { "north": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "uvlock": true } + }, + { "when": { "east": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "y": 90, "uvlock": true } + }, + { "when": { "south": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "y": 180, "uvlock": true } + }, + { "when": { "west": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "y": 270, "uvlock": true } + }, + { "when": { "up": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "x": 270, "uvlock": true } + }, + { "when": { "down": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "x": 90, "uvlock": true } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/enderquarrymod/blockstates/upgradespeedi.json b/src/main/resources/assets/enderquarrymod/blockstates/upgradespeedi.json new file mode 100644 index 0000000..3d28460 --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/blockstates/upgradespeedi.json @@ -0,0 +1,25 @@ +{ + "multipart": + [ + { + "apply": { "model": "enderquarrymod:upgradespeedi" }}, + { "when": { "north": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "uvlock": true } + }, + { "when": { "east": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "y": 90, "uvlock": true } + }, + { "when": { "south": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "y": 180, "uvlock": true } + }, + { "when": { "west": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "y": 270, "uvlock": true } + }, + { "when": { "up": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "x": 270, "uvlock": true } + }, + { "when": { "down": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "x": 90, "uvlock": true } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/enderquarrymod/blockstates/upgradespeedii.json b/src/main/resources/assets/enderquarrymod/blockstates/upgradespeedii.json new file mode 100644 index 0000000..2e79a47 --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/blockstates/upgradespeedii.json @@ -0,0 +1,25 @@ +{ + "multipart": + [ + { + "apply": { "model": "enderquarrymod:upgradespeedii" }}, + { "when": { "north": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "uvlock": true } + }, + { "when": { "east": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "y": 90, "uvlock": true } + }, + { "when": { "south": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "y": 180, "uvlock": true } + }, + { "when": { "west": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "y": 270, "uvlock": true } + }, + { "when": { "up": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "x": 270, "uvlock": true } + }, + { "when": { "down": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "x": 90, "uvlock": true } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/enderquarrymod/blockstates/upgradespeediii.json b/src/main/resources/assets/enderquarrymod/blockstates/upgradespeediii.json new file mode 100644 index 0000000..26575e2 --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/blockstates/upgradespeediii.json @@ -0,0 +1,25 @@ +{ + "multipart": + [ + { + "apply": { "model": "enderquarrymod:upgradespeediii" }}, + { "when": { "north": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "uvlock": true } + }, + { "when": { "east": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "y": 90, "uvlock": true } + }, + { "when": { "south": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "y": 180, "uvlock": true } + }, + { "when": { "west": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "y": 270, "uvlock": true } + }, + { "when": { "up": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "x": 270, "uvlock": true } + }, + { "when": { "down": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "x": 90, "uvlock": true } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/enderquarrymod/blockstates/upgradevoid.json b/src/main/resources/assets/enderquarrymod/blockstates/upgradevoid.json new file mode 100644 index 0000000..8ca434d --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/blockstates/upgradevoid.json @@ -0,0 +1,25 @@ +{ + "multipart": + [ + { + "apply": { "model": "enderquarrymod:upgradevoid" }}, + { "when": { "north": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "uvlock": true } + }, + { "when": { "east": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "y": 90, "uvlock": true } + }, + { "when": { "south": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "y": 180, "uvlock": true } + }, + { "when": { "west": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "y": 270, "uvlock": true } + }, + { "when": { "up": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "x": 270, "uvlock": true } + }, + { "when": { "down": "true" }, + "apply": { "model": "enderquarrymod:upgradeside", "x": 90, "uvlock": true } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/enderquarrymod/lang/en_us.lang b/src/main/resources/assets/enderquarrymod/lang/en_us.lang new file mode 100644 index 0000000..ef57a3c --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/lang/en_us.lang @@ -0,0 +1,11 @@ +tile.enderquarry.name=Ender Quarry +tile.upgradevoid.name=Ender Quarry World Hole Upgrade +tile.upgradesilk.name=Ender Quarry Silk Touch Upgrade +tile.upgradefortunei.name=Ender Quarry Fortune I Upgrade +tile.upgradefortuneii.name=Ender Quarry Fortune II Upgrade +tile.upgradefortuneiii.name=Ender Quarry Fortune III Upgrade +tile.upgradespeedi.name=Ender Quarry Speed I Upgrade +tile.upgradespeedii.name=Ender Quarry Speed II Upgrade +tile.upgradespeediii.name=Ender Quarry Speed III Upgrade +tile.upgradepump.name=Ender Quarry Pump Upgrade +tile.endermarker.name=Ender Marker \ No newline at end of file diff --git a/src/main/resources/assets/enderquarrymod/models/block/endermarker.json b/src/main/resources/assets/enderquarrymod/models/block/endermarker.json new file mode 100644 index 0000000..d98324a --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/models/block/endermarker.json @@ -0,0 +1,54 @@ +{ + "__comment": "Model generated using MrCrayfish's Model Creator (https://mrcrayfish.com/tools?id=mc)", + "textures": { + "particle": "enderquarrymod:blocks/endermarker", + "endermarker": "enderquarrymod:blocks/endermarker" + }, + "display": { + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 0, 0 ], + "scale": [ 0.625, 0.625, 0.625 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 3, 0 ], + "scale": [ 0.25, 0.25, 0.25 ] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0 ], + "scale": [ 1, 1, 1 ] + }, + "head": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0 ], + "scale": [ 1, 1, 1 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 315, 0 ], + "translation": [ 0, 2.5, 0 ], + "scale": [ 0.4, 0.4, 0.4 ] + }, + "thirdperson_righthand": { + "rotation": [ 75, 315, 0 ], + "translation": [ 0, 2.5, 0 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + }, + "elements": [ + { + "name": "Cube", + "from": [ 7, 0, 7 ], + "to": [ 9, 13, 9 ], + "faces": { + "north": { "texture": "#endermarker", "uv": [ 7, 3, 9, 16 ] }, + "east": { "texture": "#endermarker", "uv": [ 7, 3, 9, 16 ] }, + "south": { "texture": "#endermarker", "uv": [ 7, 3, 9, 16 ] }, + "west": { "texture": "#endermarker", "uv": [ 7, 3, 9, 16 ] }, + "up": { "texture": "#endermarker", "uv": [ 7, 1, 9, 3 ] }, + "down": { "texture": "#endermarker", "uv": [ 7, 14, 9, 16 ] } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/enderquarrymod/models/block/enderquarry.json b/src/main/resources/assets/enderquarrymod/models/block/enderquarry.json new file mode 100644 index 0000000..fe0359f --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/models/block/enderquarry.json @@ -0,0 +1,55 @@ +{ + "__comment": "Model generated using MrCrayfish's Model Creator (https://mrcrayfish.com/tools?id=mc)", + "textures": { + "particle": "enderquarrymod:blocks/enderquarry", + "enderquarry": "enderquarrymod:blocks/enderquarry", + "enderquarrytop": "enderquarrymod:blocks/enderquarrytop" + }, + "display": { + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 0, 0 ], + "scale": [ 0.625, 0.625, 0.625 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 3, 0 ], + "scale": [ 0.25, 0.25, 0.25 ] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0 ], + "scale": [ 1, 1, 1 ] + }, + "head": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0 ], + "scale": [ 1, 1, 1 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 315, 0 ], + "translation": [ 0, 2.5, 0 ], + "scale": [ 0.4, 0.4, 0.4 ] + }, + "thirdperson_righthand": { + "rotation": [ 75, 315, 0 ], + "translation": [ 0, 2.5, 0 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + }, + "elements": [ + { + "name": "Cube", + "from": [ 0, 0, 0 ], + "to": [ 16, 16, 16 ], + "faces": { + "north": { "texture": "#enderquarry", "uv": [ 0, 0, 16, 16 ] }, + "east": { "texture": "#enderquarry", "uv": [ 0, 0, 16, 16 ] }, + "south": { "texture": "#enderquarry", "uv": [ 0, 0, 16, 16 ] }, + "west": { "texture": "#enderquarry", "uv": [ 0, 0, 16, 16 ] }, + "up": { "texture": "#enderquarrytop", "uv": [ 0, 0, 16, 16 ] }, + "down": { "texture": "#enderquarrytop", "uv": [ 0, 0, 16, 16 ] } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/enderquarrymod/models/block/upgradeblockbase.json b/src/main/resources/assets/enderquarrymod/models/block/upgradeblockbase.json new file mode 100644 index 0000000..c762823 --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/models/block/upgradeblockbase.json @@ -0,0 +1,53 @@ +{ + "__comment": "Model generated using MrCrayfish's Model Creator (https://mrcrayfish.com/tools?id=mc)", + "textures": { + "particle": "#texture" + }, + "display": { + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 0, 0 ], + "scale": [ 0.625, 0.625, 0.625 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 3, 0 ], + "scale": [ 0.25, 0.25, 0.25 ] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0 ], + "scale": [ 1, 1, 1 ] + }, + "head": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0 ], + "scale": [ 1, 1, 1 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 315, 0 ], + "translation": [ 0, 2.5, 0 ], + "scale": [ 0.4, 0.4, 0.4 ] + }, + "thirdperson_righthand": { + "rotation": [ 75, 315, 0 ], + "translation": [ 0, 2.5, 0 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + }, + "elements": [ + { + "name": "Cube", + "from": [ 1, 1, 1 ], + "to": [ 15, 15, 15 ], + "faces": { + "north": { "texture": "#texture", "uv": [ 1, 1, 15, 15 ] }, + "east": { "texture": "#texture", "uv": [ 1, 1, 15, 15 ] }, + "south": { "texture": "#texture", "uv": [ 1, 1, 15, 15 ] }, + "west": { "texture": "#texture", "uv": [ 1, 1, 15, 15 ] }, + "up": { "texture": "#texture", "uv": [ 1, 1, 15, 15 ] }, + "down": { "texture": "#texture", "uv": [ 1, 1, 15, 15 ] } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/enderquarrymod/models/block/upgradefortunei.json b/src/main/resources/assets/enderquarrymod/models/block/upgradefortunei.json new file mode 100644 index 0000000..6fc5e00 --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/models/block/upgradefortunei.json @@ -0,0 +1,6 @@ +{ + "parent": "enderquarrymod:block/upgradeblockbase", + "textures": { + "texture": "enderquarrymod:blocks/upgradefortunei" + } +} diff --git a/src/main/resources/assets/enderquarrymod/models/block/upgradefortuneii.json b/src/main/resources/assets/enderquarrymod/models/block/upgradefortuneii.json new file mode 100644 index 0000000..fb7e70d --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/models/block/upgradefortuneii.json @@ -0,0 +1,6 @@ +{ + "parent": "enderquarrymod:block/upgradeblockbase", + "textures": { + "texture": "enderquarrymod:blocks/upgradefortuneii" + } +} diff --git a/src/main/resources/assets/enderquarrymod/models/block/upgradefortuneiii.json b/src/main/resources/assets/enderquarrymod/models/block/upgradefortuneiii.json new file mode 100644 index 0000000..d7fd120 --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/models/block/upgradefortuneiii.json @@ -0,0 +1,6 @@ +{ + "parent": "enderquarrymod:block/upgradeblockbase", + "textures": { + "texture": "enderquarrymod:blocks/upgradefortuneiii" + } +} diff --git a/src/main/resources/assets/enderquarrymod/models/block/upgradepump.json b/src/main/resources/assets/enderquarrymod/models/block/upgradepump.json new file mode 100644 index 0000000..d4bf400 --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/models/block/upgradepump.json @@ -0,0 +1,6 @@ +{ + "parent": "enderquarrymod:block/upgradeblockbase", + "textures": { + "texture": "enderquarrymod:blocks/upgradepump" + } +} diff --git a/src/main/resources/assets/enderquarrymod/models/block/upgradeside.json b/src/main/resources/assets/enderquarrymod/models/block/upgradeside.json new file mode 100644 index 0000000..b4de271 --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/models/block/upgradeside.json @@ -0,0 +1,51 @@ +{ + "__comment": "Model generated using MrCrayfish's Model Creator (https://mrcrayfish.com/tools?id=mc)", + "textures": { + "quarryupgradearm": "enderquarrymod:blocks/upgradearm" + }, + "display": { + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 0, 0 ], + "scale": [ 0.625, 0.625, 0.625 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 3, 0 ], + "scale": [ 0.25, 0.25, 0.25 ] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0 ], + "scale": [ 1, 1, 1 ] + }, + "head": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0 ], + "scale": [ 1, 1, 1 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 315, 0 ], + "translation": [ 0, 2.5, 0 ], + "scale": [ 0.4, 0.4, 0.4 ] + }, + "thirdperson_righthand": { + "rotation": [ 75, 315, 0 ], + "translation": [ 0, 2.5, 0 ], + "scale": [ 0.375, 0.375, 0.375 ] + } + }, + "elements": [ + { + "name": "Cube", + "from": [ 2, 2, 0 ], + "to": [ 14, 14, 1 ], + "faces": { + "east": { "texture": "#quarryupgradearm", "uv": [ 0, 2, 1, 14 ] }, + "west": { "texture": "#quarryupgradearm", "uv": [ 15, 2, 16, 14 ] }, + "up": { "texture": "#quarryupgradearm", "uv": [ 2, 0, 14, 1 ] }, + "down": { "texture": "#quarryupgradearm", "uv": [ 2, 15, 14, 16 ] } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/enderquarrymod/models/block/upgradesilk.json b/src/main/resources/assets/enderquarrymod/models/block/upgradesilk.json new file mode 100644 index 0000000..2ab2c60 --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/models/block/upgradesilk.json @@ -0,0 +1,6 @@ +{ + "parent": "enderquarrymod:block/upgradeblockbase", + "textures": { + "texture": "enderquarrymod:blocks/upgradesilk" + } +} diff --git a/src/main/resources/assets/enderquarrymod/models/block/upgradespeedi.json b/src/main/resources/assets/enderquarrymod/models/block/upgradespeedi.json new file mode 100644 index 0000000..7836bcc --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/models/block/upgradespeedi.json @@ -0,0 +1,6 @@ +{ + "parent": "enderquarrymod:block/upgradeblockbase", + "textures": { + "texture": "enderquarrymod:blocks/upgradespeedi" + } +} diff --git a/src/main/resources/assets/enderquarrymod/models/block/upgradespeedii.json b/src/main/resources/assets/enderquarrymod/models/block/upgradespeedii.json new file mode 100644 index 0000000..f14e9f3 --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/models/block/upgradespeedii.json @@ -0,0 +1,6 @@ +{ + "parent": "enderquarrymod:block/upgradeblockbase", + "textures": { + "texture": "enderquarrymod:blocks/upgradespeedii" + } +} diff --git a/src/main/resources/assets/enderquarrymod/models/block/upgradespeediii.json b/src/main/resources/assets/enderquarrymod/models/block/upgradespeediii.json new file mode 100644 index 0000000..fe0a5ac --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/models/block/upgradespeediii.json @@ -0,0 +1,6 @@ +{ + "parent": "enderquarrymod:block/upgradeblockbase", + "textures": { + "texture": "enderquarrymod:blocks/upgradespeediii" + } +} diff --git a/src/main/resources/assets/enderquarrymod/models/block/upgradevoid.json b/src/main/resources/assets/enderquarrymod/models/block/upgradevoid.json new file mode 100644 index 0000000..850a676 --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/models/block/upgradevoid.json @@ -0,0 +1,6 @@ +{ + "parent": "enderquarrymod:block/upgradeblockbase", + "textures": { + "texture": "enderquarrymod:blocks/upgradevoid" + } +} diff --git a/src/main/resources/assets/enderquarrymod/models/item/endermarker.json b/src/main/resources/assets/enderquarrymod/models/item/endermarker.json new file mode 100644 index 0000000..db00526 --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/models/item/endermarker.json @@ -0,0 +1,3 @@ +{ + "parent": "enderquarrymod:block/endermarker" +} \ No newline at end of file diff --git a/src/main/resources/assets/enderquarrymod/models/item/enderquarry.json b/src/main/resources/assets/enderquarrymod/models/item/enderquarry.json new file mode 100644 index 0000000..990102c --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/models/item/enderquarry.json @@ -0,0 +1,3 @@ +{ + "parent": "enderquarrymod:block/enderquarry" +} \ No newline at end of file diff --git a/src/main/resources/assets/enderquarrymod/models/item/upgradefortunei.json b/src/main/resources/assets/enderquarrymod/models/item/upgradefortunei.json new file mode 100644 index 0000000..700c03c --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/models/item/upgradefortunei.json @@ -0,0 +1,3 @@ +{ + "parent": "enderquarrymod:block/upgradefortunei" +} \ No newline at end of file diff --git a/src/main/resources/assets/enderquarrymod/models/item/upgradefortuneii.json b/src/main/resources/assets/enderquarrymod/models/item/upgradefortuneii.json new file mode 100644 index 0000000..5a3e4bc --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/models/item/upgradefortuneii.json @@ -0,0 +1,3 @@ +{ + "parent": "enderquarrymod:block/upgradefortuneii" +} \ No newline at end of file diff --git a/src/main/resources/assets/enderquarrymod/models/item/upgradefortuneiii.json b/src/main/resources/assets/enderquarrymod/models/item/upgradefortuneiii.json new file mode 100644 index 0000000..b6c9c39 --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/models/item/upgradefortuneiii.json @@ -0,0 +1,3 @@ +{ + "parent": "enderquarrymod:block/upgradefortuneiii" +} \ No newline at end of file diff --git a/src/main/resources/assets/enderquarrymod/models/item/upgradepump.json b/src/main/resources/assets/enderquarrymod/models/item/upgradepump.json new file mode 100644 index 0000000..7b7795c --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/models/item/upgradepump.json @@ -0,0 +1,3 @@ +{ + "parent": "enderquarrymod:block/upgradepump" +} \ No newline at end of file diff --git a/src/main/resources/assets/enderquarrymod/models/item/upgradesilk.json b/src/main/resources/assets/enderquarrymod/models/item/upgradesilk.json new file mode 100644 index 0000000..f0148d9 --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/models/item/upgradesilk.json @@ -0,0 +1,3 @@ +{ + "parent": "enderquarrymod:block/upgradesilk" +} \ No newline at end of file diff --git a/src/main/resources/assets/enderquarrymod/models/item/upgradespeedi.json b/src/main/resources/assets/enderquarrymod/models/item/upgradespeedi.json new file mode 100644 index 0000000..4766f6e --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/models/item/upgradespeedi.json @@ -0,0 +1,3 @@ +{ + "parent": "enderquarrymod:block/upgradespeedi" +} \ No newline at end of file diff --git a/src/main/resources/assets/enderquarrymod/models/item/upgradespeedii.json b/src/main/resources/assets/enderquarrymod/models/item/upgradespeedii.json new file mode 100644 index 0000000..1ee8613 --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/models/item/upgradespeedii.json @@ -0,0 +1,3 @@ +{ + "parent": "enderquarrymod:block/upgradespeedii" +} \ No newline at end of file diff --git a/src/main/resources/assets/enderquarrymod/models/item/upgradespeediii.json b/src/main/resources/assets/enderquarrymod/models/item/upgradespeediii.json new file mode 100644 index 0000000..288f824 --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/models/item/upgradespeediii.json @@ -0,0 +1,3 @@ +{ + "parent": "enderquarrymod:block/upgradespeediii" +} \ No newline at end of file diff --git a/src/main/resources/assets/enderquarrymod/models/item/upgradevoid.json b/src/main/resources/assets/enderquarrymod/models/item/upgradevoid.json new file mode 100644 index 0000000..2c2955c --- /dev/null +++ b/src/main/resources/assets/enderquarrymod/models/item/upgradevoid.json @@ -0,0 +1,3 @@ +{ + "parent": "enderquarrymod:block/upgradevoid" +} \ No newline at end of file diff --git a/src/main/resources/assets/enderquarrymod/textures/blocks/endermarker.png b/src/main/resources/assets/enderquarrymod/textures/blocks/endermarker.png new file mode 100644 index 0000000000000000000000000000000000000000..270e2a86d2fb4d8262e86dacea033c9a475f1fb0 GIT binary patch literal 368 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzmUKs7M+SzC{oH>NS%G}c0*}aI z1_r((Aj~*bn@<`jC{f}XQ4*Y=R#Ki=l*&+$n3-3imzP?iV4`QBXPVk-lnPYy&eO#) zB*Oje6kD!C4gzlF;o7<^f~!Nqw$1aj?tfr;#Lb#t@!rAtUTe2_CU-D$`);3Ay8l>F z8k4sIzgi{Bq@Oe1totXjqCw(L^TBxsuG%HeYkYYigJr&h?1Cu_vmZ;jxyv|Qx}(Uo z;l{Zux|XZ&{%cV$xxpAy>@IftoZ&ai1Rv>V8^5tG7OWB9pngHRFJa!7qK1nr-mx4z zt$AkitTTxwP5uqC3#4D}e-w1r^ujB5gY(v%i6&k%9scb&{Gx-|W0tiG<0qZgkBRFU z*Ge1w-fd(rTqk~o@du;N$5q;jU-efMFhswp4`24O+w%dZ##h#F(|nX?a$UX%^f`m4 LtDnm{r-UW|p>B^- literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/enderquarrymod/textures/blocks/enderquarry.png b/src/main/resources/assets/enderquarrymod/textures/blocks/enderquarry.png new file mode 100644 index 0000000000000000000000000000000000000000..8c20d64d913454c5fe533c6b7dcec9a29b9df792 GIT binary patch literal 3509 zcmV;m4NCHfP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0008uNklnSe+1Z@AMVW$&o0l; zF3<7*>od!Mw^En<699e}Q?}b5Z63_KS&tyiq*?V4%XOQTZfxN%08j@W5&)2~04R23EC5`$0|2Bp59VCA zc4G@6+gGNPz039iAY&Cf#V)2SrVOMYKvr_y`s&J*ik)8^)Q5~+)Q2(@Ff9xji+Vf< zz^0TbukWt>xVSy_qU3_ z$5%u(ZO8k~c)zKptt6K)q%CP1bdh2w8}y}p^;O0aCQ4QCl11HL?CW;3o(lFegP0cp zA$46fxtmbIr0w&Jpo@HfV%N?3i`&!t#|K32CJR8p{%xZTmjD45B?LhF&cLap* z7^0rL2|A#g^#F9UKIoz-A(;eZY-UH99qFpMzPq}AeBipx-9%T70MNz)c>n2(t{Po6 zK^OURCU+As$XNKbnzmfGx@xLv3xHx5B?N$|4+D_GFi|{0DHi?AP5=^%6KK0&B&4eb zy+#EG0Z{)PP6ip;Vh}*u0>g!4RWa6{)0X{>X zsUW~^YyrS^3#YCpsQ{8(%S{TB>vokfaLKE0vUGzF5T77ZOzNjg7Va3ZY3SqWHJ@Sw jHhn|&Wx#*@b^U7qlOA*>?n|?<00000NkvXXu0mjfvN3?# literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/enderquarrymod/textures/blocks/enderquarrytop.png b/src/main/resources/assets/enderquarrymod/textures/blocks/enderquarrytop.png new file mode 100644 index 0000000000000000000000000000000000000000..db5c560a952ee3a0adfa6f0f281e427b9920a05b GIT binary patch literal 801 zcmV++1K#|JP)N2bZe?^J zG%heMHD!e|WdHyIpGibPR7gv`mD`FFK@>&vVkUiwxksXmmkA^BK?W2V7|@3hMBl{k z@Wt=&r(M-6RCV{HB^k-UCUkby*{l1UzVue>%~|zWfSc`C^y|-WEcyt&=3?{+F5Pf;9f~w{S{!kcq0VllbL{Gy5Lv<{sDj%=`7!F@03f&D3(a-1bAMjrYozs8UXe~|1bcD zbD{Mrdm5U6SfwZVxav%0hVJJj&7nj9`<wT9g&VmgkhCz`=OHnSmBI{Qb$0DC`#@PF24>y zrn4l&Dh~QtaR8vjayeV-n5!Hh>J55`bpNu%ElU+wW0j}X2_QWJV*2{Sbv<3_AZBK} ztRkHf`=QeS(CY}`yi8a1bVa&Lq{kt9PEJ%O0kE8>4uHVuNLQ|s9sw`je*$2dP8zZR zmUY5wV75FJFn<0L*$1?Ps)`52d zs>C#8uAt7~?yRRHAFKNS`=QeS&~!p|I0yh=N7F@oz7*+PZcL9a7@s~Ts*?a%_2)o9 zVoc_B04YA_d@TUPDgmbHq#+}=@?p}602%4HdcpZXMF&~Mw6DK>w;wtQfaUda`8c7N z7S|#?j_HWbxP(awg`^+;WNP`zbb$KD%PO0B6yPLAED0C%4**|z0Q^?hzGU~4L5BE? z2E(!4K%>>=;%cMsfxS{hwTCRg0#yO_4E~aiOc$VNS%G}c0*}aI z1_r)^Ak4U9V)k30phSslL`iUdT1k0gQ7S`0VrE{6US4X6f{C7io@r{UQ7TZ)IZqeI zkO=p;(;T@DIqw9f4j|VL%zd5gN^MUuRUrh>18>42F+37sEHf`JIM8@rQQ$d_# zhXfjCACh3a6CuG=5GNS%G}c0*}aI z1_r);Ak6s6Y2yK)phSslL`iUdT1k0gQ7S`0VrE{6US4X6f{C7io@r{UQ7Qui;}1_4 z$B+p3x6=-09SRU|jn!VE&?FkNrAf5qpR@SiS$V%?|FXq$G&OOXH)Yqqnfm#|vCN8D zfl20Xo4q@B&Mdy~Gi%GI{afbEi$9eAs>OEwl$R5&63=^!$KAhYTw7D?Hnp_x4r5o> z-73AE%xBUz8_e}PoMOcJ_@hOS+hPL=9;f~H_iL{>>@c4L!FixiU(5&rQ6)(=YZq zM@q=;&j%iVoRPWzzWdv<-7CIU{blx(c+ip(ypF*r>)CXsB@a#!vhiaeRuN~hpi61lC;s|P%eYnQ!a(YOc53nL}Zpe_{p$N z@C3&kdspt|XAeC8{PXIz`9b+! z_AjBE3;KYveGQ+D7Ol%>F?uyQ>*2j^(TvBBFNeAL^}|nvOF%NW>eX~Y-j~_N zXs!f$#2)0vjXoBoD_#SQon#es?WZp|^!vD&|4j3{@!4yp+)CkZ=hu5Zm40D;qIv1! S%WHw@gu&C*&t;ucLK6T;ejua( literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/enderquarrymod/textures/blocks/upgradefortuneii.png b/src/main/resources/assets/enderquarrymod/textures/blocks/upgradefortuneii.png new file mode 100644 index 0000000000000000000000000000000000000000..11ddfb34678068afc6535dabcc2f42fd39b615df GIT binary patch literal 617 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzmUKs7M+SzC{oH>NS%G}c0*}aI z1_r);Ak6s6Y2yK)phSslL`iUdT1k0gQ7S`0VrE{6US4X6f{C7io@r{UQ7Qui<8x0J z$B+p3x6>|W9dZzGtqn71;s^`4$Q8!%MLNn$^Naki3)jCbW!=9>e(zJ2>c>~soz%EE zz3icqp?UGUb4QMx`+sTIu6>--Lyo))J5}Q6`X=w?k+*-7mwsR0@02U6T;8xO>A0Nt zJBG@6?Pt@3ue~mfSR0nOGp6llja=I1n~sHY@^$MTSH02^>(=r~W{|wy(trH%D&=(y z9v>bSNNmzseKo;Aqh|5N6%D>>lMUwjX+oO}X{04{TN_J}6iq=XRyE*THRXknWw^ zW!evZ+?b->(DSXfPAkUFZY9Y5-_EzRzPhN2bZe?^J zG%heMHD!e|WdHyI07*naR9HvtmcdE_Q51$lm2>EGo9_v1AS~9*uBT47 z+nt747(m8#!W)gov?HbfNbp*%<|>uSTve-8@2l7A9@cC&U8~ia!ug&}nF7eDoyUNo z=E3>od(KnWGy)mb_B?R>b)V_;&TI63c`2A2_nW5pW(x)HRJjM!ix)xV7z}fa7CRrT{XA@AFmR^6^Ps(+Fe? z|4f8XJ==A2#iX_i&h>1{6hOvx!l^@D(+Fgg)RA=^FBM=>v1O0Z!T{S+ip^Hcv`MAd cKfelvZNS%G}c0*}aI z1_r);Ak6s6Y2yK)phSslL`iUdT1k0gQ7S`0VrE{6US4X6f{C7io@r{UQ7Qui6Q`$( zV@QPi+i8wjOpXGsvDzyXngl~kngm~Rpgx%-3I=1%SR6ZTfH^gqe9+H=hQnn_=9 zSK4HgnzpjK>;FTS#$Nk3{o3i*(La3Wq?~^(^m3-f$$8V`_SDxrJF#!SlH6AIJm%1Y zd3U+-4544vgxb1!6VUAO3No_pN(+r3GD>+E^hnq%gi_dJ#A;F3D8OLzKdrm)qajA3)s zAI(r+x0+RH)ti+cs`m0lPHTNz7JZ;@fByu*BZkcuqDq?683nHvcPi_|7$@`w)E$|9 zHm&D%R%6GnqN$P|zDw9FoPP@Dn@Aag)U9RQv{7vp&jHpc@*k`A%01o{rI3{Mpu*-^ zqhr>AeYbPWK6?HXWLJ4=r0__USu9N8P1$aaBdHCWuQdQ&FikSyqm2w7Ylx%*$gEU{ z={-IbJRUZt4}i9Hd=9?CTfUYn^=33PNdKaDWz~D9g)Y?jeFda9Yr~D*f8&_T?=sKI z`j)pn*Mm1k%idwm>5d)i#5z_?%wq4p)v&-P=Cqtb-F2M}pJN_Lt*tQ>-0acX$R_Cj z2crx2=8`M8%3jNbNd3@-$Jf7~ dp{xHg+}!WYaBlU_XTXHR;OXk;vd$@?2>_FD6>INS%G}c0*}aI z1_r+UAk1jN8ms~olqhkHC<)F_D=AMbN@XZW%*-p%%S$a$Fwry6GfizZN@ZYR{OjrB z7!u+BcG|(LLk=RYo5Kv6ILsC#X+#rH2=>Rqk3OXJJ-xaWO4PbU8| z@$byL)!6M*Wc++z<>e(e|3BEVbMNHrRmZj+Hi`{0-6p%I@c)M!FJ3;iT(#cv3EzdS zH&zy(l3lP$>t^2eO*eB=_QrWfPTLftm%1@RM&#XLcKdmUKS!i*jWSKNV!m)gy~b>| zsr4f+20^=-J}T!wFP7>*e$jlcpYj?Fu9@eb^U7QgoTAOpyXFp4mTdE5@#}^1uXjZ` zC~v>pq_^_qun_K~h>rSQ% zGuS-*t(_g(A5{3U7XVF?RcPJ(Nn*jfy{y+613+f*6mYEDK36fQLh8U(CMm|_^OLxy z$EJOYx#!%WzzbDVv;F_AZvqUL3R=FffDEaNSd%+_I|FytgY}7WQw~W!So57>f0pK) zsm4bPEm$n#+#;?6&HCxN^}!k&+k$Bf?ff98tl0nj`JtDG^{;_^^!I#A+o!wd4yShB z_OqDh4)Xdp&f`{KjhgQ~;y+JjD$y-_CG(1>K=x&QzG literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/enderquarrymod/textures/blocks/upgradespeedi.png b/src/main/resources/assets/enderquarrymod/textures/blocks/upgradespeedi.png new file mode 100644 index 0000000000000000000000000000000000000000..41346f09660757550856177e263c284bddb48a29 GIT binary patch literal 631 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzmUKs7M+SzC{oH>NS%G}c0*}aI z1_r*pAk66gd%{|vphSslL`iUdT1k0gQ7S`0VrE{6US4X6f{C7io@r{UQ7Qui<5y1? z$B+p3x6=Z%4mpUp{tXLoWYJ!c!K%%1*V%s8tbZl4Hz&L<;MP-+*Go7hS@hVz=B#(; zzb(w-l6z+sKi}(_^u9i0&z^m)>8lRKwWn4s(Rx$*qWydS`Kb7#~Y~2-{qG%W}knaxG~~N!M^n1bqq#X&&4D%1sEa=?0(KG zSo1oou}AB-ZAIj?K(2|0XEHB$$~h(K;P!P7r{3K2&sT`}xi;{(AKtNUHLKC9f~}2< zFTV^qtZDz@V1j`8Q!a&MIfuoZeSOE1?^ZwfTW7xxWLhQzufB|^tKeyVnT?v^43eS_ zi*;kXn0G`eBu6p6wmbju)lR>?QOg;?_ONbvFz1s^1M7K^ymCRFEBCpz%NVqFv-&e{ z0BQc3v;9FPtH^<-=ZrDB69V`}T>HftEZ!!9e7o%ZXPI-2-Ve7ky-4_Ua@RVs6EptJ^vE}~yFVdQ&MBb@08W1ij{pDw literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/enderquarrymod/textures/blocks/upgradespeedii.png b/src/main/resources/assets/enderquarrymod/textures/blocks/upgradespeedii.png new file mode 100644 index 0000000000000000000000000000000000000000..cda704933b04ea22758757d1c2bf5989a0613502 GIT binary patch literal 636 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzmUKs7M+SzC{oH>NS%G}c0*}aI z1_r)8Aj~**Pmw23P@=>&q9iy!t)x7$D3zfgF*C13FE6!3!9>qM&os5wD3yVM@t3EI zV@QPi+i8wjha5!OmhP4caAXR*ut0Q;!WX{SFD7?Ou4_+;TNeJpb=Rv^=>f}Xoc~$0 zEU(nO=xhB!d2#)--_Q4YCcUrExO3-TtM{rSa&4(r%e~$tzG(m5e%#AH|9oKV*@@N; zmy>dzPqIExwwrhMS+zCSUvG$7d#Gq9k85Dd&zicBKYjf6*9&c5>xgx0`6M$)?r!l{ zo4iVC9fQY*j}VD1g@8Eb#Rki zXZB&m`qf;1KO55{#mt{_DJ0uAxCzVD*2jeJWxx0S`{P~f#7@j$yYS)A#pm8~r}<^T zMu|Es){XIE-Vvpc9L4zBZvEk_#dE8+`Z3;^qTSHLm2lAV=~o7^J#q)GGD$WTYeyC2 znX(4l)UA+e@ZHIDVnzCHR)6gUFa=+eHa@UoZc^s%Yxw`la>4dltm+|L&$mPuu*_)} ze7!45VR76_u{qn8dS^93i>8ev> z3)ZCvuVXMO<4l*m2J)n*=*z5oTHxScVR&F^ND}{Hqq)JV-_G~Py=Omp*qKM;#pHXy Pl)~WY>gTe~DWM4fT>lD7 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/enderquarrymod/textures/blocks/upgradespeediii.png b/src/main/resources/assets/enderquarrymod/textures/blocks/upgradespeediii.png new file mode 100644 index 0000000000000000000000000000000000000000..eb6512ed5cf1c90ca8518aed1bad9e21e8521cb3 GIT binary patch literal 638 zcmV-^0)hRBP)N2bZe?^J zG%heMHD!e|WdHyH{7FPXR9HvtmQiZLKomu#U#$TZM6iMptzZSAd+0}3)1NM*bT6e_ z=o-3(esvAXv}eeTLwK5(68&ihE|TPC&YkxriJkwUaeZ?e&Zz>sAC~EqDzN*Z3wQSq zr5<0NqS`t}?f`X@H9eNx0XCaWSg+S%wOWPcav2tjMVQTIAY!f~nkIRa<0wBSM!(r(6`=%Ig+ie&O2GKVfjUsF^nS|+dTEaQcqFe!F)XFU| z(jWk`;QVr)aLns!fs88qG5GUt7o`wYILE-L5Q}mJkWoFagG<@ZIh4Yw2=HF77w2`g zKt^q@CUA5SK1(>|2cBhFT$C$-jMV@db#Qd`^b)^SW9fV;Vri3rCk9ud)2V z5sPvKkWm3Nn!=?tfU5;ErWLTB^D10D*REIV6o5s!0?4QU7MxvP4Pe2m0bDJR5jc;c z1?N#y0F~W>rvX@$D}ao8w_EVE0t#Tks{vdskWn8N3$8sNII`df_^;jr`l?xQLZxta zy9GzUc^NUUs|7OZlWM_fOA0?0066VoQLX?orr+}_oDG-44+YT1V!Z07*qoM6N<$f>i4bpa1{> literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/enderquarrymod/textures/blocks/upgradevoid.png b/src/main/resources/assets/enderquarrymod/textures/blocks/upgradevoid.png new file mode 100644 index 0000000000000000000000000000000000000000..da756e71801eae0ea6850d3061d80c766ae768d7 GIT binary patch literal 692 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzmUKs7M+SzC{oH>NS%G}c0*}aI z1_r+UAk1jN8ms~olqhkHC<)F_D=AMbN@XZW%*-p%%S$a$Fwry6GfizZN@ZYRGV*kB z42f`mJIyzX$x)y+R(pj)lVFHRlVHmo#qK$3v*#$g3$X;|Kj7EmSj7ERNH*?aw)V2Q znyDp|O>9!q?p^u4D|^}TEB_xQ(3J!ys^&yS3@`)1rx|o_~I%E!Hg*rZ+uyY0$@q7X6+x88V)nac+zXeE8#NWsG}l zFn7k2O~x5UGdrGr-kGs6qGQ_Wr5RhJDt(s+bF%XsV(bLzNI7qM;9-G5riqlNMHtJ& zn>k^xW<@zD%j+@q98cEVcmI8T%g2iCw|^EhB)k`#cQPdt<8 literal 0 HcmV?d00001 diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info new file mode 100644 index 0000000..a9536cb --- /dev/null +++ b/src/main/resources/mcmod.info @@ -0,0 +1,16 @@ +[ +{ + "modid": "enderquarrymod", + "name": "Ender Quarry Mod", + "description": "Unofficial Ender Quarry port from ExU 1.7.10", + "version": "1.0.5", + "mcversion": "${mcversion}", + "url": "", + "updateUrl": "", + "authorList": ["Vlad"], + "credits": "RWTema, Vlad", + "logoFile": "", + "screenshots": [], + "dependencies": [] +} +] diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta new file mode 100644 index 0000000..39c473a --- /dev/null +++ b/src/main/resources/pack.mcmeta @@ -0,0 +1,7 @@ +{ + "pack": { + "description": "enderquarrymod resources", + "pack_format": 3, + "_comment": "A pack_format of 3 should be used starting with Minecraft 1.11. All resources, including language files, should be lowercase (eg: en_us.lang). A pack_format of 2 will load your mod resources with LegacyV2Adapter, which requires language files to have uppercase letters (eg: en_US.lang)." + } +}