finally make sense
This commit is contained in:
parent
f372551765
commit
97a89da849
|
@ -1,39 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2021 TeamMoeg
|
||||
*
|
||||
* This file is part of Steam Powered.
|
||||
*
|
||||
* Steam Powered 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, version 3.
|
||||
*
|
||||
* Steam Powered 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 Steam Powered. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.teammoeg.steampowered.client.render;
|
||||
|
||||
import com.simibubi.create.AllBlockPartials;
|
||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
||||
import com.simibubi.create.foundation.render.PartialBufferer;
|
||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
import com.teammoeg.steampowered.block.SPBlockPartials;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
|
||||
public class DynamoRenderer extends KineticTileEntityRenderer {
|
||||
|
||||
public DynamoRenderer(TileEntityRendererDispatcher dispatcher) {
|
||||
super(dispatcher);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SuperByteBuffer getRotatedModel(KineticTileEntity te) {
|
||||
return PartialBufferer.getFacing(AllBlockPartials.SHAFT_HALF, te.getBlockState());
|
||||
}
|
||||
}
|
|
@ -67,7 +67,7 @@ public class DynamoBlock extends DirectionalKineticBlock implements ITE<DynamoTi
|
|||
public static final BooleanProperty REDSTONE_LOCKED = BooleanProperty.create("redstone_locked");
|
||||
|
||||
public static final VoxelShaper DYNAMO_SHAPE = SPShapes
|
||||
.shape(0, 0, 0, 16, 3, 16)
|
||||
.shape(2, 0, 0, 14, 3, 15)
|
||||
.add(3, 3, 1, 13, 14, 12)
|
||||
.add(2, 3, 12, 14,15, 16)
|
||||
.forDirectional();
|
||||
|
|
|
@ -50,7 +50,7 @@ public class DynamoTileEntity extends KineticTileEntity {
|
|||
protected final InternalEnergyStorage energy;
|
||||
private LazyOptional<IEnergyStorage> lazyEnergy;
|
||||
private boolean redstoneLocked = false;
|
||||
|
||||
|
||||
public static final int MAX_FE_OUT = SPConfig.COMMON.dynamoFeMaxOut.get(); // FE Output
|
||||
public static final int FE_CAPACITY = SPConfig.COMMON.dynamoFeCapacity.get(); // FE Storage
|
||||
public static final int IMPACT = SPConfig.COMMON.dynamoImpact.get(); // Impact on network
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
package com.teammoeg.steampowered.content.alternator;
|
||||
|
||||
import com.jozufozu.flywheel.backend.material.MaterialManager;
|
||||
import com.simibubi.create.content.contraptions.base.HalfShaftInstance;
|
||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||
|
||||
import net.minecraft.state.properties.BlockStateProperties;
|
||||
import net.minecraft.util.Direction;
|
||||
|
||||
public class RevertHalfShaftInstance extends HalfShaftInstance {
|
||||
|
||||
public RevertHalfShaftInstance(MaterialManager<?> modelManager, KineticTileEntity tile) {
|
||||
super(modelManager, tile);
|
||||
}
|
||||
@Override
|
||||
protected Direction getShaftDirection() {
|
||||
return blockState.getValue(BlockStateProperties.FACING).getOpposite();
|
||||
}
|
||||
|
||||
}
|
|
@ -28,7 +28,6 @@ import com.teammoeg.steampowered.SteamPowered;
|
|||
import com.teammoeg.steampowered.client.instance.BronzeFlywheelInstance;
|
||||
import com.teammoeg.steampowered.client.instance.CastIronFlywheelInstance;
|
||||
import com.teammoeg.steampowered.client.instance.SteelFlywheelInstance;
|
||||
import com.teammoeg.steampowered.client.render.DynamoRenderer;
|
||||
import com.teammoeg.steampowered.client.render.BronzeFlywheelRenderer;
|
||||
import com.teammoeg.steampowered.client.render.CastIronFlywheelRenderer;
|
||||
import com.teammoeg.steampowered.client.render.SteelFlywheelRenderer;
|
||||
|
@ -102,9 +101,8 @@ public class SPTiles {
|
|||
|
||||
public static final TileEntityEntry<DynamoTileEntity> DYNAMO = REGISTRATE
|
||||
.tileEntity("alternator", DynamoTileEntity::new)
|
||||
.instance(() -> HalfShaftInstance::new)
|
||||
.instance(() -> com.teammoeg.steampowered.content.alternator.RevertHalfShaftInstance::new)
|
||||
.validBlocks(SPBlocks.DYNAMO)
|
||||
.renderer(() -> DynamoRenderer::new)
|
||||
.register();
|
||||
|
||||
public static final TileEntityEntry<FlywheelTileEntity> BRONZE_STEAM_FLYWHEEL = REGISTRATE
|
||||
|
|
Loading…
Reference in a new issue