Posted September 1, 20205 yr I made some flower blocks for my mod, i referenced vanila classes and created a StartupClientOnly class with help from this post1 and post2 StartupClientOnly: https://pastebin.com/QQqDQcHT Main Class: https://pastebin.com/7NJChcMt But the result is invisible blocks even though i set it to cut out. The block i placed is the ZING_RED in the code. Tell me if you need to see model json files too! Edited September 1, 20205 yr by starstorms21
September 1, 20205 yr It seems that your code is missing some things, maybe it is a copy-paste issue? For example the @Mod annotation on top of your main class or this line inside your client setup event: RenderTypeLookup.setRenderLayer(RegistryHandler.ZING_RED.get(), RenderType.get()); which shouldn't even compile. Also it seems that your client event handler class is not subscribed to the event bus (@EventBusSubscriber) Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
September 1, 20205 yr Author StartupClientOnly: https://pastebin.com/TKgS7Fas full mod class: https://pastebin.com/cEruQDQv the line you pointed out does compile btw, see post2 on my original post for the code
September 1, 20205 yr Yeah, i saw that, but RenderType.get() is not a thing as far as i know, shouldn't it be RenderType.getCutout()? Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
September 1, 20205 yr Author oh, ppft, yeah fixed, i was trying to change the RenderType to see if it works and forgot to change it back. Sorry
September 1, 20205 yr All right, now its correct, before it wasn't, at least in the file you linked...still your StartupClientOnly class is not subscribed to the event bus, so no event will be listened by the function of this class Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
September 1, 20205 yr Author i tried to register it with MinecraftForge.EVENT_BUS.register(StartupMessageManager.class); in main.....but before i did, my plants were just: how would i go about subscribing to the event?
September 1, 20205 yr MinecraftForge.EVENT_BUS.register(StartupMessageManager.class); What would that do^^^ ? I don't see you registering your StartupClientOnly class to the Mod event bus Edited September 1, 20205 yr by Beethoven92 Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
September 1, 20205 yr Author i thought that would subscribe the class. How do i register my StartupClientOnly class to the Mod event bus?
September 1, 20205 yr Yeah, it subscribes the class, but that class does absolutely nothing in regard of your problem. You need to add the @EventBusSubscriber annotation on top of your startupclient class. That way every method in this class annotated with @SubscribeEvent will listen to the specified event Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
September 1, 20205 yr there are parameters you need to specify...the default bus, if not specified is the forge bus, you have to subscribe to the mod bus Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
September 1, 20205 yr Author tried: @Mod.EventBusSubscriber(modid = "jsaga",bus = Mod.EventBusSubscriber.Bus.MOD,value = Dist.CLIENT) @Mod.EventBusSubscriber(modid = "jsaga",bus = Mod.EventBusSubscriber.Bus.MOD) but still invisible block...what a head scratcher
September 1, 20205 yr 7 minutes ago, starstorms21 said: tried: @Mod.EventBusSubscriber(modid = "jsaga",bus = Mod.EventBusSubscriber.Bus.MOD,value = Dist.CLIENT) @Mod.EventBusSubscriber(modid = "jsaga",bus = Mod.EventBusSubscriber.Bus.MOD) but still invisible block...what a head scratcher Just put one of them at a time of course (Maybe you already did, just for clarification) Edited September 1, 20205 yr by Beethoven92 Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
September 1, 20205 yr Post your updated code again please...however, it must be said..you can also register your class to the event bus without the annotation @EventBusSubscriber...similarly to what you were doing here: MinecraftForge.EVENT_BUS.register(StartupMessageManager.class); But with the line above you were registering the wrong class to the wrong event bus...you would need to use MOD_EVENT_BUS.register(StartupClientOnly.class) where MOD_EVENT_BUS is FMLJavaModLoadingContext.get().getModEventBus() Edited September 1, 20205 yr by Beethoven92 Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
September 2, 20205 yr Author My updated code: https://pastebin.com/eBWAryez and https://pastebin.com/3w13ad2u Problem still persists
September 2, 20205 yr Author Fixed the error, completely my mistake! I had set the block to render as invisible in the block class, im dumb. Thanks for your help.
September 2, 20205 yr My bad, should have asked to see your block class, for some reason i did not think you could have not set it to render as a model. Glad to help anyway Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
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.