This commit is contained in:
khj xiaogu 2021-10-27 01:22:52 +08:00
commit 7e8ff75665
No known key found for this signature in database
GPG key ID: DEA172814EAFF426
35 changed files with 628 additions and 511 deletions

View file

@ -18,7 +18,7 @@ apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'org.spongepowered.mixin'
group = 'com.teammoeg'
version = '1.16.5-1.1.0'
version = '1.16.5-1.1.1'
java {
archivesBaseName = 'steampowered'

View file

@ -48,7 +48,6 @@ public class SPConfig {
public final ForgeConfigSpec.IntValue steelBurnerHU;
public final ForgeConfigSpec.IntValue dynamoFeMaxIn;
public final ForgeConfigSpec.IntValue dynamoFeMaxOut;
public final ForgeConfigSpec.IntValue dynamoFeCapacity;
public final ForgeConfigSpec.IntValue dynamoImpact;
@ -114,7 +113,6 @@ public class SPConfig {
builder.push("dynamo").comment("If dynamo is disabled in the server config, the following will be ignored!");
{
dynamoFeMaxIn = builder.defineInRange("dynamoFeMaxIn", 0, 0, 8192);
dynamoFeMaxOut = builder.defineInRange("dynamoFeMaxOut", 256, 0, 8192);
dynamoFeCapacity = builder.defineInRange("dynamoFeCapacity", 2048, 0, 8192);
dynamoImpact = builder.defineInRange("dynamoImpact", 16, 0, 8192);
@ -136,7 +134,7 @@ public class SPConfig {
public final ForgeConfigSpec.BooleanValue allowUnverifiedContraption;
public final ForgeConfigSpec.BooleanValue allowCartAssembler;
public final ForgeConfigSpec.BooleanValue disableSteamPoweredDynamo;
public final ForgeConfigSpec.BooleanValue disableDynamo;
Server(ForgeConfigSpec.Builder builder) {
builder.push("createmodify");
@ -147,7 +145,21 @@ public class SPConfig {
builder.pop();
builder.push("dynamo");
{
disableSteamPoweredDynamo = builder.comment("Set to false to enable this mod's dynamo.").define("disableSteamPoweredDynamo", true);
disableDynamo = builder
.comment("Set to true to DISABLE the DynamoBlock ONLY when Create: Crafts & Additions is loaded")
.comment("Create: Crafts & Additions is a mod which provides a similar electricity generation device called Alternator")
.comment("For pack developers who think having two similar devices is superfluous, you have two choices:")
.comment("Either you can set this config option to true and remove the DynamoBlock recipe through datapack")
.comment("Or if you instead want to use our DynamoBlock, you can remove the Alternator's recipe through datapack")
.comment("How to make datapack? Learn it from here: https://minecraft.gamepedia.com/Data_Pack")
.comment("However, please refer to the following: ")
.comment("We offers a redstone lock mechanism so that you can disconnect the DynamoBlock with redstone signal")
.comment("We offers a different model which provides different textures according to redstone status")
.comment("Clarification: As of Ver 1.1.1, Create: Steam Powered's DynamoBlock ONLY adapts from")
.comment("the code implementation of the Alternator created by MRH0, which is under MIT License")
.comment("We acknowledge and appreciate the great work done by MRH0. We learn from his code")
.comment("MRH0 is also under our credits list in mods.toml description")
.define("disableDynamo", false);
}
builder.pop();
}

View file

@ -81,7 +81,7 @@ public class SteamPowered {
SPBlocks.register();
SPTiles.register();
SPItems.register();
BlockStressDefaults.setDefaultImpact(new ResourceLocation("create","gantry_shaft"),8.0);
BlockStressDefaults.setDefaultImpact(new ResourceLocation("create","gantry_shaft"),32.0);
ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, SPConfig.COMMON_CONFIG);
ModLoadingContext.get().registerConfig(ModConfig.Type.SERVER, SPConfig.SERVER_CONFIG);
PacketHandler.register();

View file

@ -40,6 +40,8 @@ public class SPBlockPartials {
public static final PartialModel STEEL_FLYWHEEL_UPPER_SLIDING = get("steel_flywheel/upper_sliding_connector");
public static final PartialModel STEEL_FLYWHEEL_LOWER_SLIDING = get("steel_flywheel/lower_sliding_connector");
public static final PartialModel DYNAMO_SHAFT = get("dynamo/shaft");
private static PartialModel get(String path) {
return new PartialModel(new ResourceLocation("steampowered", "block/" + path));
}

View file

@ -1,51 +0,0 @@
/**
* Available under MIT the license more info at: https://tldrlegal.com/license/mit-license
*
* MIT License
*
* Copyright 2021 MRH0
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction,
* including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom t
* he Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
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 net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
/**
* Adapted from: Create: Crafts & Additions
* @author MRH0
*/
public class AlternatorRenderer extends KineticTileEntityRenderer {
public AlternatorRenderer(TileEntityRendererDispatcher dispatcher) {
super(dispatcher);
}
@Override
protected SuperByteBuffer getRotatedModel(KineticTileEntity te) {
return PartialBufferer.getFacing(AllBlockPartials.SHAFT_HALF, te.getBlockState());
}
}

View file

@ -0,0 +1,39 @@
/*
* 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(SPBlockPartials.DYNAMO_SHAFT, te.getBlockState());
}
}

View file

@ -1,142 +0,0 @@
/**
* Available under MIT the license more info at: https://tldrlegal.com/license/mit-license
*
* MIT License
*
* Copyright 2021 MRH0
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction,
* including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom t
* he Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.teammoeg.steampowered.content.alternator;
import com.simibubi.create.content.contraptions.base.DirectionalKineticBlock;
import com.simibubi.create.content.contraptions.base.IRotate;
import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.utility.VoxelShaper;
import com.teammoeg.steampowered.SPConfig;
import com.teammoeg.steampowered.block.SPShapes;
import com.teammoeg.steampowered.registrate.SPTiles;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
import java.util.List;
/**
* Adapted from: Create: Crafts & Additions
* @author MRH0
*/
public class AlternatorBlock extends DirectionalKineticBlock implements ITE<AlternatorTileEntity>, IRotate {
public static final VoxelShaper ALTERNATOR_SHAPE = SPShapes.shape(0, 3, 0, 16, 13, 16).add(2, 0, 2, 14, 14, 14).forDirectional();
@Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
return ALTERNATOR_SHAPE.get(state.getValue(FACING));
}
@Override
public BlockState getStateForPlacement(BlockItemUseContext context) {
Direction preferred = getPreferredFacing(context);
if ((context.getPlayer() != null && context.getPlayer()
.isShiftKeyDown()) || preferred == null)
return super.getStateForPlacement(context);
return defaultBlockState().setValue(FACING, preferred);
}
public AlternatorBlock(Properties properties) {
super(properties);
}
@Override
public boolean hasShaftTowards(IWorldReader world, BlockPos pos, BlockState state, Direction face) {
return face == state.getValue(FACING);
}
@Override
public Axis getRotationAxis(BlockState state) {
return state.getValue(FACING)
.getAxis();
}
@Override
public Class<AlternatorTileEntity> getTileEntityClass() {
return AlternatorTileEntity.class;
}
@Override
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
return SPTiles.ALTERNATOR.create();
}
@Override
public SpeedLevel getMinimumRequiredSpeedLevel() {
return SpeedLevel.MEDIUM;
}
@Override
public void neighborChanged(BlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos, boolean isMoving) {
TileEntity tileentity = state.hasTileEntity() ? worldIn.getBlockEntity(pos) : null;
if (tileentity != null) {
if (tileentity instanceof AlternatorTileEntity) {
((AlternatorTileEntity) tileentity).updateCache();
}
}
}
@Override
public void fillItemCategory(ItemGroup group, NonNullList<ItemStack> itemStacks) {
if (SPConfig.SERVER.disableSteamPoweredDynamo.get()) {
// dynamo disabled
} else {
super.fillItemCategory(group, itemStacks);
}
}
@Override
public void appendHoverText(ItemStack i, IBlockReader w, List<ITextComponent> t, ITooltipFlag f) {
if (SPConfig.SERVER.disableSteamPoweredDynamo.get()) {
t.add(new StringTextComponent("Dynamo is disabled in the server config").withStyle(TextFormatting.RED));
} else {
t.add(new StringTextComponent("Dynamo adapted from the mod Create: Crafts & Additions. Credits: MRH0").withStyle(TextFormatting.RED));
t.add(new StringTextComponent("Codes and assets under MIT License").withStyle(TextFormatting.RED));
t.add(new TranslationTextComponent("block.steampowered.alternator.tooltip.summary").withStyle(TextFormatting.GRAY));
}
super.appendHoverText(i,w,t,f);
}
}

View file

@ -0,0 +1,168 @@
/*
* 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.content.alternator;
import com.simibubi.create.content.contraptions.base.DirectionalKineticBlock;
import com.simibubi.create.content.contraptions.base.IRotate;
import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.utility.VoxelShaper;
import com.teammoeg.steampowered.SPConfig;
import com.teammoeg.steampowered.block.SPShapes;
import com.teammoeg.steampowered.registrate.SPTiles;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.StateContainer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld;
import net.minecraftforge.fml.ModList;
import java.util.List;
import java.util.Random;
/**
* Adapted from: Create: Crafts & Additions
* @author MRH0
* @author yuesha-yc
*/
public class DynamoBlock extends DirectionalKineticBlock implements ITE<DynamoTileEntity>, IRotate {
public static final BooleanProperty REDSTONE_LOCKED = BooleanProperty.create("redstone_locked");
public static final VoxelShaper DYNAMO_SHAPE = SPShapes
.shape(0, 0, 0, 16, 3, 16)
.add(3, 3, 1, 13, 14, 12)
.add(2, 3, 12, 14,15, 16)
.forDirectional();
@Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
return DYNAMO_SHAPE.get(state.getValue(FACING).getOpposite());
}
@Override
public BlockState getStateForPlacement(BlockItemUseContext context) {
Direction preferred = getPreferredFacing(context);
if ((context.getPlayer() != null && context.getPlayer().isShiftKeyDown()) || preferred == null) {
return super.getStateForPlacement(context).setValue(REDSTONE_LOCKED, context.getLevel().hasNeighborSignal(context.getClickedPos()));
}
return defaultBlockState().setValue(FACING, preferred).setValue(REDSTONE_LOCKED, context.getLevel().hasNeighborSignal(context.getClickedPos()));
}
public DynamoBlock(Properties properties) {
super(properties);
this.registerDefaultState(this.stateDefinition.any().setValue(REDSTONE_LOCKED, false));
}
protected void createBlockStateDefinition(StateContainer.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder.add(REDSTONE_LOCKED));
}
@Override
public boolean hasShaftTowards(IWorldReader world, BlockPos pos, BlockState state, Direction face) {
return face == state.getValue(FACING).getOpposite();
}
@Override
public Axis getRotationAxis(BlockState state) {
return state.getValue(FACING)
.getAxis();
}
@Override
public Class<DynamoTileEntity> getTileEntityClass() {
return DynamoTileEntity.class;
}
@Override
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
return SPTiles.DYNAMO.create();
}
@Override
public SpeedLevel getMinimumRequiredSpeedLevel() {
return SpeedLevel.MEDIUM;
}
@Override
public void fillItemCategory(ItemGroup group, NonNullList<ItemStack> itemStacks) {
if (ModList.get().isLoaded("createaddition") && SPConfig.SERVER.disableDynamo.get()) {
// removes dynamo from creative tab when CC&A is loaded AND config is set to true
} else {
super.fillItemCategory(group, itemStacks);
}
}
@Override
public void appendHoverText(ItemStack i, IBlockReader w, List<ITextComponent> t, ITooltipFlag f) {
t.add(new StringTextComponent("We adapt and appreciate MRH0's code").withStyle(TextFormatting.GRAY));
if (ModList.get().isLoaded("createaddition")) {
if (SPConfig.SERVER.disableDynamo.get()) {
t.add(new StringTextComponent("Dynamo is disabled in [save]/serverconfig/steampowered-server.toml").withStyle(TextFormatting.RED));
}
}
super.appendHoverText(i,w,t,f);
}
@Override
public void neighborChanged(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean flag) {
if (!world.isClientSide) {
TileEntity tileentity = state.hasTileEntity() ? world.getBlockEntity(pos) : null;
if (tileentity != null) {
if (tileentity instanceof DynamoTileEntity) {
((DynamoTileEntity) tileentity).updateCache();
}
}
boolean isLocked = state.getValue(REDSTONE_LOCKED);
if (isLocked != world.hasNeighborSignal(pos)) {
if (isLocked) {
world.getBlockTicks().scheduleTick(pos, this, 4);
} else {
world.setBlock(pos, state.cycle(REDSTONE_LOCKED), 2);
}
}
}
}
@Override
public void tick(BlockState state, ServerWorld serverworld, BlockPos pos, Random random) {
if (state.getValue(REDSTONE_LOCKED) && !serverworld.hasNeighborSignal(pos)) {
serverworld.setBlock(pos, state.cycle(REDSTONE_LOCKED), 2);
}
}
}

View file

@ -1,28 +1,19 @@
/**
* Available under MIT the license more info at: https://tldrlegal.com/license/mit-license
/*
* Copyright (c) 2021 TeamMoeg
*
* MIT License
* This file is part of Steam Powered.
*
* Copyright 2021 MRH0
* 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.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction,
* including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom t
* he Software is furnished to do so, subject to the following conditions:
* 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.
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* 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.content.alternator;
@ -31,7 +22,6 @@ import com.simibubi.create.AllBlocks;
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
import com.simibubi.create.foundation.utility.Lang;
import com.teammoeg.steampowered.SPConfig;
import com.teammoeg.steampowered.SteamPowered;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.nbt.CompoundNBT;
@ -51,35 +41,39 @@ import net.minecraftforge.energy.IEnergyStorage;
import java.util.List;
/**
* Adapted from: Create: Crafts & Additions
* Adapted from: Create: Crafts & Additions under the MIT License
* @author MRH0
* @author yuesha-yc
*/
public class AlternatorTileEntity extends KineticTileEntity {
public class DynamoTileEntity extends KineticTileEntity {
protected final InternalEnergyStorage energy;
private LazyOptional<IEnergyStorage> lazyEnergy;
private boolean redstoneLocked = false;
private static final int
MAX_FE_IN = SPConfig.COMMON.dynamoFeMaxIn.get(),
MAX_FE_OUT = SPConfig.COMMON.dynamoFeMaxOut.get(), // FE Output
FE_CAPACITY = SPConfig.COMMON.dynamoFeCapacity.get(), // FE Storage
IMPACT = SPConfig.COMMON.dynamoImpact.get(); // Impact on network
private static final double
EFFICIENCY = SPConfig.COMMON.dynamoEfficiency.get();
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
public static final double EFFICIENCY = SPConfig.COMMON.dynamoEfficiency.get(); // Efficiency
public AlternatorTileEntity(TileEntityType<?> typeIn) {
public DynamoTileEntity(TileEntityType<?> typeIn) {
super(typeIn);
energy = new InternalEnergyStorage(FE_CAPACITY, MAX_FE_IN, MAX_FE_OUT);
energy = new InternalEnergyStorage(FE_CAPACITY, 0, MAX_FE_OUT);
lazyEnergy = LazyOptional.of(() -> energy);
}
@Override
public boolean addToGoggleTooltip(List<ITextComponent> tooltip, boolean isPlayerSneaking) {
tooltip.add(new StringTextComponent(spacing).append(new TranslationTextComponent(SteamPowered.MODID + ".tooltip.energy.production").withStyle(TextFormatting.GRAY)));
if (this.getBlockState().getValue(DynamoBlock.REDSTONE_LOCKED)) {
tooltip.add(new StringTextComponent(spacing).append(new TranslationTextComponent("tooltip.steampowered.dynamo.locked").withStyle(TextFormatting.RED)));
return true;
} else {
tooltip.add(new StringTextComponent(spacing).append(new TranslationTextComponent("tooltip.steampowered.energy.production").withStyle(TextFormatting.GRAY)));
tooltip.add(new StringTextComponent(spacing).append(new StringTextComponent(" " + format(getEnergyProductionRate((int) (isSpeedRequirementFulfilled() ? getSpeed() : 0))) + "fe/t ") // fix
.withStyle(TextFormatting.AQUA)).append(Lang.translate("gui.goggles.at_current_speed").withStyle(TextFormatting.DARK_GRAY)));
return super.addToGoggleTooltip(tooltip, isPlayerSneaking);
}
}
private static String format(int n) {
if (n > 1000000)
@ -91,9 +85,14 @@ public class AlternatorTileEntity extends KineticTileEntity {
@Override
public float calculateStressApplied() {
if (getBlockState().getValue(DynamoBlock.REDSTONE_LOCKED)) {
this.lastStressApplied = 0;
return 0;
} else {
this.lastStressApplied = IMPACT;
return IMPACT;
}
}
@Override
public <T> LazyOptional<T> getCapability(Capability<T> cap, Direction side) {
@ -107,19 +106,21 @@ public class AlternatorTileEntity extends KineticTileEntity {
}
public boolean isEnergyOutput(Direction side) {
return side != getBlockState().getValue(AlternatorBlock.FACING);
return side != getBlockState().getValue(DynamoBlock.FACING).getOpposite();
}
@Override
public void fromTag(BlockState state, CompoundNBT compound, boolean clientPacket) {
super.fromTag(state, compound, clientPacket);
energy.read(compound);
redstoneLocked = compound.getBoolean("redstonelocked");
}
@Override
public void write(CompoundNBT compound, boolean clientPacket) {
super.write(compound, clientPacket);
energy.write(compound);
compound.putBoolean("redstonelocked", redstoneLocked);
}
private boolean firstTickState = true;
@ -129,6 +130,10 @@ public class AlternatorTileEntity extends KineticTileEntity {
super.tick();
if (level != null && level.isClientSide())
return;
if (this.getBlockState().getValue(DynamoBlock.REDSTONE_LOCKED))
return;
if (firstTickState)
firstTick();
firstTickState = false;
@ -152,11 +157,6 @@ public class AlternatorTileEntity extends KineticTileEntity {
return (int) (Math.abs(rpm) * EFFICIENCY);
}
@Override
protected Block getStressConfigKey() {
return AllBlocks.MECHANICAL_MIXER.get();
}
@Override
public void setRemoved() {
super.setRemoved();
@ -167,8 +167,6 @@ public class AlternatorTileEntity extends KineticTileEntity {
updateCache();
}
;
public void updateCache() {
if (level.isClientSide())
return;

View file

@ -54,8 +54,8 @@ public class SPPonderIndex {
STEAM_HELPER.forComponents(SPBlocks.BRONZE_FLYWHEEL, SPBlocks.CAST_IRON_FLYWHEEL, SPBlocks.STEEL_FLYWHEEL)
.addStoryBoard("steam_engine", SPScenes::steamFlywheel, PonderTag.KINETIC_SOURCES, STEAM);
STEAM_HELPER.forComponents(SPBlocks.ALTERNATOR)
.addStoryBoard("alternator", SPScenes::alternator, PonderTag.KINETIC_APPLIANCES, STEAM);
STEAM_HELPER.forComponents(SPBlocks.DYNAMO)
.addStoryBoard("dynamo", SPScenes::dynamo, PonderTag.KINETIC_APPLIANCES, STEAM);
}
}

View file

@ -25,9 +25,13 @@ import com.simibubi.create.foundation.ponder.Selection;
import com.simibubi.create.foundation.ponder.content.PonderPalette;
import com.simibubi.create.foundation.ponder.elements.InputWindowElement;
import com.simibubi.create.foundation.utility.Pointing;
import com.teammoeg.steampowered.content.alternator.DynamoBlock;
import com.teammoeg.steampowered.content.burner.BurnerBlock;
import com.teammoeg.steampowered.content.engine.SteamEngineBlock;
import com.teammoeg.steampowered.registrate.SPBlocks;
import net.minecraft.block.LeverBlock;
import net.minecraft.block.RedstoneBlock;
import net.minecraft.block.RedstoneWireBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.util.Direction;
@ -194,37 +198,71 @@ public class SPScenes {
scene.overlay.showText(80).placeNearTarget().colored(PonderPalette.MEDIUM).pointAt(util.vector.topOf(enginePos.west())).text(text3);
}
public static void alternator(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("alternator", "Generating Electric energy using a Alternator");
public static void dynamo(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("dynamo", "Generating Electric energy using a Dynamo");
scene.configureBasePlate(1, 0, 4);
scene.world.showSection(util.select.layer(0), Direction.UP);
scene.idle(10);
scene.world.showSection(util.select.layer(1), Direction.UP);
scene.idle(10);
scene.world.showSection(util.select.layer(2), Direction.UP);
scene.idle(10);
BlockPos generator = util.grid.at(3, 1, 2);
BlockPos shaft = util.grid.at(2, 1, 2);
BlockPos gauge = util.grid.at(1, 1, 2);
BlockPos cogwheel = util.grid.at(0, 1, 2);
BlockPos largecog = util.grid.at(0, 2, 3);
BlockPos redstone = util.grid.at(3, 1, 1);
BlockPos lever = util.grid.at(3, 1, 0);
for (int i = 0; i < 6; i++) {
scene.world.setKineticSpeed(util.select.position(largecog), 16.0F);
scene.idle(5);
scene.world.setKineticSpeed(util.select.position(cogwheel), 32.0F);
scene.idle(5);
scene.world.setKineticSpeed(util.select.position(shaft), 32.0F);
scene.idle(5);
scene.world.setKineticSpeed(util.select.position(generator), 32.0F);
scene.idle(5);
scene.world.showSection(util.select.position(i, 1, 2), Direction.DOWN);
//scene.world.showSection(util.select.position(i, 2, 2), Direction.DOWN);
}
scene.idle(10);
scene.overlay.showText(50)
.text("The Alternator generates electric energy (fe) from rotational force")
.attachKeyFrame()
.text("The Dynamo generates electric energy (fe) from rotational force")
.placeNearTarget()
.pointAt(util.vector.topOf(generator));
scene.idle(60);
scene.effects.rotationSpeedIndicator(cogwheel);
scene.idle(60);
scene.overlay.showText(50)
.text("It requires at least 32 RPM to operate")
.placeNearTarget()
.pointAt(util.vector.topOf(generator));
.pointAt(util.vector.topOf(cogwheel));
scene.idle(60);
scene.overlay.showText(50)
.text("The Alternators energy production is determined by the input RPM")
.text("The Dynamos energy production is determined by the input RPM")
.placeNearTarget()
.pointAt(util.vector.topOf(generator));
scene.idle(60);
scene.overlay.showText(50)
.text("It has conversion efficiency of 75 Percent")
.placeNearTarget()
.pointAt(util.vector.topOf(generator));
scene.idle(60);
scene.overlay.showText(50)
.attachKeyFrame()
.text("You can lock the Dynamo with redstone signal so it will not apply stress to the network")
.placeNearTarget()
.pointAt(util.vector.centerOf(lever));
scene.idle(60);
scene.world.modifyBlock(lever, s -> s.setValue(LeverBlock.POWERED, true), false);
scene.world.modifyBlock(redstone, s -> s.setValue(RedstoneWireBlock.POWER, 15), false);
scene.world.modifyBlock(generator, s -> s.setValue(DynamoBlock.REDSTONE_LOCKED, true), false);
scene.idle(60);
}
}

View file

@ -31,7 +31,7 @@ import com.simibubi.create.foundation.data.SharedProperties;
import com.simibubi.create.repack.registrate.util.entry.BlockEntry;
import com.teammoeg.steampowered.SPConfig;
import com.teammoeg.steampowered.SteamPowered;
import com.teammoeg.steampowered.content.alternator.AlternatorBlock;
import com.teammoeg.steampowered.content.alternator.DynamoBlock;
import com.teammoeg.steampowered.content.boiler.CastIronBoilerBlock;
import com.teammoeg.steampowered.content.boiler.SteelBoilerBlock;
import com.teammoeg.steampowered.content.burner.CastIronBurnerBlock;
@ -172,7 +172,7 @@ public class SPBlocks {
.build()
.register();
public static final BlockEntry<AlternatorBlock> ALTERNATOR = REGISTRATE.block("alternator", AlternatorBlock::new)
public static final BlockEntry<DynamoBlock> DYNAMO = REGISTRATE.block("alternator", DynamoBlock::new)
.initialProperties(SPBlocks::hardMetal)
.transform(BlockStressDefaults.setImpact(4.0))
.tag(AllTags.AllBlockTags.SAFE_NBT.tag) //Dono what this tag means (contraption safe?).

View file

@ -28,12 +28,11 @@ 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.AlternatorRenderer;
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;
import com.teammoeg.steampowered.content.alternator.AlternatorTileEntity;
import com.teammoeg.steampowered.content.boiler.CastIronBoilerBlock;
import com.teammoeg.steampowered.content.alternator.DynamoTileEntity;
import com.teammoeg.steampowered.content.boiler.CastIronBoilerTileEntity;
import com.teammoeg.steampowered.content.boiler.SteelBoilerTileEntity;
import com.teammoeg.steampowered.content.burner.CastIronBurnerTileEntity;
@ -101,11 +100,11 @@ public class SPTiles {
.renderer(() -> KineticTileEntityRenderer::new)
.register();
public static final TileEntityEntry<AlternatorTileEntity> ALTERNATOR = REGISTRATE
.tileEntity("alternator", AlternatorTileEntity::new)
public static final TileEntityEntry<DynamoTileEntity> DYNAMO = REGISTRATE
.tileEntity("alternator", DynamoTileEntity::new)
.instance(() -> HalfShaftInstance::new)
.validBlocks(SPBlocks.ALTERNATOR)
.renderer(() -> AlternatorRenderer::new)
.validBlocks(SPBlocks.DYNAMO)
.renderer(() -> DynamoRenderer::new)
.register();
public static final TileEntityEntry<FlywheelTileEntity> BRONZE_STEAM_FLYWHEEL = REGISTRATE

View file

@ -4,10 +4,10 @@ license = "GPLv3"
issueTrackerURL = "https://github.com/TeamMoegMC/Steam-Powered/issues"
[[mods]] #mandatory
modId = "steampowered" #mandatory
version = "1.16.5-1.1.0" #mandatory
version = "1.16.5-1.1.1" #mandatory
displayName = "Create: Steam Powered" #mandatory
authors = "YueSha, khjxiaogu, goumo_g"
credits = "MRH0"
credits = "We appreciate MRH0 for his code on RPM-FE conversion logic which we adapted in Steam Powered"
description = '''
Expanding Create mod to the Steam Age
'''

View file

@ -1,27 +1,51 @@
{
"variants": {
"facing=down": {
"model": "steampowered:block/alternator/block",
"facing=down,redstone_locked=false": {
"model": "steampowered:block/dynamo/block",
"x": 270, "y": 90
},
"facing=up": {
"model": "steampowered:block/alternator/block",
"facing=up,redstone_locked=false": {
"model": "steampowered:block/dynamo/block",
"x": 90, "y": 90
},
"facing=north": {
"model": "steampowered:block/alternator/block",
"facing=north,redstone_locked=false": {
"model": "steampowered:block/dynamo/block",
"y": 180
},
"facing=south": {
"model": "steampowered:block/alternator/block",
"facing=south,redstone_locked=false": {
"model": "steampowered:block/dynamo/block",
"y": 0
},
"facing=west": {
"model": "steampowered:block/alternator/block",
"facing=west,redstone_locked=false": {
"model": "steampowered:block/dynamo/block",
"y": 90
},
"facing=east": {
"model": "steampowered:block/alternator/block",
"facing=east,redstone_locked=false": {
"model": "steampowered:block/dynamo/block",
"y": 270
},
"facing=down,redstone_locked=true": {
"model": "steampowered:block/dynamo/block_locked",
"x": 270, "y": 90
},
"facing=up,redstone_locked=true": {
"model": "steampowered:block/dynamo/block_locked",
"x": 90, "y": 90
},
"facing=north,redstone_locked=true": {
"model": "steampowered:block/dynamo/block_locked",
"y": 180
},
"facing=south,redstone_locked=true": {
"model": "steampowered:block/dynamo/block_locked",
"y": 0
},
"facing=west,redstone_locked=true": {
"model": "steampowered:block/dynamo/block_locked",
"y": 90
},
"facing=east,redstone_locked=true": {
"model": "steampowered:block/dynamo/block_locked",
"y": 270
}
}

View file

@ -36,24 +36,19 @@
"steampowered.ponder.flywheel.text_2": "The provided Rotational Force has a very large stress capacity",
"steampowered.ponder.flywheel.text_3": "Using Flywheels made of Steel or Cast Iron will increase efficiency and generated capacity of the Flywheel",
"steampowered.tooltip.energy.production": "Energy Generated:",
"tooltip.steampowered.energy.production": "Energy Generated:",
"tooltip.steampowered.steam_engine.not_enough_steam": "Status: Not Enough Steam",
"tooltip.steampowered.steam_engine.running": "Status: Running",
"tooltip.steampowered.dynamo.locked": "Status: Redstone Locked",
"item.steampowered.multimeter": "Multimeter",
"item.steampowered.multimeter.title":"[Multimeter]:",
"item.steampowered.multimeter.measuring":"[Measuring..]",
"item.steampowered.multimeter.ticks":"ticks",
"item.steampowered.multimeter.no_capability":"No Forge Energy capability on this side.",
"item.steampowered.multimeter.tooltip.summary": "Measures capacity and input/output on any side with a Forge Energy capability.",
"block.steampowered.alternator": "Alternating Dynamo",
"block.steampowered.alternator": "Dynamo",
"block.steampowered.alternator.tooltip.summary": "Generates FE from SU. The amount of energy produced is based on RPM.",
"steampowered.ponder.alternator.header": "Generating Electric energy using an Alternator",
"steampowered.ponder.alternator.text_1": "The Alternator requires at least 32 RPM to operate",
"steampowered.ponder.alternator.text_2": "It generates electric energy (FE) from rotational force",
"steampowered.ponder.alternator.text_3": "It's energy production is determined by the input RPM",
"steampowered.ponder.dynamo.header": "Generating Electric energy using a Dynamo",
"steampowered.ponder.dynamo.text_1": "The Dynamo generates electric energy (FE) from rotational force",
"steampowered.ponder.dynamo.text_2": "It requires at least 32 RPM to operate",
"steampowered.ponder.dynamo.text_3": "It's energy production is determined by the input RPM",
"steampowered.ponder.dynamo.text_4": "It has conversion efficiency of 75 Percent",
"steampowered.ponder.dynamo.text_5": "You can lock the Dynamo with redstone signal so it will not apply stress to the network",
"steampowered.ponder.tag.steam": "Steam",
"steampowered.ponder.tag.steam.description": "Components related to steam production and usage",

View file

@ -36,32 +36,38 @@
"steampowered.ponder.flywheel.text_2": "生成される回転力は非常に大きな応力容量を持っています",
"steampowered.ponder.flywheel.text_3": "鋼鉄や鋳鉄の勢車を使うと、勢車の効率や生成される応力容量が向上します",
"steampowered.tooltip.energy.production": "エネルギー生成量:",
"tooltip.steampowered.energy.production": "エネルギー生成量:",
"tooltip.steampowered.steam_engine.not_enough_steam": "状態: 蒸気不足",
"tooltip.steampowered.steam_engine.running": "状態: 稼働中",
"tooltip.steampowered.dynamo.locked": "Status: Redstone Locked",
"item.steampowered.multimeter": "マルチメーター",
"item.steampowered.multimeter.title":"[マルチメーター]:",
"item.steampowered.multimeter.measuring":"[計測中..]",
"item.steampowered.multimeter.ticks":"ticks",
"item.steampowered.multimeter.no_capability":"この面にはForge Energyの機能はありません",
"item.steampowered.multimeter.tooltip.summary": "_Forge Energy機能_を持つ任意の面の_容量と_入出力_を計測します",
"block.steampowered.alternator": "オルタネーター Dynamo",
"block.steampowered.alternator": "オルタネーター",
"block.steampowered.alternator.tooltip.summary": "_su_から_FE_を発電します。発電量は_rpm_で決まります",
"steampowered.ponder.alternator.header": "オルタネーターによる発電",
"steampowered.ponder.alternator.text_1": "オルタネーターの動作には最低でも32RPMが必要です",
"steampowered.ponder.alternator.text_2": "回転力で電気(FE)を発電します",
"steampowered.ponder.alternator.text_3": "発電量は供給される_RPM_(回転速度)で決まります",
"steampowered.ponder.dynamo.header": "オルタネーターによる発電",
"steampowered.ponder.dynamo.text_1": "回転力で電気(FE)を発電します",
"steampowered.ponder.dynamo.text_2": "オルタネーターの動作には最低でも32RPMが必要です",
"steampowered.ponder.dynamo.text_3": "発電量は供給される_RPM_(回転速度)で決まります",
"steampowered.ponder.dynamo.text_4": "It has conversion efficiency of 75 Percent",
"steampowered.ponder.dynamo.text_5": "You can lock the Dynamo with redstone signal so it will not apply stress to the network",
"steampowered.ponder.tag.steam": "蒸気",
"steampowered.ponder.tag.steam.description": "蒸気を生成・利用する機械",
"tooltip.steampowered.burner.hu": "Heat Remaining: %s HU",
"tooltip.steampowered.burner.item": "Fuel Remaining: %s x %s",
"tooltip.steampowered.burner.huproduce": "Generates %s HU/t",
"tooltip.steampowered.burner.danger": "Caution! Standing on when burning causes damage!",
"tooltip.steampowered.boiler.huconsume": "Maximum Heat Intake %s HU/t",
"tooltip.steampowered.boiler.waterconsume": "Requires Water %s mb/t",
"tooltip.steampowered.boiler.steamproduce": "Maximum Steam Output %s mb/t",
"tooltip.steampowered.boiler.danger": "Caution! Standing on when working causes damage!",
"steampowered.ponder.boiler.header": "Generating Steam through Boilers and Burning Chambers",
"steampowered.ponder.boiler.text_1": "The Boiler needs water to produce Steam",
"steampowered.ponder.boiler.text_2": "The Burning Chamber needs furnace fuel to heat the Boiler",
"steampowered.ponder.boiler.text_3": "Right click with fuel item such as Coal or Planks to provide it with fuel",
"steampowered.ponder.boiler.text_4": "Right click with empty hand to take out the remaining fuel",
"steampowered.ponder.boiler.text_5": "Pump the steam out of the boiler to power the Steam Engines"
"steampowered.ponder.boiler.text_5": "Pump the steam out of the boiler to power the Steam Engines",
"tooltip.steampowered.dynamo.redstone_locked": "状態: Redstone Locked"
}

View file

@ -36,24 +36,19 @@
"steampowered.ponder.flywheel.text_2": "如此产生的旋转力具有非常大的应力值",
"steampowered.ponder.flywheel.text_3": "使用钢或者铸铁制作的的蒸汽飞轮会使得飞轮效率和产能提升",
"steampowered.tooltip.energy.production": "已产生的能量:",
"tooltip.steampowered.energy.production": "已产生的能量:",
"tooltip.steampowered.steam_engine.not_enough_steam": "状态:蒸汽不足",
"tooltip.steampowered.steam_engine.running": "状态:工作中",
"tooltip.steampowered.dynamo.locked": "状态: 红石锁定",
"item.steampowered.multimeter": "万用表",
"item.steampowered.multimeter.title":"[万用表]",
"item.steampowered.multimeter.measuring":"[测量中..]",
"item.steampowered.multimeter.ticks":"刻",
"item.steampowered.multimeter.no_capability":"此面不支持 FE 功能",
"item.steampowered.multimeter.tooltip.summary": "测量任何一个有 FE 功能的面的容量与输入/输出",
"block.steampowered.alternator": "交流式发电机",
"block.steampowered.alternator": "发电机",
"block.steampowered.alternator.tooltip.summary": "从应力产生 FE 能量,基于转速。",
"steampowered.ponder.alternator.header": "使用交流发电机发电",
"steampowered.ponder.alternator.text_1": "交流发电机需要至少 32 rpm 的转速才能工作",
"steampowered.ponder.alternator.text_2": "它从旋转动力中产生电能FE",
"steampowered.ponder.alternator.text_3": "它产生能量的多少是由输入的转速决定的",
"steampowered.ponder.dynamo.header": "使用发电机发电",
"steampowered.ponder.dynamo.text_1": "发电机从旋转动力中产生电能FE",
"steampowered.ponder.dynamo.text_2": "它需要至少 32 rpm 的转速才能工作",
"steampowered.ponder.dynamo.text_3": "它产生能量的多少是由输入的转速决定的",
"steampowered.ponder.dynamo.text_4": "它的能量转化效率是百分之七十五",
"steampowered.ponder.dynamo.text_5": "你可以用红石信号锁定发电机,这样它就不会对动力网络造成压力了",
"steampowered.ponder.tag.steam": "蒸汽",
"steampowered.ponder.tag.steam.description": "使用或生产蒸汽的组件",

View file

@ -1,36 +0,0 @@
{
"textures": {
"main": "steampowered:block/alternator/alternator",
"particle": "steampowered:block/alternator/alternator"
},
"elements": [
{
"name": "coil",
"from": [0, 0, 3],
"to": [16, 16, 13],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 7]},
"faces": {
"north": {"uv": [8, 8, 16, 16], "texture": "#main"},
"east": {"uv": [1.5, 0, 6.5, 8], "rotation": 180, "texture": "#main"},
"south": {"uv": [8, 8, 16, 16], "texture": "#main"},
"west": {"uv": [1.5, 0, 6.5, 8], "texture": "#main"},
"up": {"uv": [1.5, 0, 6.5, 8], "rotation": 90, "texture": "#main"},
"down": {"uv": [1.5, 0, 6.5, 8], "rotation": 270, "texture": "#main"}
}
},
{
"name": "housing",
"from": [2, 2, 0],
"to": [14, 14, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 7]},
"faces": {
"north": {"uv": [9, 1, 15, 7], "texture": "#main"},
"east": {"uv": [9, 1, 16, 7], "texture": "#main"},
"south": {"uv": [1, 9, 7, 15], "texture": "#main"},
"west": {"uv": [8, 1, 15, 7], "texture": "#main"},
"up": {"uv": [9, 0, 15, 7], "texture": "#main"},
"down": {"uv": [9, 1, 15, 8], "texture": "#main"}
}
}
]
}

View file

@ -1,35 +0,0 @@
{
"textures": {
"0": "steampowered:block/alternator/coil",
"1": "create:block/depot_top",
"particle": "steampowered:block/alternator/coil"
},
"elements": [
{
"name": "coil",
"from": [0, 0, 1],
"to": [16, 16, 13],
"faces": {
"north": {"uv": [1, 0, 15, 14], "texture": "#1"},
"east": {"uv": [2, 0, 14, 16], "rotation": 180, "texture": "#0"},
"south": {"uv": [1, 0, 15, 14], "texture": "#1"},
"west": {"uv": [2, 0, 14, 16], "texture": "#0"},
"up": {"uv": [2, 0, 14, 16], "rotation": 90, "texture": "#0"},
"down": {"uv": [2, 0, 14, 16], "rotation": 270, "texture": "#0"}
}
},
{
"name": "housing",
"from": [1, 1, 0],
"to": [15, 15, 14],
"faces": {
"north": {"uv": [1, 0, 15, 14], "texture": "#1"},
"east": {"uv": [1, 0, 15, 14], "texture": "#1"},
"south": {"uv": [1, 0, 15, 14], "texture": "#1"},
"west": {"uv": [1, 0, 15, 14], "texture": "#1"},
"up": {"uv": [1, 0, 15, 14], "texture": "#1"},
"down": {"uv": [1, 0, 15, 14], "texture": "#1"}
}
}
]
}

View file

@ -1,53 +0,0 @@
{
"textures": {
"main": "steampowered:block/alternator/alternator",
"particle": "steampowered:block/alternator/alternator",
"1_0": "create:block/axis",
"1_1": "create:block/axis_top"
},
"elements": [
{
"name": "coil",
"from": [0, 0, 3],
"to": [16, 16, 13],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 7]},
"faces": {
"north": {"uv": [8, 8, 16, 16], "texture": "#main"},
"east": {"uv": [1.5, 0, 6.5, 8], "rotation": 180, "texture": "#main"},
"south": {"uv": [8, 8, 16, 16], "texture": "#main"},
"west": {"uv": [1.5, 0, 6.5, 8], "texture": "#main"},
"up": {"uv": [1.5, 0, 6.5, 8], "rotation": 90, "texture": "#main"},
"down": {"uv": [1.5, 0, 6.5, 8], "rotation": 270, "texture": "#main"}
}
},
{
"name": "housing",
"from": [2, 2, 0],
"to": [14, 14, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 7]},
"faces": {
"north": {"uv": [9, 1, 15, 7], "texture": "#main"},
"east": {"uv": [9, 1, 16, 7], "texture": "#main"},
"south": {"uv": [1, 9, 7, 15], "texture": "#main"},
"west": {"uv": [8, 1, 15, 7], "texture": "#main"},
"up": {"uv": [9, 0, 15, 7], "texture": "#main"},
"down": {"uv": [9, 1, 15, 8], "texture": "#main"}
}
},
{
"name": "Axis",
"from": [6, 6, 6],
"to": [10, 10, 16],
"shade": false,
"rotation": {"angle": 22.5, "axis": "z", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [6, 6, 10, 10], "rotation": 180, "texture": "#1_1"},
"east": {"uv": [6, 0, 10, 10], "rotation": 270, "texture": "#1_0"},
"south": {"uv": [6, 6, 10, 10], "texture": "#1_1"},
"west": {"uv": [6, 0, 10, 10], "rotation": 90, "texture": "#1_0"},
"up": {"uv": [6, 0, 10, 10], "rotation": 180, "texture": "#1_0"},
"down": {"uv": [6, 0, 10, 10], "texture": "#1_0"}
}
}
]
}

View file

@ -1,52 +0,0 @@
{
"textures": {
"0": "steampowered:block/alternator/coil",
"1": "create:block/depot_top",
"1_0": "create:block/axis",
"1_1": "create:block/axis_top",
"particle": "steampowered:block/alternator/coil"
},
"elements": [
{
"name": "coil",
"from": [0, 0, 1],
"to": [16, 16, 13],
"faces": {
"north": {"uv": [1, 0, 15, 14], "texture": "#1"},
"east": {"uv": [2, 0, 14, 16], "rotation": 180, "texture": "#0"},
"south": {"uv": [1, 0, 15, 14], "texture": "#1"},
"west": {"uv": [2, 0, 14, 16], "texture": "#0"},
"up": {"uv": [2, 0, 14, 16], "rotation": 90, "texture": "#0"},
"down": {"uv": [2, 0, 14, 16], "rotation": 270, "texture": "#0"}
}
},
{
"name": "housing",
"from": [1, 1, 0],
"to": [15, 15, 14],
"faces": {
"north": {"uv": [1, 0, 15, 14], "texture": "#1"},
"east": {"uv": [1, 0, 15, 14], "texture": "#1"},
"south": {"uv": [1, 0, 15, 14], "texture": "#1"},
"west": {"uv": [1, 0, 15, 14], "texture": "#1"},
"up": {"uv": [1, 0, 15, 14], "texture": "#1"},
"down": {"uv": [1, 0, 15, 14], "texture": "#1"}
}
},
{
"name": "Axis",
"from": [6, 6, 6],
"to": [10, 10, 16],
"shade": false,
"rotation": {"angle": 22.5, "axis": "z", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [6, 6, 10, 10], "rotation": 180, "texture": "#1_1"},
"east": {"uv": [6, 0, 10, 10], "rotation": 270, "texture": "#1_0"},
"south": {"uv": [6, 6, 10, 10], "texture": "#1_1"},
"west": {"uv": [6, 0, 10, 10], "rotation": 90, "texture": "#1_0"},
"up": {"uv": [6, 0, 10, 10], "rotation": 180, "texture": "#1_0"},
"down": {"uv": [6, 0, 10, 10], "texture": "#1_0"}
}
}
]
}

View file

@ -0,0 +1,46 @@
{
"credit": "Made with Blockbench, by goumo_g",
"texture_size": [32, 32],
"textures": {
"0": "steampowered:block/dynamo/dynamo",
"particle": "steampowered:block/dynamo/dynamo"
},
"elements": [
{
"from": [0, 0, 0],
"to": [16, 3, 16],
"faces": {
"north": {"uv": [8, 0, 16, 1.5], "texture": "#0"},
"east": {"uv": [8, 0, 16, 1.5], "texture": "#0"},
"south": {"uv": [8, 0, 16, 1.5], "texture": "#0"},
"west": {"uv": [8, 0, 16, 1.5], "texture": "#0"},
"up": {"uv": [0, 0, 8, 8], "texture": "#0"},
"down": {"uv": [0, 0, 8, 8], "texture": "#0"}
}
},
{
"from": [3, 3, 1],
"to": [13, 14, 12],
"faces": {
"north": {"uv": [10.5, 8, 15.5, 13.5], "texture": "#0"},
"east": {"uv": [5.5, 8, 0, 13.5], "texture": "#0"},
"south": {"uv": [10.5, 8, 15.5, 13.5], "texture": "#0"},
"west": {"uv": [0, 8, 5.5, 13.5], "texture": "#0"},
"up": {"uv": [5.5, 8, 10.5, 13.5], "texture": "#0"},
"down": {"uv": [5.5, 8, 10.5, 13.5], "texture": "#0"}
}
},
{
"from": [2, 3, 12],
"to": [14, 15, 16],
"faces": {
"north": {"uv": [8, 1.5, 14, 7.5], "texture": "#0"},
"east": {"uv": [14, 1.5, 16, 7.5], "texture": "#0"},
"south": {"uv": [8, 1.5, 14, 7.5], "texture": "#0"},
"west": {"uv": [14, 1.5, 16, 7.5], "texture": "#0"},
"up": {"uv": [14, 1.5, 16, 7.5], "rotation": 90, "texture": "#0"},
"down": {"uv": [14, 1.5, 16, 7.5], "rotation": 90, "texture": "#0"}
}
}
]
}

View file

@ -0,0 +1,46 @@
{
"credit": "Made with Blockbench, by goumo_g",
"texture_size": [32, 32],
"textures": {
"0": "steampowered:block/dynamo/dynamo_locked",
"particle": "steampowered:block/dynamo/dynamo"
},
"elements": [
{
"from": [0, 0, 0],
"to": [16, 3, 16],
"faces": {
"north": {"uv": [8, 0, 16, 1.5], "texture": "#0"},
"east": {"uv": [8, 0, 16, 1.5], "texture": "#0"},
"south": {"uv": [8, 0, 16, 1.5], "texture": "#0"},
"west": {"uv": [8, 0, 16, 1.5], "texture": "#0"},
"up": {"uv": [0, 0, 8, 8], "texture": "#0"},
"down": {"uv": [0, 0, 8, 8], "texture": "#0"}
}
},
{
"from": [3, 3, 1],
"to": [13, 14, 12],
"faces": {
"north": {"uv": [10.5, 8, 15.5, 13.5], "texture": "#0"},
"east": {"uv": [5.5, 8, 0, 13.5], "texture": "#0"},
"south": {"uv": [10.5, 8, 15.5, 13.5], "texture": "#0"},
"west": {"uv": [0, 8, 5.5, 13.5], "texture": "#0"},
"up": {"uv": [5.5, 8, 10.5, 13.5], "texture": "#0"},
"down": {"uv": [5.5, 8, 10.5, 13.5], "texture": "#0"}
}
},
{
"from": [2, 3, 12],
"to": [14, 15, 16],
"faces": {
"north": {"uv": [8, 1.5, 14, 7.5], "texture": "#0"},
"east": {"uv": [14, 1.5, 16, 7.5], "texture": "#0"},
"south": {"uv": [8, 1.5, 14, 7.5], "texture": "#0"},
"west": {"uv": [14, 1.5, 16, 7.5], "texture": "#0"},
"up": {"uv": [14, 1.5, 16, 7.5], "rotation": 90, "texture": "#0"},
"down": {"uv": [14, 1.5, 16, 7.5], "rotation": 90, "texture": "#0"}
}
}
]
}

View file

@ -0,0 +1,63 @@
{
"credit": "Made with Blockbench, by goumo_g",
"texture_size": [32, 32],
"textures": {
"0": "steampowered:block/dynamo/dynamo",
"particle": "steampowered:block/dynamo/dynamo",
"2": "create:block/axis",
"3": "create:block/axis_top"
},
"elements": [
{
"from": [0, 0, 0],
"to": [16, 3, 16],
"faces": {
"north": {"uv": [8, 0, 16, 1.5], "texture": "#0"},
"east": {"uv": [8, 0, 16, 1.5], "texture": "#0"},
"south": {"uv": [8, 0, 16, 1.5], "texture": "#0"},
"west": {"uv": [8, 0, 16, 1.5], "texture": "#0"},
"up": {"uv": [0, 0, 8, 8], "texture": "#0"},
"down": {"uv": [0, 0, 8, 8], "texture": "#0"}
}
},
{
"from": [3, 3, 1],
"to": [13, 14, 12],
"faces": {
"north": {"uv": [10.5, 8, 15.5, 13.5], "texture": "#0"},
"east": {"uv": [5.5, 8, 0, 13.5], "texture": "#0"},
"south": {"uv": [10.5, 8, 15.5, 13.5], "texture": "#0"},
"west": {"uv": [0, 8, 5.5, 13.5], "texture": "#0"},
"up": {"uv": [5.5, 8, 10.5, 13.5], "texture": "#0"},
"down": {"uv": [5.5, 8, 10.5, 13.5], "texture": "#0"}
}
},
{
"from": [2, 3, 12],
"to": [14, 15, 16],
"faces": {
"north": {"uv": [8, 1.5, 14, 7.5], "texture": "#0"},
"east": {"uv": [14, 1.5, 16, 7.5], "texture": "#0"},
"south": {"uv": [8, 1.5, 14, 7.5], "texture": "#0"},
"west": {"uv": [14, 1.5, 16, 7.5], "texture": "#0"},
"up": {"uv": [14, 1.5, 16, 7.5], "rotation": 90, "texture": "#0"},
"down": {"uv": [14, 1.5, 16, 7.5], "rotation": 90, "texture": "#0"}
}
},
{
"name": "Axis",
"from": [6, 6, 6],
"to": [10, 10, 16],
"shade": false,
"rotation": {"angle": 22.5, "axis": "z", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [6, 6, 10, 10], "rotation": 180, "texture": "#3"},
"east": {"uv": [6, 0, 10, 10], "rotation": 270, "texture": "#2"},
"south": {"uv": [6, 6, 10, 10], "texture": "#3"},
"west": {"uv": [6, 0, 10, 10], "rotation": 90, "texture": "#2"},
"up": {"uv": [6, 0, 10, 10], "rotation": 180, "texture": "#2"},
"down": {"uv": [6, 0, 10, 10], "texture": "#2"}
}
}
]
}

View file

@ -0,0 +1,25 @@
{
"credit": "Made with Blockbench",
"parent": "block/block",
"textures": {
"0": "create:block/axis",
"1": "create:block/axis_top",
"particle": "create:block/axis"
},
"elements": [
{
"name": "Axis",
"from": [6, 6, 0],
"to": [10, 10, 8],
"shade": false,
"faces": {
"north": {"uv": [6, 6, 10, 10], "rotation": 180, "texture": "#1"},
"east": {"uv": [6, 0, 10, 8], "rotation": 270, "texture": "#0"},
"south": {"uv": [6, 6, 10, 10], "texture": "#1"},
"west": {"uv": [6, 0, 10, 8], "rotation": 90, "texture": "#0"},
"up": {"uv": [6, 0, 10, 8], "rotation": 180, "texture": "#0"},
"down": {"uv": [6, 0, 10, 8], "texture": "#0"}
}
}
]
}

View file

@ -1,5 +1,5 @@
{
"parent": "steampowered:block/alternator/item",
"parent": "steampowered:block/dynamo/item",
"display": {
"gui": {
"rotation": [ 30, 45, 0 ],

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 862 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 808 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 808 B

View file

@ -0,0 +1,30 @@
{
"type": "create:mechanical_crafting",
"pattern": [
" IRI ",
"ILCLI",
"RCSCR",
"ILCLI",
" IRI "
],
"key": {
"I": {
"tag": "forge:ingots/iron"
},
"R": {
"item": "minecraft:redstone_block"
},
"S": {
"item": "create:shaft"
},
"C": {
"item": "steampowered:cast_iron_cogwheel"
},
"L": {
"item": "steampowered:cast_iron_large_cogwheel"
}
},
"result": {
"item": "steampowered:alternator"
}
}