engine fixes
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
package com.drmangotea.tfmg.blocks.engines.small;
|
package com.drmangotea.tfmg.blocks.engines.small;
|
||||||
|
|
||||||
import com.drmangotea.createindustry.content.oil.exhaust.ExhaustBlock;
|
|
||||||
import com.drmangotea.createindustry.registry.CIFluids;
|
import com.drmangotea.tfmg.registry.TFMGFluids;
|
||||||
import com.simibubi.create.content.equipment.goggles.IHaveGoggleInformation;
|
import com.simibubi.create.content.equipment.goggles.IHaveGoggleInformation;
|
||||||
import com.simibubi.create.foundation.blockEntity.SmartBlockEntity;
|
import com.simibubi.create.foundation.blockEntity.SmartBlockEntity;
|
||||||
import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour;
|
import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour;
|
||||||
@@ -13,6 +13,7 @@ import net.minecraft.core.BlockPos;
|
|||||||
import net.minecraft.core.Direction;
|
import net.minecraft.core.Direction;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
|
import net.minecraft.world.level.block.DirectionalBlock;
|
||||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
@@ -133,7 +134,7 @@ import java.util.Optional;
|
|||||||
return new SmartFluidTank(1000, this::onFluidStackChanged){
|
return new SmartFluidTank(1000, this::onFluidStackChanged){
|
||||||
@Override
|
@Override
|
||||||
public boolean isFluidValid(FluidStack stack) {
|
public boolean isFluidValid(FluidStack stack) {
|
||||||
return stack.getFluid().isSame(CIFluids.CARBON_DIOXIDE.getSource());
|
return stack.getFluid().isSame(TFMGFluids.CARBON_DIOXIDE.getSource());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -142,7 +143,7 @@ import java.util.Optional;
|
|||||||
sendData();
|
sendData();
|
||||||
}
|
}
|
||||||
public BlockEntity getFrontPart(){
|
public BlockEntity getFrontPart(){
|
||||||
Direction direction = this.getBlockState().getValue(ExhaustBlock.FACING);
|
Direction direction = this.getBlockState().getValue(DirectionalBlock.FACING);
|
||||||
|
|
||||||
if(direction == Direction.UP)
|
if(direction == Direction.UP)
|
||||||
return level.getBlockEntity(this.getBlockPos().above());
|
return level.getBlockEntity(this.getBlockPos().above());
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
package com.drmangotea.tfmg.blocks.engines.small;
|
package com.drmangotea.tfmg.blocks.engines.small;
|
||||||
|
|
||||||
|
|
||||||
import com.drmangotea.createindustry.registry.CIShapes;
|
|
||||||
|
import com.drmangotea.tfmg.registry.TFMGShapes;
|
||||||
import com.simibubi.create.content.kinetics.base.DirectionalKineticBlock;
|
import com.simibubi.create.content.kinetics.base.DirectionalKineticBlock;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.Direction;
|
import net.minecraft.core.Direction;
|
||||||
@@ -34,9 +35,9 @@ abstract public class EngineBlock extends DirectionalKineticBlock {
|
|||||||
public VoxelShape getShape(BlockState pState, BlockGetter worldIn, BlockPos pos, CollisionContext context) {
|
public VoxelShape getShape(BlockState pState, BlockGetter worldIn, BlockPos pos, CollisionContext context) {
|
||||||
|
|
||||||
if(pState.getValue(FACING).getAxis()==Axis.Y) {
|
if(pState.getValue(FACING).getAxis()==Axis.Y) {
|
||||||
return CIShapes.ENGINE_VERTICAL.get(pState.getValue(FACING));
|
return TFMGShapes.ENGINE_VERTICAL.get(pState.getValue(FACING));
|
||||||
}else
|
}else
|
||||||
return CIShapes.ENGINE.get(pState.getValue(FACING));
|
return TFMGShapes.ENGINE.get(pState.getValue(FACING));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.drmangotea.tfmg.blocks.engines.small.gasoline;
|
package com.drmangotea.tfmg.blocks.engines.small.gasoline;
|
||||||
|
|
||||||
import com.drmangotea.createindustry.content.blocks.engines.EngineBlock;
|
|
||||||
|
import com.drmangotea.tfmg.blocks.engines.small.EngineBlock;
|
||||||
import com.simibubi.create.foundation.data.AssetLookup;
|
import com.simibubi.create.foundation.data.AssetLookup;
|
||||||
import com.simibubi.create.foundation.data.SpecialBlockStateGen;
|
import com.simibubi.create.foundation.data.SpecialBlockStateGen;
|
||||||
import com.tterrag.registrate.providers.DataGenContext;
|
import com.tterrag.registrate.providers.DataGenContext;
|
||||||
|
|||||||
Reference in New Issue
Block a user