mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +01:00
InitBlocks no longer has errors and all blocks contructors are now correct
This commit is contained in:
parent
6e0fb39544
commit
6139ca68fa
32 changed files with 450 additions and 453 deletions
|
@ -5,6 +5,7 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBreaker;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBreaker;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityPlacer;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityPlacer;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockDirectional;
|
import net.minecraft.block.BlockDirectional;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
|
@ -21,18 +22,19 @@ import net.minecraft.util.Mirror;
|
||||||
import net.minecraft.util.Rotation;
|
import net.minecraft.util.Rotation;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ToolType;
|
||||||
|
|
||||||
public class BlockBreaker extends BlockContainerBase {
|
public class BlockBreaker extends BlockContainerBase {
|
||||||
|
|
||||||
private final boolean isPlacer;
|
private final boolean isPlacer;
|
||||||
|
|
||||||
public BlockBreaker(boolean isPlacer, String name) {
|
public BlockBreaker(boolean isPlacer) {
|
||||||
super(Material.ROCK, name);
|
super(Block.Properties.create(Material.ROCK)
|
||||||
|
.hardnessAndResistance(1.5f, 10.0f)
|
||||||
|
.harvestTool(ToolType.PICKAXE)
|
||||||
|
.sound(SoundType.STONE));
|
||||||
|
|
||||||
this.isPlacer = isPlacer;
|
this.isPlacer = isPlacer;
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
|
||||||
this.setHardness(1.5F);
|
|
||||||
this.setResistance(10.0F);
|
|
||||||
this.setSoundType(SoundType.STONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -4,26 +4,25 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCanolaPress;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCanolaPress;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.EnumRarity;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.EnumFacing;
|
import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraft.util.EnumHand;
|
import net.minecraft.util.EnumHand;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ToolType;
|
||||||
|
|
||||||
public class BlockCanolaPress extends BlockContainerBase {
|
public class BlockCanolaPress extends BlockContainerBase {
|
||||||
|
|
||||||
public BlockCanolaPress(String name) {
|
public BlockCanolaPress() {
|
||||||
super(Material.ROCK, name);
|
super(Block.Properties.create(Material.ROCK)
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
.hardnessAndResistance(1.5f, 10.0f)
|
||||||
this.setHardness(1.5F);
|
.harvestTool(ToolType.PICKAXE)
|
||||||
this.setResistance(10.0F);
|
.sound(SoundType.STONE));
|
||||||
this.setSoundType(SoundType.STONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -54,9 +53,4 @@ public class BlockCanolaPress extends BlockContainerBase {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public EnumRarity getRarity(ItemStack stack) {
|
|
||||||
return EnumRarity.RARE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockHorizontal;
|
import net.minecraft.block.BlockHorizontal;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
|
@ -16,25 +15,24 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.EnumRarity;
|
import net.minecraft.item.EnumRarity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.EnumFacing;
|
|
||||||
import net.minecraft.util.EnumHand;
|
|
||||||
import net.minecraft.util.EnumParticleTypes;
|
|
||||||
import net.minecraft.util.Mirror;
|
import net.minecraft.util.Mirror;
|
||||||
import net.minecraft.util.Rotation;
|
import net.minecraft.util.Rotation;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ToolType;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BlockCoalGenerator extends BlockContainerBase {
|
public class BlockCoalGenerator extends BlockContainerBase {
|
||||||
|
|
||||||
public BlockCoalGenerator(String name) {
|
public BlockCoalGenerator() {
|
||||||
super(Material.ROCK, name);
|
super(Block.Properties.create(Material.ROCK)
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
.hardnessAndResistance(1.5f, 10.0f)
|
||||||
this.setHardness(1.5F);
|
.harvestTool(ToolType.PICKAXE)
|
||||||
this.setResistance(10.0F);
|
.sound(SoundType.STONE)
|
||||||
this.setSoundType(SoundType.STONE);
|
.tickRandomly());
|
||||||
this.setTickRandomly(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -4,6 +4,7 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoffeeMachine;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoffeeMachine;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockHorizontal;
|
import net.minecraft.block.BlockHorizontal;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
|
@ -23,17 +24,17 @@ import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ToolType;
|
||||||
|
|
||||||
public class BlockCoffeeMachine extends BlockContainerBase {
|
public class BlockCoffeeMachine extends BlockContainerBase {
|
||||||
|
|
||||||
private static final AxisAlignedBB AABB = new AxisAlignedBB(0.0625, 0, 0.0625, 1 - 0.0625, 1 - 0.0625 * 2, 1 - 0.0625);
|
private static final AxisAlignedBB AABB = new AxisAlignedBB(0.0625, 0, 0.0625, 1 - 0.0625, 1 - 0.0625 * 2, 1 - 0.0625);
|
||||||
|
|
||||||
public BlockCoffeeMachine(String name) {
|
public BlockCoffeeMachine() {
|
||||||
super(Material.ROCK, name);
|
super(Block.Properties.create(Material.ROCK)
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
.hardnessAndResistance(1.5f, 10.0f)
|
||||||
this.setHardness(1.5F);
|
.harvestTool(ToolType.PICKAXE)
|
||||||
this.setResistance(10.0F);
|
.sound(SoundType.STONE));
|
||||||
this.setSoundType(SoundType.STONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
|
|
||||||
|
import java.util.Properties;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||||
|
@ -25,21 +26,22 @@ import net.minecraft.util.NonNullList;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ToolType;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
public class BlockColoredLamp extends BlockBase {
|
public class BlockColoredLamp extends Block {
|
||||||
|
|
||||||
public static final TheColoredLampColors[] ALL_LAMP_TYPES = TheColoredLampColors.values();
|
public static final TheColoredLampColors[] ALL_LAMP_TYPES = TheColoredLampColors.values();
|
||||||
public static final PropertyEnum<TheColoredLampColors> TYPE = PropertyEnum.create("type", TheColoredLampColors.class);
|
public static final PropertyEnum<TheColoredLampColors> TYPE = PropertyEnum.create("type", TheColoredLampColors.class);
|
||||||
public final boolean isOn;
|
public final boolean isOn;
|
||||||
|
|
||||||
public BlockColoredLamp(boolean isOn, String name) {
|
public BlockColoredLamp(boolean isOn) {
|
||||||
super(Material.REDSTONE_LIGHT, name);
|
super(Block.Properties.create(Material.REDSTONE_LIGHT)
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
.hardnessAndResistance(0.5f, 3.0f)
|
||||||
this.setHardness(0.5F);
|
.harvestTool(ToolType.PICKAXE));
|
||||||
this.setResistance(3.0F);
|
|
||||||
this.isOn = isOn;
|
this.isOn = isOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import net.minecraft.state.IProperty;
|
|
||||||
import org.apache.commons.lang3.tuple.Pair;
|
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.api.recipe.CompostRecipe;
|
import de.ellpeck.actuallyadditions.api.recipe.CompostRecipe;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCompost;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCompost;
|
||||||
|
@ -12,9 +7,9 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
|
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.properties.IProperty;
|
|
||||||
import net.minecraft.block.state.BlockStateContainer;
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
@ -23,6 +18,7 @@ import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.EnumRarity;
|
import net.minecraft.item.EnumRarity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.state.IProperty;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.BlockRenderLayer;
|
import net.minecraft.util.BlockRenderLayer;
|
||||||
import net.minecraft.util.EnumFacing;
|
import net.minecraft.util.EnumFacing;
|
||||||
|
@ -33,11 +29,15 @@ import net.minecraft.util.math.RayTraceResult;
|
||||||
import net.minecraft.util.text.TextFormatting;
|
import net.minecraft.util.text.TextFormatting;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ToolType;
|
||||||
import net.minecraftforge.common.property.ExtendedBlockState;
|
import net.minecraftforge.common.property.ExtendedBlockState;
|
||||||
import net.minecraftforge.common.property.IExtendedBlockState;
|
import net.minecraftforge.common.property.IExtendedBlockState;
|
||||||
import net.minecraftforge.common.property.IUnlistedProperty;
|
import net.minecraftforge.common.property.IUnlistedProperty;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class BlockCompost extends BlockContainerBase implements IHudDisplay {
|
public class BlockCompost extends BlockContainerBase implements IHudDisplay {
|
||||||
|
|
||||||
|
@ -48,12 +48,11 @@ public class BlockCompost extends BlockContainerBase implements IHudDisplay {
|
||||||
protected static final AxisAlignedBB AABB_WALL_WEST = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.125D, 1.0D, 1.0D);
|
protected static final AxisAlignedBB AABB_WALL_WEST = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.125D, 1.0D, 1.0D);
|
||||||
private static final AxisAlignedBB AABB = new AxisAlignedBB(0.0625, 0, 0.0625, 1 - 0.0625, 11 * 0.0625, 1 - 0.0625);
|
private static final AxisAlignedBB AABB = new AxisAlignedBB(0.0625, 0, 0.0625, 1 - 0.0625, 11 * 0.0625, 1 - 0.0625);
|
||||||
|
|
||||||
public BlockCompost(String name) {
|
public BlockCompost() {
|
||||||
super(Material.WOOD, name);
|
super(Block.Properties.create(Material.WOOD)
|
||||||
this.setHarvestLevel("axe", 0);
|
.hardnessAndResistance(0.5f, 5.0f)
|
||||||
this.setHardness(0.5F);
|
.harvestTool(ToolType.AXE)
|
||||||
this.setResistance(5.0F);
|
.sound(SoundType.WOOD));
|
||||||
this.setSoundType(SoundType.WOOD);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -4,6 +4,7 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityDropper;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityDropper;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockDirectional;
|
import net.minecraft.block.BlockDirectional;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
|
@ -20,15 +21,15 @@ import net.minecraft.util.Mirror;
|
||||||
import net.minecraft.util.Rotation;
|
import net.minecraft.util.Rotation;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ToolType;
|
||||||
|
|
||||||
public class BlockDropper extends BlockContainerBase {
|
public class BlockDropper extends BlockContainerBase {
|
||||||
|
|
||||||
public BlockDropper(String name) {
|
public BlockDropper() {
|
||||||
super(Material.ROCK, name);
|
super(Block.Properties.create(Material.ROCK)
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
.hardnessAndResistance(1.5f, 10.0f)
|
||||||
this.setHardness(1.5F);
|
.harvestTool(ToolType.PICKAXE)
|
||||||
this.setResistance(10.0F);
|
.sound(SoundType.STONE));
|
||||||
this.setSoundType(SoundType.STONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -5,6 +5,7 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnergizer;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnergizer;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnervator;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnervator;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
@ -16,18 +17,19 @@ import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraft.util.EnumHand;
|
import net.minecraft.util.EnumHand;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ToolType;
|
||||||
|
|
||||||
public class BlockEnergizer extends BlockContainerBase {
|
public class BlockEnergizer extends BlockContainerBase {
|
||||||
|
|
||||||
private final boolean isEnergizer;
|
private final boolean isEnergizer;
|
||||||
|
|
||||||
public BlockEnergizer(boolean isEnergizer, String name) {
|
public BlockEnergizer(boolean isEnergizer) {
|
||||||
super(Material.ROCK, name);
|
super(Block.Properties.create(Material.ROCK)
|
||||||
|
.hardnessAndResistance(2.0f, 100f)
|
||||||
|
.harvestTool(ToolType.PICKAXE)
|
||||||
|
.sound(SoundType.STONE));
|
||||||
|
|
||||||
this.isEnergizer = isEnergizer;
|
this.isEnergizer = isEnergizer;
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
|
||||||
this.setHardness(2.0F);
|
|
||||||
this.setResistance(10.0F);
|
|
||||||
this.setSoundType(SoundType.STONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -4,6 +4,7 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFeeder;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFeeder;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
@ -15,15 +16,15 @@ import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraft.util.EnumHand;
|
import net.minecraft.util.EnumHand;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ToolType;
|
||||||
|
|
||||||
public class BlockFeeder extends BlockContainerBase {
|
public class BlockFeeder extends BlockContainerBase {
|
||||||
|
|
||||||
public BlockFeeder(String name) {
|
public BlockFeeder() {
|
||||||
super(Material.ROCK, name);
|
super(Block.Properties.create(Material.ROCK)
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
.hardnessAndResistance(0.5f, 6.0f)
|
||||||
this.setHardness(0.5F);
|
.harvestTool(ToolType.PICKAXE)
|
||||||
this.setResistance(6.0F);
|
.sound(SoundType.STONE));
|
||||||
this.setSoundType(SoundType.STONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -42,9 +43,4 @@ public class BlockFeeder extends BlockContainerBase {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public EnumRarity getRarity(ItemStack stack) {
|
|
||||||
return EnumRarity.UNCOMMON;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFermentingBarrel;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFermentingBarrel;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
@ -15,15 +16,15 @@ import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraft.util.EnumHand;
|
import net.minecraft.util.EnumHand;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ToolType;
|
||||||
|
|
||||||
public class BlockFermentingBarrel extends BlockContainerBase {
|
public class BlockFermentingBarrel extends BlockContainerBase {
|
||||||
|
|
||||||
public BlockFermentingBarrel(String name) {
|
public BlockFermentingBarrel() {
|
||||||
super(Material.WOOD, name);
|
super(Block.Properties.create(Material.WOOD)
|
||||||
this.setHarvestLevel("axe", 0);
|
.hardnessAndResistance(0.5f, 5.0f)
|
||||||
this.setHardness(0.5F);
|
.harvestTool(ToolType.AXE)
|
||||||
this.setResistance(5.0F);
|
.sound(SoundType.WOOD));
|
||||||
this.setSoundType(SoundType.WOOD);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -2,6 +2,7 @@ package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFishingNet;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFishingNet;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
@ -12,17 +13,17 @@ import net.minecraft.util.math.AxisAlignedBB;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ToolType;
|
||||||
|
|
||||||
public class BlockFishingNet extends BlockContainerBase {
|
public class BlockFishingNet extends BlockContainerBase {
|
||||||
|
|
||||||
private static final AxisAlignedBB AABB = new AxisAlignedBB(0, 0, 0, 1, 0.0625, 1);
|
private static final AxisAlignedBB AABB = new AxisAlignedBB(0, 0, 0, 1, 0.0625, 1);
|
||||||
|
|
||||||
public BlockFishingNet(String name) {
|
public BlockFishingNet() {
|
||||||
super(Material.WOOD, name);
|
super(Block.Properties.create(Material.WOOD)
|
||||||
this.setHarvestLevel("axe", 0);
|
.hardnessAndResistance(0.5f, 3.0f)
|
||||||
this.setHardness(0.5F);
|
.harvestTool(ToolType.AXE)
|
||||||
this.setResistance(3.0F);
|
.sound(SoundType.WOOD));
|
||||||
this.setSoundType(SoundType.WOOD);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -5,6 +5,7 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFluidCollector;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFluidCollector;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFluidPlacer;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFluidPlacer;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockDirectional;
|
import net.minecraft.block.BlockDirectional;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
|
@ -21,18 +22,19 @@ import net.minecraft.util.Mirror;
|
||||||
import net.minecraft.util.Rotation;
|
import net.minecraft.util.Rotation;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ToolType;
|
||||||
|
|
||||||
public class BlockFluidCollector extends BlockContainerBase {
|
public class BlockFluidCollector extends BlockContainerBase {
|
||||||
|
|
||||||
private final boolean isPlacer;
|
private final boolean isPlacer;
|
||||||
|
|
||||||
public BlockFluidCollector(boolean isPlacer, String name) {
|
public BlockFluidCollector(boolean isPlacer) {
|
||||||
super(Material.ROCK, name);
|
super(Block.Properties.create(Material.ROCK)
|
||||||
|
.hardnessAndResistance(1.5f, 10.0f)
|
||||||
|
.harvestTool(ToolType.PICKAXE)
|
||||||
|
.sound(SoundType.STONE));
|
||||||
|
|
||||||
this.isPlacer = isPlacer;
|
this.isPlacer = isPlacer;
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
|
||||||
this.setHardness(1.5F);
|
|
||||||
this.setResistance(10.0F);
|
|
||||||
this.setSoundType(SoundType.STONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase;
|
import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase;
|
||||||
|
@ -22,29 +19,28 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.EnumRarity;
|
import net.minecraft.item.EnumRarity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.EnumFacing;
|
import net.minecraft.util.*;
|
||||||
import net.minecraft.util.EnumHand;
|
|
||||||
import net.minecraft.util.EnumParticleTypes;
|
|
||||||
import net.minecraft.util.Mirror;
|
|
||||||
import net.minecraft.util.Rotation;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.text.TextFormatting;
|
import net.minecraft.util.text.TextFormatting;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ToolType;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BlockFurnaceDouble extends BlockContainerBase {
|
public class BlockFurnaceDouble extends BlockContainerBase {
|
||||||
|
|
||||||
public static final PropertyBool IS_ON = PropertyBool.create("on");
|
public static final PropertyBool IS_ON = PropertyBool.create("on");
|
||||||
|
|
||||||
public BlockFurnaceDouble(String name) {
|
public BlockFurnaceDouble() {
|
||||||
super(Material.ROCK, name);
|
super(Block.Properties.create(Material.ROCK)
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
.hardnessAndResistance(1.5f, 10.0f)
|
||||||
this.setHardness(1.5F);
|
.harvestTool(ToolType.PICKAXE)
|
||||||
this.setResistance(10.0F);
|
.sound(SoundType.STONE)
|
||||||
this.setSoundType(SoundType.STONE);
|
.tickRandomly());
|
||||||
this.setTickRandomly(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -2,6 +2,7 @@ package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFurnaceSolar;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFurnaceSolar;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
@ -12,17 +13,17 @@ import net.minecraft.util.math.AxisAlignedBB;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ToolType;
|
||||||
|
|
||||||
public class BlockFurnaceSolar extends BlockContainerBase {
|
public class BlockFurnaceSolar extends BlockContainerBase {
|
||||||
|
|
||||||
private static final AxisAlignedBB AABB = new AxisAlignedBB(0, 0, 0, 1, 6 * 0.0625, 1);
|
private static final AxisAlignedBB AABB = new AxisAlignedBB(0, 0, 0, 1, 6 * 0.0625, 1);
|
||||||
|
|
||||||
public BlockFurnaceSolar(String name) {
|
public BlockFurnaceSolar() {
|
||||||
super(Material.ROCK, name);
|
super(Block.Properties.create(Material.ROCK)
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
.hardnessAndResistance(1.5f, 10.0f)
|
||||||
this.setHardness(1.5F);
|
.harvestTool(ToolType.PICKAXE)
|
||||||
this.setResistance(10.0F);
|
.sound(SoundType.STONE));
|
||||||
this.setSoundType(SoundType.STONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,178 +1,178 @@
|
||||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
// todo: delete. I'm not allowed to port this one haha
|
||||||
|
//package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
import java.util.List;
|
//
|
||||||
|
//import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
//import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
//import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase;
|
//import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
||||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
//import de.ellpeck.actuallyadditions.mod.items.InitItems;
|
||||||
import de.ellpeck.actuallyadditions.mod.items.InitItems;
|
//import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChest;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChest;
|
//import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChestLarge;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChestLarge;
|
//import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChestMedium;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChestMedium;
|
//import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA;
|
//import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
|
//import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
//import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
//import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.Block;
|
//import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.SoundType;
|
//import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.material.Material;
|
//import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.block.state.IBlockState;
|
//import net.minecraft.client.util.ITooltipFlag;
|
||||||
import net.minecraft.client.util.ITooltipFlag;
|
//import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
//import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
//import net.minecraft.item.EnumRarity;
|
||||||
import net.minecraft.item.EnumRarity;
|
//import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.ItemStack;
|
//import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
//import net.minecraft.nbt.NBTTagList;
|
||||||
import net.minecraft.nbt.NBTTagList;
|
//import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
//import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraft.util.EnumFacing;
|
//import net.minecraft.util.EnumHand;
|
||||||
import net.minecraft.util.EnumHand;
|
//import net.minecraft.util.NonNullList;
|
||||||
import net.minecraft.util.NonNullList;
|
//import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.BlockPos;
|
//import net.minecraft.util.text.TextFormatting;
|
||||||
import net.minecraft.util.text.TextFormatting;
|
//import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.IBlockAccess;
|
//import net.minecraft.world.World;
|
||||||
import net.minecraft.world.World;
|
//import net.minecraftforge.common.ToolType;
|
||||||
import net.minecraftforge.items.IItemHandlerModifiable;
|
//import net.minecraftforge.items.IItemHandlerModifiable;
|
||||||
|
//
|
||||||
public class BlockGiantChest extends BlockContainerBase {
|
//import java.util.List;
|
||||||
|
//
|
||||||
public final int type;
|
//public class BlockGiantChest extends BlockContainerBase {
|
||||||
|
//
|
||||||
public BlockGiantChest(String name, int type) {
|
// public final int type;
|
||||||
super(Material.WOOD, name);
|
//
|
||||||
this.type = type;
|
// public BlockGiantChest(int type) {
|
||||||
|
// super(Block.Properties.create(Material.WOOD)
|
||||||
this.setHarvestLevel("axe", 0);
|
// .hardnessAndResistance(0.5f, 15.0f)
|
||||||
this.setHardness(0.5F);
|
// .harvestTool(ToolType.AXE)
|
||||||
this.setResistance(15.0F);
|
// .sound(SoundType.STONE));
|
||||||
this.setSoundType(SoundType.WOOD);
|
//
|
||||||
|
// this.type = type;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public TileEntity createNewTileEntity(World world, int par2) {
|
// public TileEntity createNewTileEntity(World world, int par2) {
|
||||||
switch (this.type) {
|
// switch (this.type) {
|
||||||
case 1:
|
// case 1:
|
||||||
return new TileEntityGiantChestMedium();
|
// return new TileEntityGiantChestMedium();
|
||||||
case 2:
|
// case 2:
|
||||||
return new TileEntityGiantChestLarge();
|
// return new TileEntityGiantChestLarge();
|
||||||
default:
|
// default:
|
||||||
return new TileEntityGiantChest();
|
// return new TileEntityGiantChest();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public boolean isFullCube(IBlockState state) {
|
// public boolean isFullCube(IBlockState state) {
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public boolean isOpaqueCube(IBlockState state) {
|
// public boolean isOpaqueCube(IBlockState state) {
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing par6, float par7, float par8, float par9) {
|
// public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing par6, float par7, float par8, float par9) {
|
||||||
if (!world.isRemote) {
|
// if (!world.isRemote) {
|
||||||
TileEntityGiantChest chest = (TileEntityGiantChest) world.getTileEntity(pos);
|
// TileEntityGiantChest chest = (TileEntityGiantChest) world.getTileEntity(pos);
|
||||||
if (chest != null) {
|
// if (chest != null) {
|
||||||
chest.fillWithLoot(player);
|
// chest.fillWithLoot(player);
|
||||||
player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.GIANT_CHEST.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
// player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.GIANT_CHEST.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||||
}
|
// }
|
||||||
return true;
|
// return true;
|
||||||
}
|
// }
|
||||||
return true;
|
// return true;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public EnumRarity getRarity(ItemStack stack) {
|
// public EnumRarity getRarity(ItemStack stack) {
|
||||||
return EnumRarity.EPIC;
|
// return EnumRarity.EPIC;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase entity, ItemStack stack) {
|
// public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase entity, ItemStack stack) {
|
||||||
if (stack.getTagCompound() != null) {
|
// if (stack.getTagCompound() != null) {
|
||||||
TileEntity tile = world.getTileEntity(pos);
|
// TileEntity tile = world.getTileEntity(pos);
|
||||||
if (tile instanceof TileEntityGiantChest) {
|
// if (tile instanceof TileEntityGiantChest) {
|
||||||
NBTTagList list = stack.getTagCompound().getTagList("Items", 10);
|
// NBTTagList list = stack.getTagCompound().getTagList("Items", 10);
|
||||||
IItemHandlerModifiable inv = ((TileEntityGiantChest) tile).inv;
|
// IItemHandlerModifiable inv = ((TileEntityGiantChest) tile).inv;
|
||||||
|
//
|
||||||
for (int i = 0; i < list.tagCount(); i++) {
|
// for (int i = 0; i < list.tagCount(); i++) {
|
||||||
NBTTagCompound compound = list.getCompoundTagAt(i);
|
// NBTTagCompound compound = list.getCompoundTagAt(i);
|
||||||
if (compound != null && compound.hasKey("id")) {
|
// if (compound != null && compound.hasKey("id")) {
|
||||||
inv.setStackInSlot(i, new ItemStack(list.getCompoundTagAt(i)));
|
// inv.setStackInSlot(i, new ItemStack(list.getCompoundTagAt(i)));
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
super.onBlockPlacedBy(world, pos, state, entity, stack);
|
// super.onBlockPlacedBy(world, pos, state, entity, stack);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void getDrops(NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
|
// public void getDrops(NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
|
||||||
super.getDrops(drops, world, pos, state, fortune);
|
// super.getDrops(drops, world, pos, state, fortune);
|
||||||
TileEntity tile = world.getTileEntity(pos);
|
// TileEntity tile = world.getTileEntity(pos);
|
||||||
if (tile instanceof TileEntityGiantChest) {
|
// if (tile instanceof TileEntityGiantChest) {
|
||||||
ItemStackHandlerAA slots = ((TileEntityGiantChest) tile).inv;
|
// ItemStackHandlerAA slots = ((TileEntityGiantChest) tile).inv;
|
||||||
int place = ItemUtil.getPlaceAt(slots.getItems(), new ItemStack(InitItems.itemCrateKeeper), false);
|
// int place = ItemUtil.getPlaceAt(slots.getItems(), new ItemStack(InitItems.itemCrateKeeper), false);
|
||||||
if (place >= 0) {
|
// if (place >= 0) {
|
||||||
NBTTagList list = new NBTTagList();
|
// NBTTagList list = new NBTTagList();
|
||||||
for (int i = 0; i < slots.getSlots(); i++) {
|
// for (int i = 0; i < slots.getSlots(); i++) {
|
||||||
//Destroy the keeper
|
// //Destroy the keeper
|
||||||
if (i != place) {
|
// if (i != place) {
|
||||||
NBTTagCompound compound = new NBTTagCompound();
|
// NBTTagCompound compound = new NBTTagCompound();
|
||||||
if (StackUtil.isValid(slots.getStackInSlot(i))) {
|
// if (StackUtil.isValid(slots.getStackInSlot(i))) {
|
||||||
slots.getStackInSlot(i).writeToNBT(compound);
|
// slots.getStackInSlot(i).writeToNBT(compound);
|
||||||
}
|
// }
|
||||||
list.appendTag(compound);
|
// list.appendTag(compound);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if (list.tagCount() > 0) {
|
// if (list.tagCount() > 0) {
|
||||||
ItemStack stackInQuestion = drops.get(0);
|
// ItemStack stackInQuestion = drops.get(0);
|
||||||
if (StackUtil.isValid(stackInQuestion)) {
|
// if (StackUtil.isValid(stackInQuestion)) {
|
||||||
if (stackInQuestion.getTagCompound() == null) {
|
// if (stackInQuestion.getTagCompound() == null) {
|
||||||
stackInQuestion.setTagCompound(new NBTTagCompound());
|
// stackInQuestion.setTagCompound(new NBTTagCompound());
|
||||||
}
|
// }
|
||||||
stackInQuestion.getTagCompound().setTag("Items", list);
|
// stackInQuestion.getTagCompound().setTag("Items", list);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public boolean shouldDropInventory(World world, BlockPos pos) {
|
// public boolean shouldDropInventory(World world, BlockPos pos) {
|
||||||
TileEntity tile = world.getTileEntity(pos);
|
// TileEntity tile = world.getTileEntity(pos);
|
||||||
return !(tile instanceof TileEntityGiantChest) || !ItemUtil.contains(((TileEntityGiantChest) tile).inv.getItems(), new ItemStack(InitItems.itemCrateKeeper), false);
|
// return !(tile instanceof TileEntityGiantChest) || !ItemUtil.contains(((TileEntityGiantChest) tile).inv.getItems(), new ItemStack(InitItems.itemCrateKeeper), false);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
protected ItemBlockBase getItemBlock() {
|
// protected ItemBlockBase getItemBlock() {
|
||||||
return new TheItemBlock(this);
|
// return new TheItemBlock(this);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public static class TheItemBlock extends ItemBlockBase {
|
// public static class TheItemBlock extends ItemBlockBase {
|
||||||
|
//
|
||||||
public TheItemBlock(Block block) {
|
// public TheItemBlock(Block block) {
|
||||||
super(block);
|
// super(block);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void addInformation(ItemStack stack, World playerIn, List<String> tooltip, ITooltipFlag advanced) {
|
// public void addInformation(ItemStack stack, World playerIn, List<String> tooltip, ITooltipFlag advanced) {
|
||||||
int type = this.block instanceof BlockGiantChest ? ((BlockGiantChest) this.block).type : -1;
|
// int type = this.block instanceof BlockGiantChest ? ((BlockGiantChest) this.block).type : -1;
|
||||||
if (type == 2) {
|
// if (type == 2) {
|
||||||
tooltip.add(TextFormatting.ITALIC + StringUtil.localize("container." + ActuallyAdditions.MODID + ".giantChestLarge.desc"));
|
// tooltip.add(TextFormatting.ITALIC + StringUtil.localize("container." + ActuallyAdditions.MODID + ".giantChestLarge.desc"));
|
||||||
} else if (type == 0) {
|
// } else if (type == 0) {
|
||||||
tooltip.add(TextFormatting.ITALIC + StringUtil.localize("container." + ActuallyAdditions.MODID + ".giantChest.desc"));
|
// tooltip.add(TextFormatting.ITALIC + StringUtil.localize("container." + ActuallyAdditions.MODID + ".giantChest.desc"));
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public NBTTagCompound getNBTShareTag(ItemStack stack) {
|
// public NBTTagCompound getNBTShareTag(ItemStack stack) {
|
||||||
return null;
|
// return null;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.tuple.Triple;
|
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.IGrowable;
|
import net.minecraft.block.IGrowable;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
|
@ -17,18 +12,21 @@ import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ToolType;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
import org.apache.commons.lang3.tuple.Triple;
|
||||||
|
|
||||||
public class BlockGreenhouseGlass extends BlockBase {
|
import java.util.Random;
|
||||||
|
|
||||||
public BlockGreenhouseGlass(String name) {
|
public class BlockGreenhouseGlass extends Block {
|
||||||
super(Material.GLASS, name);
|
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
public BlockGreenhouseGlass() {
|
||||||
this.setHardness(0.5F);
|
super(Block.Properties.create(Material.GLASS)
|
||||||
this.setResistance(10.0F);
|
.hardnessAndResistance(0.5f, 10.0f)
|
||||||
this.setSoundType(SoundType.GLASS);
|
.harvestTool(ToolType.PICKAXE)
|
||||||
this.setTickRandomly(true);
|
.sound(SoundType.GLASS)
|
||||||
|
.tickRandomly());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityGrinder;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityGrinder;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityGrinderDouble;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityGrinderDouble;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.state.BlockStateContainer;
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
|
@ -21,15 +20,22 @@ import net.minecraft.util.EnumParticleTypes;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ToolType;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BlockGrinder extends BlockContainerBase {
|
public class BlockGrinder extends BlockContainerBase {
|
||||||
|
|
||||||
private final boolean isDouble;
|
private final boolean isDouble;
|
||||||
|
|
||||||
public BlockGrinder(boolean isDouble, String name) {
|
public BlockGrinder(boolean isDouble) {
|
||||||
super(Material.ROCK, name);
|
super(Block.Properties.create(Material.ROCK)
|
||||||
|
.hardnessAndResistance(1.5f, 10.0f)
|
||||||
|
.harvestTool(ToolType.PICKAXE)
|
||||||
|
.sound(SoundType.STONE));
|
||||||
|
|
||||||
this.isDouble = isDouble;
|
this.isDouble = isDouble;
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
this.setHarvestLevel("pickaxe", 0);
|
||||||
this.setHardness(1.5F);
|
this.setHardness(1.5F);
|
||||||
|
|
|
@ -2,21 +2,22 @@ package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityHeatCollector;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityHeatCollector;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.item.EnumRarity;
|
import net.minecraft.item.EnumRarity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ToolType;
|
||||||
|
|
||||||
public class BlockHeatCollector extends BlockContainerBase {
|
public class BlockHeatCollector extends BlockContainerBase {
|
||||||
|
|
||||||
public BlockHeatCollector(String name) {
|
public BlockHeatCollector() {
|
||||||
super(Material.ROCK, name);
|
super(Block.Properties.create(Material.ROCK)
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
.hardnessAndResistance(2.5f, 10.0f)
|
||||||
this.setHardness(2.5F);
|
.harvestTool(ToolType.PICKAXE)
|
||||||
this.setResistance(10.0F);
|
.sound(SoundType.STONE));
|
||||||
this.setSoundType(SoundType.STONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase;
|
import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase;
|
||||||
|
@ -22,6 +20,9 @@ import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraft.util.EnumHand;
|
import net.minecraft.util.EnumHand;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ToolType;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BlockInputter extends BlockContainerBase {
|
public class BlockInputter extends BlockContainerBase {
|
||||||
|
|
||||||
|
@ -29,13 +30,13 @@ public class BlockInputter extends BlockContainerBase {
|
||||||
|
|
||||||
public final boolean isAdvanced;
|
public final boolean isAdvanced;
|
||||||
|
|
||||||
public BlockInputter(boolean isAdvanced, String name) {
|
public BlockInputter(boolean isAdvanced) {
|
||||||
super(Material.ROCK, name);
|
super(Block.Properties.create(Material.ROCK)
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
.hardnessAndResistance(1.5f, 10.0f)
|
||||||
this.setHardness(1.5F);
|
.harvestTool(ToolType.PICKAXE)
|
||||||
this.setResistance(10.0F);
|
.sound(SoundType.STONE)
|
||||||
this.setSoundType(SoundType.STONE);
|
.tickRandomly());
|
||||||
this.setTickRandomly(true);
|
|
||||||
this.isAdvanced = isAdvanced;
|
this.isAdvanced = isAdvanced;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemRepairer;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemRepairer;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
@ -16,16 +17,16 @@ import net.minecraft.util.EnumHand;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ToolType;
|
||||||
|
|
||||||
public class BlockItemRepairer extends BlockContainerBase {
|
public class BlockItemRepairer extends BlockContainerBase {
|
||||||
|
|
||||||
public BlockItemRepairer(String name) {
|
public BlockItemRepairer() {
|
||||||
super(Material.ROCK, name);
|
super(Block.Properties.create(Material.ROCK)
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
.hardnessAndResistance(20.0f, 15.0f)
|
||||||
this.setHardness(20.0F);
|
.harvestTool(ToolType.PICKAXE)
|
||||||
this.setResistance(15.0F);
|
.sound(SoundType.STONE)
|
||||||
this.setSoundType(SoundType.STONE);
|
.tickRandomly());
|
||||||
this.setTickRandomly(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase;
|
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
|
import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
@ -19,15 +16,18 @@ import net.minecraft.util.Mirror;
|
||||||
import net.minecraft.util.Rotation;
|
import net.minecraft.util.Rotation;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ToolType;
|
||||||
|
|
||||||
public class BlockLampPowerer extends BlockBase {
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public BlockLampPowerer(String name) {
|
public class BlockLampPowerer extends Block {
|
||||||
super(Material.ROCK, name);
|
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
public BlockLampPowerer() {
|
||||||
this.setHardness(1.5F);
|
super(Block.Properties.create(Material.REDSTONE_LIGHT)
|
||||||
this.setResistance(10.0F);
|
.hardnessAndResistance(1.5f, 10.0f)
|
||||||
this.setSoundType(SoundType.STONE);
|
.harvestTool(ToolType.PICKAXE)
|
||||||
|
.sound(SoundType.STONE));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -4,6 +4,7 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLavaFactoryController;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLavaFactoryController;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
@ -14,17 +15,17 @@ import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.math.RayTraceResult;
|
import net.minecraft.util.math.RayTraceResult;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ToolType;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class BlockLavaFactoryController extends BlockContainerBase implements IHudDisplay {
|
public class BlockLavaFactoryController extends BlockContainerBase implements IHudDisplay {
|
||||||
|
|
||||||
public BlockLavaFactoryController(String name) {
|
public BlockLavaFactoryController() {
|
||||||
super(Material.ROCK, name);
|
super(Block.Properties.create(Material.ROCK)
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
.hardnessAndResistance(4.5f, 20.0f)
|
||||||
this.setHardness(4.5F);
|
.harvestTool(ToolType.PICKAXE)
|
||||||
this.setResistance(20.0F);
|
.sound(SoundType.STONE));
|
||||||
this.setSoundType(SoundType.STONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -32,11 +33,6 @@ public class BlockLavaFactoryController extends BlockContainerBase implements IH
|
||||||
return new TileEntityLavaFactoryController();
|
return new TileEntityLavaFactoryController();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public EnumRarity getRarity(ItemStack stack) {
|
|
||||||
return EnumRarity.RARE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void displayHud(Minecraft minecraft, EntityPlayer player, ItemStack stack, RayTraceResult posHit, ScaledResolution resolution) {
|
public void displayHud(Minecraft minecraft, EntityPlayer player, ItemStack stack, RayTraceResult posHit, ScaledResolution resolution) {
|
||||||
|
|
|
@ -6,6 +6,7 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks;
|
import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.properties.PropertyEnum;
|
import net.minecraft.block.properties.PropertyEnum;
|
||||||
import net.minecraft.block.state.BlockStateContainer;
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
|
@ -14,17 +15,18 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.item.EnumRarity;
|
import net.minecraft.item.EnumRarity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.NonNullList;
|
import net.minecraft.util.NonNullList;
|
||||||
|
import net.minecraftforge.common.ToolType;
|
||||||
|
|
||||||
public class BlockMisc extends BlockBase {
|
public class BlockMisc extends Block {
|
||||||
|
|
||||||
public static final TheMiscBlocks[] ALL_MISC_BLOCKS = TheMiscBlocks.values();
|
public static final TheMiscBlocks[] ALL_MISC_BLOCKS = TheMiscBlocks.values();
|
||||||
public static final PropertyEnum<TheMiscBlocks> TYPE = PropertyEnum.create("type", TheMiscBlocks.class);
|
public static final PropertyEnum<TheMiscBlocks> TYPE = PropertyEnum.create("type", TheMiscBlocks.class);
|
||||||
|
|
||||||
public BlockMisc(String name) {
|
public BlockMisc() {
|
||||||
super(Material.ROCK, name);
|
super(Block.Properties.create(Material.ROCK)
|
||||||
this.setHardness(1.5F);
|
.hardnessAndResistance(1.5f, 10.0f)
|
||||||
this.setResistance(10.0F);
|
.harvestTool(ToolType.PICKAXE)
|
||||||
this.setHarvestLevel("pickaxe", 1);
|
.sound(SoundType.STONE));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityOilGenerator;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityOilGenerator;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockHorizontal;
|
import net.minecraft.block.BlockHorizontal;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
|
@ -16,25 +15,24 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.EnumRarity;
|
import net.minecraft.item.EnumRarity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.EnumFacing;
|
|
||||||
import net.minecraft.util.EnumHand;
|
|
||||||
import net.minecraft.util.EnumParticleTypes;
|
|
||||||
import net.minecraft.util.Mirror;
|
import net.minecraft.util.Mirror;
|
||||||
import net.minecraft.util.Rotation;
|
import net.minecraft.util.Rotation;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ToolType;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public class BlockOilGenerator extends BlockContainerBase {
|
public class BlockOilGenerator extends BlockContainerBase {
|
||||||
|
|
||||||
public BlockOilGenerator(String name) {
|
public BlockOilGenerator() {
|
||||||
super(Material.ROCK, name);
|
super(Block.Properties.create(Material.ROCK)
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
.hardnessAndResistance(1.5f, 10.0f)
|
||||||
this.setHardness(1.5F);
|
.harvestTool(ToolType.PICKAXE)
|
||||||
this.setResistance(10.0F);
|
.sound(SoundType.STONE)
|
||||||
this.setSoundType(SoundType.STONE);
|
.tickRandomly());
|
||||||
this.setTickRandomly(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -3,12 +3,7 @@ package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
import de.ellpeck.actuallyadditions.api.tile.IPhantomTile;
|
import de.ellpeck.actuallyadditions.api.tile.IPhantomTile;
|
||||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomBreaker;
|
import de.ellpeck.actuallyadditions.mod.tile.*;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomEnergyface;
|
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomItemface;
|
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomLiquiface;
|
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomPlacer;
|
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomRedstoneface;
|
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
|
@ -30,6 +25,7 @@ import net.minecraft.util.math.Vec3d;
|
||||||
import net.minecraft.util.text.TextFormatting;
|
import net.minecraft.util.text.TextFormatting;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ToolType;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
|
@ -37,13 +33,13 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay {
|
||||||
|
|
||||||
public final Type type;
|
public final Type type;
|
||||||
|
|
||||||
public BlockPhantom(Type type, String name) {
|
public BlockPhantom(Type type) {
|
||||||
super(Material.ROCK, name);
|
super(Block.Properties.create(Material.ROCK)
|
||||||
|
.hardnessAndResistance(4.5f, 10.0f)
|
||||||
|
.harvestTool(ToolType.PICKAXE)
|
||||||
|
.sound(SoundType.STONE));
|
||||||
|
|
||||||
this.type = type;
|
this.type = type;
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
|
||||||
this.setHardness(4.5F);
|
|
||||||
this.setResistance(10.0F);
|
|
||||||
this.setSoundType(SoundType.STONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -2,6 +2,7 @@ package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomBooster;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomBooster;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
@ -12,17 +13,17 @@ import net.minecraft.util.math.AxisAlignedBB;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ToolType;
|
||||||
|
|
||||||
public class BlockPhantomBooster extends BlockContainerBase {
|
public class BlockPhantomBooster extends BlockContainerBase {
|
||||||
|
|
||||||
private static final AxisAlignedBB AABB = new AxisAlignedBB(2 * 0.0625, 0, 2 * 0.0625, 1 - 2 * 0.0625, 1, 1 - 2 * 0.0625);
|
private static final AxisAlignedBB AABB = new AxisAlignedBB(2 * 0.0625, 0, 2 * 0.0625, 1 - 2 * 0.0625, 1, 1 - 2 * 0.0625);
|
||||||
|
|
||||||
public BlockPhantomBooster(String name) {
|
public BlockPhantomBooster() {
|
||||||
super(Material.ROCK, name);
|
super(Block.Properties.create(Material.ROCK)
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
.hardnessAndResistance(1.5f, 10.0f)
|
||||||
this.setHardness(1.5F);
|
.harvestTool(ToolType.PICKAXE)
|
||||||
this.setResistance(10.0F);
|
.sound(SoundType.STONE));
|
||||||
this.setSoundType(SoundType.STONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase;
|
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase;
|
import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockSlab;
|
import net.minecraft.block.BlockSlab;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.state.BlockStateContainer;
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
@ -21,6 +21,7 @@ import net.minecraft.util.math.AxisAlignedBB;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ToolType;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
|
@ -29,16 +30,18 @@ public class BlockSlabs extends Block {
|
||||||
public static final AxisAlignedBB AABB_BOTTOM_HALF = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.5D, 1.0D);
|
public static final AxisAlignedBB AABB_BOTTOM_HALF = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.5D, 1.0D);
|
||||||
private static final AxisAlignedBB AABB_TOP_HALF = new AxisAlignedBB(0.0D, 0.5D, 0.0D, 1.0D, 1.0D, 1.0D);
|
private static final AxisAlignedBB AABB_TOP_HALF = new AxisAlignedBB(0.0D, 0.5D, 0.0D, 1.0D, 1.0D, 1.0D);
|
||||||
|
|
||||||
private final IBlockState fullBlockState;
|
private final BlockState fullBlockState;
|
||||||
|
|
||||||
public BlockSlabs(String name, Block fullBlock) {
|
public BlockSlabs(Block fullBlock) {
|
||||||
this(name, fullBlock.getDefaultState());
|
this(fullBlock.getDefaultState());
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockSlabs(String name, BlockState fullBlockState) {
|
public BlockSlabs(BlockState fullBlockState) {
|
||||||
super(fullBlockState.getMaterial(), name);
|
super(Properties.create(fullBlockState.getMaterial())
|
||||||
this.setHardness(1.5F);
|
.harvestTool(fullBlockState.getHarvestTool())
|
||||||
this.setResistance(10.0F);
|
.hardnessAndResistance(1.5f, 10.0f)
|
||||||
|
.sound(fullBlockState.getSoundType()));
|
||||||
|
|
||||||
this.fullBlockState = fullBlockState;
|
this.fullBlockState = fullBlockState;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||||
import de.ellpeck.actuallyadditions.api.recipe.TreasureChestLoot;
|
import de.ellpeck.actuallyadditions.api.recipe.TreasureChestLoot;
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockHorizontal;
|
import net.minecraft.block.BlockHorizontal;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
|
@ -18,28 +16,24 @@ import net.minecraft.init.SoundEvents;
|
||||||
import net.minecraft.item.EnumRarity;
|
import net.minecraft.item.EnumRarity;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.EnumFacing;
|
import net.minecraft.util.*;
|
||||||
import net.minecraft.util.EnumHand;
|
|
||||||
import net.minecraft.util.EnumParticleTypes;
|
|
||||||
import net.minecraft.util.Mirror;
|
|
||||||
import net.minecraft.util.Rotation;
|
|
||||||
import net.minecraft.util.SoundCategory;
|
|
||||||
import net.minecraft.util.WeightedRandom;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ToolType;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class BlockTreasureChest extends BlockBase {
|
import java.util.Random;
|
||||||
|
|
||||||
public BlockTreasureChest(String name) {
|
public class BlockTreasureChest extends Block {
|
||||||
super(Material.WOOD, name);
|
|
||||||
this.setHarvestLevel("axe", 0);
|
public BlockTreasureChest() {
|
||||||
this.setHardness(300.0F);
|
super(Block.Properties.create(Material.WOOD)
|
||||||
this.setResistance(50.0F);
|
.hardnessAndResistance(300.0f, 50.0f)
|
||||||
this.setSoundType(SoundType.WOOD);
|
.harvestTool(ToolType.AXE)
|
||||||
this.setTickRandomly(true);
|
.sound(SoundType.WOOD)
|
||||||
|
.tickRandomly());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -4,6 +4,7 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockFenceGate;
|
import net.minecraft.block.BlockFenceGate;
|
||||||
import net.minecraft.block.BlockWall;
|
import net.minecraft.block.BlockWall;
|
||||||
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.state.BlockStateContainer;
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
@ -15,20 +16,22 @@ import net.minecraft.util.NonNullList;
|
||||||
import net.minecraft.util.math.AxisAlignedBB;
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
import net.minecraftforge.common.ToolType;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class BlockWallAA extends BlockBase {
|
public class BlockWallAA extends Block {
|
||||||
|
|
||||||
protected static final AxisAlignedBB[] AABB_BY_INDEX = new AxisAlignedBB[] { new AxisAlignedBB(0.25D, 0.0D, 0.25D, 0.75D, 1.0D, 0.75D), new AxisAlignedBB(0.25D, 0.0D, 0.25D, 0.75D, 1.0D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.25D, 0.75D, 1.0D, 0.75D), new AxisAlignedBB(0.0D, 0.0D, 0.25D, 0.75D, 1.0D, 1.0D), new AxisAlignedBB(0.25D, 0.0D, 0.0D, 0.75D, 1.0D, 0.75D), new AxisAlignedBB(0.3125D, 0.0D, 0.0D, 0.6875D, 0.875D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.75D, 1.0D, 0.75D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.75D, 1.0D, 1.0D), new AxisAlignedBB(0.25D, 0.0D, 0.25D, 1.0D, 1.0D, 0.75D), new AxisAlignedBB(0.25D, 0.0D, 0.25D, 1.0D, 1.0D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.3125D, 1.0D, 0.875D, 0.6875D), new AxisAlignedBB(0.0D, 0.0D, 0.25D, 1.0D, 1.0D, 1.0D), new AxisAlignedBB(0.25D, 0.0D, 0.0D, 1.0D, 1.0D, 0.75D), new AxisAlignedBB(0.25D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 0.75D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D) };
|
protected static final AxisAlignedBB[] AABB_BY_INDEX = new AxisAlignedBB[] { new AxisAlignedBB(0.25D, 0.0D, 0.25D, 0.75D, 1.0D, 0.75D), new AxisAlignedBB(0.25D, 0.0D, 0.25D, 0.75D, 1.0D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.25D, 0.75D, 1.0D, 0.75D), new AxisAlignedBB(0.0D, 0.0D, 0.25D, 0.75D, 1.0D, 1.0D), new AxisAlignedBB(0.25D, 0.0D, 0.0D, 0.75D, 1.0D, 0.75D), new AxisAlignedBB(0.3125D, 0.0D, 0.0D, 0.6875D, 0.875D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.75D, 1.0D, 0.75D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.75D, 1.0D, 1.0D), new AxisAlignedBB(0.25D, 0.0D, 0.25D, 1.0D, 1.0D, 0.75D), new AxisAlignedBB(0.25D, 0.0D, 0.25D, 1.0D, 1.0D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.3125D, 1.0D, 0.875D, 0.6875D), new AxisAlignedBB(0.0D, 0.0D, 0.25D, 1.0D, 1.0D, 1.0D), new AxisAlignedBB(0.25D, 0.0D, 0.0D, 1.0D, 1.0D, 0.75D), new AxisAlignedBB(0.25D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 0.75D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D) };
|
||||||
protected static final AxisAlignedBB[] CLIP_AABB_BY_INDEX = new AxisAlignedBB[] { AABB_BY_INDEX[0].setMaxY(1.5D), AABB_BY_INDEX[1].setMaxY(1.5D), AABB_BY_INDEX[2].setMaxY(1.5D), AABB_BY_INDEX[3].setMaxY(1.5D), AABB_BY_INDEX[4].setMaxY(1.5D), AABB_BY_INDEX[5].setMaxY(1.5D), AABB_BY_INDEX[6].setMaxY(1.5D), AABB_BY_INDEX[7].setMaxY(1.5D), AABB_BY_INDEX[8].setMaxY(1.5D), AABB_BY_INDEX[9].setMaxY(1.5D), AABB_BY_INDEX[10].setMaxY(1.5D), AABB_BY_INDEX[11].setMaxY(1.5D), AABB_BY_INDEX[12].setMaxY(1.5D), AABB_BY_INDEX[13].setMaxY(1.5D), AABB_BY_INDEX[14].setMaxY(1.5D), AABB_BY_INDEX[15].setMaxY(1.5D) };
|
protected static final AxisAlignedBB[] CLIP_AABB_BY_INDEX = new AxisAlignedBB[] { AABB_BY_INDEX[0].setMaxY(1.5D), AABB_BY_INDEX[1].setMaxY(1.5D), AABB_BY_INDEX[2].setMaxY(1.5D), AABB_BY_INDEX[3].setMaxY(1.5D), AABB_BY_INDEX[4].setMaxY(1.5D), AABB_BY_INDEX[5].setMaxY(1.5D), AABB_BY_INDEX[6].setMaxY(1.5D), AABB_BY_INDEX[7].setMaxY(1.5D), AABB_BY_INDEX[8].setMaxY(1.5D), AABB_BY_INDEX[9].setMaxY(1.5D), AABB_BY_INDEX[10].setMaxY(1.5D), AABB_BY_INDEX[11].setMaxY(1.5D), AABB_BY_INDEX[12].setMaxY(1.5D), AABB_BY_INDEX[13].setMaxY(1.5D), AABB_BY_INDEX[14].setMaxY(1.5D), AABB_BY_INDEX[15].setMaxY(1.5D) };
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public BlockWallAA(String name, Block blocc) {
|
public BlockWallAA(Block blocc) {
|
||||||
super(blocc.getDefaultState().getMaterial(), name);
|
super(Block.Properties.create(blocc.getDefaultState().getMaterial())
|
||||||
this.setHardness(1.5F);
|
.hardnessAndResistance(1.5f, 10.0f)
|
||||||
this.setResistance(10F);
|
.harvestTool(blocc.getDefaultState().getHarvestTool())
|
||||||
this.setSoundType(blocc.getSoundType());
|
.sound(blocc.getDefaultState().getSoundType()));
|
||||||
|
|
||||||
this.setDefaultState(this.blockState.getBaseState().withProperty(BlockWall.UP, false).withProperty(BlockWall.NORTH, false).withProperty(BlockWall.EAST, false).withProperty(BlockWall.SOUTH, false).withProperty(BlockWall.WEST, false));
|
this.setDefaultState(this.blockState.getBaseState().withProperty(BlockWall.UP, false).withProperty(BlockWall.NORTH, false).withProperty(BlockWall.EAST, false).withProperty(BlockWall.SOUTH, false).withProperty(BlockWall.WEST, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,9 +29,8 @@ public class BlockWildPlant extends BlockBushBase {
|
||||||
public static final TheWildPlants[] ALL_WILD_PLANTS = TheWildPlants.values();
|
public static final TheWildPlants[] ALL_WILD_PLANTS = TheWildPlants.values();
|
||||||
public static final PropertyEnum<TheWildPlants> TYPE = PropertyEnum.create("type", TheWildPlants.class);
|
public static final PropertyEnum<TheWildPlants> TYPE = PropertyEnum.create("type", TheWildPlants.class);
|
||||||
|
|
||||||
public BlockWildPlant(String name) {
|
public BlockWildPlant() {
|
||||||
super(name);
|
super(Properties.create(Material.PLANTS));
|
||||||
this.setSoundType(SoundType.PLANT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -127,16 +127,16 @@ public final class InitBlocks {
|
||||||
= BLOCKS.register("block_testifi_bucks_white_stairs", () -> new StairsBlock(() -> blockTestifiBucksWhiteWall.get().getDefaultState(), Block.Properties.create(Material.ROCK)));
|
= BLOCKS.register("block_testifi_bucks_white_stairs", () -> new StairsBlock(() -> blockTestifiBucksWhiteWall.get().getDefaultState(), Block.Properties.create(Material.ROCK)));
|
||||||
|
|
||||||
public static final RegistryObject<Block> blockTestifiBucksGreenSlab
|
public static final RegistryObject<Block> blockTestifiBucksGreenSlab
|
||||||
= BLOCKS.register("block_testifi_bucks_green_slab", () -> new BlockSlabs(blockTestifiBucksGreenWall);
|
= BLOCKS.register("block_testifi_bucks_green_slab", () -> new BlockSlabs(blockTestifiBucksGreenWall.get()));
|
||||||
|
|
||||||
public static final RegistryObject<Block> blockTestifiBucksWhiteSlab
|
public static final RegistryObject<Block> blockTestifiBucksWhiteSlab
|
||||||
= BLOCKS.register("block_testifi_bucks_white_slab", () -> new BlockSlabs(blockTestifiBucksWhiteWall);
|
= BLOCKS.register("block_testifi_bucks_white_slab", () -> new BlockSlabs(blockTestifiBucksWhiteWall.get()));
|
||||||
|
|
||||||
public static final RegistryObject<Block> blockTestifiBucksGreenFence
|
public static final RegistryObject<Block> blockTestifiBucksGreenFence
|
||||||
= BLOCKS.register("block_testifi_bucks_green_fence", () -> new BlockWallAA(blockTestifiBucksGreenWall);
|
= BLOCKS.register("block_testifi_bucks_green_fence", () -> new BlockWallAA(blockTestifiBucksGreenWall.get()));
|
||||||
|
|
||||||
public static final RegistryObject<Block> blockTestifiBucksWhiteFence
|
public static final RegistryObject<Block> blockTestifiBucksWhiteFence
|
||||||
= BLOCKS.register("block_testifi_bucks_white_fence", () -> new BlockWallAA(blockTestifiBucksWhiteWall);
|
= BLOCKS.register("block_testifi_bucks_white_fence", () -> new BlockWallAA(blockTestifiBucksWhiteWall.get()));
|
||||||
|
|
||||||
public static final RegistryObject<Block> blockColoredLamp
|
public static final RegistryObject<Block> blockColoredLamp
|
||||||
= BLOCKS.register("block_colored_lamp", () -> new BlockColoredLamp(false));
|
= BLOCKS.register("block_colored_lamp", () -> new BlockColoredLamp(false));
|
||||||
|
@ -210,14 +210,14 @@ public final class InitBlocks {
|
||||||
public static final RegistryObject<Block> blockFeeder
|
public static final RegistryObject<Block> blockFeeder
|
||||||
= BLOCKS.register("block_feeder", BlockFeeder::new);
|
= BLOCKS.register("block_feeder", BlockFeeder::new);
|
||||||
|
|
||||||
public static final RegistryObject<Block> blockGiantChest
|
// public static final RegistryObject<Block> blockGiantChest
|
||||||
= BLOCKS.register("block_giant_chest", BlockGiantChest::new);
|
// = BLOCKS.register("block_giant_chest", BlockGiantChest::new);
|
||||||
|
//
|
||||||
public static final RegistryObject<Block> blockGiantChestMedium
|
// public static final RegistryObject<Block> blockGiantChestMedium
|
||||||
= BLOCKS.register("block_giant_chest_medium", BlockGiantChest::new);
|
// = BLOCKS.register("block_giant_chest_medium", BlockGiantChest::new);
|
||||||
|
//
|
||||||
public static final RegistryObject<Block> blockGiantChestLarge
|
// public static final RegistryObject<Block> blockGiantChestLarge
|
||||||
= BLOCKS.register("block_giant_chest_large", BlockGiantChest::new);
|
// = BLOCKS.register("block_giant_chest_large", BlockGiantChest::new);
|
||||||
|
|
||||||
public static final RegistryObject<Block> blockGrinder
|
public static final RegistryObject<Block> blockGrinder
|
||||||
= BLOCKS.register("block_grinder", () -> new BlockGrinder(false));
|
= BLOCKS.register("block_grinder", () -> new BlockGrinder(false));
|
||||||
|
@ -274,31 +274,31 @@ public final class InitBlocks {
|
||||||
= BLOCKS.register("block_wild", BlockWildPlant::new);
|
= BLOCKS.register("block_wild", BlockWildPlant::new);
|
||||||
|
|
||||||
public static final RegistryObject<Block> blockQuartzWall
|
public static final RegistryObject<Block> blockQuartzWall
|
||||||
= BLOCKS.register("block_quartz_wall", () -> new BlockWallAA(blockMisc));
|
= BLOCKS.register("block_quartz_wall", () -> new BlockWallAA(blockMisc.get()));
|
||||||
|
|
||||||
public static final RegistryObject<Block> blockChiseledQuartzWall
|
public static final RegistryObject<Block> blockChiseledQuartzWall
|
||||||
= BLOCKS.register("block_chiseled_quartz_wall", () -> new BlockWallAA(blockMisc));
|
= BLOCKS.register("block_chiseled_quartz_wall", () -> new BlockWallAA(blockMisc.get()));
|
||||||
|
|
||||||
public static final RegistryObject<Block> blockPillarQuartzWall
|
public static final RegistryObject<Block> blockPillarQuartzWall
|
||||||
= BLOCKS.register("block_pillar_quartz_wall", () -> new BlockWallAA(blockMisc));
|
= BLOCKS.register("block_pillar_quartz_wall", () -> new BlockWallAA(blockMisc.get()));
|
||||||
|
|
||||||
public static final RegistryObject<Block> blockQuartzStair
|
public static final RegistryObject<Block> blockQuartzStair
|
||||||
= BLOCKS.register("block_quartz_stair", () -> new StairsBlock(blockMisc.get().getDefaultState().with(BlockMisc.TYPE, TheMiscBlocks.QUARTZ), Block.Properties.create(Material.ROCK)));
|
= BLOCKS.register("block_quartz_stair", () -> new StairsBlock(() -> blockMisc.get().getDefaultState().with(BlockMisc.TYPE, TheMiscBlocks.QUARTZ), Block.Properties.create(Material.ROCK)));
|
||||||
|
|
||||||
public static final RegistryObject<Block> blockChiseledQuartzStair
|
public static final RegistryObject<Block> blockChiseledQuartzStair
|
||||||
= BLOCKS.register("block_chiseled_quartz_stair", () -> new StairsBlock(blockMisc.get().getDefaultState().with(BlockMisc.TYPE, TheMiscBlocks.QUARTZ_CHISELED), Block.Properties.create(Material.ROCK)));
|
= BLOCKS.register("block_chiseled_quartz_stair", () -> new StairsBlock(() -> blockMisc.get().getDefaultState().with(BlockMisc.TYPE, TheMiscBlocks.QUARTZ_CHISELED), Block.Properties.create(Material.ROCK)));
|
||||||
|
|
||||||
public static final RegistryObject<Block> blockPillarQuartzStair
|
public static final RegistryObject<Block> blockPillarQuartzStair
|
||||||
= BLOCKS.register("block_pillar_quartz_stair", () -> new StairsBlock(blockMisc.get().getDefaultState().with(BlockMisc.TYPE, TheMiscBlocks.QUARTZ_PILLAR), Block.Properties.create(Material.ROCK)));
|
= BLOCKS.register("block_pillar_quartz_stair", () -> new StairsBlock(() -> blockMisc.get().getDefaultState().with(BlockMisc.TYPE, TheMiscBlocks.QUARTZ_PILLAR), Block.Properties.create(Material.ROCK)));
|
||||||
|
|
||||||
public static final RegistryObject<Block> blockQuartzSlab
|
public static final RegistryObject<Block> blockQuartzSlab
|
||||||
= BLOCKS.register("block_quartz_slab", () -> new BlockSlabs(blockMisc.get().getDefaultState().with(BlockMisc.TYPE, TheMiscBlocks.QUARTZ), Block.Properties.create(Material.ROCK)));
|
= BLOCKS.register("block_quartz_slab", () -> new BlockSlabs(blockMisc.get().getDefaultState().with(BlockMisc.TYPE, TheMiscBlocks.QUARTZ)));
|
||||||
|
|
||||||
public static final RegistryObject<Block> blockChiseledQuartzSlab
|
public static final RegistryObject<Block> blockChiseledQuartzSlab
|
||||||
= BLOCKS.register("block_chiseled_quartz_slab", () -> new BlockSlabs(blockMisc.get().getDefaultState().with(BlockMisc.TYPE, TheMiscBlocks.QUARTZ_CHISELED), Block.Properties.create(Material.ROCK)));
|
= BLOCKS.register("block_chiseled_quartz_slab", () -> new BlockSlabs(blockMisc.get().getDefaultState().with(BlockMisc.TYPE, TheMiscBlocks.QUARTZ_CHISELED)));
|
||||||
|
|
||||||
public static final RegistryObject<Block> blockPillarQuartzSlab
|
public static final RegistryObject<Block> blockPillarQuartzSlab
|
||||||
= BLOCKS.register("block_pillar_quartz_slab", () -> new BlockSlabs(blockMisc.get().getDefaultState().with(BlockMisc.TYPE, TheMiscBlocks.QUARTZ_PILLAR), Block.Properties.create(Material.ROCK)));
|
= BLOCKS.register("block_pillar_quartz_slab", () -> new BlockSlabs(blockMisc.get().getDefaultState().with(BlockMisc.TYPE, TheMiscBlocks.QUARTZ_PILLAR)));
|
||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
ActuallyAdditions.LOGGER.info("Initializing Blocks...");
|
ActuallyAdditions.LOGGER.info("Initializing Blocks...");
|
||||||
|
|
|
@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.blocks.base;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.CropsBlock;
|
import net.minecraft.block.CropsBlock;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
@ -32,17 +33,18 @@ import java.util.List;
|
||||||
public class BlockPlant extends CropsBlock {// implements ItemBlockBase.ICustomRarity, IHasModel {
|
public class BlockPlant extends CropsBlock {// implements ItemBlockBase.ICustomRarity, IHasModel {
|
||||||
|
|
||||||
// private final String name;
|
// private final String name;
|
||||||
private final int minDropAmount = 1;
|
private final int minDropAmount;
|
||||||
private final int addDropAmount = 1;
|
private final int addDropAmount;
|
||||||
public Item seedItem;
|
public Item seedItem;
|
||||||
private Item returnItem;
|
private Item returnItem;
|
||||||
private int returnMeta;
|
private int returnMeta;
|
||||||
|
|
||||||
public BlockPlant(Properties properties) {
|
// todo: find the correct properties for crops
|
||||||
super(properties);
|
public BlockPlant(int minDropAmount, int addDropAmount) {
|
||||||
|
super(Properties.create(Material.PLANTS));
|
||||||
// this.name = name;
|
// this.name = name;
|
||||||
// this.minDropAmount = minDropAmount;
|
this.minDropAmount = minDropAmount;
|
||||||
// this.addDropAmount = addDropAmount;
|
this.addDropAmount = addDropAmount;
|
||||||
// this.register();
|
// this.register();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue