Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.15.2] Structure gen wrongly [Solved]


Recommended Posts

I am making a structure with 4 template pieces .

Sometimes it gen properly like this.


But mostly,it gen like this.



here is the code https://github.com/HungTeen/pvzmod/tree/dev/src/main/java/com/hungteen/pvz/structure/davevilla


and this picture maybe helpful.It shows the place of structure block.



I have troubled a whole day. hope you guys will help me out. Thanks !


Edited by _HungTeen_
Link to comment
Share on other sites

ok,finally i know the problem.

Im just so stupid !

public DaveVillaComponent(TemplateManager manager, ResourceLocation res,BlockPos pos, Rotation rotation) {
			super(IStructurePieceType.SHIPWRECK, 0);
			this.templatePosition = pos;
			this.rotation = rotation;
//			this.midPos=blockpos;

I just forgot to change the IStrucurePieceType.SHIPWRECK which I copy from default code.


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • sever and client, but if i'm correct the ItemGroup is only use for sorting in creative (so client)
    • Hello, I was wondering wether item groups are client or server-sided?
    • i would really appreciate help on this. i just can't figure out how to deobf my api module / prevent the api module from being obfuscated in the dev env.
    • I want to debug in intellij but when i click the debug icon it runs like normal, and if you go to top right(Gradle icon), normally i use runClient but if i try runServer minecraft doesnt open, or runServer with debug(https://imgur.com/a/KuSUqwt), (the eula.txt file has eula=true just in case) before minecraft window open it close with no errors, like if i closed it on purpose
    • By looking at the log output for command 'gradlew --debug runData', it appears that the Standard Library jars get passed to Forge via the '-cp' command line parameter correctly in both versions. Trying to create a workaround earlier revealed that the module resolver is aware of the Standard Library's exports, and therefore conflicts with any attempt to manually copy stdlib over to 'build/classes/kotlin/main'. This means I cannot create a workaround that way. I have also switched to 1.18, and this issue still persists. This is most likely an issue regarding JVM options, which I do not have enough knowledge about. The build.gradle snippets shown above (remember switching jvmTarget in kotlinOptions to 17 when building for 1.18), alongside with the following piece of code for a mod class, should be enough to reproduce: File: src/main/kotlin/com/example/examplemod/ExampleMod.kt package com.example.examplemod import net.minecraftforge.fml.common.Mod import org.apache.logging.log4j.LogManager import org.apache.logging.log4j.Logger @Mod("examplemod") class ExampleMod { init { LOGGER.info("Hello World!") } companion object { private val LOGGER: Logger = LogManager.getLogger() } } Note that removing the explicit type Logger (so it becomes 'private val LOGGER = LogManager.getLogger()') loads successfully, because when there is no explicit type specified, Koltin implicitly infers a so-called platform type, shown in IDE as 'Logger!' (note the exclamation mark). This platform type is not null checked by default, so there are no references to 'kotlin.jvm.internal.Intrinsics' for null checks. Specifying the type explicitly as not null however creates a null check under the hood, because in Kotlin, for a type to be nullable, it has to be suffixed with a question mark (Logger?). Otherwise it is guaranteed to be not null. Explanation for those not knowing Kotlin: The 'init' block is essentially a constructor block. The Java equivalent would be 'public ExampleMod() { LOGGER.info("Hello World!"); }'. Declarations inside 'companion object' basically behave like static declarations, so the Java equivalent would be 'private static Logger LOGGER = LogManager.getLogger();'. Looking forward to a fix! Thank you for your time.
  • Topics

  • Who's Online (See full list)

  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.