From 6585eabb7ed2b6e3649bc57cd2e36a98ba088af9 Mon Sep 17 00:00:00 2001 From: Frank Date: Wed, 14 Jun 2023 13:14:54 +0200 Subject: [PATCH] New Structures for end village --- .../betterend/registry/EndProcessors.java | 3 ++ .../betterend/registry/EndStructures.java | 4 +-- .../structures/village/VillagePools.java | 30 +++++++++++++----- .../worldgen/PlacedFeatureDataProvider.java | 18 +++++++++++ .../worldgen/ProcessorsDataProvider.java | 9 ++++++ .../worldgen/StructureDataProvider.java | 2 ++ .../structures/village/decoration/work_01.nbt | Bin 0 -> 791 bytes .../village/street_decoration/lamp_05.nbt | Bin 436 -> 663 bytes .../village/street_decoration/lamp_06.nbt | Bin 0 -> 450 bytes .../village/street_decoration/obsidian_01.nbt | Bin 0 -> 388 bytes .../village/street_decoration/obsidian_02.nbt | Bin 0 -> 332 bytes .../village/street_decoration/obsidian_03.nbt | Bin 0 -> 398 bytes .../village/street_decoration/obsidian_04.nbt | Bin 0 -> 371 bytes .../village/street_decoration/obsidian_05.nbt | Bin 0 -> 459 bytes 14 files changed, 56 insertions(+), 10 deletions(-) create mode 100644 src/main/resources/data/betterend/structures/village/decoration/work_01.nbt create mode 100644 src/main/resources/data/betterend/structures/village/street_decoration/lamp_06.nbt create mode 100644 src/main/resources/data/betterend/structures/village/street_decoration/obsidian_01.nbt create mode 100644 src/main/resources/data/betterend/structures/village/street_decoration/obsidian_02.nbt create mode 100644 src/main/resources/data/betterend/structures/village/street_decoration/obsidian_03.nbt create mode 100644 src/main/resources/data/betterend/structures/village/street_decoration/obsidian_04.nbt create mode 100644 src/main/resources/data/betterend/structures/village/street_decoration/obsidian_05.nbt diff --git a/src/main/java/org/betterx/betterend/registry/EndProcessors.java b/src/main/java/org/betterx/betterend/registry/EndProcessors.java index 4df24189..66077575 100644 --- a/src/main/java/org/betterx/betterend/registry/EndProcessors.java +++ b/src/main/java/org/betterx/betterend/registry/EndProcessors.java @@ -16,4 +16,7 @@ public class EndProcessors { public static final ResourceKey END_STREET = ProcessorHelper.createKey(BetterEnd.makeID("end_street")); + + public static final ResourceKey CRYING_10_PERCENT = + ProcessorHelper.createKey(BetterEnd.makeID("crying_10_percent")); } diff --git a/src/main/java/org/betterx/betterend/registry/EndStructures.java b/src/main/java/org/betterx/betterend/registry/EndStructures.java index 45559b02..fe422e70 100644 --- a/src/main/java/org/betterx/betterend/registry/EndStructures.java +++ b/src/main/java/org/betterx/betterend/registry/EndStructures.java @@ -40,13 +40,13 @@ public class EndStructures { public static final BCLStructure MEGALAKE = BCLStructureBuilder .start(BetterEnd.makeID("megalake"), MegaLakeStructure::new) - .step(Decoration.RAW_GENERATION) + .step(Decoration.LAKES) .randomPlacement(4, 1) .build(); public static final BCLStructure MEGALAKE_SMALL = BCLStructureBuilder .start(BetterEnd.makeID("megalake_small"), MegaLakeSmallStructure::new) - .step(Decoration.RAW_GENERATION) + .step(Decoration.LAKES) .randomPlacement(4, 1) .build(); diff --git a/src/main/java/org/betterx/betterend/world/structures/village/VillagePools.java b/src/main/java/org/betterx/betterend/world/structures/village/VillagePools.java index 8ed58d96..da3a8d30 100644 --- a/src/main/java/org/betterx/betterend/world/structures/village/VillagePools.java +++ b/src/main/java/org/betterx/betterend/world/structures/village/VillagePools.java @@ -24,6 +24,10 @@ import com.google.common.collect.ImmutableList; import java.util.function.Function; public class VillagePools { + public static final ResourceKey CHORUS_VILLAGE = ResourceKey.create( + Registries.PLACED_FEATURE, + BetterEnd.makeID("village_chorus") + ); public static ResourceKey TERMINATORS_KEY = StructurePools .createKey(BetterEnd.makeID("village/terminators")); public static ResourceKey START = StructurePools @@ -54,12 +58,14 @@ public class VillagePools { final Holder.Reference emptyPool = poolGetter.getOrThrow(Pools.EMPTY); final Holder.Reference terminatorPool = poolGetter.getOrThrow(VillagePools.TERMINATORS_KEY); - Holder.Reference mossifyProcessor = processorGetter.getOrThrow(EndProcessors.WEATHERED_10_PERCENT); - Holder.Reference crack = processorGetter.getOrThrow(EndProcessors.CRACK_20_PERCENT); - Holder.Reference crackAndWeather = processorGetter.getOrThrow(EndProcessors.CRACK_AND_WEATHER); - Holder.Reference endStreetProcessor = processorGetter.getOrThrow(EndProcessors.END_STREET); - + final Holder.Reference mossifyProcessor = processorGetter.getOrThrow(EndProcessors.WEATHERED_10_PERCENT); + final Holder.Reference crack = processorGetter.getOrThrow(EndProcessors.CRACK_20_PERCENT); + final Holder.Reference cry = processorGetter.getOrThrow(EndProcessors.CRYING_10_PERCENT); + final Holder.Reference crackAndWeather = processorGetter.getOrThrow(EndProcessors.CRACK_AND_WEATHER); + final Holder.Reference endStreetProcessor = processorGetter.getOrThrow(EndProcessors.END_STREET); final Holder.Reference emptyProcessor = processorGetter.getOrThrow(ProcessorLists.EMPTY); + + final Holder.Reference chorus = featureGetter.getOrThrow(CHORUS_VILLAGE); ctx.register(VillagePools.TERMINATORS_KEY, new StructureTemplatePool( emptyPool, ImmutableList.of( @@ -101,7 +107,8 @@ public class VillagePools { single("village/decoration/pond_01", mossifyProcessor, 1), single("village/decoration/respawn_01", endStreetProcessor, 1), single("village/decoration/respawn_02", endStreetProcessor, 1), - single("village/decoration/fountain_01", endStreetProcessor, 1) + single("village/decoration/fountain_01", endStreetProcessor, 1), + single("village/street_decoration/work_01", endStreetProcessor, 1) ), StructureTemplatePool.Projection.RIGID @@ -124,8 +131,15 @@ public class VillagePools { terminatorPool, ImmutableList.of( Pair.of(StructurePoolElement.empty(), 5), - single("village/street_decoration/lamp_02", emptyProcessor, 2), - single("village/street_decoration/lamp_05", emptyProcessor, 1) + single("village/street_decoration/lamp_02", emptyProcessor, 4), + single("village/street_decoration/lamp_05", emptyProcessor, 2), + single("village/street_decoration/lamp_06", emptyProcessor, 3), + single("village/street_decoration/obsidian_01", cry, 2), + single("village/street_decoration/obsidian_02", cry, 3), + single("village/street_decoration/obsidian_03", cry, 2), + single("village/street_decoration/obsidian_04", cry, 2), + single("village/street_decoration/obsidian_05", cry, 1), + Pair.of(StructurePoolElement.feature(chorus), 2) ), StructureTemplatePool.Projection.RIGID )); diff --git a/src/main/java/org/betterx/datagen/betterend/worldgen/PlacedFeatureDataProvider.java b/src/main/java/org/betterx/datagen/betterend/worldgen/PlacedFeatureDataProvider.java index 69d98d99..139dd6a0 100644 --- a/src/main/java/org/betterx/datagen/betterend/worldgen/PlacedFeatureDataProvider.java +++ b/src/main/java/org/betterx/datagen/betterend/worldgen/PlacedFeatureDataProvider.java @@ -1,12 +1,30 @@ package org.betterx.datagen.betterend.worldgen; import org.betterx.bclib.api.v3.levelgen.features.BCLPlacedFeatureBuilder; +import org.betterx.betterend.world.structures.village.VillagePools; +import net.minecraft.core.Holder; +import net.minecraft.core.HolderGetter; +import net.minecraft.core.registries.Registries; import net.minecraft.data.worldgen.BootstapContext; +import net.minecraft.data.worldgen.features.EndFeatures; +import net.minecraft.data.worldgen.placement.PlacementUtils; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; import net.minecraft.world.level.levelgen.placement.PlacedFeature; public class PlacedFeatureDataProvider { public static void bootstrap(BootstapContext ctx) { BCLPlacedFeatureBuilder.registerUnbound(ctx); + + HolderGetter> configuredFeatures = ctx.lookup(Registries.CONFIGURED_FEATURE); + Holder.Reference> chorusFeature = configuredFeatures.getOrThrow(EndFeatures.CHORUS_PLANT); + + PlacementUtils.register( + ctx, + VillagePools.CHORUS_VILLAGE, + chorusFeature, + PlacementUtils.filteredByBlockSurvival(Blocks.CHORUS_PLANT) + ); } } diff --git a/src/main/java/org/betterx/datagen/betterend/worldgen/ProcessorsDataProvider.java b/src/main/java/org/betterx/datagen/betterend/worldgen/ProcessorsDataProvider.java index a7a8e682..60f60d93 100644 --- a/src/main/java/org/betterx/datagen/betterend/worldgen/ProcessorsDataProvider.java +++ b/src/main/java/org/betterx/datagen/betterend/worldgen/ProcessorsDataProvider.java @@ -15,6 +15,15 @@ import com.google.common.collect.ImmutableList; public class ProcessorsDataProvider { public static void bootstrap(BootstapContext bootstapContext) { + ProcessorHelper.register( + bootstapContext, + EndProcessors.CRYING_10_PERCENT, + ImmutableList.of(new RuleProcessor(ImmutableList.of(new ProcessorRule( + new RandomBlockMatchTest(Blocks.OBSIDIAN, 0.1f), + AlwaysTrueTest.INSTANCE, + Blocks.CRYING_OBSIDIAN.defaultBlockState() + )))) + ); ProcessorHelper.register( bootstapContext, EndProcessors.WEATHERED_10_PERCENT, diff --git a/src/main/java/org/betterx/datagen/betterend/worldgen/StructureDataProvider.java b/src/main/java/org/betterx/datagen/betterend/worldgen/StructureDataProvider.java index 93402d0d..d0f9a62b 100644 --- a/src/main/java/org/betterx/datagen/betterend/worldgen/StructureDataProvider.java +++ b/src/main/java/org/betterx/datagen/betterend/worldgen/StructureDataProvider.java @@ -13,5 +13,7 @@ public class StructureDataProvider { public static void bootstrapSets(BootstapContext ctx) { BCLStructureBuilder.registerUnboundSets(ctx); + + } } diff --git a/src/main/resources/data/betterend/structures/village/decoration/work_01.nbt b/src/main/resources/data/betterend/structures/village/decoration/work_01.nbt new file mode 100644 index 0000000000000000000000000000000000000000..e51d5f36cf986e84e0324256ed02ed2b33f85683 GIT binary patch literal 791 zcmV+y1L*u8iwFP!00000|Fu<3Z<|069SqpmX`A#=DIfiidg`q`HEqs4S3UKL)-Z-m zmtC~GcI5tn{_PHK2nN=eREj0b7~Z@$Z$6dlZ;qJwB0lr+?2&R_l3@uzO(OT3f)0^d*i-ZO}w;vf`47_+J|51(%p;wz4UCn*8sm-P6_I2G!bL+w z07Sc|J>e;wH3YXjGwiN)KAgJy0$q<6tu)#y2OOR@Ay|}l`&eVcWj$`~%sozCZLMN> zwU?tzQO8M+##SfUtYo6nuU@1tDW&gKN|!A-8Br4BrRMa)g&MQh*g_ezjn&fdlr#B& zc-rctxdrc21T&+! z*ggB)RzdCL4eHA&V?ptltn}v&vvDGP`z@Mx~eB?IckKssXC+dz{otVhhN6^@W1)L4)9+$ z{Jlf2TMeZ-Z3?qo(Gg>49rAd8-X9k)mF~p5kH|4Cse2#pNUK9NA|YNy>|UlmoP1-J V{j9c~wBh+5_zQb1e}CHy003>Ofr9`5 literal 0 HcmV?d00001 diff --git a/src/main/resources/data/betterend/structures/village/street_decoration/lamp_05.nbt b/src/main/resources/data/betterend/structures/village/street_decoration/lamp_05.nbt index ceb630840fec87c52ac2a5dd173d84034d9fd650..b3bc6414452d6dfd086db5d22514520f3868a17d 100644 GIT binary patch literal 663 zcmV;I0%-joiwFP!00000|Fu<3kCZSNekm{uOg3)xV4|M9dp6m`n`h(6i!r1#beQgz zmb9H6$3NiT_GJf#S*X)$lw`tCo<3i+PypnR82*FB05JU0?wrG7CDi)f6nOP6hSXSU z8UDu^ajVP#9*zk77;*s<1!AHpCYod7sUPC@1Lv67?FTOKkUzj&@-twF$8+S-8Zf@> zvkr;7XJ4*Rj4!*-51cwW!z6BuFFOgyKGXUQ<`NGH@Js?clK?F^ozF0-8{_LIo@zPv z#Z1f5&y2^BYsRy1V|@Miw7Mhlcpfmmev*LoGt;_qV=ie$0a_#=7YWcJF0IV{K8y;8 z<;rHTuvFK~!pnwBw$^lGZ&%7%)s)6+#t@O-DK0H!S_wf{f@P4jN(p#2&R|Vz4;d^s zTvAaUrQfcYwM;Wv-9B(7*qU2bwj4S1SNffs4~K8aBx%FoW`rKKGa$Tzn^EA7*M{z& z6qLJPcBfz+!}F22WfjAz;t5CLej)fda=2=#=x%i1)g=b`)CGAnVk=E+CCjeEQZV|! z@C#gg)~aRNa%QlsJ$leW)itXi-B4k$*{tFyAlD3{_ZbujHaNhr{>17XS{{^Mxs_H_ z-%oUsu55@7WPc4U0*de(wU9Fsw@xhXe7 zDcz5FbMC1SA;e_Y9-BkHJw7{Ja7uO;jN(Ns)E?KjQ9BIN-|3@0Uj08CN9Ci7K{&w1 zzw3FjoMu~X%BD2ORY)yY67ovzW%-x`94r59xA*&HLe_7;#jw}&Ej6X!_12C?yCI}# xW((pkgo?Eiy9OVbY6Hb`$S^JMSo-(!@*}nMOSc`d0J#1MzW@r1K!I3X^Z#N^bVThe{pt`>L>gTH*AcNSc4~hUF+?Bsc_-2rj5haQogp#L@G6Jb(t+CXULTs=hxGYJ8 zESc)QWD#z>qh;3ctx<-y7I$(_O)KvyY<9|^E{@z!Q`{fLnzl-)XsIIa*1z`X3jfeN z>`*(p3#L}}UOw%f;^CO@cM5A&!R3_hMb!?w6wU-~O>$b|LgO%NJQ^Dh#a zAvT@QXFaN>3X*<8UN6T7*$9qbYiQXdxDRps|drC22a;dR|4UT(Q&4_DHZ; z$;f)M#H!KwH!~;RuvLElQ51V$#hodR4Gd%_YM+!gY|uE6Y+R!MX4ET{Z&@E2KWuKt e1h-$Urx$tih=M=Kx=m(NkO%VzGXRKlC9{a{4P4chc0WTES28F9 zYexB&jI5_HCB(5FpN}xBB_^9=)=Nx2$7D;)I4a0o%_Us1_AN5J>x{#l*L%LLiJ3YT z*dq#}xF_QnN>A46+F}WLPh{au%D}GYhZ44XNc`^%8UoncfxHYnTn z`#}dK3*Fsb+khWqXia;5zBJH*L_vfA#0f`d5$Z zj|^`U@gy*M^s3i3ZjAPch%ZsZO~N)_x8zh!4%KLM1=UwiJ$g16Btic+0agzHQ}TzW z?xglcdPEJ{+8M!ikQ%(Dw#5dD@n%Huv4@=fG5RowR=FGzAOY$W6oHO>xI~Wp6eTe? zPl>VG$(nnKkkSOTw?zIVClN0UnX{2M=)@mG4mJ%9PK||J2;M)}Iy17f(bbOZv2%*4 sFJW_OrzCc2xbsT%w-ga3vYh{!?I+Fp8~PA+!Rx>9573hun%n~b0IiwTqW}N^ literal 0 HcmV?d00001 diff --git a/src/main/resources/data/betterend/structures/village/street_decoration/obsidian_01.nbt b/src/main/resources/data/betterend/structures/village/street_decoration/obsidian_01.nbt new file mode 100644 index 0000000000000000000000000000000000000000..edafb85f9575ac6eb4f2ed8ced89572fd3de92b3 GIT binary patch literal 388 zcmV-~0ek)*iwFP!00000|Fx6NPJ=)Y#|J1BXiOVD=*{==?AdtoN|rLMTbCWOJC)QI z@U>lHE2XT~m`Fkb?C<}v4CDYAOsssv2ml6W21%)C`C@Z-H;*8;EEwIjQ$!8f19&(B zIM0MXFu@mfo*DQALni!XpWqA=_?XbYuR-U?-)F!~{LElqvA^?xN&KA$S<`XWXkW=V zD?DXV|15$WB3*I{2@A7EhU;2tTpF?ByONlxE-V{FN5mVFnjtl$lqeOZFlmSs%zFja z4ewHzt)v#J_>8{nm#MU}l0rMB7B#}6L}oOot9@1qp{!uhD>ia%McWN`+6dLr-S?b1 zgNM$*;|+(ko8G)8Yj?$nxH^j8s* literal 0 HcmV?d00001 diff --git a/src/main/resources/data/betterend/structures/village/street_decoration/obsidian_02.nbt b/src/main/resources/data/betterend/structures/village/street_decoration/obsidian_02.nbt new file mode 100644 index 0000000000000000000000000000000000000000..f63baa55d92f9e4e4dd0a5b07a55fb8c5619c034 GIT binary patch literal 332 zcmV-S0ki%eiwFP!00000|DBS{PQx$|MJKP4q(W4%fNx>V8nI#0HSvk(nTby_zn|y?6VGKu^UTC2ozIF(NK7p`EJWE23fy*Nu(4__ z_ce=fS2?kWp2)ULMj*GWwW>AdkoL?Pu0{oRy}akJT$53{`i{OEm%Y=jk)6frjj8o| zqdJ6DjUs5#w1>nTVrpSE>bA6TY9F5FqE|Z5;q^0b@E8oPN0MttEhz)T+RbP#igeYn z^IxZYvfQH;Lg!DuRt=dAWQMK0z*$nqyECOJDkr1z->Lt|mTU=)zgS`eMaz3r?J*b> eko$QG)Zu$9AC#zPv@W1<`3Yax4;k}U0{{R|>YvI0 literal 0 HcmV?d00001 diff --git a/src/main/resources/data/betterend/structures/village/street_decoration/obsidian_03.nbt b/src/main/resources/data/betterend/structures/village/street_decoration/obsidian_03.nbt new file mode 100644 index 0000000000000000000000000000000000000000..f6af4a19ba7053fe3e27bee56aa6d6e98dafe7bc GIT binary patch literal 398 zcmV;90df8xiwFP!00000|DBV~PUA2T$0tc!(o_fphvl}?J_cvbXir?NNi!|O+MdXs zQo#%CYp)|Hrfpymk)nL~_y2J0Gyrp$M1H0U0Cs0NT<0)rtt|hI6 zyYVC$+ztj;*}zGRPe$6v9ixXGagn`_#xAp3k*ygl8fbn8=_x2vOy6dOOZID+Y$+;y zOG)@%`70}4CqO=|pcdv*$ zb~||YjNpGJ`lI%k(Xh_}6CE<6p{#f~>wrm4nbC1pI-CVL#HN%C#-eP40yixgTv}Dj zqGSYsE<2Rck|>8K)QVE65M z;1)ULPnJ8hLg;)0+e<-e*vcE6BTY~_IZK&3UhjwA_Rq%rBHh2&nZy9|JLk5iF!us R0ty%3@B#)p3!U=?+h9$Kk~N_~u;d#-xw)f$#r;?#JM zJsXt1KwrB?&91{j)K!oWV1C~>p3hSQRFHf9n=$}6-TCyaVAB}h|MGSC+GS99L80&- z6xqQ31fQ-1UT2as^?zpOlPqf`SJb+ONv~kCOD0|Keb!etXVSI4R(z66pM1Tq8B?q? z=}Ts_+|R=2X1Sk5KIM9bGoNa`cc>w=jg+tvbR7wN=(VN2!-ITnScH4!#SsOfcwlV> zO2@`vW2l6DU^ehBDySdisf6u8TQurl>AU!w8?Rf9HYhFj1iOYr$dPTIYn71d7Isnb zpgWJ_GypdPnu(rfz77W8CxaDlIQ{z=&3pF#NiB%?kr32IO;`=}561&J(d0ua2i$Ah zL1Ed+J-kJl6MBitPf_`(+0b4KDT6kw*$ap581i$5yN+5Y4rqMHywqMD46}n=+>ze2 zrNZ;^WjCLrv@<*gL=8F|vQviekzTV&k3;nM5-KUP`LdAe*vHif literal 0 HcmV?d00001