From 5b07073e007ef24bc2f56d08fcb4388cc9eb4a20 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Sat, 20 Jun 2020 20:02:27 +0200 Subject: [PATCH] Logistical Mockups Part III - Added the depot block --- src/generated/resources/.cache/cache | 7 +++- .../assets/create/blockstates/depot.json | 7 ++++ .../resources/assets/create/lang/en_ud.json | 1 + .../resources/assets/create/lang/en_us.json | 1 + .../assets/create/models/item/depot.json | 3 ++ .../data/create/loot_tables/blocks/depot.json | 19 +++++++++ .../java/com/simibubi/create/AllBlocks.java | 8 ++++ .../java/com/simibubi/create/AllShapes.java | 2 + .../logistics/block/depot/DepotBlock.java | 24 ++++++++++++ .../block/realityFunnel/BeltFunnelBlock.java | 3 ++ .../create/models/block/depot/block.json | 37 ++++++++++++++++++ .../create/textures/block/depot_side.png | Bin 0 -> 588 bytes .../create/textures/block/depot_top.png | Bin 0 -> 587 bytes 13 files changed, 110 insertions(+), 2 deletions(-) create mode 100644 src/generated/resources/assets/create/blockstates/depot.json create mode 100644 src/generated/resources/assets/create/models/item/depot.json create mode 100644 src/generated/resources/data/create/loot_tables/blocks/depot.json create mode 100644 src/main/java/com/simibubi/create/content/logistics/block/depot/DepotBlock.java create mode 100644 src/main/resources/assets/create/models/block/depot/block.json create mode 100644 src/main/resources/assets/create/textures/block/depot_side.png create mode 100644 src/main/resources/assets/create/textures/block/depot_top.png diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index 9f4b1687b..43b66d7d8 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -58,6 +58,7 @@ f86eea3f7df0988fffbe90e29b74141a7203cd15 assets\create\blockstates\dark_scoria_c f1020a33fcb1a362b6c55b5aa8ce093e47ebde09 assets\create\blockstates\dark_scoria_cobblestone_wall.json 902778a0f16b7ad009ee7b123bb583eaea32467a assets\create\blockstates\dark_scoria_pillar.json ac85f55d82d96fc15750e6b954297cfd1e00d04d assets\create\blockstates\deployer.json +3660f44309279a0347347f23ce7444c6ed98cafd assets\create\blockstates\depot.json c890ec9b3778aebb16c6b2eb2ca79bfbe7bf7435 assets\create\blockstates\diorite_bricks.json 894d5ca00c3765553deaac44b83257983acf502d assets\create\blockstates\diorite_bricks_slab.json e42f2ebe5a2fdaeed62b9bc289252664a1e8705b assets\create\blockstates\diorite_bricks_stairs.json @@ -334,8 +335,8 @@ c60c3115fd6eeaa3a696428a87a74d184ab7d62d assets\create\blockstates\weathered_lim c77b46d8b459e5c7cc495393546f3fcca8a1fa1d assets\create\blockstates\weathered_limestone_pillar.json 7f39521b211441f5c3e06d60c5978cebe16cacfb assets\create\blockstates\zinc_block.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets\create\blockstates\zinc_ore.json -0ef66cfa2ad2656989bd228b5281dd81ae215f4e assets\create\lang\en_ud.json -0a4d0882aa343ae0e943cf1bc542c2a96baedaa0 assets\create\lang\en_us.json +5753bc985f4c202fe16387c32fb8ad80c631c933 assets\create\lang\en_ud.json +0640b1b64ac1a1e337178f932f22b0b2aea61d46 assets\create\lang\en_us.json 846200eb548d3bfa2e77b41039de159b4b6cfb45 assets\create\models\block\acacia_window.json 1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets\create\models\block\acacia_window_pane_noside.json 1763ea2c9b981d187f5031ba608f3d5d3be3986a assets\create\models\block\acacia_window_pane_noside_alt.json @@ -998,6 +999,7 @@ e67fe11e9036c81f0f54d368b41a971822a84a32 assets\create\models\item\dark_scoria_c f5b2995929ac9dca9857d4618660ffa7778d5618 assets\create\models\item\dark_scoria_pillar.json f06f56ffb1cd7c9a2b81c65f7796726692e5cc59 assets\create\models\item\deforester.json 2104c1276259ab67b94f3d4fe97e14b6bc6941ac assets\create\models\item\deployer.json +84d87f715efab45dc7bcb2e3c0870ed56fa20ee9 assets\create\models\item\depot.json a97ca9b6fc3e10a9c9409b27458a852222045e4e assets\create\models\item\diorite_bricks.json 7a28bb619d37a37ed82509d2ff395d76b4435961 assets\create\models\item\diorite_bricks_slab.json 920804b7380cca2c477d9f901e045597234246d7 assets\create\models\item\diorite_bricks_stairs.json @@ -1772,6 +1774,7 @@ ef1beeb856cb30d381fd4f1cb4d2bf62fc444e52 data\create\loot_tables\blocks\dark_sco 76457f3ec7c2d3874866ce8eb894f7bd9cfd59ee data\create\loot_tables\blocks\dark_scoria_cobblestone_wall.json be851f6643d151ed464e4164bc2b7ca145e5ff82 data\create\loot_tables\blocks\dark_scoria_pillar.json cf9be747e10a98f3f3aabb95c9753f39d806f73b data\create\loot_tables\blocks\deployer.json +5b46f6003bfe393b43ea0447fffcf7ae3bf969b1 data\create\loot_tables\blocks\depot.json 5c8ca846c3fb348fea628035e1670208e386516b data\create\loot_tables\blocks\diorite_bricks.json 427fea1465652db87a2c192934511b972ecfcedf data\create\loot_tables\blocks\diorite_bricks_slab.json bdaba62199f7a65e1149b742aaaf0c23a1e149b0 data\create\loot_tables\blocks\diorite_bricks_stairs.json diff --git a/src/generated/resources/assets/create/blockstates/depot.json b/src/generated/resources/assets/create/blockstates/depot.json new file mode 100644 index 000000000..f1af801d0 --- /dev/null +++ b/src/generated/resources/assets/create/blockstates/depot.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "create:block/depot/block" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/lang/en_ud.json b/src/generated/resources/assets/create/lang/en_ud.json index 548827595..a35239349 100644 --- a/src/generated/resources/assets/create/lang/en_ud.json +++ b/src/generated/resources/assets/create/lang/en_ud.json @@ -59,6 +59,7 @@ "block.create.dark_scoria_cobblestone_wall": "\u05DF\u05DF\u0250M \u01DDuo\u0287s\u01DD\u05DFqqo\u0186 \u0250\u0131\u0279o\u0254S \u029E\u0279\u0250\u15E1", "block.create.dark_scoria_pillar": "\u0279\u0250\u05DF\u05DF\u0131\u0500 \u0250\u0131\u0279o\u0254S \u029E\u0279\u0250\u15E1", "block.create.deployer": "\u0279\u01DD\u028Eo\u05DFd\u01DD\u15E1", + "block.create.depot": "\u0287od\u01DD\u15E1", "block.create.diorite_bricks": "s\u029E\u0254\u0131\u0279\u15FA \u01DD\u0287\u0131\u0279o\u0131\u15E1", "block.create.diorite_bricks_slab": "q\u0250\u05DFS s\u029E\u0254\u0131\u0279\u15FA \u01DD\u0287\u0131\u0279o\u0131\u15E1", "block.create.diorite_bricks_stairs": "s\u0279\u0131\u0250\u0287S s\u029E\u0254\u0131\u0279\u15FA \u01DD\u0287\u0131\u0279o\u0131\u15E1", diff --git a/src/generated/resources/assets/create/lang/en_us.json b/src/generated/resources/assets/create/lang/en_us.json index 6d479372f..fcc292fd4 100644 --- a/src/generated/resources/assets/create/lang/en_us.json +++ b/src/generated/resources/assets/create/lang/en_us.json @@ -62,6 +62,7 @@ "block.create.dark_scoria_cobblestone_wall": "Dark Scoria Cobblestone Wall", "block.create.dark_scoria_pillar": "Dark Scoria Pillar", "block.create.deployer": "Deployer", + "block.create.depot": "Depot", "block.create.diorite_bricks": "Diorite Bricks", "block.create.diorite_bricks_slab": "Diorite Bricks Slab", "block.create.diorite_bricks_stairs": "Diorite Bricks Stairs", diff --git a/src/generated/resources/assets/create/models/item/depot.json b/src/generated/resources/assets/create/models/item/depot.json new file mode 100644 index 000000000..6efbe20e3 --- /dev/null +++ b/src/generated/resources/assets/create/models/item/depot.json @@ -0,0 +1,3 @@ +{ + "parent": "create:block/depot/block" +} \ No newline at end of file diff --git a/src/generated/resources/data/create/loot_tables/blocks/depot.json b/src/generated/resources/data/create/loot_tables/blocks/depot.json new file mode 100644 index 000000000..0f2400aed --- /dev/null +++ b/src/generated/resources/data/create/loot_tables/blocks/depot.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "create:depot" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index 595ac1a79..888e3beed 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -77,6 +77,7 @@ import com.simibubi.create.content.logistics.block.belts.observer.BeltObserverBl import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelBlock; import com.simibubi.create.content.logistics.block.chute.ChuteBlock; import com.simibubi.create.content.logistics.block.chute.ChutePortBlock; +import com.simibubi.create.content.logistics.block.depot.DepotBlock; import com.simibubi.create.content.logistics.block.diodes.AbstractDiodeGenerator; import com.simibubi.create.content.logistics.block.diodes.AdjustableRepeaterBlock; import com.simibubi.create.content.logistics.block.diodes.AdjustableRepeaterGenerator; @@ -786,6 +787,13 @@ public class AllBlocks { .transform(customItemModel()) .register(); + public static final BlockEntry DEPOT = REGISTRATE.block("depot", DepotBlock::new) + .initialProperties(SharedProperties::stone) + .blockstate((c, p) -> p.simpleBlock(c.getEntry(), AssetLookup.partialBaseModel(c, p))) + .item() + .transform(customItemModel("_", "block")) + .register(); + public static final BlockEntry EXTRACTOR = REGISTRATE.block("extractor", ExtractorBlock::new) .initialProperties(SharedProperties::softMetal) .blockstate((c, p) -> p.horizontalBlock(c.get(), AssetLookup.forPowered(c, p, c.getName() + "/horizontal"))) diff --git a/src/main/java/com/simibubi/create/AllShapes.java b/src/main/java/com/simibubi/create/AllShapes.java index cbdd000f4..003e524c4 100644 --- a/src/main/java/com/simibubi/create/AllShapes.java +++ b/src/main/java/com/simibubi/create/AllShapes.java @@ -134,6 +134,8 @@ public class AllShapes { .build(), TANK_TOP_BOTTOM = shape(TANK_BOTTOM_LID).add(TANK_TOP_LID) .add(TANK) + .build(), + DEPOT = shape(CASING_11PX.get(Direction.UP)).add(1, 11, 1, 15, 13, 15) .build() ; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/depot/DepotBlock.java b/src/main/java/com/simibubi/create/content/logistics/block/depot/DepotBlock.java new file mode 100644 index 000000000..280e2eb3c --- /dev/null +++ b/src/main/java/com/simibubi/create/content/logistics/block/depot/DepotBlock.java @@ -0,0 +1,24 @@ +package com.simibubi.create.content.logistics.block.depot; + +import com.simibubi.create.AllShapes; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; + +public class DepotBlock extends Block { + + public DepotBlock(Properties p_i48440_1_) { + super(p_i48440_1_); + } + + @Override + public VoxelShape getShape(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, + ISelectionContext p_220053_4_) { + return AllShapes.DEPOT; + } + +} diff --git a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/BeltFunnelBlock.java b/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/BeltFunnelBlock.java index d70964e0b..48fa9c93f 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/BeltFunnelBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/realityFunnel/BeltFunnelBlock.java @@ -6,6 +6,7 @@ import com.simibubi.create.content.contraptions.relays.belt.BeltBlock; import com.simibubi.create.content.contraptions.relays.belt.BeltBlock.Slope; import com.simibubi.create.content.contraptions.wrench.IWrenchable; import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelBlock; +import com.simibubi.create.content.logistics.block.depot.DepotBlock; import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.VoxelShaper; @@ -101,6 +102,8 @@ public class BeltFunnelBlock extends HorizontalBlock implements IWrenchable { public static boolean isOnValidBelt(BlockState state, IWorldReader world, BlockPos pos) { BlockState stateBelow = world.getBlockState(pos.down()); + if (stateBelow.getBlock() instanceof DepotBlock) + return true; if (!(stateBelow.getBlock() instanceof BeltBlock)) return false; if (stateBelow.get(BeltBlock.SLOPE) == Slope.VERTICAL) diff --git a/src/main/resources/assets/create/models/block/depot/block.json b/src/main/resources/assets/create/models/block/depot/block.json new file mode 100644 index 000000000..85bde5e9f --- /dev/null +++ b/src/main/resources/assets/create/models/block/depot/block.json @@ -0,0 +1,37 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "1": "create:block/depot_side", + "2": "create:block/depot_top", + "3": "create:block/andesite_casing", + "particle": "create:block/andesite_casing" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 11, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [0.5, 10.5, 0.5]}, + "faces": { + "north": {"uv": [0, 5, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 5, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 5, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 5, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#3"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#3"} + } + }, + { + "from": [1, 11, 1], + "to": [15, 13, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [9, -2, 9]}, + "faces": { + "north": {"uv": [1, 14, 15, 16], "texture": "#2"}, + "east": {"uv": [1, 14, 15, 16], "texture": "#2"}, + "south": {"uv": [1, 14, 15, 16], "texture": "#2"}, + "west": {"uv": [1, 14, 15, 16], "texture": "#2"}, + "up": {"uv": [1, 0, 15, 14], "texture": "#2"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/textures/block/depot_side.png b/src/main/resources/assets/create/textures/block/depot_side.png new file mode 100644 index 0000000000000000000000000000000000000000..eea606e2a001818c51e3907092d4ee0cb77e3d93 GIT binary patch literal 588 zcmV-S0<-;zP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!T>5pa=<^;Pg;9tcUM=AQx4&Zr17ATccoFJuS-*(yvgAmnvg=(Kr?HT(o_RHO! zCrH&4%TgbwL9xmv=sG=EwnUNLCjSVo;I2Jf@DC^NVUcPvpX1$|SE$!aOlR|j|IBG% zZkZ;>o?+;3iQVTfnR5|olaku^BsL#(u zjGAR>ks24Q(`v#NHYcd*jE#zF=+o`Gg{FQgJ&kV90zyc5;~3uq1ux3+X*j~*%*VHj zh;0<7+>z5!sPht>`vHp+%)O_3$BxrM;eW(hM`FWm!gU(Bzq+z8;$q1_yJ16$n!bez zxw?%+-+VDhQIg|2D{wNn#Na$&Um5XelCcqV%^B267Rd907s6PfC~gpFA0-+5Fk^n5 z&M+EJF!V#5T?BWE$b;11++sq7@%403|0_;Cr~XTO<<6W?Jox(MR)AOkfNCl$Pxw8# a5Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!Tcwr?$ZByrqpz+|91Y>eqOz+*Uq$H(ttR7!~)C5OS!#lOJ1uCcgI zg~0D^g0eK&Y}Rsq{eHsJA3AxC?ehk0+elzh6gYV?-B%|BT(-*`h7q)i5Ck5=D1h(# zXc~*Es!29N#Bi+$!LU~j%&zB{&og8h%hx2YaCdi0CHsiur1$I~1kA=gb7rl(N|wtN z?(aX-`GVEz8?{%F)gtJd=A>h-k1Fsz>~^hG!9-ygh|Yo5TFS2Akn~pvW*U&^nhSTncWN) ziwu{SS4h(oH#dv@42&t{-a!@#(|7jM!;%++O08)Q{G0)`(2`Cc6v*w2$5X7=IVO`S zE-qfNf44~P75I{8P*v^G3@ReBa(|3{3*6WF*%@A*&ZtjK`Z-Q#Gm)Ip9j#*_cG&+5 zyp8;vT+L8A4DAIS_BUnO{Y(!(Zf#6U@xP!zkvd8`f{$NQYlxK*53)L2)6`P_u}>H( Z?=OI?_XUO=s}BGG002ovPDHLkV1kdH2XX)a literal 0 HcmV?d00001