2018-02-17 20:37:53 +01:00
|
|
|
/*
|
|
|
|
* This file is part of Industrial Wires.
|
2018-02-28 21:06:33 +01:00
|
|
|
* Copyright (C) 2016-2018 malte0811
|
2018-02-17 20:37:53 +01:00
|
|
|
* Industrial Wires is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
* Industrial Wires is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with Industrial Wires. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
package malte0811.industrialWires.converter;
|
|
|
|
|
|
|
|
import malte0811.industrialWires.IndustrialWires;
|
|
|
|
import malte0811.industrialWires.blocks.converter.MechanicalMBBlockType;
|
|
|
|
import malte0811.industrialWires.util.LocalSidedWorld;
|
|
|
|
import net.minecraft.nbt.NBTTagCompound;
|
|
|
|
import net.minecraft.util.ResourceLocation;
|
2018-04-04 20:47:44 +02:00
|
|
|
import net.minecraft.util.math.AxisAlignedBB;
|
2018-02-17 20:37:53 +01:00
|
|
|
import net.minecraft.util.math.BlockPos;
|
|
|
|
|
|
|
|
import static malte0811.industrialWires.blocks.converter.MechanicalMBBlockType.SHAFT_BASIC;
|
|
|
|
|
|
|
|
public class MechPartShaft extends MechMBPart {
|
2018-05-14 18:51:42 +02:00
|
|
|
{
|
|
|
|
original.put(BlockPos.ORIGIN, getDefaultShaft());
|
|
|
|
}
|
2018-02-17 20:37:53 +01:00
|
|
|
@Override
|
|
|
|
public void createMEnergy(MechEnergy e) {}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public double requestMEnergy(MechEnergy e) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void insertMEnergy(double added) {}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public double getInertia() {
|
|
|
|
return 5;//TODO
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2018-03-23 16:27:32 +01:00
|
|
|
public double getMaxSpeed() {
|
2018-02-17 20:37:53 +01:00
|
|
|
return Double.MAX_VALUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void writeToNBT(NBTTagCompound out) {}
|
|
|
|
|
|
|
|
@Override
|
2018-02-28 21:03:26 +01:00
|
|
|
public void readFromNBT(NBTTagCompound in) {}
|
2018-02-17 20:37:53 +01:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public ResourceLocation getRotatingBaseModel() {
|
|
|
|
return new ResourceLocation(IndustrialWires.MODID, "block/mech_mb/shaft.obj");
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean canForm(LocalSidedWorld world) {
|
2018-03-23 16:27:32 +01:00
|
|
|
return isValidDefaultCenter(world.getBlockState(BlockPos.ORIGIN));
|
2018-02-17 20:37:53 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2018-05-14 18:51:42 +02:00
|
|
|
public short getFormPattern(int offset) {
|
2018-02-17 20:37:53 +01:00
|
|
|
return 0b000_010_000;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2018-05-14 18:51:42 +02:00
|
|
|
public void breakOnFailure(MechEnergy energy) {
|
|
|
|
disassemble();
|
2018-02-17 20:37:53 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public MechanicalMBBlockType getType() {
|
|
|
|
return SHAFT_BASIC;
|
|
|
|
}
|
2018-04-04 20:47:44 +02:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public AxisAlignedBB getBoundingBox(BlockPos offsetPart) {
|
|
|
|
return new AxisAlignedBB(.375, .375, 0, .625, .625, 1);
|
|
|
|
}
|
2018-02-17 20:37:53 +01:00
|
|
|
}
|