Textures! Not great ones, but they exist.

main
Astoria 7 months ago
parent e76ea5f6eb
commit 3834bff826

@ -46,10 +46,10 @@ public class RedControl implements ModInitializer {
LOGGER.info("Initializing RedControl!"); LOGGER.info("Initializing RedControl!");
Registry.register(Registries.BLOCK, new Identifier("redcontrol", "cpu"), CPU); Registry.register(Registries.BLOCK, new Identifier("redcontrol", "cpu"), CPU);
Registry.register(Registries.BLOCK, new Identifier("redcontrol", "monitor"), MONITOR); Registry.register(Registries.BLOCK, new Identifier("redcontrol", "monitor"), MONITOR);
Registry.register(Registries.BLOCK, new Identifier("redcontrol", "drive"), DRIVE); Registry.register(Registries.BLOCK, new Identifier("redcontrol", "disk_drive"), DRIVE);
Registry.register(Registries.ITEM, new Identifier("redcontrol", "cpu"), new BlockItem(CPU, new FabricItemSettings())); Registry.register(Registries.ITEM, new Identifier("redcontrol", "cpu"), new BlockItem(CPU, new FabricItemSettings()));
Registry.register(Registries.ITEM, new Identifier("redcontrol", "monitor"), new BlockItem(MONITOR, new FabricItemSettings())); Registry.register(Registries.ITEM, new Identifier("redcontrol", "monitor"), new BlockItem(MONITOR, new FabricItemSettings()));
Registry.register(Registries.ITEM, new Identifier("redcontrol", "drive"), new BlockItem(DRIVE, new FabricItemSettings())); Registry.register(Registries.ITEM, new Identifier("redcontrol", "disk_drive"), new BlockItem(DRIVE, new FabricItemSettings()));
} }
} }

@ -7,7 +7,10 @@ import net.brokenmoon.redcontrol.mixin.RedBusAccessor;
import net.minecraft.block.*; import net.minecraft.block.*;
import net.minecraft.entity.LivingEntity; import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemPlacementContext;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.state.StateManager;
import net.minecraft.state.property.Properties;
import net.minecraft.text.Text; import net.minecraft.text.Text;
import net.minecraft.util.ActionResult; import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
@ -97,4 +100,15 @@ public abstract class NetworkCarrier extends BlockWithEntity implements BlockEnt
return ActionResult.SUCCESS; return ActionResult.SUCCESS;
} }
@Override
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
builder.add(Properties.HORIZONTAL_FACING);
}
@Override
public BlockState getPlacementState(ItemPlacementContext ctx) {
return super.getPlacementState(ctx).with(Properties.HORIZONTAL_FACING, ctx.getHorizontalPlayerFacing().getOpposite());
}
} }

@ -0,0 +1,8 @@
{
"variants": {
"facing=north": { "model": "redcontrol:block/cpu", "uvlock": false },
"facing=east": { "model": "redcontrol:block/cpu", "y": 90, "uvlock": false },
"facing=south": { "model": "redcontrol:block/cpu", "y": 180, "uvlock": false },
"facing=west": { "model": "redcontrol:block/cpu", "y": 270, "uvlock": false }
}
}

@ -0,0 +1,8 @@
{
"variants": {
"facing=north": { "model": "redcontrol:block/disk_drive", "uvlock": false },
"facing=east": { "model": "redcontrol:block/disk_drive", "y": 90, "uvlock": false },
"facing=south": { "model": "redcontrol:block/disk_drive", "y": 180, "uvlock": false },
"facing=west": { "model": "redcontrol:block/disk_drive", "y": 270, "uvlock": false }
}
}

@ -0,0 +1,8 @@
{
"variants": {
"facing=north": { "model": "redcontrol:block/monitor", "uvlock": false },
"facing=east": { "model": "redcontrol:block/monitor", "y": 90, "uvlock": false },
"facing=south": { "model": "redcontrol:block/monitor", "y": 180, "uvlock": false },
"facing=west": { "model": "redcontrol:block/monitor", "y": 270, "uvlock": false }
}
}

@ -0,0 +1,23 @@
{ "parent": "block/block",
"textures": {
"front": "redcontrol:block/cpu",
"left": "redcontrol:block/monitor_left",
"right": "redcontrol:block/monitor_right",
"back": "redcontrol:block/monitor_back",
"top": "redcontrol:block/monitor_bottom",
"bottom": "redcontrol:block/monitor_top"
},
"elements": [
{ "from": [ 0, 0, 0 ],
"to": [ 16, 16, 16 ],
"faces": {
"down": { "texture": "#bottom", "cullface": "down" },
"up": { "texture": "#top", "cullface": "up" },
"north": { "texture": "#front", "cullface": "north" },
"south": { "texture": "#back", "cullface": "south" },
"west": { "texture": "#right", "cullface": "west" },
"east": { "texture": "#left", "cullface": "east" }
}
}
]
}

@ -0,0 +1,23 @@
{ "parent": "block/block",
"textures": {
"front": "redcontrol:block/disk_drive",
"left": "redcontrol:block/monitor_left",
"right": "redcontrol:block/monitor_right",
"back": "redcontrol:block/monitor_back",
"top": "redcontrol:block/monitor_bottom",
"bottom": "redcontrol:block/monitor_top"
},
"elements": [
{ "from": [ 0, 0, 0 ],
"to": [ 16, 16, 16 ],
"faces": {
"down": { "texture": "#bottom", "cullface": "down" },
"up": { "texture": "#top", "cullface": "up" },
"north": { "texture": "#front", "cullface": "north" },
"south": { "texture": "#back", "cullface": "south" },
"west": { "texture": "#right", "cullface": "west" },
"east": { "texture": "#left", "cullface": "east" }
}
}
]
}

@ -0,0 +1,23 @@
{ "parent": "block/block",
"textures": {
"front": "redcontrol:block/monitor_front",
"left": "redcontrol:block/monitor_left",
"right": "redcontrol:block/monitor_right",
"back": "redcontrol:block/monitor_back",
"top": "redcontrol:block/monitor_bottom",
"bottom": "redcontrol:block/monitor_top"
},
"elements": [
{ "from": [ 0, 0, 0 ],
"to": [ 16, 16, 16 ],
"faces": {
"down": { "texture": "#bottom", "cullface": "down" },
"up": { "texture": "#top", "cullface": "up" },
"north": { "texture": "#front", "cullface": "north" },
"south": { "texture": "#back", "cullface": "south" },
"west": { "texture": "#right", "cullface": "west" },
"east": { "texture": "#left", "cullface": "east" }
}
}
]
}

@ -0,0 +1,3 @@
{
"parent": "redcontrol:block/cpu"
}

@ -0,0 +1,3 @@
{
"parent": "redcontrol:block/disk_drive"
}

@ -0,0 +1,3 @@
{
"parent": "redcontrol:block/monitor"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 B

Loading…
Cancel
Save