From 79d7a7568724348b58d4a12564f9f905b8efae1c Mon Sep 17 00:00:00 2001 From: paulevsGitch Date: Sun, 6 Dec 2020 14:11:29 +0300 Subject: [PATCH] Charnia prototype --- .../ru/betterend/blocks/BlockCharnia.java | 15 +++ .../java/ru/betterend/registry/EndBlocks.java | 4 + .../world/biome/BiomeSulphurSprings.java | 2 +- .../betterend/blockstates/charnia_orange.json | 10 ++ .../betterend/blockstates/charnia_purple.json | 10 ++ .../betterend/blockstates/charnia_red.json | 10 ++ .../materialmaps/block/charnia_orange.json | 3 + .../materialmaps/block/charnia_purple.json | 3 + .../materialmaps/block/charnia_red.json | 3 + .../betterend/models/block/charnia.json | 87 ++++++++++++++++++ .../models/block/charnia_orange.json | 6 ++ .../models/block/charnia_purple.json | 6 ++ .../betterend/models/block/charnia_red.json | 6 ++ .../textures/block/charnia_orange.png | Bin 0 -> 2206 bytes .../textures/block/charnia_purple.png | Bin 0 -> 2204 bytes .../betterend/textures/block/charnia_red.png | Bin 0 -> 1764 bytes 16 files changed, 164 insertions(+), 1 deletion(-) create mode 100644 src/main/java/ru/betterend/blocks/BlockCharnia.java create mode 100644 src/main/resources/assets/betterend/blockstates/charnia_orange.json create mode 100644 src/main/resources/assets/betterend/blockstates/charnia_purple.json create mode 100644 src/main/resources/assets/betterend/blockstates/charnia_red.json create mode 100644 src/main/resources/assets/betterend/materialmaps/block/charnia_orange.json create mode 100644 src/main/resources/assets/betterend/materialmaps/block/charnia_purple.json create mode 100644 src/main/resources/assets/betterend/materialmaps/block/charnia_red.json create mode 100644 src/main/resources/assets/betterend/models/block/charnia.json create mode 100644 src/main/resources/assets/betterend/models/block/charnia_orange.json create mode 100644 src/main/resources/assets/betterend/models/block/charnia_purple.json create mode 100644 src/main/resources/assets/betterend/models/block/charnia_red.json create mode 100644 src/main/resources/assets/betterend/textures/block/charnia_orange.png create mode 100644 src/main/resources/assets/betterend/textures/block/charnia_purple.png create mode 100644 src/main/resources/assets/betterend/textures/block/charnia_red.png diff --git a/src/main/java/ru/betterend/blocks/BlockCharnia.java b/src/main/java/ru/betterend/blocks/BlockCharnia.java new file mode 100644 index 00000000..044a506e --- /dev/null +++ b/src/main/java/ru/betterend/blocks/BlockCharnia.java @@ -0,0 +1,15 @@ +package ru.betterend.blocks; + +import net.minecraft.block.BlockState; +import net.minecraft.fluid.Fluids; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.world.WorldView; +import ru.betterend.blocks.basis.BlockUnderwaterPlant; + +public class BlockCharnia extends BlockUnderwaterPlant { + @Override + public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) { + return sideCoversSmallSquare(world, pos.down(), Direction.UP) && world.getFluidState(pos).getFluid() == Fluids.WATER; + } +} diff --git a/src/main/java/ru/betterend/registry/EndBlocks.java b/src/main/java/ru/betterend/registry/EndBlocks.java index 45628c96..4e650a54 100644 --- a/src/main/java/ru/betterend/registry/EndBlocks.java +++ b/src/main/java/ru/betterend/registry/EndBlocks.java @@ -17,6 +17,7 @@ import ru.betterend.blocks.BlockBrimstone; import ru.betterend.blocks.BlockBubbleCoral; import ru.betterend.blocks.BlockBulbVine; import ru.betterend.blocks.BlockBulbVineSeed; +import ru.betterend.blocks.BlockCharnia; import ru.betterend.blocks.BlockChorusGrass; import ru.betterend.blocks.BlockDragonTreeSapling; import ru.betterend.blocks.BlockEndLily; @@ -168,6 +169,9 @@ public class EndBlocks { public static final Block BUBBLE_CORAL = registerBlock("bubble_coral", new BlockBubbleCoral()); public static final Block MENGER_SPONGE = registerBlock("menger_sponge", new BlockMengerSponge()); public static final Block MENGER_SPONGE_WET = registerBlock("menger_sponge_wet", new BlockMengerSpongeWet()); + public static final Block CHARNIA_RED = registerBlock("charnia_red", new BlockCharnia()); + public static final Block CHARNIA_PURPLE = registerBlock("charnia_purple", new BlockCharnia()); + public static final Block CHARNIA_ORANGE = registerBlock("charnia_orange", new BlockCharnia()); public static final Block END_LILY = registerBlockNI("end_lily", new BlockEndLily()); public static final Block END_LILY_SEED = registerBlock("end_lily_seed", new BlockEndLilySeed()); diff --git a/src/main/java/ru/betterend/world/biome/BiomeSulphurSprings.java b/src/main/java/ru/betterend/world/biome/BiomeSulphurSprings.java index f483282d..962faf86 100644 --- a/src/main/java/ru/betterend/world/biome/BiomeSulphurSprings.java +++ b/src/main/java/ru/betterend/world/biome/BiomeSulphurSprings.java @@ -7,7 +7,7 @@ import ru.betterend.world.surface.SurfaceBuilders; public class BiomeSulphurSprings extends EndBiome { public BiomeSulphurSprings() { - super(new BiomeDefinition("sulfur_springs") + super(new BiomeDefinition("sulphur_springs") .setSurface(SurfaceBuilders.SULPHURIC_SURFACE) .setWaterColor(25, 90, 157) .setWaterFogColor(30, 65, 61) diff --git a/src/main/resources/assets/betterend/blockstates/charnia_orange.json b/src/main/resources/assets/betterend/blockstates/charnia_orange.json new file mode 100644 index 00000000..6beb7fef --- /dev/null +++ b/src/main/resources/assets/betterend/blockstates/charnia_orange.json @@ -0,0 +1,10 @@ +{ + "variants": { + "": [ + { "model": "betterend:block/charnia_orange" }, + { "model": "betterend:block/charnia_orange", "y": 90 }, + { "model": "betterend:block/charnia_orange", "y": 180 }, + { "model": "betterend:block/charnia_orange", "y": 270 } + ] + } +} diff --git a/src/main/resources/assets/betterend/blockstates/charnia_purple.json b/src/main/resources/assets/betterend/blockstates/charnia_purple.json new file mode 100644 index 00000000..d3962d74 --- /dev/null +++ b/src/main/resources/assets/betterend/blockstates/charnia_purple.json @@ -0,0 +1,10 @@ +{ + "variants": { + "": [ + { "model": "betterend:block/charnia_purple" }, + { "model": "betterend:block/charnia_purple", "y": 90 }, + { "model": "betterend:block/charnia_purple", "y": 180 }, + { "model": "betterend:block/charnia_purple", "y": 270 } + ] + } +} diff --git a/src/main/resources/assets/betterend/blockstates/charnia_red.json b/src/main/resources/assets/betterend/blockstates/charnia_red.json new file mode 100644 index 00000000..13e9d0d9 --- /dev/null +++ b/src/main/resources/assets/betterend/blockstates/charnia_red.json @@ -0,0 +1,10 @@ +{ + "variants": { + "": [ + { "model": "betterend:block/charnia_red" }, + { "model": "betterend:block/charnia_red", "y": 90 }, + { "model": "betterend:block/charnia_red", "y": 180 }, + { "model": "betterend:block/charnia_red", "y": 270 } + ] + } +} diff --git a/src/main/resources/assets/betterend/materialmaps/block/charnia_orange.json b/src/main/resources/assets/betterend/materialmaps/block/charnia_orange.json new file mode 100644 index 00000000..352de84b --- /dev/null +++ b/src/main/resources/assets/betterend/materialmaps/block/charnia_orange.json @@ -0,0 +1,3 @@ +{ + "defaultMaterial": "betterend:waving_floor" +} diff --git a/src/main/resources/assets/betterend/materialmaps/block/charnia_purple.json b/src/main/resources/assets/betterend/materialmaps/block/charnia_purple.json new file mode 100644 index 00000000..352de84b --- /dev/null +++ b/src/main/resources/assets/betterend/materialmaps/block/charnia_purple.json @@ -0,0 +1,3 @@ +{ + "defaultMaterial": "betterend:waving_floor" +} diff --git a/src/main/resources/assets/betterend/materialmaps/block/charnia_red.json b/src/main/resources/assets/betterend/materialmaps/block/charnia_red.json new file mode 100644 index 00000000..352de84b --- /dev/null +++ b/src/main/resources/assets/betterend/materialmaps/block/charnia_red.json @@ -0,0 +1,3 @@ +{ + "defaultMaterial": "betterend:waving_floor" +} diff --git a/src/main/resources/assets/betterend/models/block/charnia.json b/src/main/resources/assets/betterend/models/block/charnia.json new file mode 100644 index 00000000..1409556a --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/charnia.json @@ -0,0 +1,87 @@ +{ + "__comment": "Designed by Paulevs with Cubik Studio - https://cubik.studio", + "textures": { + "particle": "#texture" + }, + "elements": [ + { + "__comment": "PlaneX1", + "from": [ 2.5, 0, 2.5 ], + "to": [ 2.501, 16, 7.5 ], + "rotation": { "origin": [ 2.5, 0, 2.5 ], "axis": "y", "angle": 22.5 }, + "faces": { + "west": { "uv": [ 0, 0, 5, 16 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0, 5, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "PlaneX1", + "from": [ 13, 0, 1 ], + "to": [ 13.001, 16, 6 ], + "rotation": { "origin": [ 13, 0, 1 ], "axis": "y", "angle": -45 }, + "faces": { + "west": { "uv": [ 0, 0, 5, 16 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0, 5, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "PlaneX1", + "from": [ 14, 0, 11 ], + "to": [ 14.001, 16, 16 ], + "rotation": { "origin": [ 14, 0, 11 ], "axis": "y", "angle": -45 }, + "faces": { + "west": { "uv": [ 0, 0, 5, 16 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0, 5, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "PlaneX1", + "from": [ 4.5, 0, 8 ], + "to": [ 4.501, 16, 13 ], + "rotation": { "origin": [ 4.5, 0, 8 ], "axis": "y", "angle": 45 }, + "faces": { + "west": { "uv": [ 5, 0, 10, 16 ], "texture": "#texture" }, + "east": { "uv": [ 5, 0, 10, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "PlaneX1", + "from": [ 9, 0, 4.5 ], + "to": [ 9.001, 16, 9.5 ], + "faces": { + "west": { "uv": [ 5, 0, 10, 16 ], "texture": "#texture" }, + "east": { "uv": [ 5, 0, 10, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "PlaneX1", + "from": [ 3.5, 0, 1 ], + "to": [ 8.5, 16, 1.001 ], + "rotation": { "origin": [ 8.5, 0, 1 ], "axis": "y", "angle": 22.5 }, + "faces": { + "north": { "uv": [ 10, 0, 15, 16 ], "texture": "#texture" }, + "south": { "uv": [ 10, 0, 15, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "PlaneX1", + "from": [ 14.999, 0, 2.5 ], + "to": [ 15, 16, 7.5 ], + "rotation": { "origin": [ 15, 0, 7.5 ], "axis": "y", "angle": 22.5 }, + "faces": { + "west": { "uv": [ 10, 0, 15, 16 ], "texture": "#texture" }, + "east": { "uv": [ 10, 0, 15, 16 ], "texture": "#texture" } + } + }, + { + "__comment": "PlaneX1", + "from": [ 4.999, 0, 9.5 ], + "to": [ 5, 16, 14.5 ], + "rotation": { "origin": [ 5, 0, 14.5 ], "axis": "y", "angle": 45 }, + "faces": { + "west": { "uv": [ 10, 0, 15, 16 ], "texture": "#texture" }, + "east": { "uv": [ 10, 0, 15, 16 ], "texture": "#texture" } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/betterend/models/block/charnia_orange.json b/src/main/resources/assets/betterend/models/block/charnia_orange.json new file mode 100644 index 00000000..7656bee2 --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/charnia_orange.json @@ -0,0 +1,6 @@ +{ + "parent": "betterend:block/charnia", + "textures": { + "texture": "betterend:block/charnia_orange" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/betterend/models/block/charnia_purple.json b/src/main/resources/assets/betterend/models/block/charnia_purple.json new file mode 100644 index 00000000..b8f39e8b --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/charnia_purple.json @@ -0,0 +1,6 @@ +{ + "parent": "betterend:block/charnia", + "textures": { + "texture": "betterend:block/charnia_purple" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/betterend/models/block/charnia_red.json b/src/main/resources/assets/betterend/models/block/charnia_red.json new file mode 100644 index 00000000..c775cfba --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/charnia_red.json @@ -0,0 +1,6 @@ +{ + "parent": "betterend:block/charnia", + "textures": { + "texture": "betterend:block/charnia_red" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/betterend/textures/block/charnia_orange.png b/src/main/resources/assets/betterend/textures/block/charnia_orange.png new file mode 100644 index 0000000000000000000000000000000000000000..f472920603347d8ea2d5ed7789205d22f4458a48 GIT binary patch literal 2206 zcmb_eeQeZZ9KJCeY-|ji$iT$aP6A~1+FpAfZ8(m3H`oX_<~STGW4vwO+ZyiL(ssMs zh(j1I6A=~?<3g4QnkX^_!ym>-_y)5C1VsKIfkgQl;71sKgki?!+uPlVW*{M6((Bvy zd7t0!_xzssZQrV@T#%PDJ;!FVTwh0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*G5->hpRk;dz*O6b^v@V=mv|;c1ZSougYULx!72Kg*`Z z5f;mUEmAOSg#9x)K}lM9QHcO+I;ldm#Zo*qt@1)OFpvm{NwN#Q*xHUFlITK1c0b`) z-5@S`>oibR7YGV<)dDM`Q%jKIGzSTiz~GT|G9l|++J$C#IXE__aTLiwjA|EJY6e8Y z{tCpcXaKQW9hgAUHpIzVNe98&=*ftUAe}hj#7PPxNRDuD6pQ43D2%3wQLfT6Jr@gJ zxzM;_s2q-`QYmYSvMO2(Cs~%o2^(&+VGx1owX(sdFDBDKcU*@)4!R zaG_9XHie{`r2G_T^Ml`vDv07W5>Q){$DCb%fzAOVsj0|0`ec!us>?@@#rvx(;Vte-_ifE@YKaW;yL zI6%aSIURzC0UI5~B7mnbh9+!wmL+H>DfY6>(j@pu@rhemO;sXf1iLLa#^St^4!c*Idqk?h{M;xZAsH`m zykOehg$ib$0aTWqmTpt0yHk{1pNa!WdWYs`VY(7EQoIIAW3Z-o<1f4~{W`zk&guz< zW^A-TW0VjPFhIdBvn(ZI3`Nk9s6!;2bUyn&)ZcXDJ*v+YSBUd+48R=}NAEqKyL0Uw zyYWBegPVJ2)@t~_U6{Fd%RUR+nVEu{w>iweHQ+`5y#r)eDh<9>j@-9pgT>Nsi_cRU zWL9r`>u7oZXCCToFIrOB;j8+la{q(qB=SA&^ z!E?HD4s%34u`L=9cC35j@Z9~?7f+GR^EaMk0%fOCR~M~S*OV;T_vr&i@mbGzjd`MD z*W07o@U5p?{#vpAsXa5(@11Db(e!Q8!ARn@RBUhc;s<8?LLG;XJ@z^_FjTZq7-sbE zbT3(_PmLFWwKJ~;_69<$v4Us2=N|ulIydsdhKUC{*6a0?i-TV-{&?Z`^ugJFT6|Pk n-tlnAKHa&1?7@GfMVm literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/betterend/textures/block/charnia_red.png b/src/main/resources/assets/betterend/textures/block/charnia_red.png new file mode 100644 index 0000000000000000000000000000000000000000..70f40cc64d57dc721871339a7e6fb595fcad2269 GIT binary patch literal 1764 zcmbVN4NMzV96ty#1IHYKg42cLh?5Q5`zS5+q#&a}36}9ug)NbAy?dnxZSQt>(1Iq5 zn-FyxvkfAQ7{? ztx~D9K0&jBTgz~Q9cX=S5uy_!6IC)Ex z1j?I=ZERB=Yvi!(EHu+cLjpHY7}V!>d1TsW!u-56T&vqShWa5&oe9fP1)`PK5;Rwk z0IJs-G%T4$q3K2~X&{VL+M_5%km)#)j*~hKLDGbQ))~>jgF$H$=b+2X`2kt*%Y-=< zMWk`u>-B2AI;|kp;H1%L#0d(gC=Ent>^^vDY1VL_qUgh5rcJkQYp zq^H9yb7)9Cm##4w)ASl9!@+9wc7}6gq}j;~gCls~EU@)z5QF!*|9O9d#KR(DTzAeB z3KE?wxCF^6aL~&-HHH1DL|b?n#;Y+<6y;!ZVCCXbfA-J}t0uS!W7Wt44hwAackG!Z zTCWp8(tio}5=<5xikFcmc4D})S5$a^X z1KXDb`_!eb)uRX!wx`gXW6SugZ;ugw_w(0M^bc-^R;yKaL^~z%%pB~CQ>V9uJYfrO_N+x>H3g0%iBtN6` z`LF8Mi=V&hea%MACH=PY==iCDYGt|QqhouMzOGH_A6$OQ7Cy|bo6*ii?CVSXq_#PA zexEH|+xWsaR2}S literal 0 HcmV?d00001