From 2505975c32ff624c28f9601dbe4006cc982e5ac5 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 22 Feb 2020 10:56:29 +0100 Subject: [PATCH] finished the item distributor --- .../blockstates/item_distributor.json | 7 ++++++ .../models/block/item_distributor.json | 8 +++++++ .../models/item/item_distributor.json | 3 +++ .../loot_tables/blocks/item_distributor.json | 19 ++++++++++++++++ .../blocks/BlockItemDistributor.java | 12 +++++++++- .../assets/naturesaura/lang/en_us.json | 1 + .../textures/block/item_distributor.png | Bin 0 -> 704 bytes .../block/item_distributor_bottom.png | Bin 0 -> 622 bytes .../textures/block/item_distributor_top.png | Bin 0 -> 600 bytes .../entries/devices/item_distributor.json | 21 ++++++++++++++++++ .../naturesaura/recipes/item_distributor.json | 19 ++++++++++++++++ 11 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 src/generated/resources/assets/naturesaura/blockstates/item_distributor.json create mode 100644 src/generated/resources/assets/naturesaura/models/block/item_distributor.json create mode 100644 src/generated/resources/assets/naturesaura/models/item/item_distributor.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/item_distributor.json create mode 100644 src/main/resources/assets/naturesaura/textures/block/item_distributor.png create mode 100644 src/main/resources/assets/naturesaura/textures/block/item_distributor_bottom.png create mode 100644 src/main/resources/assets/naturesaura/textures/block/item_distributor_top.png create mode 100644 src/main/resources/data/naturesaura/patchouli_books/book/en_us/entries/devices/item_distributor.json create mode 100644 src/main/resources/data/naturesaura/recipes/item_distributor.json diff --git a/src/generated/resources/assets/naturesaura/blockstates/item_distributor.json b/src/generated/resources/assets/naturesaura/blockstates/item_distributor.json new file mode 100644 index 00000000..620230fa --- /dev/null +++ b/src/generated/resources/assets/naturesaura/blockstates/item_distributor.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "naturesaura:block/item_distributor" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/naturesaura/models/block/item_distributor.json b/src/generated/resources/assets/naturesaura/models/block/item_distributor.json new file mode 100644 index 00000000..239f3257 --- /dev/null +++ b/src/generated/resources/assets/naturesaura/models/block/item_distributor.json @@ -0,0 +1,8 @@ +{ + "parent": "block/cube_bottom_top", + "textures": { + "side": "naturesaura:block/item_distributor", + "bottom": "naturesaura:block/item_distributor_bottom", + "top": "naturesaura:block/item_distributor_top" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/naturesaura/models/item/item_distributor.json b/src/generated/resources/assets/naturesaura/models/item/item_distributor.json new file mode 100644 index 00000000..108ca2be --- /dev/null +++ b/src/generated/resources/assets/naturesaura/models/item/item_distributor.json @@ -0,0 +1,3 @@ +{ + "parent": "naturesaura:block/item_distributor" +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/item_distributor.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/item_distributor.json new file mode 100644 index 00000000..7eb11852 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/item_distributor.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:item_distributor" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/BlockItemDistributor.java b/src/main/java/de/ellpeck/naturesaura/blocks/BlockItemDistributor.java index 5a67519d..33d0957b 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/BlockItemDistributor.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/BlockItemDistributor.java @@ -1,6 +1,8 @@ package de.ellpeck.naturesaura.blocks; import de.ellpeck.naturesaura.blocks.tiles.TileEntityItemDistributor; +import de.ellpeck.naturesaura.data.BlockStateGenerator; +import de.ellpeck.naturesaura.reg.ICustomBlockState; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.entity.player.PlayerEntity; @@ -11,7 +13,7 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.world.World; -public class BlockItemDistributor extends BlockContainerImpl { +public class BlockItemDistributor extends BlockContainerImpl implements ICustomBlockState { public BlockItemDistributor() { super("item_distributor", TileEntityItemDistributor::new, ModBlocks.prop(Blocks.FURNACE)); @@ -31,4 +33,12 @@ public class BlockItemDistributor extends BlockContainerImpl { } return ActionResultType.SUCCESS; } + + @Override + public void generateCustomBlockState(BlockStateGenerator generator) { + generator.simpleBlock(this, generator.models().cubeBottomTop(this.getBaseName(), + generator.modLoc("block/" + this.getBaseName()), + generator.modLoc("block/" + this.getBaseName() + "_bottom"), + generator.modLoc("block/" + this.getBaseName() + "_top"))); + } } diff --git a/src/main/resources/assets/naturesaura/lang/en_us.json b/src/main/resources/assets/naturesaura/lang/en_us.json index af4208a2..bd7226a5 100644 --- a/src/main/resources/assets/naturesaura/lang/en_us.json +++ b/src/main/resources/assets/naturesaura/lang/en_us.json @@ -57,6 +57,7 @@ "block.naturesaura.nether_wart_mushroom": "Nether Wart Mushroom", "block.naturesaura.animal_container": "Corporeal Eye", "block.naturesaura.snow_creator": "Winter's Calling", + "block.naturesaura.item_distributor": "Item Distributor", "item.naturesaura.eye": "Environmental Eye", "item.naturesaura.eye_improved": "Environmental Ocular", "item.naturesaura.gold_fiber": "Brilliant Fiber", diff --git a/src/main/resources/assets/naturesaura/textures/block/item_distributor.png b/src/main/resources/assets/naturesaura/textures/block/item_distributor.png new file mode 100644 index 0000000000000000000000000000000000000000..8e7139e3f64f183510f43f26c0f855217e9887a2 GIT binary patch literal 704 zcmV;x0zdtUP)BqaBFT1O*jf1hf57W}Kma>PfasCX zHYLI!hvdxkD+|L!0_1F~aI0`|)i3XVEh-iY3F|yXB@W$@N-SM}#8Q#+Kv4?k99lGl zL|*BW6b&T`tycKQ_*)l zx*rF;^BfKx-nJNBIE*J^45XYfqNtQ*f7o+-bA`7p&Q)k_&|;8EEQhYcRyEf@Trk9l zQJO#Qf9KzL+tSWF(}_nbjkN};EIN!mDP>ejjANkoH6e`v#K#-r|4!3Xq~nN892JI4f?AN!4~(e;oq5=7xL)0$ zY@x0NH))vK8j2!YjV+pwcOUra`ZZEn`eTQV6tt^o+zfzE+cn$mp4Ds)S#ua8m9yxg z_;~lNXq)FP+pk-4Drj$Oo;IJ*M&WIXw=I{;1!D?KT#Ye_=cg^Il=Hk@O!&HcX2=;C z;sC(?`W|mve!RTkG@dX<==M93(V(F3Ph75+C=K`PI{^Aak7VR5Y`JO~bEI}P;}B7b mZ>B|1TA{^|Vmj}O2>$@XTOPlEb|nV@0000-r(=Y1qB~=mR|XBt+e%=-TB1A0IF5)46r+^J z-Q7LXOQpL`Z{X?FT$rXEwHsrIG%;Lr>|-SA0IlP^M^!k@C)7Fwas2t^FZh>lYyJQE z_}wF|RCG6uxb6V>`KMo?RW3{7X4;WkWnEWpZf*%)aLqAqGoPP6fgjk74r#69Q~S^ z1$r}_7gUvE#=5Lj-U-_!q2sipzZ!>|16C`?`v>Zp=m=I51;_1Sj}D5C%Gc+=uMJ{E zn?bdFT|gD<8|73;<$@0*(mSmSmt^RmwEVt-?;wqeh5>;2v64|aJrecVI3!NAhCqncCwq}m^4}>nP`SJ!>mKmvZWV}+RDY73& zR3i_EBQ#;jm0=7>cQhIr^bOFgqf>}T2>b(ldivwTFMj&+p-pNHO*KKvJpS*)8_Myxr{+qb01j0lrwUdn)=*XA5D-rA1se1!s32X1^@s607*qo IM6N<$f)k7)umAu6 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/naturesaura/textures/block/item_distributor_top.png b/src/main/resources/assets/naturesaura/textures/block/item_distributor_top.png new file mode 100644 index 0000000000000000000000000000000000000000..d6334287c2df11b1ba46f229e417876b988818c5 GIT binary patch literal 600 zcmV-e0;m0nP)s1G(W)pC0yUSJ z$&AMr7J)>S(tqbq_VMRq_2u)|qGF+tFwRp{qHQ{AF*JRLp(f>lq7=?Kv}hO;CsbBUt;I?WxuB{F5zV1FAgO@Sil<*c;SaA*_j0*; zvmuWWnRtgP3V@FvK0%J0+JTv$5OSpJI%cy4rqZaaX!?f7?E||*%l-WtopV8n2HasDj=DNm>Pg)|4b^G3XM057l$X4n$!hk>aGAQ$k-2rbe1@b39Uhyg0+I1 zPM8@BMUjoh6ipXS7eL!K=tx1ka|7=!Q|Az|tmjL}nl?mgXV68F$%v5)Ag6+OW6{R& z8+h3MxG8V@>t@W5Gcv>hhQQ|jJ-g@U+dE&Gne#|SST3i;5LvAkfI>tQh6pJ#ri_SS mYl9Xc#l$csQjF~ONB#nc8T#kj*@S8U0000