Added storage buffer, textures thanks to Spearkiller. Thanks to Ayutac

Tested a bit, but I would like additional testing by someone else.
This commit is contained in:
Ayutac 2022-05-05 11:04:36 +02:00 committed by GitHub
parent 0cbcc3a93a
commit 6a91757791
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 99 additions and 3 deletions

View file

@ -50,7 +50,7 @@ public class StorageUnitBlock extends BlockMachineBase {
public final TRContent.StorageUnit unitType;
public StorageUnitBlock(TRContent.StorageUnit unitType) {
super((Settings.of(unitType.name.equals("crude") ? Material.WOOD : Material.METAL).strength(2.0F, 2.0F)));
super((Settings.of(unitType.name.equals("buffer") || unitType.name.equals("crude") ? Material.WOOD : Material.METAL).strength(2.0F, 2.0F)));
this.unitType = unitType;
}

View file

@ -302,6 +302,7 @@ public class TRContent {
}
public enum StorageUnit implements ItemConvertible {
BUFFER(1),
CRUDE(TechRebornConfig.crudeStorageUnitMaxStorage),
BASIC(TechRebornConfig.basicStorageUnitMaxStorage),
ADVANCED(TechRebornConfig.advancedStorageUnitMaxStorage),
@ -312,7 +313,7 @@ public class TRContent {
public final String name;
public final Block block;
// How many blocks it can hold
// How many items it can hold
public int capacity;
@ -321,7 +322,10 @@ public class TRContent {
block = new StorageUnitBlock(this);
this.capacity = capacity;
InitUtils.setup(block, name + "_storage_unit");
if (name.equals("buffer"))
InitUtils.setup(block, "storage_buffer");
else
InitUtils.setup(block, name + "_storage_unit");
}
@Override