Add second variant of condensation drive
This commit is contained in:
parent
1a4c1b468a
commit
3506e661b1
@ -112,6 +112,7 @@ public class Registry {
|
||||
public static final ResourceLocation NUTRIENT_PASTE = new ResourceLocation(OverdriveThatMatters.MOD_ID, "nutrient_paste");
|
||||
|
||||
public static final ResourceLocation PORTABLE_CONDENSATION_DRIVE = new ResourceLocation(OverdriveThatMatters.MOD_ID, "portable_condensation_drive");
|
||||
public static final ResourceLocation PORTABLE_DENSE_CONDENSATION_DRIVE = new ResourceLocation(OverdriveThatMatters.MOD_ID, "portable_dense_condensation_drive");
|
||||
|
||||
// android features and research
|
||||
public static final ResourceLocation AIR_BAGS = new ResourceLocation(OverdriveThatMatters.MOD_ID, "air_bags");
|
||||
@ -238,7 +239,8 @@ public class Registry {
|
||||
public static final ItemPatternStorage PATTERN_DRIVE_NORMAL = new ItemPatternStorage(4);
|
||||
public static final ItemPatternStorage PATTERN_DRIVE_CREATIVE = new ItemPatternStorage();
|
||||
|
||||
public static final ItemPortableCondensationDrive PORTABLE_CONDENSATION_DRIVE = new ItemPortableCondensationDrive();
|
||||
public static final ItemPortableCondensationDrive PORTABLE_CONDENSATION_DRIVE = new ItemPortableCondensationDrive(4000);
|
||||
public static final ItemPortableCondensationDrive PORTABLE_DENSE_CONDENSATION_DRIVE = new ItemPortableCondensationDrive(25000);
|
||||
|
||||
public static final Item NUTRIENT_PASTE = new Item(new Item.Properties().stacksTo(64).food(new FoodProperties.Builder().meat().nutrition(8).saturationMod(0.9F).build()).tab(OverdriveThatMatters.CREATIVE_TAB));
|
||||
|
||||
@ -270,6 +272,7 @@ public class Registry {
|
||||
PATTERN_DRIVE_NORMAL.setRegistryName(Names.PATTERN_DRIVE_NORMAL);
|
||||
PATTERN_DRIVE_CREATIVE.setRegistryName(Names.PATTERN_DRIVE_CREATIVE);
|
||||
PORTABLE_CONDENSATION_DRIVE.setRegistryName(Names.PORTABLE_CONDENSATION_DRIVE);
|
||||
PORTABLE_DENSE_CONDENSATION_DRIVE.setRegistryName(Names.PORTABLE_DENSE_CONDENSATION_DRIVE);
|
||||
|
||||
NUTRIENT_PASTE.setRegistryName(Names.NUTRIENT_PASTE);
|
||||
}
|
||||
@ -303,6 +306,7 @@ public class Registry {
|
||||
event.getRegistry().register(PATTERN_DRIVE_NORMAL);
|
||||
event.getRegistry().register(PATTERN_DRIVE_CREATIVE);
|
||||
event.getRegistry().register(PORTABLE_CONDENSATION_DRIVE);
|
||||
event.getRegistry().register(PORTABLE_DENSE_CONDENSATION_DRIVE);
|
||||
|
||||
event.getRegistry().register(NUTRIENT_PASTE);
|
||||
|
||||
|
@ -47,8 +47,11 @@ import java.util.UUID;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class ItemPortableCondensationDrive extends Item {
|
||||
public ItemPortableCondensationDrive() {
|
||||
public final int capacity;
|
||||
|
||||
public ItemPortableCondensationDrive(int capacity) {
|
||||
super(new Properties().stacksTo(1).tab(OverdriveThatMatters.CREATIVE_TAB));
|
||||
this.capacity = capacity;
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@ -109,15 +112,15 @@ public class ItemPortableCondensationDrive extends Item {
|
||||
}
|
||||
}
|
||||
|
||||
private static class DriveCapability implements ICapabilityProvider {
|
||||
private class DriveCapability implements ICapabilityProvider {
|
||||
private UUID uuid;
|
||||
private final ItemStack stack;
|
||||
private final LazyOptional<IMatteryDrive> resolver = LazyOptional.of(() -> {
|
||||
return DrivePool.get(uuid, (tag) -> {
|
||||
var drive = new MatteryDrive(4000);
|
||||
var drive = new MatteryDrive(capacity);
|
||||
drive.deserializeNBT(tag);
|
||||
return drive;
|
||||
}, () -> new MatteryDrive(4000));
|
||||
}, () -> new MatteryDrive(capacity));
|
||||
});
|
||||
|
||||
DriveCapability(ItemStack stack) {
|
||||
|
@ -138,7 +138,8 @@
|
||||
"item.overdrive_that_matters.pill_android": "Android pill",
|
||||
"item.overdrive_that_matters.pill_humane": "Humane pill",
|
||||
|
||||
"item.overdrive_that_matters.portable_condensation_drive": "Portable condensation drive",
|
||||
"item.overdrive_that_matters.portable_condensation_drive": "Portable Condensation drive",
|
||||
"item.overdrive_that_matters.portable_dense_condensation_drive": "Portable Dense Condensation drive",
|
||||
|
||||
"item.overdrive_that_matters.nutrient_paste": "Nutrient paste",
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user