Compare commits

...

21 commits
1.18 ... master

Author SHA1 Message Date
khj xiaogu f94adf204e
Automatic steam input for engines 2023-03-14 16:37:44 +08:00
khj xiaogu 3e7cf4c68b
bump 2022-10-24 01:05:46 +08:00
khj xiaogu ea3d6a3189
more optimize 2022-10-24 01:04:09 +08:00
khj xiaogu 325bb23894
more optimize 2022-10-24 00:51:52 +08:00
khj xiaogu 22935b3820
optimize 2022-10-24 00:29:44 +08:00
khj xiaogu 0b0277a539
fix crash 2022-10-16 14:53:21 +08:00
khj xiaogu 4e615c93e5
bump 2022-09-10 15:38:05 +08:00
khj xiaogu 3ac6aea18d
fix minor question 2022-09-10 15:35:54 +08:00
khj xiaogu 09926fae13
optimize particles 2022-08-19 14:12:18 +08:00
khj xiaogu 6f0b787f56
improved particles 2022-08-19 14:11:26 +08:00
yuesha-yc 8b3b48d318
1.2.2: update textures 2022-08-16 15:33:01 -07:00
khj xiaogu dd8748f462
fix burner cannot insert fuel 2022-05-22 23:42:43 +08:00
khj xiaogu 5b00ef7700
forgot bump 2022-05-22 21:13:50 +08:00
khj xiaogu bc5d38684c
Independ 2022-05-22 21:05:43 +08:00
khj xiaogu 48a6a7cd63
Bump to 1.1.15 2022-05-22 02:26:15 +08:00
khj xiaogu ca236e584c
Merge branch 'master' of https://github.com/TeamMoegMC/SteamPowered 2022-05-22 02:24:25 +08:00
khj xiaogu 9b52dd4053
Improved boiler logic and steam particles 2022-05-22 02:24:13 +08:00
Yichen Wang 323fd66dc4
Merge pull request #24 from gralp-1/patch-1
Fixed some of the README
2022-03-08 15:01:59 -08:00
khj xiaogu 834d25858d
fix itemgroup and display 2022-03-02 13:57:09 +08:00
khj xiaogu e842df2384
fix display issues 2022-02-27 22:32:16 +08:00
gralp 8e697110ff
Fixed some of the README 2022-02-25 11:53:00 +00:00
115 changed files with 873 additions and 340 deletions

View file

@ -1,20 +1,20 @@
<p align="center"><img src="https://media.forgecdn.net/attachments/403/496/steam-powered-logo.png" alt="logo" width="200"/></p>
#<p align="center">Create: Steam Powered</p>
# <p align="center">Create: Steam Powered</p>
###<p align="center">Expanding Create mod to the Steam Age</p>
### <p align="center">Expanding Create mod to the Steam Age</p>
<br>
<p align="center"><img src="https://media.forgecdn.net/attachments/403/636/2021-10-25_15.png" alt="logo" width="400"/></p>
####Foreword:
#### Foreword:
Taking inspiration from the furnace engine in Create, we decide that we could make something more realistic and cooler. The main philosophy of this mod is to provide more "realistic" power generation methods and machines & contraptions that will work to achieve this goal. This mod is also playable even in Creative Mode because it includes many decorative blocks such as metal cogwheels.
This mod requires Create and Flywheel as required dependencies. Immersive Engineering is an optional dependency that adds in steel for the mod.
####What we added:
#### What we added:
Steam Engines of three types: Bronze, Cast Iron, and Steel
Flywheels of three types: Bronze, Cast Iron, and Steel
@ -25,7 +25,7 @@ Steam Boilers of three types: Bronze, Cast Iron, and Steel
Fully configurable steam engine outputs, steam consumption, cogwheel stress impact, dynamo output and intake
####Upcoming Features:
#### Upcoming Features:
Steam Encased Fan
@ -37,7 +37,7 @@ Steam Ariship
Steam Jetpack
####Optional Feature:
#### Optional Feature:
Dynamo that produces FE from RPM. Redstone signal can be provided to lock it from working.
@ -51,19 +51,19 @@ CC&A is a great mod that I recommend you to use along Steam Powered. They provid
My only reason to add the dynamo to the mod is the fact that I want the people who only want the steam power part of create to run only with vanilla create and steam powered.
####Open Source:
#### Open Source:
This is a free and open source mod licensed under GNU GPL 3.0 License.
You are welcomed to contribute to this project. Visit Discord or Github Repo.
####Discord:
#### Discord:
Join the discord to get exclusive update previews and new projects notifications
https://discord.gg/BWn6E94
####Support the Devs:
#### Support the Devs:
If you love what we create, support us to let us create more
https://www.patreon.com/TeamMoegProjects
https://www.patreon.com/TeamMoegProjects

View file

@ -112,8 +112,8 @@ dependencies {
implementation fg.deobf("curse.maven:create-328085:3499718")
implementation fg.deobf("curse.maven:flywheel-486392:3459739")
implementation fg.deobf("curse.maven:immersive-engineering-231951:3377691")
implementation fg.deobf("curse.maven:create-alloyed-564792:3602444")
/*implementation fg.deobf("curse.maven:immersive-engineering-231951:3377691")
implementation fg.deobf("curse.maven:create-alloyed-564792:3602444")*/
compileOnly fg.deobf("mezz.jei:jei-1.16.5:7.6.4.88:api")
runtimeOnly fg.deobf("mezz.jei:jei-1.16.5:7.6.4.88")

View file

@ -1,2 +1,2 @@
1.1.14:
- fix wrong set direction
1.2.6
- Optimized network and performance

View file

@ -4,7 +4,7 @@ org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
# mod version info
mod_version = 1.1.14
mod_version = 1.2.6
minecraft_version = 1.16.5
forge_version = 36.2.2

View file

@ -26,6 +26,6 @@ import net.minecraftforge.registries.ForgeRegistries;
public class ItemRegistry {
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, SteamPowered.MODID);
public static RegistryObject<Item> pressurizedGasContainer = ITEMS.register("pressurized_gas_container", () -> new Item(new Item.Properties()));
public static RegistryObject<Item> pressurizedSteamContainer = ITEMS.register("pressurized_steam_container", () -> new Item(new Item.Properties()));
public static RegistryObject<Item> pressurizedGasContainer = ITEMS.register("pressurized_gas_container", () -> new Item(new Item.Properties().tab(SteamPowered.itemGroup)));
public static RegistryObject<Item> pressurizedSteamContainer = ITEMS.register("pressurized_steam_container", () -> new Item(new Item.Properties().tab(SteamPowered.itemGroup)));
}

View file

@ -27,14 +27,17 @@ public class SPConfig {
public final ForgeConfigSpec.IntValue bronzeFlywheelSpeed;
public final ForgeConfigSpec.IntValue bronzeFlywheelSteamConsumptionPerTick;
public final ForgeConfigSpec.IntValue bronzeFlywheelSteamStorage;
public final ForgeConfigSpec.DoubleValue bronzeFlywheelSuckEfficiency;
public final ForgeConfigSpec.IntValue castIronFlywheelCapacity;
public final ForgeConfigSpec.IntValue castIronFlywheelSpeed;
public final ForgeConfigSpec.IntValue castIronFlywheelSteamConsumptionPerTick;
public final ForgeConfigSpec.IntValue castIronFlywheelSteamStorage;
public final ForgeConfigSpec.DoubleValue castIronFlywheelSuckEfficiency;
public final ForgeConfigSpec.IntValue steelFlywheelCapacity;
public final ForgeConfigSpec.IntValue steelFlywheelSpeed;
public final ForgeConfigSpec.IntValue steelFlywheelSteamConsumptionPerTick;
public final ForgeConfigSpec.IntValue steelFlywheelSteamStorage;
public final ForgeConfigSpec.DoubleValue steelFlywheelSuckEfficiency;
public final ForgeConfigSpec.IntValue HUPerFuelTick;
public final ForgeConfigSpec.DoubleValue steamPerWater;
@ -63,7 +66,7 @@ public class SPConfig {
builder.push("steam");
{
HUPerFuelTick=builder.comment("HU generation for each fuel burning tick. 10HU=1mb of steam. THIS AFFECT ALL BURNERS AND BOILERS!")
.defineInRange("HuPerFuelTick",24,0,655360);
.defineInRange("HuPerFuelTick",68,0,655360);
steamPerWater=builder.comment("This defines how many mbs of steam does a mb of water can turn into.")
.defineInRange("steamPerWater",12.0,0.0,100000.0);
@ -94,27 +97,29 @@ public class SPConfig {
{
builder.push("bronze_flywheel");
{
bronzeFlywheelCapacity = builder.defineInRange("bronzeFlywheelCapacity",512, 0, 8192);
bronzeFlywheelCapacity = builder.defineInRange("bronzeFlywheelCapacity",1024, 0, 8192);
bronzeFlywheelSpeed = builder.defineInRange("bronzeFlywheelSpeed", 32, 0, 8192);
bronzeFlywheelSteamConsumptionPerTick = builder.defineInRange("bronzeFlywheelSteamConsumptionPerTick", 12, 0, 8192);
bronzeFlywheelSteamStorage = builder.defineInRange("bronzeFlywheelSteamStorage", 32000, 0, 1048576);
bronzeFlywheelSuckEfficiency =builder.defineInRange("bronzeFlywheelSuckEfficiency",0.7,0,1);
}
builder.pop();
builder.push("cast_iron_flywheel");
{
castIronFlywheelCapacity = builder.defineInRange("castIronFlywheelCapacity", 1024, 0, 8192);
castIronFlywheelCapacity = builder.defineInRange("castIronFlywheelCapacity", 2048, 0, 8192);
castIronFlywheelSpeed = builder.defineInRange("castIronFlywheelSpeed", 32, 0, 8192);
castIronFlywheelSteamConsumptionPerTick = builder.defineInRange("castIronFlywheelSteamConsumptionPerTick", 24, 0, 8192);
castIronFlywheelSteamStorage = builder.defineInRange("castIronFlywheelSteamStorage", 64000, 0, 1048576);
castIronFlywheelSuckEfficiency =builder.defineInRange("castIronFlywheelSuckEfficiency",0.7,0,1);
}
builder.pop();
builder.push("steel_flywheel");
{
steelFlywheelCapacity = builder.defineInRange("steelFlywheelCapacity", 2048, 0, 8192);
steelFlywheelCapacity = builder.defineInRange("steelFlywheelCapacity", 4096, 0, 8192);
steelFlywheelSpeed = builder.defineInRange("steelFlywheelSpeed", 32, 0, 8192);
steelFlywheelSteamConsumptionPerTick = builder.defineInRange("steelFlywheelSteamConsumptionPerTick", 48, 0, 1048576);
steelFlywheelSteamStorage = builder.defineInRange("steelFlywheelSteamStorage", 96000, 0, 1048576);
steelFlywheelSuckEfficiency =builder.defineInRange("steelFlywheelSuckEfficiency",0.7,0,1);
}
builder.pop();
}

View file

@ -35,6 +35,9 @@ public class ParticleBase extends SpriteTexturedParticle {
public ParticleBase(ClientWorld world, double x, double y, double z, double motionX, double motionY, double motionZ) {
super(world, x, y, z, motionX, motionY, motionZ);
this.xd*=1.25;
this.yd*=1.25;
this.zd*=1.25;
}
public IParticleRenderType getRenderType() {
@ -46,8 +49,8 @@ public class ParticleBase extends SpriteTexturedParticle {
float age = (this.age + pt) / lifetime * 32.0F;
age = MathHelper.clamp(age, 0.0F, 1.0F);
super.quadSize = originalScale * age;
super.alpha=MathHelper.clamp(1-(this.age + pt) / lifetime, 0.0F, 1.0F);
super.quadSize = originalScale*(age+this.age*0.01875F);
super.render(worldRendererIn, entityIn, pt);
}
@ -58,15 +61,14 @@ public class ParticleBase extends SpriteTexturedParticle {
if (age >= lifetime)
super.remove();
this.age++;
this.yd -= 0.04D * gravity;
move(xd,yd, zd);
if (y == yo) {
this.xd *= 1.1D;
this.zd *= 1.1D;
this.age+=7;
}
this.xd *= 0.96D;
this.yd *= 0.96D;
this.zd *= 0.96D;

View file

@ -27,11 +27,11 @@ import net.minecraft.particles.BasicParticleType;
public class SteamParticle extends ParticleBase {
public SteamParticle(ClientWorld world, double x, double y, double z, double motionX, double motionY, double motionZ) {
super(world, x, y, z, motionX, motionY, motionZ);
this.gravity = -0.1F;
this.rCol = this.gCol = this.bCol = (float) (Math.random() * 0.4) + 0.4f;
this.originalScale = 0.25F;
this.lifetime= (int) (12.0D / (Math.random() * 0.8D + 0.2D));
super(world, x, y, z, motionX, motionY + 0.4f, motionZ);
this.gravity = -0.05F;
this.rCol = this.gCol = this.bCol = 1.0f;
this.originalScale = 0.6F;
this.lifetime= (int) (160.0D / (Math.random() * 0.2D + 0.8D));
}
public static class Factory implements IParticleFactory<BasicParticleType> {

View file

@ -54,7 +54,7 @@ public class DynamoTileEntity extends KineticTileEntity {
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
boolean working;
public DynamoTileEntity(TileEntityType<?> typeIn) {
super(typeIn);
energy = new InternalEnergyStorage(FE_CAPACITY, 0, MAX_FE_OUT);
@ -117,8 +117,17 @@ public class DynamoTileEntity extends KineticTileEntity {
super.tick();
if (level != null && level.isClientSide())
return;
if (this.getBlockState().getValue(DynamoBlock.REDSTONE_LOCKED))
if (this.getBlockState().getValue(DynamoBlock.REDSTONE_LOCKED)) {
if(working)
if(this.hasNetwork())
this.getOrCreateNetwork().updateStressFor(this,this.calculateStressApplied());
working=false;
return;
}
if(!working)
if(this.hasNetwork())
this.getOrCreateNetwork().updateStressFor(this,this.calculateStressApplied());
working=true;
if (Math.abs(getSpeed()) > 0 && isSpeedRequirementFulfilled())
energy.internalProduceEnergy(getEnergyProductionRate((int) getSpeed()));
Direction side=this.getBlockState().getValue(DynamoBlock.FACING);

View file

@ -19,87 +19,45 @@
package com.teammoeg.steampowered.content.boiler;
import java.util.List;
import java.util.Random;
import com.simibubi.create.foundation.item.ItemDescription.Palette;
import com.simibubi.create.foundation.item.TooltipHelper;
import com.simibubi.create.foundation.utility.Lang;
import com.teammoeg.steampowered.client.ClientUtils;
import com.teammoeg.steampowered.client.Particles;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.ILiquidContainer;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.fluid.Fluid;
import net.minecraft.fluid.FluidState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.DamageSource;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.SoundEvents;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorld;
import net.minecraft.world.World;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction;
import net.minecraftforge.fluids.FluidUtil;
public abstract class BoilerBlock extends Block implements ILiquidContainer {
@Override
public boolean canPlaceLiquid(IBlockReader w, BlockPos p, BlockState s, Fluid f) {
TileEntity te = w.getBlockEntity(p);
if (te instanceof BoilerTileEntity) {
BoilerTileEntity boiler = (BoilerTileEntity) te;
if (boiler.input.fill(new FluidStack(f, 1000), FluidAction.SIMULATE) == 1000)
return true;
}
return false;
}
public abstract class BoilerBlock extends Block {
@Override
public boolean placeLiquid(IWorld w, BlockPos p, BlockState s, FluidState f) {
TileEntity te = w.getBlockEntity(p);
if (te instanceof BoilerTileEntity) {
BoilerTileEntity boiler = (BoilerTileEntity) te;
if (boiler.input.fill(new FluidStack(f.getType(), 1000), FluidAction.SIMULATE) == 1000) {
boiler.input.fill(new FluidStack(f.getType(), 1000), FluidAction.EXECUTE);
return true;
}
}
return false;
}
@Override
public void animateTick(BlockState p_180655_1_, World p_180655_2_, BlockPos p_180655_3_, Random p_180655_4_) {
TileEntity te = p_180655_2_.getBlockEntity(p_180655_3_);
if (te instanceof BoilerTileEntity) {
BoilerTileEntity boiler = (BoilerTileEntity) te;
if (boiler.output.getFluidAmount()>=10000&&boiler.lastheat!=0) {//steam leaking
double d0 = p_180655_3_.getX();
double d1 = p_180655_3_.getY() + 1;
double d2 = p_180655_3_.getZ();
//if(p_180655_4_.nextDouble()<0.5D) {
p_180655_2_.playLocalSound(d0, d1, d2, SoundEvents.FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.25F, 0.25F, false);
int count=4;
while(--count!=0)
p_180655_2_.addParticle(Particles.STEAM.get(), d0+p_180655_4_.nextFloat(), d1, d2+p_180655_4_.nextFloat(), 0.0D, 0.0D, 0.0D);
//}
}
}
}
public ActionResultType use(BlockState bs, World w, BlockPos bp, PlayerEntity pe, Hand h, BlockRayTraceResult br) {
if (FluidUtil.interactWithFluidHandler(pe, h,w, bp,br.getDirection()))
return ActionResultType.SUCCESS;
return ActionResultType.PASS;
}
@Override
public boolean hasAnalogOutputSignal(BlockState p_149740_1_) {
return true;
}
public BoilerBlock(Properties properties) {
super(properties);
}

View file

@ -23,6 +23,7 @@ import java.util.List;
import com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation;
import com.teammoeg.steampowered.FluidRegistry;
import com.teammoeg.steampowered.SPConfig;
import com.teammoeg.steampowered.client.Particles;
import com.teammoeg.steampowered.content.burner.IHeatReceiver;
import net.minecraft.block.BlockState;
@ -34,6 +35,8 @@ import net.minecraft.tileentity.ITickableTileEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityType;
import net.minecraft.util.Direction;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.SoundEvents;
import net.minecraft.util.text.ITextComponent;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.util.LazyOptional;
@ -43,161 +46,200 @@ import net.minecraftforge.fluids.capability.IFluidHandler;
import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction;
import net.minecraftforge.fluids.capability.templates.FluidTank;
public abstract class BoilerTileEntity extends TileEntity implements IHeatReceiver, ITickableTileEntity, IHaveGoggleInformation {
FluidTank input = new FluidTank(10000,s->s.getFluid() == Fluids.WATER);
FluidTank output = new FluidTank(10000);
private IFluidHandler ft = new IFluidHandler() {
@Override
public int getTanks() {
return 2;
}
public abstract class BoilerTileEntity extends TileEntity
implements IHeatReceiver, ITickableTileEntity, IHaveGoggleInformation {
FluidTank input = new FluidTank(10000, s -> s.getFluid() == Fluids.WATER);
public FluidTank output = new FluidTank(10000);
private IFluidHandler ft = new IFluidHandler() {
@Override
public int getTanks() {
return 2;
}
@Override
public FluidStack getFluidInTank(int tank) {
switch (tank) {
case 0:
return input.getFluid();
case 1:
return output.getFluid();
default:
return null;
}
}
@Override
public FluidStack getFluidInTank(int tank) {
switch (tank) {
case 0:
return input.getFluid();
case 1:
return output.getFluid();
default:
return null;
}
}
@Override
public int getTankCapacity(int tank) {
return 10000;
}
@Override
public int getTankCapacity(int tank) {
return 10000;
}
@Override
public boolean isFluidValid(int tank, FluidStack stack) {
if (tank == 0 && stack.getFluid() == Fluids.WATER)
return true;
return false;
}
@Override
public boolean isFluidValid(int tank, FluidStack stack) {
if (tank == 0 && stack.getFluid() == Fluids.WATER)
return true;
return false;
}
@Override
public int fill(FluidStack resource, FluidAction action) {
return input.fill(resource, action);
}
@Override
public int fill(FluidStack resource, FluidAction action) {
int filled=input.fill(resource, action);
if(filled>0&&action==FluidAction.EXECUTE) {
setChanged();
level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), 3);
}
return filled;
}
@Override
public FluidStack drain(FluidStack resource, FluidAction action) {
return output.drain(resource, action);
}
@Override
public FluidStack drain(FluidStack resource, FluidAction action) {
FluidStack drained=output.drain(resource, action);
if(!drained.isEmpty()&&action==FluidAction.EXECUTE){
setChanged();
level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), 3);
}
return drained;
}
@Override
public FluidStack drain(int maxDrain, FluidAction action) {
return output.drain(maxDrain, action);
}
};
int heatreceived;
int lastheat;
private LazyOptional<IFluidHandler> holder = LazyOptional.of(() -> ft);
@Override
public FluidStack drain(int maxDrain, FluidAction action) {
FluidStack drained=output.drain(maxDrain, action);
if(!drained.isEmpty()&&action==FluidAction.EXECUTE){
setChanged();
level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), 3);
}
return drained;
}
};
int heatreceived;
int lastheat;
private LazyOptional<IFluidHandler> holder = LazyOptional.of(() -> ft);
public BoilerTileEntity(TileEntityType<?> p_i48289_1_) {
super(p_i48289_1_);
}
public BoilerTileEntity(TileEntityType<?> p_i48289_1_) {
super(p_i48289_1_);
}
// Easy, easy
public void readCustomNBT(CompoundNBT nbt) {
input.readFromNBT(nbt.getCompound("in"));
output.readFromNBT(nbt.getCompound("out"));
heatreceived = nbt.getInt("hu");
lastheat=nbt.getInt("lasthu");
}
// Easy, easy
public void readCustomNBT(CompoundNBT nbt) {
input.readFromNBT(nbt.getCompound("in"));
output.readFromNBT(nbt.getCompound("out"));
heatreceived = nbt.getInt("hu");
lastheat = nbt.getInt("lasthu");
}
// Easy, easy
public void writeCustomNBT(CompoundNBT nbt) {
nbt.put("in", input.writeToNBT(new CompoundNBT()));
nbt.put("out", output.writeToNBT(new CompoundNBT()));
nbt.putInt("hu", heatreceived);
nbt.putInt("lasthu", lastheat);
}
// Easy, easy
public void writeCustomNBT(CompoundNBT nbt) {
nbt.put("in", input.writeToNBT(new CompoundNBT()));
nbt.put("out", output.writeToNBT(new CompoundNBT()));
nbt.putInt("hu", heatreceived);
nbt.putInt("lasthu", lastheat);
}
@Override
public void load(BlockState state, CompoundNBT nbt) {
super.load(state, nbt);
readCustomNBT(nbt);
}
@Override
public void load(BlockState state, CompoundNBT nbt) {
super.load(state, nbt);
readCustomNBT(nbt);
}
@Override
public CompoundNBT save(CompoundNBT nbt) {
super.save(nbt);
writeCustomNBT(nbt);
return nbt;
}
@Override
public CompoundNBT save(CompoundNBT nbt) {
super.save(nbt);
writeCustomNBT(nbt);
return nbt;
}
@Override
public SUpdateTileEntityPacket getUpdatePacket() {
CompoundNBT nbt = new CompoundNBT();
this.writeCustomNBT(nbt);
return new SUpdateTileEntityPacket(this.getBlockPos(), 3, nbt);
}
@Override
public SUpdateTileEntityPacket getUpdatePacket() {
CompoundNBT nbt = new CompoundNBT();
this.writeCustomNBT(nbt);
return new SUpdateTileEntityPacket(this.getBlockPos(), 3, nbt);
}
@Override
public void onDataPacket(NetworkManager net, SUpdateTileEntityPacket pkt) {
this.readCustomNBT(pkt.getTag());
}
@Override
public void onDataPacket(NetworkManager net, SUpdateTileEntityPacket pkt) {
this.readCustomNBT(pkt.getTag());
}
@Override
public CompoundNBT getUpdateTag() {
CompoundNBT nbt = super.getUpdateTag();
writeCustomNBT(nbt);
return nbt;
}
@Override
public CompoundNBT getUpdateTag() {
CompoundNBT nbt = super.getUpdateTag();
writeCustomNBT(nbt);
return nbt;
}
@Override
public void tick() {
//debug
if (this.level != null && !this.level.isClientSide) {
boolean flag=false;
if(lastheat!=heatreceived)
flag=true;
lastheat=heatreceived;
if(heatreceived!=0) {
int consume = Math.min(getHUPerTick(), heatreceived);
heatreceived = 0;
double waterconsume=(SPConfig.COMMON.steamPerWater.get()*10);
consume = Math.min((int)(this.input.drain((int) Math.ceil(consume / waterconsume), FluidAction.EXECUTE).getAmount() * waterconsume), consume);
this.output.fill(new FluidStack(FluidRegistry.steam.get().getFluid(), consume / 10), FluidAction.EXECUTE);
flag=true;
}
this.setChanged();
this.level.sendBlockUpdated(this.getBlockPos(),this.getBlockState(),this.getBlockState(), 3);
@Override
public void tick() {
}
}
if (this.level == null)
return;
if (!this.level.isClientSide) {
lastheat = heatreceived;
if (heatreceived != 0) {
int consume = Math.min(getHUPerTick(), heatreceived);
heatreceived = 0;
double waterconsume = (SPConfig.COMMON.steamPerWater.get() * 10);
consume = Math.min((int) (this.input.drain((int) Math.ceil(consume / waterconsume), FluidAction.EXECUTE)
.getAmount() * waterconsume), consume);
this.output.fill(new FluidStack(FluidRegistry.steam.get().getFluid(), consume / 10),
FluidAction.EXECUTE);
if(consume>0) {
this.setChanged();
this.level.sendBlockUpdated(this.getBlockPos(), this.getBlockState(), this.getBlockState(), 3);
}
}
@Override
public void commitHeat(float value) {
heatreceived = (int) value;
} else {
if (output.getFluidAmount() >= output.getCapacity() && lastheat != 0) {// steam leaking
particleInterval++;
if (particleInterval >= 20) {
particleInterval = 0;
double d0 = this.worldPosition.getX();
double d1 = this.worldPosition.getY() + 1;
double d2 = this.worldPosition.getZ();
// if(p_180655_4_.nextDouble()<0.5D) {
this.level.playLocalSound(d0, d1, d2, SoundEvents.FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.25F,
0.25F, false);
for(int i=0;i<this.level.random.nextInt(3)+1;i++)
this.level.addParticle(Particles.STEAM.get(), d0 + this.level.random.nextFloat(), d1,
d2 + this.level.random.nextFloat(), 0.0D, 0.0D, 0.0D);
// }
}
} else
particleInterval = 0;
}
}
}
private int particleInterval = 0;
public boolean addToGoggleTooltip(List<ITextComponent> tooltip, boolean isPlayerSneaking) {
this.containedFluidTooltip(tooltip, isPlayerSneaking, LazyOptional.of(() -> input));
this.containedFluidTooltip(tooltip, isPlayerSneaking, LazyOptional.of(() -> output));
return true;
}
@Override
public void commitHeat(float value) {
heatreceived = (int) value;
protected abstract int getHUPerTick();
}
@Override
public <T> LazyOptional<T> getCapability(Capability<T> cap, Direction side) {
if (!this.holder.isPresent()) {
this.refreshCapability();
}
return cap == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY ? holder.cast() : super.getCapability(cap, side);
}
public boolean addToGoggleTooltip(List<ITextComponent> tooltip, boolean isPlayerSneaking) {
this.containedFluidTooltip(tooltip, isPlayerSneaking, LazyOptional.of(() -> input));
this.containedFluidTooltip(tooltip, isPlayerSneaking, LazyOptional.of(() -> output));
return true;
}
private void refreshCapability() {
LazyOptional<IFluidHandler> oldCap = this.holder;
this.holder = LazyOptional.of(() -> {
return this.ft;
});
oldCap.invalidate();
}
protected abstract int getHUPerTick();
@Override
public <T> LazyOptional<T> getCapability(Capability<T> cap, Direction side) {
if (!this.holder.isPresent()) {
this.refreshCapability();
}
return cap == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY ? holder.cast() : super.getCapability(cap, side);
}
private void refreshCapability() {
LazyOptional<IFluidHandler> oldCap = this.holder;
this.holder = LazyOptional.of(() -> {
return this.ft;
});
oldCap.invalidate();
}
}

View file

@ -48,7 +48,7 @@ public abstract class BurnerTileEntity extends TileEntity implements ITickableTi
@Override
public boolean isItemValid(int slot, ItemStack stack) {
if (ForgeHooks.getBurnTime(stack) != 0) return true;
if (ForgeHooks.getBurnTime(stack) != 0&&stack.getContainerItem().isEmpty()) return true;
return false;
}
@ -130,20 +130,27 @@ public abstract class BurnerTileEntity extends TileEntity implements ITickableTi
if (HURemain > 0) {
emitHeat(HURemain);
HURemain = 0;
this.setChanged();
this.level.sendBlockUpdated(worldPosition, state, state, 3);
}
this.level.setBlockAndUpdate(this.worldPosition, state.setValue(BurnerBlock.LIT, false));
if(state.getValue(BurnerBlock.LIT))
this.level.setBlockAndUpdate(this.worldPosition, state.setValue(BurnerBlock.LIT, false));
} else {
HURemain -= emit;
emitHeat(emit);
this.level.setBlockAndUpdate(this.worldPosition, state.setValue(BurnerBlock.LIT, true));
this.setChanged();
if(!state.getValue(BurnerBlock.LIT))
this.level.setBlockAndUpdate(this.worldPosition, state.setValue(BurnerBlock.LIT, true));
else this.level.sendBlockUpdated(worldPosition, state, state, 3);
}
this.level.sendBlockUpdated(this.getBlockPos(), this.getBlockState(), this.getBlockState(), 3);
this.setChanged();
}
}
private boolean consumeFuel() {
if(this.getBlockState().getValue(BurnerBlock.REDSTONE_LOCKED))return false;
int time = ForgeHooks.getBurnTime(inv.getStackInSlot(0), IRecipeType.SMELTING);
if (time <= 0) return false;
inv.getStackInSlot(0).shrink(1);

View file

@ -53,4 +53,9 @@ public class BronzeSteamEngineTileEntity extends SteamEngineTileEntity {
public int getSteamStorage() {
return SPConfig.COMMON.bronzeFlywheelSteamStorage.get();
}
@Override
public double getSuckEfficiency() {
return SPConfig.COMMON.bronzeFlywheelSuckEfficiency.get();
}
}

View file

@ -53,4 +53,9 @@ public class CastIronSteamEngineTileEntity extends SteamEngineTileEntity {
public int getSteamStorage() {
return SPConfig.COMMON.castIronFlywheelSteamStorage.get();
}
@Override
public double getSuckEfficiency() {
return SPConfig.COMMON.castIronFlywheelSuckEfficiency.get();
}
}

View file

@ -96,26 +96,7 @@ public class SteamEngineBlock extends EngineBlock {
return true;
}
@OnlyIn(Dist.CLIENT)
public void animateTick(BlockState p_180655_1_, World p_180655_2_, BlockPos p_180655_3_, Random p_180655_4_) {
if (p_180655_1_.getValue(LIT)) {
double d0 = p_180655_3_.getX() + 0.5D;
double d1 = p_180655_3_.getY();
double d2 = p_180655_3_.getZ() + 0.5D;
if (p_180655_4_.nextDouble() < 0.1D) {
p_180655_2_.playLocalSound(d0, d1, d2, SoundEvents.BLASTFURNACE_FIRE_CRACKLE, SoundCategory.BLOCKS, 1.0F, 1.0F, false);
}
Direction direction = p_180655_1_.getValue(FACING);
Direction.Axis direction$axis = direction.getAxis();
double d3 = 0.52D;
double d4 = p_180655_4_.nextDouble() * 0.6D - 0.3D;
double d5 = direction$axis == Direction.Axis.X ? direction.getStepX() * 0.52D : d4;
double d6 = p_180655_4_.nextDouble() * 9.0D / 16.0D;
double d7 = direction$axis == Direction.Axis.Z ? direction.getStepZ() * 0.52D : d4;
p_180655_2_.addParticle(Particles.STEAM.get(), d0 + d5, d1 + d6, d2 + d7, 0.0D, 0.0D, 0.0D);
}
}
@Override
public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult blockRayTraceResult) {

View file

@ -29,6 +29,8 @@ import com.simibubi.create.content.contraptions.components.flywheel.engine.Engin
import com.simibubi.create.content.contraptions.components.flywheel.engine.EngineTileEntity;
import com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation;
import com.teammoeg.steampowered.FluidRegistry;
import com.teammoeg.steampowered.client.Particles;
import com.teammoeg.steampowered.content.boiler.BoilerTileEntity;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
@ -40,21 +42,67 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityType;
import net.minecraft.util.Direction;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.SoundEvents;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.util.LazyOptional;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
import net.minecraftforge.fluids.capability.IFluidHandler;
import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction;
import net.minecraftforge.fluids.capability.templates.FluidTank;
public abstract class SteamEngineTileEntity extends EngineTileEntity implements IHaveGoggleInformation {
private FluidTank tank;
private LazyOptional<IFluidHandler> holder = LazyOptional.of(() -> tank);
private IFluidHandler handler=new IFluidHandler() {
@Override
public int getTanks() {
return 1;
}
@Override
public FluidStack getFluidInTank(int itank) {
return tank.getFluid();
}
@Override
public int getTankCapacity(int itank) {
return tank.getCapacity();
}
@Override
public boolean isFluidValid(int itank, FluidStack stack) {
return tank.isFluidValid(stack);
}
@Override
public int fill(FluidStack resource, FluidAction action) {
int filled=tank.fill(resource, action);
if(filled>0&&action==FluidAction.EXECUTE) {
setChanged();
level.sendBlockUpdated(worldPosition,getBlockState(),getBlockState(),3);
}
return filled;
}
@Override
public FluidStack drain(FluidStack resource, FluidAction action) {
return FluidStack.EMPTY;
}
@Override
public FluidStack drain(int maxDrain, FluidAction action) {
return FluidStack.EMPTY;
}
};
private LazyOptional<IFluidHandler> holder = LazyOptional.of(() -> handler);
private int heatup = 0;
public SteamEngineTileEntity(TileEntityType<? extends SteamEngineTileEntity> type) {
@ -72,37 +120,91 @@ public abstract class SteamEngineTileEntity extends EngineTileEntity implements
@Override
public void tick() {
super.tick();
if (level != null && !level.isClientSide) {
if(level == null)return;
if (!level.isClientSide) {
BlockState state = this.level.getBlockState(this.worldPosition);
if(this.poweredWheel==null)attachWheel();
if (this.poweredWheel == null || this.poweredWheel.isRemoved()) {
this.level.setBlockAndUpdate(this.worldPosition, state.setValue(SteamEngineBlock.LIT, false));
this.refreshWheelSpeed();
heatup = 0;
tank.drain(this.getSteamConsumptionPerTick(), IFluidHandler.FluidAction.EXECUTE);
} else {
if (!tank.isEmpty() && tank.drain(this.getSteamConsumptionPerTick(), IFluidHandler.FluidAction.EXECUTE)
.getAmount() >= this.getSteamConsumptionPerTick()) {
this.level.setBlockAndUpdate(this.worldPosition, state.setValue(SteamEngineBlock.LIT, true));
if (heatup >= 60) {
this.appliedCapacity = this.getGeneratingCapacity();
this.appliedSpeed = this.getGeneratingSpeed();
this.refreshWheelSpeed();
} else
heatup++;
} else {
if (heatup > 0)
heatup--;
this.level.setBlockAndUpdate(this.worldPosition, state.setValue(SteamEngineBlock.LIT, false));
if(this.appliedSpeed!=0||this.appliedCapacity!=0) {
this.appliedCapacity = 0;
this.appliedSpeed = 0;
this.refreshWheelSpeed();
}
heatup = 0;
if(!tank.drain(this.getSteamConsumptionPerTick(), IFluidHandler.FluidAction.EXECUTE).isEmpty()) {
this.setChanged();
level.sendBlockUpdated(worldPosition,getBlockState(),getBlockState(),3);
}
if(state.getValue(SteamEngineBlock.LIT))
this.level.setBlockAndUpdate(this.worldPosition, state.setValue(SteamEngineBlock.LIT, false));
} else {
Direction engineFacing = this.getBlockState().getValue(EngineBlock.FACING);
BlockPos boilerPos = this.worldPosition.relative(engineFacing, -1);
FluidTank tank=this.tank;
if(this.tank.isEmpty()) {
TileEntity te=this.getWorld().getBlockEntity(boilerPos);
if(te instanceof BoilerTileEntity) {
tank=((BoilerTileEntity)te).output;
}
}
if(heatup==0&&tank.getFluidAmount()/this.getSteamConsumptionPerTick()<40)
return;
if (!tank.isEmpty() && tank.drain(this.getSteamConsumptionPerTick(), IFluidHandler.FluidAction.EXECUTE)
.getAmount() >= this.getSteamConsumptionPerTick()) {
if (heatup >= 60) {
float spd=this.getGeneratingSpeed();
if(this.tank!=tank)
spd=MathHelper.ceil(spd*this.getSuckEfficiency());
this.appliedCapacity = this.getGeneratingCapacity();
if(this.appliedSpeed!=spd) {
this.appliedSpeed = this.getGeneratingSpeed();
this.refreshWheelSpeed();
}
} else {
heatup++;
this.setChanged();
level.sendBlockUpdated(worldPosition,getBlockState(),getBlockState(),3);
if(!state.getValue(SteamEngineBlock.LIT))
this.level.setBlockAndUpdate(this.worldPosition, state.setValue(SteamEngineBlock.LIT, true));
}
} else {
if (heatup > 0) {
heatup--;
this.setChanged();
level.sendBlockUpdated(worldPosition,getBlockState(),getBlockState(),3);
}
if(this.appliedSpeed!=0||this.appliedCapacity!=0) {
this.appliedCapacity = 0;
this.appliedSpeed = 0;
this.refreshWheelSpeed();
}
if(state.getValue(SteamEngineBlock.LIT))
this.level.setBlockAndUpdate(this.worldPosition, state.setValue(SteamEngineBlock.LIT, false));
}
}
this.level.sendBlockUpdated(this.getBlockPos(), this.getBlockState(), this.getBlockState(), 3);
this.setChanged();
}else{
if (this.getBlockState().getValue(SteamEngineBlock.LIT)) {
paticleInterval++;
double d0 = this.worldPosition.getX() + 0.5D;
double d1 = this.worldPosition.getY();
double d2 = this.worldPosition.getZ() + 0.5D;
if (paticleInterval>=40) {
paticleInterval=0;
this.level.playLocalSound(d0, d1, d2, SoundEvents.FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.25f, 0.25F, false);
Direction direction = this.getBlockState().getValue(SteamEngineBlock.FACING);
Direction.Axis direction$axis = direction.getAxis();
double d4 = this.level.random.nextDouble() * 0.6D - 0.3D;
double d5 = direction$axis == Direction.Axis.X ? direction.getStepX() * 0.52D : d4;
double d6 = this.level.random.nextDouble() * 9.0D / 16.0D;
double d7 = direction$axis == Direction.Axis.Z ? direction.getStepZ() * 0.52D : d4;
this.level.addParticle(Particles.STEAM.get(), d0 + d5, d1 + d6, d2 + d7, 0.0D, 0.0D, 0.0D);
}
}else paticleInterval=0;
}
}
private int paticleInterval;
public boolean addToGoggleTooltip(List<ITextComponent> tooltip, boolean isPlayerSneaking) {
if (!this.getBlockState().getValue(SteamEngineBlock.LIT)) {
tooltip.add(componentSpacing.plainCopy()
@ -147,17 +249,18 @@ public abstract class SteamEngineTileEntity extends EngineTileEntity implements
private void refreshCapability() {
LazyOptional<IFluidHandler> oldCap = this.holder;
this.holder = LazyOptional.of(() -> {
return this.tank;
return this.handler;
});
oldCap.invalidate();
}
public void attachWheel() {
Direction engineFacing = (Direction) this.getBlockState().getValue(EngineBlock.FACING);
Direction engineFacing = this.getBlockState().getValue(EngineBlock.FACING);
BlockPos wheelPos = this.worldPosition.relative(engineFacing, 2);
BlockState wheelState = this.level.getBlockState(wheelPos);
if (this.getFlywheel() == wheelState.getBlock()) {
Direction wheelFacing = (Direction) wheelState.getValue(FlywheelBlock.HORIZONTAL_FACING);
Direction wheelFacing = wheelState.getValue(FlywheelBlock.HORIZONTAL_FACING);
if (wheelFacing.getAxis() == engineFacing.getClockWise().getAxis()) {
if (!FlywheelBlock.isConnected(wheelState)
|| FlywheelBlock.getConnection(wheelState) == engineFacing.getOpposite()) {
@ -171,12 +274,17 @@ public abstract class SteamEngineTileEntity extends EngineTileEntity implements
this.poweredWheel = (FlywheelTileEntity) te;
this.refreshWheelSpeed();
return;
}
}
}
}
}
if(poweredWheel!=null&&!poweredWheel.isRemoved()) {
this.poweredWheel.setRotation(0, 0);
this.poweredWheel =null;
}
}
public abstract Block getFlywheel();
@ -188,4 +296,12 @@ public abstract class SteamEngineTileEntity extends EngineTileEntity implements
public abstract int getSteamConsumptionPerTick();
public abstract int getSteamStorage();
public abstract double getSuckEfficiency();
@Override
public void lazyTick() {
super.lazyTick();
this.attachWheel();
}
}

View file

@ -56,6 +56,7 @@ public class SteelSteamEngineBlock extends SteamEngineBlock implements ITE<Steel
}else {
t.add(TooltipHelper.holdShift(Palette.Gray,false));
}
super.appendHoverText(i,w,t,f);
}
@Override

View file

@ -53,4 +53,9 @@ public class SteelSteamEngineTileEntity extends SteamEngineTileEntity {
public int getSteamStorage() {
return SPConfig.COMMON.steelFlywheelSteamStorage.get();
}
@Override
public double getSuckEfficiency() {
return SPConfig.COMMON.steelFlywheelSuckEfficiency.get();
}
}

View file

@ -0,0 +1,37 @@
package com.teammoeg.steampowered.mixin;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import com.simibubi.create.foundation.item.ItemDescription;
import com.simibubi.create.foundation.utility.Lang;
import com.teammoeg.steampowered.SPConfig;
import com.teammoeg.steampowered.content.engine.BronzeSteamEngineBlock;
import com.teammoeg.steampowered.content.engine.CastIronSteamEngineBlock;
import com.teammoeg.steampowered.content.engine.SteamEngineBlock;
import com.teammoeg.steampowered.content.engine.SteelSteamEngineBlock;
import net.minecraft.block.Block;
import net.minecraft.util.text.IFormattableTextComponent;
import net.minecraft.util.text.ITextComponent;
@Mixin(ItemDescription.class)
public class MixinItemDescription {
public MixinItemDescription() {
}
@Inject(at=@At("HEAD"),method="generatorSpeed",remap=false,cancellable=true)
private static void sp$speed(Block block, ITextComponent unitRPM,CallbackInfoReturnable<IFormattableTextComponent> cbi) {
if(block instanceof SteamEngineBlock) {
if(block instanceof BronzeSteamEngineBlock)
cbi.setReturnValue(Lang.translate("tooltip.generationSpeed", SPConfig.COMMON.bronzeFlywheelSpeed.get(),unitRPM));
else if(block instanceof CastIronSteamEngineBlock)
cbi.setReturnValue(Lang.translate("tooltip.generationSpeed", SPConfig.COMMON.castIronFlywheelSpeed.get(),unitRPM));
else if(block instanceof SteelSteamEngineBlock)
cbi.setReturnValue(Lang.translate("tooltip.generationSpeed", SPConfig.COMMON.steelFlywheelSpeed.get(),unitRPM));
}
}
}

View file

@ -56,11 +56,7 @@ public class SPScenes {
BlockPos boiler = util.grid.at(2, 2, 2);
BlockPos engine = util.grid.at(0, 2, 2);
BlockPos steamPump = util.grid.at(1, 2, 2);
BlockPos steamCog1 = util.grid.at(1, 3, 3);
BlockPos steamCog2 = util.grid.at(0, 3, 3);
BlockPos waterPump = util.grid.at(4, 3, 2);
BlockPos waterCog1 = util.grid.at(4, 2, 1);
BlockPos waterCog2 = util.grid.at(5, 2, 1);
// show the whole structure
scene.world.showSection(util.select.layer(0), Direction.UP);
@ -70,8 +66,7 @@ public class SPScenes {
// water pumps
scene.world.setKineticSpeed(util.select.position(waterPump), 32.0F);
scene.world.setKineticSpeed(util.select.position(waterCog1), 16.0F);
scene.world.setKineticSpeed(util.select.position(waterCog2), 16.0F);
scene.world.setKineticSpeed(util.select.fromTo(4, 2, 1,5, 2, 1), -16.0F);
scene.idle(30);
// boiler text
@ -116,8 +111,7 @@ public class SPScenes {
// steam pumps
scene.world.setKineticSpeed(util.select.position(steamPump), 64.0F);
scene.world.setKineticSpeed(util.select.position(steamCog1), 32.0F);
scene.world.setKineticSpeed(util.select.position(steamCog2), 32.0F);
scene.world.setKineticSpeed(util.select.fromTo(0,3,3,1,3,3), -32.0F);
scene.world.modifyBlock(engine, s -> s.setValue(SteamEngineBlock.LIT, true), false);
scene.idle(50);
@ -150,7 +144,7 @@ public class SPScenes {
scene.idle(10);
scene.world.showSection(util.select.fromTo(3,2,3,4,3,4), Direction.WEST);
scene.world.setKineticSpeed(util.select.position(4,2,3), 64F);
scene.world.setKineticSpeed(util.select.fromTo(3,3,4,4,3,4), 32F);
scene.world.setKineticSpeed(util.select.fromTo(3,3,4,4,3,4), -32F);
scene.idle(10);
scene.world.showSection(b2Select, Direction.UP);
scene.world.modifyBlock(util.grid.at(5, 1, 3),state->state.setValue(BurnerBlock.LIT,true),false);
@ -225,12 +219,10 @@ public class SPScenes {
BlockPos redstone = util.grid.at(3, 1, 1);
BlockPos lever = util.grid.at(3, 1, 0);
scene.world.setKineticSpeed(util.select.position(largecog), 16.0F);
scene.idle(5);
scene.world.setKineticSpeed(util.select.position(largecog), -16.0F);
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(gauge), 32.0F);
scene.world.setKineticSpeed(util.select.position(generator), 32.0F);
scene.idle(5);

View file

@ -32,6 +32,18 @@ public class SPItems {
public static final ItemEntry<Item> BRONZE_SHEET =
REGISTRATE.item("bronze_sheet", Item::new)
.register();
public static final ItemEntry<Item> CAST_IRON_SHEET =
REGISTRATE.item("cast_iron_sheet", Item::new)
.register();
public static final ItemEntry<Item> STEEL_SHEET =
REGISTRATE.item("steel_sheet", Item::new)
.register();
public static final ItemEntry<Item> CAST_IRON_INGOT =
REGISTRATE.item("cast_iron_ingot", Item::new)
.register();
public static final ItemEntry<Item> STEEL_INGOT =
REGISTRATE.item("steel_ingot", Item::new)
.register();
public static void register() {
}

View file

@ -89,6 +89,7 @@ public class SPTiles {
public static final TileEntityEntry<SteelSteamEngineTileEntity> STEEL_STEAM_ENGINE = REGISTRATE
.tileEntity("steel_steam_engine", SteelSteamEngineTileEntity::new)
.validBlocks(SPBlocks.STEEL_STEAM_ENGINE)
.register();
public static final TileEntityEntry<MetalCogwheelTileEntity> METAL_COGWHEEL = REGISTRATE

View file

@ -3,6 +3,10 @@
"item.steampowered.pressurized_gas_container": "Pressurized Gas Container",
"item.steampowered.pressurized_steam_container": "Pressurized Steam Container",
"item.steampowered.bronze_sheet": "Bronze Sheet",
"item.steampowered.cast_iron_sheet": "Cast Iron Sheet",
"item.steampowered.steel_sheet": "Steel Sheet",
"item.steampowered.cast_iron_ingot": "Cast Iron Ingot",
"item.steampowered.steel_ingot": "Steel Ingot",
"block.steampowered.bronze_steam_engine": "Bronze Steam Engine",
"block.steampowered.cast_iron_steam_engine": "Cast Iron Steam Engine",

View file

@ -3,6 +3,10 @@
"item.steampowered.pressurized_gas_container": "Recipiente de gas presurizado",
"item.steampowered.pressurized_steam_container": "Recipiente de vapor presurizado",
"item.steampowered.bronze_sheet": "Lámina de bronce",
"item.steampowered.cast_iron_sheet": "Lámina de hierro fundido",
"item.steampowered.steel_sheet": "Lámina de acero",
"item.steampowered.cast_iron_ingot": "Cast Iron Ingot",
"item.steampowered.steel_ingot": "Steel Ingot",
"block.steampowered.bronze_steam_engine": "Motor de vapor de bronce",
"block.steampowered.cast_iron_steam_engine": "Motor de vapor de hierro fundido",

View file

@ -3,6 +3,10 @@
"item.steampowered.pressurized_gas_container": "加圧式ガスコンテナ",
"item.steampowered.pressurized_steam_container": "加圧式蒸気コンテナ",
"item.steampowered.bronze_sheet": "青銅の板",
"item.steampowered.cast_iron_sheet": "鋳鉄の板",
"item.steampowered.steel_sheet": "鋼鉄の板",
"item.steampowered.cast_iron_ingot": "Cast Iron Ingot",
"item.steampowered.steel_ingot": "Steel Ingot",
"block.steampowered.bronze_steam_engine": "青銅の蒸気エンジン",
"block.steampowered.cast_iron_steam_engine": "鋳鉄の蒸気エンジン",

View file

@ -3,6 +3,10 @@
"item.steampowered.pressurized_gas_container": "高压气体容器",
"item.steampowered.pressurized_steam_container": "高压蒸汽容器",
"item.steampowered.bronze_sheet": "青铜板",
"item.steampowered.cast_iron_sheet": "铸铁板",
"item.steampowered.steel_sheet": "钢板",
"item.steampowered.cast_iron_ingot": "铸铁锭",
"item.steampowered.steel_ingot": "钢锭",
"block.steampowered.bronze_steam_engine": "青铜蒸汽引擎",
"block.steampowered.cast_iron_steam_engine": "铸铁蒸汽引擎",

View file

@ -2,7 +2,7 @@
"parent": "minecraft:block/orientable_with_bottom",
"textures": {
"top": "steampowered:block/burner/bronze_top",
"bottom": "steampowered:block/burner/bottom",
"bottom": "minecraft:block/bricks",
"side": "steampowered:block/burner/bronze_side",
"front": "steampowered:block/burner/bronze_front"
}

View file

@ -2,7 +2,7 @@
"parent": "minecraft:block/orientable_with_bottom",
"textures": {
"top": "steampowered:block/burner/bronze_top",
"bottom": "steampowered:block/burner/bottom",
"bottom": "minecraft:block/bricks",
"side": "steampowered:block/burner/bronze_side",
"front": "steampowered:block/burner/bronze_front_on"
}

View file

@ -5,7 +5,7 @@
"textures": {
"0": "create:block/axis",
"3": "create:block/axis_top",
"particle": "block/stripped_spruce_log",
"particle": "steampowered:block/cogwheel/bronze_cogwheel",
"1_2": "steampowered:block/cogwheel/bronze_cogwheel"
},
"elements": [

View file

@ -5,7 +5,7 @@
"textures": {
"0": "create:block/axis",
"3": "create:block/axis_top",
"particle": "block/stripped_spruce_log",
"particle": "steampowered:block/cogwheel/bronze_large_cogwheel",
"4": "steampowered:block/cogwheel/bronze_large_cogwheel"
},
"elements": [

View file

@ -2,7 +2,7 @@
"parent": "minecraft:block/orientable_with_bottom",
"textures": {
"top": "steampowered:block/burner/cast_iron_top",
"bottom": "steampowered:block/burner/bottom",
"bottom": "minecraft:block/bricks",
"side": "steampowered:block/burner/cast_iron_side",
"front": "steampowered:block/burner/cast_iron_front"
}

View file

@ -2,7 +2,7 @@
"parent": "minecraft:block/orientable_with_bottom",
"textures": {
"top": "steampowered:block/burner/cast_iron_top",
"bottom": "steampowered:block/burner/bottom",
"bottom": "minecraft:block/bricks",
"side": "steampowered:block/burner/cast_iron_side",
"front": "steampowered:block/burner/cast_iron_front_on"
}

View file

@ -5,7 +5,7 @@
"textures": {
"0": "create:block/axis",
"3": "create:block/axis_top",
"particle": "block/stripped_spruce_log",
"particle": "steampowered:block/cogwheel/cast_iron_cogwheel",
"1_2": "steampowered:block/cogwheel/cast_iron_cogwheel"
},
"elements": [

View file

@ -5,7 +5,7 @@
"textures": {
"0": "create:block/axis",
"3": "create:block/axis_top",
"particle": "block/stripped_spruce_log",
"particle": "steampowered:block/cogwheel/cast_iron_large_cogwheel",
"4": "steampowered:block/cogwheel/cast_iron_large_cogwheel"
},
"elements": [

View file

@ -2,7 +2,7 @@
"parent": "minecraft:block/orientable_with_bottom",
"textures": {
"top": "steampowered:block/burner/steel_top",
"bottom": "steampowered:block/burner/bottom",
"bottom": "minecraft:block/bricks",
"side": "steampowered:block/burner/steel_side",
"front": "steampowered:block/burner/steel_front"
}

View file

@ -2,7 +2,7 @@
"parent": "minecraft:block/orientable_with_bottom",
"textures": {
"top": "steampowered:block/burner/steel_top",
"bottom": "steampowered:block/burner/bottom",
"bottom": "minecraft:block/bricks",
"side": "steampowered:block/burner/steel_side",
"front": "steampowered:block/burner/steel_front_on"
}

View file

@ -5,7 +5,7 @@
"textures": {
"0": "create:block/axis",
"3": "create:block/axis_top",
"particle": "block/stripped_spruce_log",
"particle": "steampowered:block/cogwheel/steel_cogwheel",
"1_2": "steampowered:block/cogwheel/steel_cogwheel"
},
"elements": [

View file

@ -5,7 +5,7 @@
"textures": {
"0": "create:block/axis",
"3": "create:block/axis_top",
"particle": "block/stripped_spruce_log",
"particle": "steampowered:block/cogwheel/steel_large_cogwheel",
"4": "steampowered:block/cogwheel/steel_large_cogwheel"
},
"elements": [

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0" : "steampowered:item/cast_iron_ingot"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0" : "steampowered:item/cast_iron_sheet"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0" : "steampowered:item/steel_ingot"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0" : "steampowered:item/steel_sheet"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 B

After

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 221 B

After

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 B

After

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 221 B

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 B

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 221 B

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 576 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 390 B

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 397 B

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 B

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 390 B

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 398 B

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 327 B

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 B

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 390 B

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 396 B

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 327 B

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 B

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 339 B

After

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 492 B

After

Width:  |  Height:  |  Size: 362 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 339 B

After

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 457 B

After

Width:  |  Height:  |  Size: 362 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 339 B

After

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 492 B

After

Width:  |  Height:  |  Size: 362 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 B

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 B

After

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 B

After

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 B

After

Width:  |  Height:  |  Size: 235 B

View file

@ -0,0 +1,5 @@
{
"replace": false,
"values": [
]
}

View file

@ -0,0 +1,5 @@
{
"replace": false,
"values": [
]
}

View file

@ -0,0 +1,5 @@
{
"replace": false,
"values": [
]
}

View file

@ -0,0 +1,5 @@
{
"replace": false,
"values": [
]
}

View file

@ -0,0 +1,5 @@
{
"replace": false,
"values": [
]
}

View file

@ -0,0 +1,5 @@
{
"replace": false,
"values": [
]
}

View file

@ -0,0 +1,33 @@
{
"type": "create:mechanical_crafting",
"pattern": [
" AAA ",
"ACPCA",
"APSPA",
"ACPCA",
" AAA "
],
"key": {
"P": {
"tag": "minecraft:planks"
},
"S": {
"item": "create:shaft"
},
"A": {
"tag": "forge:ingots/brass"
},
"C": {
"item": "steampowered:bronze_cogwheel"
}
},
"result": {
"item": "steampowered:bronze_flywheel"
},
"conditions": [
{
"tag": "forge:ingots/bronze",
"type": "forge:tag_empty"
}
]
}

View file

@ -0,0 +1,29 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"SDS",
"DCD",
"SDS"
],
"key": {
"S": {
"tag": "forge:ingots/brass"
},
"C": {
"item": "create:andesite_alloy"
},
"D": {
"tag": "steampowered:plates/bronze"
}
},
"result": {
"item": "steampowered:bronze_large_cogwheel",
"count": 8
},
"conditions": [
{
"tag": "forge:ingots/bronze",
"type": "forge:tag_empty"
}
]
}

View file

@ -0,0 +1,27 @@
{
"type": "create:compacting",
"ingredients": [
{
"tag": "forge:ingots/brass"
},
{
"tag": "forge:ingots/brass"
},
{
"item": "create:copper_ingot"
}
],
"results": [
{
"item": "steampowered:bronze_sheet",
"count": 2
}
],
"heatRequirement": "heated",
"conditions": [
{
"tag": "forge:ingots/bronze",
"type": "forge:tag_empty"
}
]
}

View file

@ -0,0 +1,36 @@
{
"type": "create:mechanical_crafting",
"pattern": [
"PCB",
"PCI",
"PCB"
],
"key": {
"P": {
"tag": "steampowered:plates/bronze"
},
"B": {
"tag": "forge:ingots/brass"
},
"I": [
{
"item": "minecraft:piston"
},
{
"item": "minecraft:sticky_piston"
}
],
"C": {
"item": "create:fluid_pipe"
}
},
"result": {
"item": "steampowered:bronze_steam_engine"
},
"conditions": [
{
"tag": "forge:ingots/bronze",
"type": "forge:tag_empty"
}
]
}

View file

@ -0,0 +1,39 @@
{
"type": "create:compacting",
"ingredients": [
{
"tag": "forge:ingots/iron"
},
{
"tag": "forge:ingots/iron"
},
{
"tag": "forge:ingots/iron"
},
{
"item": "minecraft:coal"
},
{
"item": "minecraft:coal"
},
{
"item": "minecraft:coal"
},
{
"item": "minecraft:coal"
}
],
"results": [
{
"item": "steampowered:cast_iron_ingot",
"count":2
}
],
"heatRequirement": "heated",
"conditions": [
{
"tag": "forge:ingots/cast_iron",
"type": "forge:tag_empty"
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "create:pressing",
"ingredients": [
{
"tag": "steampowered:ingots/cast_iron"
}
],
"results": [
{
"item": "steampowered:cast_iron_sheet"
}
],
"conditions": [
{
"tag": "forge:plates/cast_iron",
"type": "forge:tag_empty"
}
]
}

View file

@ -0,0 +1,26 @@
{
"type": "create:compacting",
"ingredients": [
{
"tag": "steampowered:ingots/cast_iron"
},
{
"tag": "steampowered:ingots/cast_iron"
}
],
"results": [
{
"item": "steampowered:steel_ingot"
},
{
"item": "minecraft:coal"
}
],
"heatRequirement": "superheated",
"conditions": [
{
"tag": "forge:ingots/steel",
"type": "forge:tag_empty"
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "create:pressing",
"ingredients": [
{
"tag": "steampowered:ingots/steel"
}
],
"results": [
{
"item": "steampowered:steel_sheet"
}
],
"conditions": [
{
"tag": "forge:plates/steel",
"type": "forge:tag_empty"
}
]
}

View file

@ -1,16 +1,19 @@
{
"type": "create:mechanical_crafting",
"pattern": [
" IRI ",
"ILILI",
" CRC ",
"CLILC",
"RLSLR",
"ILILI",
" IRI "
"CLILC",
" CRC "
],
"key": {
"I": {
"tag": "forge:ingots/iron"
},
"C": {
"tag": "steampowered:ingots/cast_iron"
},
"R": {
"item": "minecraft:redstone"
},

View file

@ -7,7 +7,7 @@
],
"key": {
"S": {
"tag": "steampowered:bronzeplate"
"tag": "steampowered:plates/bronze"
},
"C": {
"item": "create:fluid_pipe"

View file

@ -7,7 +7,7 @@
],
"key": {
"S": {
"tag": "steampowered:bronzeplate"
"tag": "steampowered:plates/bronze"
},
"C": {
"item": "minecraft:bricks"

View file

@ -7,7 +7,7 @@
],
"key": {
"S": {
"tag": "steampowered:bronze"
"tag": "steampowered:plates/bronze"
},
"C": {
"item": "create:andesite_alloy"

View file

@ -15,7 +15,7 @@
"item": "create:shaft"
},
"A": {
"tag": "steampowered:bronze"
"tag": "forge:ingots/bronze"
},
"C": {
"item": "steampowered:bronze_cogwheel"
@ -24,5 +24,14 @@
"result": {
"item": "steampowered:bronze_flywheel",
"count": 1
}
},
"conditions": [
{
"type": "forge:not",
"value": {
"tag": "forge:ingots/bronze",
"type": "forge:tag_empty"
}
}
]
}

View file

@ -7,17 +7,26 @@
],
"key": {
"S": {
"tag": "steampowered:bronze"
"tag": "forge:ingots/bronze"
},
"C": {
"item": "create:andesite_alloy"
},
"D": {
"tag": "steampowered:bronzeplate"
"tag": "steampowered:plates/bronze"
}
},
"result": {
"item": "steampowered:bronze_large_cogwheel",
"count": 8
}
},
"conditions": [
{
"type": "forge:not",
"value": {
"tag": "forge:ingots/bronze",
"type": "forge:tag_empty"
}
}
]
}

View file

@ -7,10 +7,10 @@
],
"key": {
"P": {
"tag": "steampowered:bronzeplate"
"tag": "steampowered:plates/bronze"
},
"B": {
"tag": "steampowered:bronze"
"tag": "forge:ingots/bronze"
},
"I": [
{
@ -26,5 +26,14 @@
},
"result": {
"item": "steampowered:bronze_steam_engine"
}
},
"conditions": [
{
"type": "forge:not",
"value": {
"tag": "forge:ingots/bronze",
"type": "forge:tag_empty"
}
}
]
}

View file

@ -7,7 +7,7 @@
],
"key": {
"S": {
"tag": "forge:plates/iron"
"tag": "steampowered:plates/cast_iron"
},
"C": {
"item": "create:fluid_pipe"

View file

@ -7,7 +7,7 @@
],
"key": {
"S": {
"tag": "forge:plates/iron"
"tag": "steampowered:plates/cast_iron"
},
"C": {
"item": "minecraft:bricks"

View file

@ -7,7 +7,7 @@
],
"key": {
"S": {
"tag": "forge:ingots/iron"
"tag": "steampowered:ingots/cast_iron"
},
"C": {
"item": "create:andesite_alloy"

View file

@ -15,7 +15,7 @@
"item": "create:shaft"
},
"A": {
"tag": "forge:ingots/iron"
"tag": "steampowered:ingots/cast_iron"
},
"C": {
"item": "steampowered:cast_iron_cogwheel"

Some files were not shown because too many files have changed in this diff Show more