Cleaned, fix workspace migration errors

This commit is contained in:
avlad171 2022-05-29 19:30:33 +03:00
parent c1d0c1638c
commit 8f13b28ebf
7 changed files with 15 additions and 77 deletions

@ -12,8 +12,8 @@ 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
version = "1.1.1"
group = "com.avlad171.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.

@ -1,3 +1,4 @@
# 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
org.gradle.daemon=false

@ -5,7 +5,6 @@ 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;

@ -24,76 +24,13 @@ public class 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.1.0";
public static final String VERSION = "1.1.1";
/*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)
{
InitBlocks.init();
/*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

@ -2,9 +2,7 @@ package com.myuki69.enderquarry;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraftforge.client.event.ModelRegistryEvent;

@ -51,7 +51,7 @@ public class TileEnderQuarry
public static int baseDrain = 1800;
public static float hardnessDrain = 200.0F;
public ArrayList<ItemStack> items = new ArrayList();
public ArrayList<ItemStack> items = new ArrayList<ItemStack>();
public FluidTank tank = new FluidTank(32000);
public EnergyStorage energy = new EnergyStorage(10000000);
public int neededEnergy = -1;
@ -363,7 +363,6 @@ public class TileEnderQuarry
if (!items.isEmpty() && config > 0)
{
int side_id = 0;
BlockPos thisBlockPos = this.getPos();
for (EnumFacing face : EnumFacing.values())
{
@ -395,9 +394,7 @@ public class TileEnderQuarry
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);
tank.drain(handler.fill(tank.getFluid(), true), true);
}
}
@ -457,8 +454,6 @@ public class TileEnderQuarry
return true;
}
//check for tile entities with inventory (chests etc) and extract their items
int meta = toBeMined.getMetaFromState(toBeMinedState);
float hardness = toBeMinedState.getBlockHardness(this.world, miningPos);
@ -499,6 +494,14 @@ public class TileEnderQuarry
{
boolean flag;
//check if item has inventory storage capability
//if so, extract items
TileEntity tile = this.world.getTileEntity(miningPos);
System.out.println("Tile at " + miningPos + ": " + tile);
if(tile != null && tile.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.UP))
{
System.out.println("Found inventory containing tile at " + miningPos);
}
Object i = new ArrayList();
if ((digType.isSilkTouch()) && (toBeMined.canSilkHarvest(this.world, miningPos, toBeMinedState, fakePlayer)))

@ -3,7 +3,7 @@
"modid": "enderquarrymod",
"name": "Ender Quarry Mod",
"description": "Unofficial Ender Quarry port from ExU 1.7.10",
"version": "1.0.5",
"version": "1.1.1",
"mcversion": "${mcversion}",
"url": "",
"updateUrl": "",