Add WIP textured drain block without logic
This commit is contained in:
parent
a98eff45af
commit
5d89272a10
12 changed files with 81 additions and 1 deletions
|
@ -0,0 +1,32 @@
|
||||||
|
package techreborn.blockentity.machine.misc;
|
||||||
|
|
||||||
|
import net.minecraft.block.entity.BlockEntityType;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.inventory.Inventory;
|
||||||
|
import reborncore.api.IListInfoProvider;
|
||||||
|
import reborncore.api.blockentity.InventoryProvider;
|
||||||
|
import reborncore.client.containerBuilder.IContainerProvider;
|
||||||
|
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||||
|
import reborncore.common.blockentity.MachineBaseBlockEntity;
|
||||||
|
import techreborn.init.TRBlockEntities;
|
||||||
|
|
||||||
|
public class DrainBlockEntity extends MachineBaseBlockEntity implements InventoryProvider, IListInfoProvider, IContainerProvider {
|
||||||
|
|
||||||
|
public DrainBlockEntity(){
|
||||||
|
this(TRBlockEntities.DRAIN);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DrainBlockEntity(BlockEntityType<?> blockEntityTypeIn) {
|
||||||
|
super(blockEntityTypeIn);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Inventory getInventory() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BuiltContainer createContainer(int syncID, PlayerEntity player) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -51,12 +51,19 @@ import techreborn.items.ItemUpgrade;
|
||||||
import techreborn.utils.ToolTipAssistUtils;
|
import techreborn.utils.ToolTipAssistUtils;
|
||||||
import techreborn.utils.WIP;
|
import techreborn.utils.WIP;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class StackToolTipHandler implements ItemTooltipCallback {
|
public class StackToolTipHandler implements ItemTooltipCallback {
|
||||||
|
|
||||||
|
private static ArrayList<Block> wipBlocks = new ArrayList<>();
|
||||||
|
|
||||||
public static void setup() {
|
public static void setup() {
|
||||||
ItemTooltipCallback.EVENT.register(new StackToolTipHandler());
|
ItemTooltipCallback.EVENT.register(new StackToolTipHandler());
|
||||||
|
|
||||||
|
// WIP injection
|
||||||
|
wipBlocks.add(TRContent.Machine.DRAIN.block);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -67,7 +74,7 @@ public class StackToolTipHandler implements ItemTooltipCallback {
|
||||||
// Machine info and upgrades helper section
|
// Machine info and upgrades helper section
|
||||||
Block block = Block.getBlockFromItem(item);
|
Block block = Block.getBlockFromItem(item);
|
||||||
|
|
||||||
if(block instanceof WIP){
|
if(wipBlocks.contains(block) || block instanceof WIP){
|
||||||
components.add(new LiteralText(Formatting.RED + StringUtils.t("techreborn.tooltip.wip")));
|
components.add(new LiteralText(Formatting.RED + StringUtils.t("techreborn.tooltip.wip")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@ import net.minecraft.util.registry.Registry;
|
||||||
import org.apache.commons.lang3.Validate;
|
import org.apache.commons.lang3.Validate;
|
||||||
import techreborn.TechReborn;
|
import techreborn.TechReborn;
|
||||||
import techreborn.blockentity.cable.CableBlockEntity;
|
import techreborn.blockentity.cable.CableBlockEntity;
|
||||||
|
import techreborn.blockentity.machine.misc.DrainBlockEntity;
|
||||||
import techreborn.blockentity.machine.multiblock.casing.MachineCasingBlockEntity;
|
import techreborn.blockentity.machine.multiblock.casing.MachineCasingBlockEntity;
|
||||||
import techreborn.blockentity.machine.multiblock.FusionControlComputerBlockEntity;
|
import techreborn.blockentity.machine.multiblock.FusionControlComputerBlockEntity;
|
||||||
import techreborn.blockentity.generator.LightningRodBlockEntity;
|
import techreborn.blockentity.generator.LightningRodBlockEntity;
|
||||||
|
@ -82,6 +83,7 @@ public class TRBlockEntities {
|
||||||
public static final BlockEntityType<DigitalChestBlockEntity> DIGITAL_CHEST = register(DigitalChestBlockEntity.class, "digital_chest", TRContent.Machine.DIGITAL_CHEST);
|
public static final BlockEntityType<DigitalChestBlockEntity> DIGITAL_CHEST = register(DigitalChestBlockEntity.class, "digital_chest", TRContent.Machine.DIGITAL_CHEST);
|
||||||
public static final BlockEntityType<CreativeQuantumChestBlockEntity> CREATIVE_QUANTUM_CHEST = register(CreativeQuantumChestBlockEntity.class, "creative_quantum_chest", TRContent.Machine.CREATIVE_QUANTUM_CHEST);
|
public static final BlockEntityType<CreativeQuantumChestBlockEntity> CREATIVE_QUANTUM_CHEST = register(CreativeQuantumChestBlockEntity.class, "creative_quantum_chest", TRContent.Machine.CREATIVE_QUANTUM_CHEST);
|
||||||
public static final BlockEntityType<CreativeQuantumTankBlockEntity> CREATIVE_QUANTUM_TANK = register(CreativeQuantumTankBlockEntity.class, "creative_quantum_tank", TRContent.Machine.CREATIVE_QUANTUM_TANK);
|
public static final BlockEntityType<CreativeQuantumTankBlockEntity> CREATIVE_QUANTUM_TANK = register(CreativeQuantumTankBlockEntity.class, "creative_quantum_tank", TRContent.Machine.CREATIVE_QUANTUM_TANK);
|
||||||
|
public static final BlockEntityType<DrainBlockEntity> DRAIN = register(DrainBlockEntity.class, "drain", TRContent.Machine.DRAIN);
|
||||||
public static final BlockEntityType<ThermalGeneratorBlockEntity> THERMAL_GEN = register(ThermalGeneratorBlockEntity.class, "thermal_generator", TRContent.Machine.THERMAL_GENERATOR);
|
public static final BlockEntityType<ThermalGeneratorBlockEntity> THERMAL_GEN = register(ThermalGeneratorBlockEntity.class, "thermal_generator", TRContent.Machine.THERMAL_GENERATOR);
|
||||||
public static final BlockEntityType<IndustrialCentrifugeBlockEntity> INDUSTRIAL_CENTRIFUGE = register(IndustrialCentrifugeBlockEntity.class, "industrial_centrifuge", TRContent.Machine.INDUSTRIAL_CENTRIFUGE);
|
public static final BlockEntityType<IndustrialCentrifugeBlockEntity> INDUSTRIAL_CENTRIFUGE = register(IndustrialCentrifugeBlockEntity.class, "industrial_centrifuge", TRContent.Machine.INDUSTRIAL_CENTRIFUGE);
|
||||||
public static final BlockEntityType<RollingMachineBlockEntity> ROLLING_MACHINE = register(RollingMachineBlockEntity.class, "rolling_machine", TRContent.Machine.ROLLING_MACHINE);
|
public static final BlockEntityType<RollingMachineBlockEntity> ROLLING_MACHINE = register(RollingMachineBlockEntity.class, "rolling_machine", TRContent.Machine.ROLLING_MACHINE);
|
||||||
|
|
|
@ -39,6 +39,7 @@ import team.reborn.energy.EnergySide;
|
||||||
import team.reborn.energy.EnergyTier;
|
import team.reborn.energy.EnergyTier;
|
||||||
import techreborn.TechReborn;
|
import techreborn.TechReborn;
|
||||||
import techreborn.blockentity.machine.misc.ChargeOMatBlockEntity;
|
import techreborn.blockentity.machine.misc.ChargeOMatBlockEntity;
|
||||||
|
import techreborn.blockentity.machine.misc.DrainBlockEntity;
|
||||||
import techreborn.blockentity.storage.fluid.CreativeQuantumTankBlockEntity;
|
import techreborn.blockentity.storage.fluid.CreativeQuantumTankBlockEntity;
|
||||||
import techreborn.blockentity.storage.fluid.QuantumTankBlockEntity;
|
import techreborn.blockentity.storage.fluid.QuantumTankBlockEntity;
|
||||||
import techreborn.blockentity.machine.tier3.IndustrialCentrifugeBlockEntity;
|
import techreborn.blockentity.machine.tier3.IndustrialCentrifugeBlockEntity;
|
||||||
|
@ -500,6 +501,7 @@ public class TRContent {
|
||||||
WATER_MILL(new GenericGeneratorBlock(null, WaterMillBlockEntity::new)),
|
WATER_MILL(new GenericGeneratorBlock(null, WaterMillBlockEntity::new)),
|
||||||
WIND_MILL(new GenericGeneratorBlock(null, WindMillBlockEntity::new)),
|
WIND_MILL(new GenericGeneratorBlock(null, WindMillBlockEntity::new)),
|
||||||
|
|
||||||
|
DRAIN(new GenericMachineBlock(null, DrainBlockEntity::new)),
|
||||||
|
|
||||||
//TODO DEPRECATED
|
//TODO DEPRECATED
|
||||||
DIGITAL_CHEST(new OldBlock(null, DigitalChestBlockEntity::new)),
|
DIGITAL_CHEST(new OldBlock(null, DigitalChestBlockEntity::new)),
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"": { "model": "techreborn:block/machines/tier0_machines/drain" }
|
||||||
|
}
|
||||||
|
}
|
|
@ -40,6 +40,7 @@
|
||||||
"block.techreborn.industrial_grinder": "Industrial Grinder",
|
"block.techreborn.industrial_grinder": "Industrial Grinder",
|
||||||
"block.techreborn.chunk_loader": "Industrial Chunkloader",
|
"block.techreborn.chunk_loader": "Industrial Chunkloader",
|
||||||
"block.techreborn.diesel_generator": "Diesel Generator",
|
"block.techreborn.diesel_generator": "Diesel Generator",
|
||||||
|
"block.techreborn.drain": "Drain",
|
||||||
"block.techreborn.industrial_electrolyzer": "Industrial Electrolyzer",
|
"block.techreborn.industrial_electrolyzer": "Industrial Electrolyzer",
|
||||||
"block.techreborn.assembly_machine": "Assembling Machine",
|
"block.techreborn.assembly_machine": "Assembling Machine",
|
||||||
"block.techreborn.semi_fluid_generator": "Semi Fluid Generator",
|
"block.techreborn.semi_fluid_generator": "Semi Fluid Generator",
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:block/cube_bottom_top",
|
||||||
|
"textures": {
|
||||||
|
"top": "techreborn:block/machines/tier0_machines/fluid_drain_top",
|
||||||
|
"side": "techreborn:block/machines/tier0_machines/fluid_drain_side",
|
||||||
|
"bottom": "techreborn:block/machines/tier0_machines/fluid_drain_bottom"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"parent": "techreborn:block/machines/tier0_machines/drain"
|
||||||
|
}
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 749 B |
Binary file not shown.
After Width: | Height: | Size: 808 B |
Binary file not shown.
After Width: | Height: | Size: 662 B |
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:block",
|
||||||
|
"pools": [
|
||||||
|
{
|
||||||
|
"rolls": 1,
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:item",
|
||||||
|
"name": "techreborn:drain"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"condition": "minecraft:survives_explosion"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in a new issue