Skip to content

Commit 64ba89d

Browse files
committed
Uploaded new prototype block - Marking Plate
1 parent 85b66dd commit 64ba89d

File tree

8 files changed

+171
-2
lines changed

8 files changed

+171
-2
lines changed

src/main/java/org/dimdev/dimdoors/client/ModelManager.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public static void registerItemModels() {
4747
register(ModItems.WOVEN_WORLD_THREAD_HELMET);
4848
register(ModItems.WOVEN_WORLD_THREAD_LEGGINGS);
4949
register(ModItems.CREEPY_RECORD);
50+
register(ModItems.MARKING_PLATE);
5051
}
5152

5253
@SubscribeEvent
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
package org.dimdev.dimdoors.shared.blocks;
2+
3+
import net.minecraft.block.Block;
4+
import net.minecraft.block.SoundType;
5+
import net.minecraft.block.material.MapColor;
6+
import net.minecraft.block.material.Material;
7+
import net.minecraft.block.state.IBlockState;
8+
import net.minecraft.item.EnumDyeColor;
9+
import net.minecraft.util.EnumFacing;
10+
import net.minecraft.util.ResourceLocation;
11+
import net.minecraft.util.math.AxisAlignedBB;
12+
import net.minecraft.util.math.BlockPos;
13+
import net.minecraft.world.IBlockAccess;
14+
import org.dimdev.dimdoors.DimDoors;
15+
import org.dimdev.dimdoors.shared.items.ModCreativeTabs;
16+
17+
public class BlockMarkingPlate extends Block {
18+
public static final Material FABRIC = new Material(MapColor.BLACK);
19+
public static final String ID = "marking_plate";
20+
public static final AxisAlignedBB FULL_BLOCK_AABB = new AxisAlignedBB(0.25D, 0.0D, 0.0D, 0.75D, 1.875D, 1.0D);
21+
22+
public BlockMarkingPlate() {
23+
super(FABRIC);
24+
setRegistryName(new ResourceLocation(DimDoors.MODID, ID));
25+
setUnlocalizedName(ID);
26+
setCreativeTab(ModCreativeTabs.DIMENSIONAL_DOORS_CREATIVE_TAB);
27+
setHardness(0.1F);
28+
setSoundType(SoundType.STONE);
29+
setLightLevel(0);
30+
}
31+
32+
@Override
33+
public boolean doesSideBlockRendering(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing face) {
34+
return false;
35+
}
36+
37+
public boolean isNormalCube(IBlockState state, IBlockAccess world, BlockPos pos) {
38+
return false;
39+
}
40+
41+
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) {
42+
return FULL_BLOCK_AABB;
43+
}
44+
}

src/main/java/org/dimdev/dimdoors/shared/blocks/ModBlocks.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public final class ModBlocks {
2424
public static final BlockFabricEternal ETERNAL_FABRIC = new BlockFabricEternal();
2525
public static final BlockFabricUnravelled UNRAVELLED_FABRIC = new BlockFabricUnravelled();
2626
public static final BlockFloatingRift RIFT = new BlockFloatingRift();
27+
public static final BlockMarkingPlate MARKING_PLATE = new BlockMarkingPlate();
2728

2829
@SubscribeEvent
2930
public static void registerBlocks(RegistryEvent.Register<Block> event) {
@@ -40,6 +41,7 @@ public static void registerBlocks(RegistryEvent.Register<Block> event) {
4041
ANCIENT_FABRIC,
4142
UNRAVELLED_FABRIC,
4243
ETERNAL_FABRIC,
43-
RIFT);
44+
RIFT,
45+
MARKING_PLATE);
4446
}
4547
}

src/main/java/org/dimdev/dimdoors/shared/items/ModItems.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public final class ModItems {
5151
public static final ItemBlock UNRAVELLED_FABRIC = (ItemBlock) new ItemBlock(ModBlocks.UNRAVELLED_FABRIC).setRegistryName(ModBlocks.UNRAVELLED_FABRIC.getRegistryName());
5252
public static final ItemBlock ETERNAL_FABRIC = (ItemBlock) new ItemBlock(ModBlocks.ETERNAL_FABRIC).setRegistryName(ModBlocks.ETERNAL_FABRIC.getRegistryName());
5353
public static final ItemDimensionalTrapdoorWood WOOD_DIMENSIONAL_TRAPDOOR = new ItemDimensionalTrapdoorWood();
54+
public static final ItemBlock MARKING_PLATE = (ItemBlock) new ItemBlock(ModBlocks.MARKING_PLATE).setRegistryName(ModBlocks.MARKING_PLATE.getRegistryName());
5455

5556
// Records
5657
public static final ItemModRecord CREEPY_RECORD = new ItemModRecord("creepy", CREEPY);
@@ -82,6 +83,7 @@ public static void registerItems(RegistryEvent.Register<Item> event) {
8283
UNRAVELLED_FABRIC,
8384
ETERNAL_FABRIC,
8485
WOOD_DIMENSIONAL_TRAPDOOR,
85-
CREEPY_RECORD);
86+
CREEPY_RECORD,
87+
MARKING_PLATE);
8688
}
8789
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"variants": {
3+
"normal": { "model": "dimdoors:marking_plate" }
4+
}
5+
}
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
{
2+
"__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)",
3+
"textures": {
4+
"0": "dimdoors:blocks/marking_plate"
5+
},
6+
"elements": [
7+
{
8+
"name": "core",
9+
"from": [ 5.0, 0.0, 1.0 ],
10+
"to": [ 11.0, 30.0, 15.0 ],
11+
"faces": {
12+
"north": { "texture": "#0", "uv": [ 0.0, 0.0, 8.0, 16.0 ] },
13+
"east": { "texture": "#0", "uv": [ 0.0, 0.0, 8.0, 16.0 ] },
14+
"south": { "texture": "#0", "uv": [ 0.0, 0.0, 6.0, 16.0 ] },
15+
"west": { "texture": "#0", "uv": [ 0.0, 0.0, 8.0, 16.0 ] },
16+
"up": { "texture": "#0", "uv": [ 0.0, 0.0, 6.0, 14.0 ] },
17+
"down": { "texture": "#0", "uv": [ 0.0, 0.0, 6.0, 14.0 ] }
18+
}
19+
},
20+
{
21+
"name": "top",
22+
"from": [ 4.0, 30.0, 0.0 ],
23+
"to": [ 12.0, 30.6, 16.0 ],
24+
"faces": {
25+
"north": { "texture": "#0", "uv": [ 8.0, 3.0, 16.0, 3.6 ] },
26+
"east": { "texture": "#0", "uv": [ 8.0, 15.0, 16.0, 15.6 ] },
27+
"south": { "texture": "#0", "uv": [ 8.0, 11.0, 16.0, 11.6 ] },
28+
"west": { "texture": "#0", "uv": [ 8.0, 3.0, 16.0, 3.5999999999999996 ] },
29+
"up": { "texture": "#0", "uv": [ 8.0, 0.0, 16.0, 16.0 ] },
30+
"down": { "texture": "#0", "uv": [ 8.0, 0.0, 16.0, 16.0 ] }
31+
}
32+
},
33+
{
34+
"name": "base1",
35+
"from": [ 4.5, 0.0, 0.5 ],
36+
"to": [ 11.5, 5.0, 15.5 ],
37+
"faces": {
38+
"north": { "texture": "#0", "uv": [ 8.0, 3.0, 15.0, 8.0 ] },
39+
"east": { "texture": "#0", "uv": [ 8.0, 4.0, 16.0, 9.0 ] },
40+
"south": { "texture": "#0", "uv": [ 9.0, 9.0, 16.0, 14.0 ] },
41+
"west": { "texture": "#0", "uv": [ 9.0, 11.0, 16.0, 16.0 ] },
42+
"up": { "texture": "#0", "uv": [ 8.0, 0.0, 15.0, 15.0 ] },
43+
"down": { "texture": "#0", "uv": [ 8.0, 0.0, 15.0, 15.0 ] }
44+
}
45+
},
46+
{
47+
"name": "base2",
48+
"from": [ 4.0, 0.0, 0.0 ],
49+
"to": [ 12.0, 1.0, 16.0 ],
50+
"faces": {
51+
"north": { "texture": "#0", "uv": [ 8.0, 2.0, 16.0, 3.0 ] },
52+
"east": { "texture": "#0", "uv": [ 8.0, 6.0, 16.0, 7.0 ] },
53+
"south": { "texture": "#0", "uv": [ 8.0, 4.0, 16.0, 5.0 ] },
54+
"west": { "texture": "#0", "uv": [ 8.0, 11.0, 16.0, 12.0 ] },
55+
"up": { "texture": "#0", "uv": [ 8.0, 0.0, 16.0, 16.0 ] },
56+
"down": { "texture": "#0", "uv": [ 8.0, 0.0, 16.0, 16.0 ] }
57+
}
58+
},
59+
{
60+
"name": "line1",
61+
"from": [ 4.5, 5.0, 0.5 ],
62+
"to": [ 5.0, 30.0, 1.0 ],
63+
"faces": {
64+
"north": { "texture": "#0", "uv": [ 12.0, 0.0, 12.5, 25.0 ] },
65+
"east": { "texture": "#0", "uv": [ 12.0, 0.0, 12.5, 25.0 ] },
66+
"south": { "texture": "#0", "uv": [ 12.0, 0.0, 12.5, 25.0 ] },
67+
"west": { "texture": "#0", "uv": [ 11.0, 0.0, 11.5, 25.0 ] },
68+
"up": { "texture": "#0", "uv": [ 12.0, 4.0, 12.5, 4.5 ] },
69+
"down": { "texture": "#0", "uv": [ 9.0, 9.0, 9.5, 9.5 ] }
70+
}
71+
},
72+
{
73+
"name": "line2",
74+
"from": [ 4.5, 5.0, 15.0 ],
75+
"to": [ 5.0, 30.0, 15.5 ],
76+
"faces": {
77+
"north": { "texture": "#0", "uv": [ 12.0, 0.0, 12.5, 25.0 ] },
78+
"east": { "texture": "#0", "uv": [ 10.0, 0.0, 10.5, 25.0 ] },
79+
"south": { "texture": "#0", "uv": [ 10.0, 0.0, 10.5, 25.0 ] },
80+
"west": { "texture": "#0", "uv": [ 11.0, 0.0, 11.5, 25.0 ] },
81+
"up": { "texture": "#0", "uv": [ 11.0, 9.0, 11.5, 9.5 ] },
82+
"down": { "texture": "#0", "uv": [ 11.0, 6.0, 11.5, 6.5 ] }
83+
}
84+
},
85+
{
86+
"name": "line3",
87+
"from": [ 11.0, 5.0, 15.0 ],
88+
"to": [ 11.5, 30.0, 15.5 ],
89+
"faces": {
90+
"north": { "texture": "#0", "uv": [ 11.0, 0.0, 11.5, 25.0 ] },
91+
"east": { "texture": "#0", "uv": [ 10.0, 0.0, 10.5, 25.0 ] },
92+
"south": { "texture": "#0", "uv": [ 9.0, 0.0, 9.5, 25.0 ] },
93+
"west": { "texture": "#0", "uv": [ 8.0, 0.0, 8.5, 25.0 ] },
94+
"up": { "texture": "#0", "uv": [ 15.0, 9.0, 15.5, 9.5 ] },
95+
"down": { "texture": "#0", "uv": [ 9.0, 4.0, 9.5, 4.5 ] }
96+
}
97+
},
98+
{
99+
"name": "line4",
100+
"from": [ 11.0, 5.0, 0.5 ],
101+
"to": [ 11.5, 30.0, 1.0 ],
102+
"faces": {
103+
"north": { "texture": "#0", "uv": [ 10.0, 0.0, 10.5, 25.0 ] },
104+
"east": { "texture": "#0", "uv": [ 11.0, 0.0, 11.5, 25.0 ] },
105+
"south": { "texture": "#0", "uv": [ 12.0, 0.0, 12.5, 25.0 ] },
106+
"west": { "texture": "#0", "uv": [ 13.0, 0.0, 13.5, 25.0 ] },
107+
"up": { "texture": "#0", "uv": [ 12.0, 9.0, 12.5, 9.5 ] },
108+
"down": { "texture": "#0", "uv": [ 12.0, 8.0, 12.5, 8.5 ] }
109+
}
110+
}
111+
]
112+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"parent": "dimdoors:block/marking_plate"
3+
}
1.21 KB
Loading

0 commit comments

Comments
 (0)