Jump to content

Recommended Posts

Posted (edited)

Hey everyone,


I tried my hand at some X and Z rotating to save myself a bunch of models on my connected model, but it seems "z": 90 doesn't to anything. "x":90 works just fine and so does "y":90, but z seems to be completely ignored. Why could this be and how can I fix it?

Here's my BlockState (it's a long one):

{
  "forge_marker": 1,
  "variants": {
    "normal": [
      {"model": "kaidencraft:boilertank/single.obj"}
    ],
    "inventory": [
      {}
    ],
    "mb_part": {
      "single": {
        "model": "kaidencraft:boilertank/single.obj"
      },
      "end": {
        "model": "kaidencraft:boilertank/pillar_bottom.obj",
        "x": 90
      },
      "line_edge": {
        "model": "kaidencraft:boilertank/pillar_center.obj",
        "z": 90
      },
      "corner": {
        "model": "kaidencraft:boilertank/end.obj",
        "z": 90
      },
      "edge": {
        "model": "kaidencraft:boilertank/edge_single.obj"
      },
      "center": {
        "model": "kaidencraft:boilertank/center_single.obj"
      },
      "bottom_end": {
        "model": "kaidencraft:boilertank/end.obj"
      },
      "bottom_edge": {
        "model": "kaidencraft:boilertank/edge.obj"
      },
      "bottom_corner": {
        "model": "kaidencraft:boilertank/corner.obj"
      },
      "bottom_center": {
        "model": "kaidencraft:boilertank/center_top.obj",
        "x": 180
      },
      "bottom_pillar": {
        "model": "kaidencraft:boilertank/pillar_bottom.obj"
      },
      "center_end": {
        "model": "kaidencraft:boilertank/edge_single.obj",
        "x": 90, "z": 90
      },
      "center_corner": {
        "model": "kaidencraft:boilertank/edge.obj",
        "z": 90,
        "x": 90
      },
      "center_edge": {
        "model": "kaidencraft:boilertank/center_top.obj",
        "x": 270
      },
      "center_line_edge": {
        "model": "kaidencraft:boilertank/center_single.obj",
        "x": 90
      },
      "center_pillar": {
        "model": "kaidencraft:boilertank/pillar_center.obj"
      },
      "top_end": {
        "model": "kaidencraft:boilertank/end.obj",
        "z": 180
      },
      "top_corner": {
        "model": "kaidencraft:boilertank/corner.obj",
        "x": 180
      },
      "top_edge": {
        "model": "kaidencraft:boilertank/edge.obj",
        "x": 90
      },
      "top_line_edge": {
        "model": "kaidencraft:boilertank/edge_single.obj",
        "x": 90
      },
      "top_pillar": {
        "model": "kaidencraft:boilertank/pillar_bottom.obj",
        "x": 180
      },
      "top_center": {
        "model": "kaidencraft:boilertank/center_top.obj"
      },
      "hidden": {
        "model": "kaidencraft:blank.obj"
      }
    },
    "facing": {
      "north": {},
      "south": {
        "y": 180
      },
      "west": {
        "y": 270
      },
      "east": {
        "y": 90
      }
    }
  },
  "defaults": {
    "model": "kaidencraft:boilertank/single.obj",
    "textures": {
      "#initialShadingGroup": "kaidencraft:block/boiler_main"
    }
  }
}

The part I'm testing with is "corner", which rotates fine when I put in an x rotation, but does nothing when I put in various z rotations.

Cheers in advance

 

Edit for posterity: You can get any transforms you want using forge specific BlockState parts - see Forge Blockstate V1 specs for all details. Only the last specified transform will be applied - this includes simple rotation like you would use in a facing variant.

Edited by BenignBanana
Posted

Minecraft and Forge didn't add the "z" rotation tag because you can replicate it with a combination of the "x" and "y" tag.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted
  On 7/4/2017 at 9:51 PM, larsgerrits said:

Minecraft and Forge didn't add the "z" rotation tag because you can replicate it with a combination of the "x" and "y" tag.

Expand  

Can you tell me how to do that specifically? I'm terrible at 3D visualization and vector math. Also, would the y rotation work additively with the facing?

Posted

I haven't done this in a while, but I think that if you set the "y" tag to 90, any rotation on the x-axis will apply to the z-axis instead.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted
  On 7/4/2017 at 9:58 PM, larsgerrits said:

I haven't done this in a while, but I think that if you set the "y" tag to 90, any rotation on the x-axis will apply to the z-axis instead.

Expand  

Yea I figured that out now with some hand moving and loading a test object into Maya :P But I'm still struggling to understand how that will interact with the facing property that I use for Y rotation.

Posted (edited)

Yea this definitely doesn't work. After recreating the BlockState scenarios in Maya it seems that Y is always applied after X, making this trick impossible. Applying y 270 first, then x 90 gives me the correct result in Maya (as it should), but what I see in Minecraft is equivalent to applying x 90 first, then y 270. This is what I did in my JSON:

      "corner": {
        "model": "kaidencraft:boilertank/end.obj",
        "y": 270, "x": 90
      },

 

Edited by BenignBanana
Posted

Probably not.

Minecraft does not encode a z-axis rotation as it treats it identically to an x-axis rotation.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Just posting one last update here for anyone who sees this in the future. Turns out there IS a way to rotate around the Z axis, it's just really hard to find. I stumbled upon it after googling for blockstate transforms (as in moving the model). See Forge Blockstate V1 specs for all the details. Do keep in mind that any Y rotation you may do in a facing variant will override these transforms.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I'm developing a Forge mod for Minecraft 1.16.5 to run on CatServer (version 1.16.5-1d8d6313, Forge 36.2.39). My mod needs to get the player's UUID from a ServerPlayerEntity object within a Forge ServerChatEvent handler. When I use serverPlayerEntity.getUUID(), my mod compiles fine, but I get a java.lang.NoSuchMethodError: net.minecraft.entity.player.ServerPlayerEntity.getUUID()Ljava/util/UUID; at runtime. I cannot use serverPlayerEntity.getUniqueID() as it causes a compile error (cannot find symbol). Is there a known issue with this on CatServer, or a recommended way for a Forge mod to reliably get a player's UUID from ServerPlayerEntity in this environment? My goal is to pass this UUID to the LuckPerms API (which is running as a Bukkit plugin and successfully connected via ServicesManager). erorr ChatMod: FMLServerStartedEvent received. Attempting to initialize LuckPerms connection... [22:45:20] [Server thread/INFO]: ⚙️ Початок ініціалізації LuckPerms API через Bukkit Services Manager... [22:45:20] [Server thread/INFO]: ✅ Bukkit ServicesManager успішно отримано. [22:45:20] [Server thread/INFO]: ✅ Реєстрацію сервісу LuckPerms знайдено. [22:45:20] [Server thread/INFO]: ✅ API LuckPerms успішно отримано від Bukkit plugin! [22:45:20] [Server thread/INFO]: Використовується реалізація: me.lucko.luckperms.common.api.LuckPermsApiProvider [22:45:20] [Server thread/INFO]: ✅ LuckPerms API схоже що успішно ініціалізовано через Bukkit Services Manager. [22:45:24] [User Authenticator #1/INFO]: UUID of player Hiklee is 92cd7721-2652-3867-896b-2ceba5b99306 [22:45:25] [Server thread/INFO]: Using new advancement loading for net.minecraft.advancements.PlayerAdvancements@24cb7a68 [22:45:26] [Server thread/INFO]: Hiklee[/127.0.0.1:41122] logged in with entity id 210 at (92.23203876864889, 95.6183020148442, 68.24087802017877) [22:45:28] [Async Chat Thread - #0/INFO]: ✅ Скасовано стандартне відправлення чату! [22:45:28] [Async Chat Thread - #0/ERROR]: Exception caught during firing event: net.minecraft.entity.player.ServerPlayerEntity.getUUID()Ljava/util/UUID; Index: 1 Listeners: 0: NORMAL 1: ASM: class com.example.chatmod.ChatEventHandler onPlayerChat(Lnet/minecraftforge/event/ServerChatEvent;)V java.lang.NoSuchMethodError: net.minecraft.entity.player.ServerPlayerEntity.getUUID()Ljava/util/UUID; at com.example.chatmod.ChatPacketHandler.getPlayerPrefix(ChatPacketHandler.java:46) at com.example.chatmod.ChatEventHandler.onPlayerChat(ChatEventHandler.java:32) at net.minecraftforge.eventbus.ASMEventHandler_1_ChatEventHandler_onPlayerChat_ServerChatEvent.invoke(.dynamic) at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) at net.minecraftforge.eventbus.EventBus.post(EventBus.java:303) at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) at net.minecraftforge.common.ForgeHooks.onServerChatEvent(ForgeHooks.java:493) at net.minecraft.network.play.ServerPlayNetHandler.chat(ServerPlayNetHandler.java:1717) at net.minecraft.network.play.ServerPlayNetHandler.func_244548_c(ServerPlayNetHandler.java:1666) at net.minecraft.network.play.ServerPlayNetHandler.func_147354_a(ServerPlayNetHandler.java:1605) at net.minecraft.network.play.client.CChatMessagePacket.lambda$handle$0(CChatMessagePacket.java:34) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750
    • Thank you so much for your help, I'll try it as soon as I can. I have a genuine question because I'm not familiar with the matter: Can a recipe error cause something as serious as the AMD error?
    • When i try to launch my modpack, the instance crashes and this is sent to the logs: Time: 2025-05-27 23:07:18 Description: Rendering overlay Below is the full log: https://mclo.gs/jP5G2EH
    • Make a test without delightful
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.