-
Posts
35 -
Joined
-
Last visited
Everything posted by MattNL
-
Thanks!
-
Simply put, I'm trying to add a new NBT byte tag to the vanilla Zombie for my custom renderer. What'd be the best way to do this, as I really don't want to write a new Entity JUST for a new NBT Flag. Thanks in advance. 🙂
-
I've replaced the function with a texture path instead, but I still got the RenderState$TextureState crash. Perhaps the renderer isn't being registered? ---- Minecraft Crash Report ---- // Don't do that. Time: 3/25/20 6:57 PM Description: Rendering item java.lang.NullPointerException: Rendering item at java.util.Objects.requireNonNull(Objects.java:203) ~[?:1.8.0_201] {} at java.util.Optional.<init>(Optional.java:96) ~[?:1.8.0_201] {} at java.util.Optional.of(Optional.java:108) ~[?:1.8.0_201] {} at net.minecraft.client.renderer.RenderState$TextureState.<init>(SourceFile:192) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.RenderType.func_230167_a_(SourceFile:116) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.RenderType.func_228640_c_(SourceFile:130) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.tileentity.SkullTileEntityRenderer.func_228878_a_(SourceFile:105) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.tileentity.SkullTileEntityRenderer.func_228879_a_(SourceFile:95) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer.func_228364_a_(SourceFile:81) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.ItemRenderer.func_229111_a_(ItemRenderer.java:108) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.ItemRenderer.renderItemModelIntoGUI(ItemRenderer.java:190) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.ItemRenderer.renderItemAndEffectIntoGUI(ItemRenderer.java:211) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.gui.screen.inventory.ContainerScreen.drawSlot(ContainerScreen.java:220) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.gui.screen.inventory.ContainerScreen.render(ContainerScreen.java:91) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.gui.DisplayEffectsScreen.render(DisplayEffectsScreen.java:45) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.gui.screen.inventory.CreativeScreen.render(CreativeScreen.java:605) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:359) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading} at net.minecraft.client.renderer.GameRenderer.updateCameraAndRender(GameRenderer.java:480) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:925) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.run(Minecraft.java:554) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.main.Main.main(SourceFile:204) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:runtimedistcleaner:A} at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_201] {} at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_201] {} at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_201] {} at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_201] {} at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.0.0-milestone.4.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.0.0-milestone.4.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.0.0-milestone.4.jar:?] {} at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.0.0-milestone.4.jar:?] {} at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.0.0-milestone.4.jar:?] {} at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102) [forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {} A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Stacktrace: at java.util.Objects.requireNonNull(Objects.java:203) at java.util.Optional.<init>(Optional.java:96) at java.util.Optional.of(Optional.java:108) at net.minecraft.client.renderer.RenderState$TextureState.<init>(SourceFile:192) at net.minecraft.client.renderer.RenderType.func_230167_a_(SourceFile:116) at net.minecraft.client.renderer.RenderType.func_228640_c_(SourceFile:130) at net.minecraft.client.renderer.tileentity.SkullTileEntityRenderer.func_228878_a_(SourceFile:105) at net.minecraft.client.renderer.tileentity.SkullTileEntityRenderer.func_228879_a_(SourceFile:95) at net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer.func_228364_a_(SourceFile:81) at net.minecraft.client.renderer.ItemRenderer.func_229111_a_(ItemRenderer.java:108) at net.minecraft.client.renderer.ItemRenderer.renderItemModelIntoGUI(ItemRenderer.java:190) -- Item being rendered -- Details: Item Type: steve_head Registry Name: namespace_here:steve_head Item Damage: 0 Item NBT: null Item Foil: false Stacktrace: at net.minecraft.client.renderer.ItemRenderer.renderItemAndEffectIntoGUI(ItemRenderer.java:211) at net.minecraft.client.gui.screen.inventory.ContainerScreen.drawSlot(ContainerScreen.java:220) at net.minecraft.client.gui.screen.inventory.ContainerScreen.render(ContainerScreen.java:91) at net.minecraft.client.gui.DisplayEffectsScreen.render(DisplayEffectsScreen.java:45) at net.minecraft.client.gui.screen.inventory.CreativeScreen.render(CreativeScreen.java:605) at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:359) -- Screen render details -- Details: Screen name: net.minecraft.client.gui.screen.inventory.CreativeScreen Mouse location: Scaled: (311, 179). Absolute: (1246.000000, 715.000000) Screen size: Scaled: (480, 251). Absolute: (1920, 1001). Scale factor of 4.000000 -- Affected level -- Details: All players: 1 total; [ClientPlayerEntity['MattNL'/14, l='MpServer', x=-376.70, y=68.00, z=-114.70]] Chunk stats: Client Chunk Cache: 841, 575 Level dimension: DimensionType{minecraft:overworld} Level name: MpServer Level seed: -1113229301927640182 Level generator: ID 00 - default, ver 1. Features enabled: false Level generator options: {} Level spawn location: World: (112,75,-192), Chunk: (at 0,4,0 in 7,-12; contains blocks 112,0,-192 to 127,255,-177), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1) Level time: 201942 game time, 44094 day time Known server brands: Level was modded: false Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Server brand: forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.world.ClientWorld.fillCrashReport(ClientWorld.java:442) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:1764) at net.minecraft.client.Minecraft.run(Minecraft.java:568) at net.minecraft.client.main.Main.main(SourceFile:204) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102) -- System Details -- Details: Minecraft Version: 1.15.2 Minecraft Version ID: 1.15.2 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_201, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 453994992 bytes (432 MB) / 950534144 bytes (906 MB) up to 1873805312 bytes (1787 MB) CPUs: 8 JVM Flags: 1 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump ModLauncher: 5.0.0-milestone.4+67+b1a340b ModLauncher launch target: fmluserdevclient ModLauncher naming: mcp ModLauncher services: /eventbus-2.0.0-milestone.1-service.jar eventbus PLUGINSERVICE /forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-launcher.jar object_holder_definalize PLUGINSERVICE /forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-launcher.jar runtime_enum_extender PLUGINSERVICE /accesstransformers-2.0.0-milestone.1-shadowed.jar accesstransformer PLUGINSERVICE /forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-launcher.jar capability_inject_definalize PLUGINSERVICE /forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-launcher.jar runtimedistcleaner PLUGINSERVICE /forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-launcher.jar fml TRANSFORMATIONSERVICE FML: 31.1 Forge: net.minecraftforge:31.1.0 FML Language Providers: javafml@31.1 minecraft@1 Mod List: client-extra.jar Minecraft {minecraft@1.15.2 DONE} main Minecraft: namespace_here {namespace_here@NONE DONE} forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar Forge {forge@31.1.0 DONE} Launched Version: MOD_DEV Backend library: LWJGL version 3.2.2 build 10 Backend API: Intel(R) UHD Graphics 630 GL version 4.5.0 - Build 23.20.16.5018, Intel GL Caps: Using framebuffer using OpenGL 3.0 Using VBOs: Yes Is Modded: Definitely; Client brand changed to 'forge' Type: Client (map_client.txt) Resource Packs: vanilla, mod_resources, programer_art Current Language: English (US) CPU: 8x Intel(R) Core(TM) i5-8300H CPU @ 2.30GHz
-
If it helps, these are the item models... Items (Identical to all other skulls in Vanilla): { "parent": "item/template_skull" } Template Skull (Vanilla): { "parent": "builtin/entity", "textures": { "particle": "block/soul_sand" }, "display": { "gui": { "rotation": [ 30, 45, 0 ], "translation": [ 0, 3, 0 ], "scale": [ 1, 1, 1 ] }, "fixed": { "rotation": [ 0, 180, 0 ], "translation": [ 0, 4, 0], "scale":[ 1, 1, 1 ] }, "ground": { "rotation": [ 0, 0, 0 ], "translation": [ 0, 3, 0 ], "scale": [ 0.5, 0.5, 0.5 ] }, "thirdperson_righthand": { "rotation": [ 45, 45, 0 ], "translation": [ 0, 3, 0 ], "scale": [ 0.5, 0.5, 0.5 ] } } }
-
I tend to censor my namespaces. It's just something that I do. (The namespace is a proper lowercase modid) Second, I should have posted the crash log before, and that's my bad. ---- Minecraft Crash Report ---- // Shall we play a game? Time: 3/25/20 5:30 PM Description: Rendering item java.lang.NullPointerException: Rendering item at java.util.Objects.requireNonNull(Objects.java:203) ~[?:1.8.0_201] {} at java.util.Optional.<init>(Optional.java:96) ~[?:1.8.0_201] {} at java.util.Optional.of(Optional.java:108) ~[?:1.8.0_201] {} at net.minecraft.client.renderer.RenderState$TextureState.<init>(SourceFile:192) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.RenderType.func_230167_a_(SourceFile:116) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.RenderType.func_228640_c_(SourceFile:130) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.tileentity.SkullTileEntityRenderer.func_228878_a_(SourceFile:105) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.tileentity.SkullTileEntityRenderer.func_228879_a_(SourceFile:95) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer.func_228364_a_(SourceFile:81) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.ItemRenderer.func_229111_a_(ItemRenderer.java:108) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.ItemRenderer.renderItemModelIntoGUI(ItemRenderer.java:190) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.ItemRenderer.renderItemAndEffectIntoGUI(ItemRenderer.java:211) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.gui.screen.inventory.ContainerScreen.drawSlot(ContainerScreen.java:220) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.gui.screen.inventory.ContainerScreen.render(ContainerScreen.java:91) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.gui.DisplayEffectsScreen.render(DisplayEffectsScreen.java:45) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.gui.screen.inventory.CreativeScreen.render(CreativeScreen.java:605) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:359) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading} at net.minecraft.client.renderer.GameRenderer.updateCameraAndRender(GameRenderer.java:480) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:925) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.run(Minecraft.java:554) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.main.Main.main(SourceFile:204) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {re:classloading,pl:runtimedistcleaner:A} at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_201] {} at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_201] {} at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_201] {} at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_201] {} at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.0.0-milestone.4.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.0.0-milestone.4.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.0.0-milestone.4.jar:?] {} at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.0.0-milestone.4.jar:?] {} at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.0.0-milestone.4.jar:?] {} at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102) [forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {} A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Stacktrace: at java.util.Objects.requireNonNull(Objects.java:203) at java.util.Optional.<init>(Optional.java:96) at java.util.Optional.of(Optional.java:108) at net.minecraft.client.renderer.RenderState$TextureState.<init>(SourceFile:192) at net.minecraft.client.renderer.RenderType.func_230167_a_(SourceFile:116) at net.minecraft.client.renderer.RenderType.func_228640_c_(SourceFile:130) at net.minecraft.client.renderer.tileentity.SkullTileEntityRenderer.func_228878_a_(SourceFile:105) at net.minecraft.client.renderer.tileentity.SkullTileEntityRenderer.func_228879_a_(SourceFile:95) at net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer.func_228364_a_(SourceFile:81) at net.minecraft.client.renderer.ItemRenderer.func_229111_a_(ItemRenderer.java:108) at net.minecraft.client.renderer.ItemRenderer.renderItemModelIntoGUI(ItemRenderer.java:190) -- Item being rendered -- Details: Item Type: steve_head Registry Name: namespace_here:steve_head Item Damage: 0 Item NBT: null Item Foil: false Stacktrace: at net.minecraft.client.renderer.ItemRenderer.renderItemAndEffectIntoGUI(ItemRenderer.java:211) at net.minecraft.client.gui.screen.inventory.ContainerScreen.drawSlot(ContainerScreen.java:220) at net.minecraft.client.gui.screen.inventory.ContainerScreen.render(ContainerScreen.java:91) at net.minecraft.client.gui.DisplayEffectsScreen.render(DisplayEffectsScreen.java:45) at net.minecraft.client.gui.screen.inventory.CreativeScreen.render(CreativeScreen.java:605) at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:359) -- Screen render details -- Details: Screen name: net.minecraft.client.gui.screen.inventory.CreativeScreen Mouse location: Scaled: (280, 154). Absolute: (561.000000, 308.000000) Screen size: Scaled: (427, 240). Absolute: (854, 480). Scale factor of 2.000000 -- Affected level -- Details: All players: 1 total; [ClientPlayerEntity['MattNL'/15, l='MpServer', x=-366.95, y=95.00, z=83.23]] Chunk stats: Client Chunk Cache: 841, 187 Level dimension: DimensionType{minecraft:overworld} Level name: MpServer Level seed: -1113229301927640182 Level generator: ID 00 - default, ver 1. Features enabled: false Level generator options: {} Level spawn location: World: (112,75,-192), Chunk: (at 0,4,0 in 7,-12; contains blocks 112,0,-192 to 127,255,-177), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1) Level time: 194158 game time, 36310 day time Known server brands: Level was modded: false Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false Server brand: forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.world.ClientWorld.fillCrashReport(ClientWorld.java:442) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:1764) at net.minecraft.client.Minecraft.run(Minecraft.java:568) at net.minecraft.client.main.Main.main(SourceFile:204) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102) -- System Details -- Details: Minecraft Version: 1.15.2 Minecraft Version ID: 1.15.2 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_201, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 300534696 bytes (286 MB) / 1183842304 bytes (1129 MB) up to 1873805312 bytes (1787 MB) CPUs: 8 JVM Flags: 1 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump ModLauncher: 5.0.0-milestone.4+67+b1a340b ModLauncher launch target: fmluserdevclient ModLauncher naming: mcp ModLauncher services: /eventbus-2.0.0-milestone.1-service.jar eventbus PLUGINSERVICE /forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-launcher.jar object_holder_definalize PLUGINSERVICE /forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-launcher.jar runtime_enum_extender PLUGINSERVICE /accesstransformers-2.0.0-milestone.1-shadowed.jar accesstransformer PLUGINSERVICE /forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-launcher.jar capability_inject_definalize PLUGINSERVICE /forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-launcher.jar runtimedistcleaner PLUGINSERVICE /forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-launcher.jar fml TRANSFORMATIONSERVICE FML: 31.1 Forge: net.minecraftforge:31.1.0 FML Language Providers: javafml@31.1 minecraft@1 Mod List: client-extra.jar Minecraft {minecraft@1.15.2 DONE} main Minecraft: namespace_here {namespace_here@NONE DONE} forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3.jar Forge {forge@31.1.0 DONE} Launched Version: MOD_DEV Backend library: LWJGL version 3.2.2 build 10 Backend API: Intel(R) UHD Graphics 630 GL version 4.5.0 - Build 23.20.16.5018, Intel GL Caps: Using framebuffer using OpenGL 3.0 Using VBOs: Yes Is Modded: Definitely; Client brand changed to 'forge' Type: Client (map_client.txt) Resource Packs: vanilla, mod_resources, programer_art Current Language: English (US) CPU: 8x Intel(R) Core(TM) i5-8300H CPU @ 2.30GHz Sorry for the lack of detail, before. Thanks, in advance.
-
Hey everyone! I'm just gonna give this topic a bump. It's been over a month, and I still haven't got a clue what I'm doing wrong. Thanks in advance!
-
Here's what I did: At that point, I now knew that the particular function I needed had to be "RuleType" type function. So, the next thing I did was decompile a jar that had the java files with deobfuscated names and obfuscated classes... such a file can be found in your MDK folder... MDK_ROOT/build/fg_cache/net/minecraftforge/forge/MCVERSION-FORGEVERSION_at_STRING In my instance: C:\dev\mdk\build\fg_cache\net\minecraftforge\forge\1.15.2-31.1.0_at_b54d5c04b317e9e50ee2e93c270c8b976d4cdb59 Any of the jars in that folder should contain what you're looking for. In my instance, I needed the "create" function in "BooleanValue" in "net.minecraft.world.gamerules" Upon decompiling, you should see the first image... then find your class, just as seen in the second image... next, look in your class for the proper type of function (in my case RuleType), as seen in the third image. The only RuleType function is "func_223567_b". That should be my function, but we can double check by searching for that name in the mappings, either in Excel or even a text editor will do. And if you search for it, the obfuscated name should line up with the deobfuscated name, as seen in the final image. Hopefully this is helpful. ?
-
Found it! Here are the names for all of the game rule type creation methods: func_223559_b -> GameRules$IntegerValue.create func_223568_b -> GameRules$BooleanValue.create try{ Method createBoolean = ObfuscationReflectionHelper.findMethod(GameRules.BooleanValue.class, "func_223568_b",boolean.class); createBoolean.setAccessible(true); DeferredWorkQueue.runLater( () -> { try { Object boolTrue = createBoolean.invoke(GameRules.BooleanValue.class, true); doAttackCooldown = GameRules.register("doAttackCooldown", (GameRules.RuleType<GameRules.BooleanValue>) boolTrue); } catch (IllegalAccessException e) { LOGGER.error("Illegal Access Exception!"); e.printStackTrace(); } catch (InvocationTargetException e) { LOGGER.error("Invocation Target Exception!"); e.printStackTrace(); } }); } catch (IllegalArgumentException e) { LOGGER.error("Illegal Argument Exception!"); e.printStackTrace(); throw e; }
-
Alright then... thanks, again. (:
-
Any easy way of getting that? Or do I have to go trial and error in the method mappings? (;
-
That did it. ObfuscationReflectionHelper was very helpful. (With terrible exception handling, or not) Thank you, diesieben07! try{ Method createBoolean = ObfuscationReflectionHelper.findMethod(GameRules.BooleanValue.class, "create",boolean.class); createBoolean.setAccessible(true); DeferredWorkQueue.runLater( () -> { try { Object boolTrue = createBoolean.invoke(GameRules.BooleanValue.class, true); doAttackCooldown = GameRules.register("doAttackCooldown", (GameRules.RuleType<GameRules.BooleanValue>) boolTrue); } catch (IllegalAccessException e) { LOGGER.error("Illegal Access Exception!"); e.printStackTrace(); } catch (InvocationTargetException e) { LOGGER.error("Invocation Target Exception!"); e.printStackTrace(); } }); } catch (IllegalArgumentException e) { LOGGER.error("Illegal Argument Exception!"); e.printStackTrace(); throw e; } Now to work on that exception handling... there's no excuse for that...
-
After doing some testing, it may seem that my "init" function is NEVER run for some bizarre reason, despite being subscribed. In fact, I can't seem to get FMLClientSetupEvent to fire at all. At first I thought my Logger was wrong, but, no, because it is printing to the log for other events. @SubscribeEvent public void setupClient(FMLClientSetupEvent event) { LOGGER.debug("Inital Client Setup!"); } So, I've moved everything to my main function: public Mod() { MinecraftForge.EVENT_BUS.register(this); LOGGER.debug("Initial Setup!"); try{ Method createBoolean = GameRules.BooleanValue.class.getClass().getMethod("create", boolean.class); createBoolean.setAccessible(true); DeferredWorkQueue.runLater( () -> { try { Object boolTrue = createBoolean.invoke(GameRules.BooleanValue.class, true); doAttackCooldown = GameRules.register("doAttackCooldown", (GameRules.RuleType<GameRules.BooleanValue>) boolTrue); } catch (IllegalAccessException e) { LOGGER.error("Illegal Access Exception!"); e.printStackTrace(); } catch (InvocationTargetException e) { LOGGER.error("Invocation Target Exception!"); e.printStackTrace(); } }); } catch (IllegalArgumentException e) { LOGGER.error("Illegal Argument Exception!"); e.printStackTrace(); } catch (NoSuchMethodException e) { LOGGER.error("No Such Method Exception!"); e.printStackTrace(); } } From there, I finally got the log to speak to me: [16:12:59] [modloading-worker-1/DEBUG] [(NAMESPACE HERE)/]: Initial Setup! [16:12:59] [modloading-worker-1/ERROR] [(NAMESPACE HERE)/]: No Such Method Exception! I'm not sure what's going on with FMLClientSetupEvent, whether it's a bug, or I simply broke something. In case it is a bug: I'm running Forge 31.1.0
-
Oops... yeah that's my bad. I'll fix that and get back to you.
-
try{ Method createBoolean = GameRules.BooleanValue.class.getClass().getMethod("create", boolean.class); createBoolean.setAccessible(true); DeferredWorkQueue.runLater( () -> { try { Object boolTrue = createBoolean.invoke(GameRules.BooleanValue.class, true); GameRules.register("doAttackCooldown", (GameRules.RuleType<GameRules.BooleanValue>) boolTrue); } catch (IllegalAccessException e) { } catch (InvocationTargetException e) { } } ); } catch (IllegalArgumentException e) { } catch (NoSuchMethodException e) { } So I've finally managed to clear all syntax errors in my code, and built the mod... however... it still hasn't registered the game rule...
-
Okay, I feel like I'm getting closer, but I'm not quite there yet. I'm doing something wrong, and I'm not exactly sure what. try{ Method createBool = GameRules.BooleanValue.class.getClass().getMethod("create", boolean.class); createBool.setAccessible(true); DeferredWorkQueue.runLater( () -> { GameRules.register("doAttackCooldown", createBool.invoke(???, true)); } ); } catch (InvocationTargetException | ClassNotFoundException | NoSuchMethodException | IllegalAccessException exception) { } I don't think I'm reflecting properly...
-
Aaaand I posted this in the wrong forum topic... oops.
-
public static GameRules.RuleKey<GameRules.BooleanValue> doAttackCooldown; @SubscribeEvent public void init(FMLClientSetupEvent event) { doAttackCooldown = GameRules.register("doAttackCooldown", new GameRules(new GameRules.RuleType<GameRules.BooleanValue>(), true)); } I'm trying to add a new gamerule, but I'm stuck at the first argument of new GameRules(). I'm not sure what to put here. I originally just followed the Vanilla format of: register("doFireTick", GameRules.BooleanValue.create(true)); However, the create function is private for all GameRule value types. Thank you in advance.
-
So... I'm attempting to make something that may be a bit excessive. I'm trying to add more skulls to the game. I simply decided to use the existing tile entity in the game... but I'm not sure if this is the right approach. However, that doesn't seem to be the case as both the block and item are registered without an issue... it's only when the game attempts to RENDER it, that it finally crashes. I've tested a little with this by changing the Creeper Head's texture, but nothing changed. I'm not sure if I have to register a new tile entity completely, but if that is the case, I've attempted that already with identical results. So, I guess what I'm trying to do, is replace the TileEntityRenderer for SkullTileEntity. Here is the code that I have so far, and hopefully, someone can show me what I'm doing wrong... (which is probably also the WAY I'm doing it) My TileEntityRenderer (A slightly modified version of Vanilla's SkullTileEntityRenderer): @OnlyIn(Dist.CLIENT) public class NewSkullTileEntityRenderer extends TileEntityRenderer<SkullTileEntity> { private static final Map<SkullBlock.ISkullType, GenericHeadModel> MODELS = Util.make(Maps.newHashMap(), (p_209262_0_) -> { GenericHeadModel genericheadmodel = new GenericHeadModel(0, 0, 64, 32); GenericHeadModel genericheadmodel1 = new HumanoidHeadModel(); DragonHeadModel dragonheadmodel = new DragonHeadModel(0.0F); p_209262_0_.put(SkullBlock.Types.SKELETON, genericheadmodel); p_209262_0_.put(SkullBlock.Types.WITHER_SKELETON, genericheadmodel); p_209262_0_.put(SkullBlock.Types.PLAYER, genericheadmodel1); p_209262_0_.put(SkullBlock.Types.ZOMBIE, genericheadmodel1); p_209262_0_.put(SkullBlock.Types.CREEPER, genericheadmodel); p_209262_0_.put(SkullBlock.Types.DRAGON, dragonheadmodel); p_209262_0_.put(NewSkullBlock.Types.STEVE, genericheadmodel1); p_209262_0_.put(NewSkullBlock.Types.ALEX, genericheadmodel1); }); private static final Map<SkullBlock.ISkullType, ResourceLocation> SKINS = Util.make(Maps.newHashMap(), (p_209263_0_) -> { p_209263_0_.put(SkullBlock.Types.SKELETON, new ResourceLocation("textures/entity/skeleton/skeleton.png")); p_209263_0_.put(SkullBlock.Types.WITHER_SKELETON, new ResourceLocation("textures/entity/skeleton/wither_skeleton.png")); p_209263_0_.put(SkullBlock.Types.ZOMBIE, new ResourceLocation("textures/entity/zombie/zombie.png")); p_209263_0_.put(SkullBlock.Types.CREEPER, new ResourceLocation("textures/entity/creeper/creeper.png")); p_209263_0_.put(SkullBlock.Types.DRAGON, new ResourceLocation("textures/entity/enderdragon/dragon.png")); p_209263_0_.put(SkullBlock.Types.PLAYER, DefaultPlayerSkin.getDefaultSkinLegacy()); p_209263_0_.put(NewSkullBlock.Types.STEVE, new ResourceLocation("textures/entity/steve.png")); p_209263_0_.put(NewSkullBlock.Types.ALEX, new ResourceLocation("textures/entity/alex.png")); }); public NewSkullTileEntityRenderer(TileEntityRendererDispatcher p_i226015_1_) { super(p_i226015_1_); } public void func_225616_a_(SkullTileEntity p_225616_1_, float p_225616_2_, MatrixStack p_225616_3_, IRenderTypeBuffer p_225616_4_, int p_225616_5_, int p_225616_6_) { float f = p_225616_1_.getAnimationProgress(p_225616_2_); BlockState blockstate = p_225616_1_.getBlockState(); boolean flag = blockstate.getBlock() instanceof WallSkullBlock; Direction direction = flag ? blockstate.get(WallSkullBlock.FACING) : null; float f1 = 22.5F * (float)(flag ? (2 + direction.getHorizontalIndex()) * 4 : blockstate.get(SkullBlock.ROTATION)); func_228879_a_(direction, f1, ((AbstractSkullBlock)blockstate.getBlock()).getSkullType(), p_225616_1_.getPlayerProfile(), f, p_225616_3_, p_225616_4_, p_225616_5_); } public static void func_228879_a_(@Nullable Direction p_228879_0_, float p_228879_1_, SkullBlock.ISkullType p_228879_2_, @Nullable GameProfile p_228879_3_, float p_228879_4_, MatrixStack p_228879_5_, IRenderTypeBuffer p_228879_6_, int p_228879_7_) { GenericHeadModel genericheadmodel = MODELS.get(p_228879_2_); p_228879_5_.func_227860_a_(); if (p_228879_0_ == null) { p_228879_5_.func_227861_a_(0.5D, 0.0D, 0.5D); } else { switch(p_228879_0_) { case NORTH: p_228879_5_.func_227861_a_(0.5D, 0.25D, (double)0.74F); break; case SOUTH: p_228879_5_.func_227861_a_(0.5D, 0.25D, (double)0.26F); break; case WEST: p_228879_5_.func_227861_a_((double)0.74F, 0.25D, 0.5D); break; case EAST: default: p_228879_5_.func_227861_a_((double)0.26F, 0.25D, 0.5D); } } p_228879_5_.func_227862_a_(-1.0F, -1.0F, 1.0F); IVertexBuilder ivertexbuilder = p_228879_6_.getBuffer(func_228878_a_(p_228879_2_, p_228879_3_)); genericheadmodel.func_225603_a_(p_228879_4_, p_228879_1_, 0.0F); genericheadmodel.func_225598_a_(p_228879_5_, ivertexbuilder, p_228879_7_, OverlayTexture.field_229196_a_, 1.0F, 1.0F, 1.0F, 1.0F); p_228879_5_.func_227865_b_(); } private static RenderType func_228878_a_(SkullBlock.ISkullType p_228878_0_, @Nullable GameProfile p_228878_1_) { ResourceLocation resourcelocation = SKINS.get(p_228878_0_); if (p_228878_0_ == SkullBlock.Types.PLAYER && p_228878_1_ != null) { Minecraft minecraft = Minecraft.getInstance(); Map<Type, MinecraftProfileTexture> map = minecraft.getSkinManager().loadSkinFromCache(p_228878_1_); return map.containsKey(Type.SKIN) ? RenderType.func_228644_e_(minecraft.getSkinManager().loadSkin(map.get(Type.SKIN), Type.SKIN)) : RenderType.func_228640_c_(DefaultPlayerSkin.getDefaultSkin(PlayerEntity.getUUID(p_228878_1_))); } else { return RenderType.func_228640_c_(resourcelocation); } } } My Registry: @SubscribeEvent public void init(FMLClientSetupEvent event) { ClientRegistry.bindTileEntityRenderer(TileEntityType.Builder.create(SkullTileEntity::new, ModBlocks.steve_head, ModBlocks.steve_head_wall, ModBlocks.alex_head, ModBlocks.alex_head_wall ).build(null), NewSkullTileEntityRenderer::new); } My NewSkullBlock (Since SkullBlock is Private): public class NewSkullBlock extends SkullBlock { public static final IntegerProperty ROTATION = BlockStateProperties.ROTATION_0_15; protected static final VoxelShape SHAPE = Block.makeCuboidShape(4.0D, 0.0D, 4.0D, 12.0D, 8.0D, 12.0D); public NewSkullBlock(SkullBlock.ISkullType type, Block.Properties properties) { super(type, properties); this.setDefaultState(this.stateContainer.getBaseState().with(ROTATION, Integer.valueOf(0))); } public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { return SHAPE; } public VoxelShape getRenderShape(BlockState state, IBlockReader worldIn, BlockPos pos) { return VoxelShapes.empty(); } public BlockState getStateForPlacement(BlockItemUseContext context) { return this.getDefaultState().with(ROTATION, Integer.valueOf(MathHelper.floor((double)(context.getPlacementYaw() * 16.0F / 360.0F) + 0.5D) & 15)); } public BlockState rotate(BlockState state, Rotation rot) { return state.with(ROTATION, Integer.valueOf(rot.rotate(state.get(ROTATION), 16))); } public BlockState mirror(BlockState state, Mirror mirrorIn) { return state.with(ROTATION, Integer.valueOf(mirrorIn.mirrorRotation(state.get(ROTATION), 16))); } protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) { builder.add(ROTATION); } public interface ISkullType { } public static enum Types implements SkullBlock.ISkullType { STEVE, ALEX; } } My (WallSkullBlock is also private) NewWallSkullBlock: public class NewWallSkullBlock extends WallSkullBlock { public static final DirectionProperty FACING = HorizontalBlock.HORIZONTAL_FACING; private static final Map<Direction, VoxelShape> SHAPES = Maps.newEnumMap(ImmutableMap.of(Direction.NORTH, Block.makeCuboidShape(4.0D, 4.0D, 8.0D, 12.0D, 12.0D, 16.0D), Direction.SOUTH, Block.makeCuboidShape(4.0D, 4.0D, 0.0D, 12.0D, 12.0D, 8.0D), Direction.EAST, Block.makeCuboidShape(0.0D, 4.0D, 4.0D, 8.0D, 12.0D, 12.0D), Direction.WEST, Block.makeCuboidShape(8.0D, 4.0D, 4.0D, 16.0D, 12.0D, 12.0D))); public NewWallSkullBlock(SkullBlock.ISkullType type, Block.Properties properties) { super(type, properties); this.setDefaultState(this.stateContainer.getBaseState().with(FACING, Direction.NORTH)); } public String getTranslationKey() { return this.asItem().getTranslationKey(); } public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { return SHAPES.get(state.get(FACING)); } public BlockState getStateForPlacement(BlockItemUseContext context) { BlockState blockstate = this.getDefaultState(); IBlockReader iblockreader = context.getWorld(); BlockPos blockpos = context.getPos(); Direction[] adirection = context.getNearestLookingDirections(); for(Direction direction : adirection) { if (direction.getAxis().isHorizontal()) { Direction direction1 = direction.getOpposite(); blockstate = blockstate.with(FACING, direction1); if (!iblockreader.getBlockState(blockpos.offset(direction)).isReplaceable(context)) { return blockstate; } } } return null; } public BlockState rotate(BlockState state, Rotation rot) { return state.with(FACING, rot.rotate(state.get(FACING))); } public BlockState mirror(BlockState state, Mirror mirrorIn) { return state.rotate(mirrorIn.toRotation(state.get(FACING))); } protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) { builder.add(FACING); } } My Item Registry: new SkullItem(ModBlocks.steve_head, ModBlocks.steve_head_wall, (new Item.Properties()).group(ItemGroup.DECORATIONS).rarity(Rarity.UNCOMMON)).setRegistryName("[NAMESPACE HERE]","steve_head"), new SkullItem(ModBlocks.alex_head, ModBlocks.alex_head_wall, (new Item.Properties()).group(ItemGroup.DECORATIONS).rarity(Rarity.UNCOMMON)).setRegistryName("[NAMESPACE HERE]","alex_head"), My Block Registry: steve_head = registerBlock(new NewSkullBlock(NewSkullBlock.Types.STEVE, Block.Properties.create(Material.MISCELLANEOUS).hardnessAndResistance(1.0F)),"[NAMESPACE HERE]","steve_head"); steve_head_wall = registerBlock(new NewWallSkullBlock(NewSkullBlock.Types.STEVE, Block.Properties.create(Material.MISCELLANEOUS).hardnessAndResistance(1.0F)),"[NAMESPACE HERE]","wall_steve_head"); alex_head = registerBlock(new NewSkullBlock(NewSkullBlock.Types.ALEX, Block.Properties.create(Material.MISCELLANEOUS).hardnessAndResistance(1.0F)),"[NAMESPACE HERE]","alex_head"); alex_head_wall = registerBlock(new NewWallSkullBlock(NewSkullBlock.Types.ALEX, Block.Properties.create(Material.MISCELLANEOUS).hardnessAndResistance(1.0F)),"[NAMESPACE HERE]","wall_alex_head"); Sorry for the huge amount of code, but I honestly don't know what's wrong here. Thanks in advance!
-
That worked like a charm. Thanks!
-
I'm trying to have my two flowers generate naturally, but I have no idea where to start. I tried looking into Vanilla's code for flower generation, but anything actually defining the flowers seem to be private or protected. I would love to say that I at least have code, but once again, I'm not exactly sure what to do. Unlike blocks or items, I have absolutely no experience with world generation features. If someone could please point me in the right direction, I'll be on my merry way. Thank you in advance!
-
[SOLVED] [1.15.2] A texture issue with cross models?
MattNL replied to MattNL's topic in Modder Support
That helped a lot! This is how I implemented it. I slightly modified the registerBlock function from here (Biomes of Plenty Mod [by Glitchfiend]): https://github.com/Glitchfiend/BiomesOPlenty/commit/7b727bfbcfb9307a6d15efa15893fdd8f7721cd4 Here is a cropped sample of code for those struggling with the issue: public static Block rose = null; public static Block cyan_flower = null; @Mod.EventBusSubscriber(modid = "[NAMESPACE HERE]", bus = Mod.EventBusSubscriber.Bus.MOD) @ObjectHolder("[NAMESPACE HERE]") public class ModBlocks { rose = registerBlock(new FlowerBlock(Effects.SPEED, 6, Block.Properties.create(Material.PLANTS).doesNotBlockMovement().hardnessAndResistance(0.0F).sound(SoundType.PLANT)), "[NAMESPACE HERE]", "rose"); cyan_flower = registerBlock(new FlowerBlock(Effects.SPEED, 6, Block.Properties.create(Material.PLANTS).doesNotBlockMovement().hardnessAndResistance(0.0F).sound(SoundType.PLANT)), "[NAMESPACE HERE]", "cyan_flower"); if (FMLEnvironment.dist == Dist.CLIENT) { RenderTypeLookup.setRenderLayer(rose, RenderType.func_228643_e_()); RenderTypeLookup.setRenderLayer(cyan_flower, RenderType.func_228643_e_()); } } public static Block registerBlock(Block block, String namespace, String name) { block.setRegistryName(namespace, name); ForgeRegistries.BLOCKS.register(block); return block; } For anyone who wants the functions for all of the RenderTypes: func_228639_c_ = SOLID func_228641_d_ = CUTOUT_MIPPED func_228643_e_ = CUTOUT func_228645_f_ = TRANSLUCENT func_228647_g_ = TRANSLUCENT_NO CRUMBLING func_228649_h_ = LEASH func_228651_i_ = WATER_MASK func_228653_j_ = GLINT func_228655_k_ = ENTITY GLINT func_228657_l_ = LIGHTNING I hope this can be useful to anyone else struggling with the same issue! Thanks very much! -
I should also mention, that I've tested in Minecraft with and without mods. It's broken across the board.
-
Yeah, I'm not sure myself. I've tested both in IntelliJ and in Minecraft itself, and it seems to be exactly the same. However, my friend, on a Mac, did not have an issue, but I, on the latest build of Windows 10, had this issue. So, I don't know if there is some platform compatibility issues, or if it's just a Beta Bug.
-
[SOLVED] [1.15.2] A texture issue with cross models?
MattNL replied to MattNL's topic in Modder Support
Well, thanks for the help. I appreciate your time. ? -
[SOLVED] [1.15.2] A texture issue with cross models?
MattNL replied to MattNL's topic in Modder Support
That might be useful, huh? new FlowerBlock(Effects.SPEED, 6, Block.Properties.create(Material.PLANTS).doesNotBlockMovement().hardnessAndResistance(0.0F).sound(SoundType.PLANT)).setRegistryName("[NAMESPACE HERE]", "rose")