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

[Solved] Need help updating to 1.7.2


Renkin42
 Share

Recommended Posts

I need some help with some bugs in my mod in 1.7.2.

 

1. Block and item textures aren't loading. My mod is in it's own project (Wuppy's advanced setup), and the file structure is src/main/resources/assets/renkin42swt/textures/items and /blocks. Entities have no problem loading their textures from this same location.

2. Placing new blocks crashes the game

3. Crafting Recipes work, but retrieving new items from the output crashes the game.

4. New items and blocks are being removed from my inventory when exiting and re-entering the game.

5. New blocks and items aren't appearing in the creative menu.

6. Blocks under transparent blocks not being rendered. Please check main/java/renkin42/stuffWorthThrowing/blocks/BlockSpectralBrick.

 

I am running forge 1007.

Here is my source code in it's current form: https://github.com/Renkin42/SWT_Mod_Gradle

Link to comment
Share on other sites

If your blocks and items are not showing up correctly it's only because there is no ID anymore use by the game code when crafting or harvesting blocks.

 

Before 1.7.2 IDs were used to identify and spawn the objects but now the game use Items.

 

When you harvest a block it creates an ItemBlock and this ItemBlock has to be registered as an item to exist.

 

The old registering method doesn't work, you have to used the extended version that also call the ItemBlock .

 

As i had also some difficulties when the first version of Forge 1.7.2 appears i used the same registering method as the vanilla game. and it works perfectly.

Link to comment
Share on other sites

If your blocks and items are not showing up correctly it's only because there is no ID anymore use by the game code when crafting or harvesting blocks.

 

Before 1.7.2 IDs were used to identify and spawn the objects but now the game use Items.

 

When you harvest a block it creates an ItemBlock and this ItemBlock has to be registered as an item to exist.

 

The old registering method doesn't work, you have to used the extended version that also call the ItemBlock .

 

As i had also some difficulties when the first version of Forge 1.7.2 appears i used the same registering method as the vanilla game. and it works perfectly.

I'm a bit confused. Can you give me a code example of what you're talking about?

Link to comment
Share on other sites

I'm going to refer you to my github. Look in the 1.7 branch of Carbon-Mod. https://github.com/alix-the-alicorn

 

Also, My stuff isn't localized yet, use the assets method to localize in 1.7.

Are your textures working? I tried setTextureName("renkin42swt:sandPile") with the texture at "main/resources/assets/renkin42swt/textures/items/sandPile.png" but it didn't work.

Link to comment
Share on other sites

I've got the same problems! Item textures, Items not popping up in creative inventory, items disappeared after logging in again ...

 

I think it's just a problem of item registering, but i can't figgure out how to register items right. I tried GameRegistry.registerItem() and also Item.field_150901_e.func_148756() which is the same as the GameData registry

 

I can't help myself please help!

Link to comment
Share on other sites

Okay, new issue. Now the rendering stuff for my transparent blocks is broken. It now doesn't render the non-visible sides correctly, resulting in world holes under the block. I checked BlockIce and BlockGlass and didn't see anything new, so I'm not sure what's missing. can someone take a look? On the github repository, its at main/java/renkin42/stuffWorthThrowing/blocks/BlockSpectralBrick

Never Mind, I was just using the wrong method. Hard to tell with the block stuff still obfuscated.

Link to comment
Share on other sites

Hi

 

This problem is normally associated with an incorrect isOpaqueCube.

 

Try adding @Override before your      public boolean func_149686_d()

 

Also - what is this line supposed to do (in shouldSideBeRendered)?  It looks broken to me, is 1 - side deliberate? (treat top & bottom different from sides?)

 

        return super.func_149646_a(par1IBlockAccess, par2, par3, par4, 1 - par5);

 

if you always return true from this function, does your missing side problem go away?

 

-TGG

Link to comment
Share on other sites

Never Mind, I was just using the wrong method. Hard to tell with the block stuff still obfuscated.

 

Use @Override for all your methods, it will help you pick up this sort of problem much faster.

 

-TGG

I did, but the method I was using was still valid, it just did something else. I was using func_149686_d when the correct one was func_149662_c. Also, the 1 - side thing is deliberate. I'm not sure what the purpose is, I just copied it from BlockIce.

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.

Guest
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.

 Share



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Currently, I'm trying to figure out how to read in data from a custom datapack.  The intention is to have the Item have a reference to this pack (IE "modname:material/materialname") as an NBT tag, and i would overwrite some use functions based off of that.  How should I go about reading in the data from the datapack?
    • Game version is 1.16.5, no mods were installed, using Java8 while it happened. And I have multiple different versions of Java including Java8, 11, 12, 13, 14, 15, 16, 18 were installed in my system, but there is only Java8's path inside the environment variable. Could them be one of the reasons? I'm new here so I almost don't know anythings about forge server. Please tell me if you need other files or logs. Following is the output inside CMD after I open the "start.bat": ECHO 处于打开状态。 C:\Users\30121\Desktop\N0u3_OL_server>"C:\Program Files\Java\jre1.8.0_321\bin\java.exe" -Xms2G -Xmx2G -jar forge-1.16.5-36.2.35.jar nogui 2022-05-25 12:42:52,637 main ERROR Error processing element Queue ([Appenders: null]): CLASS_NOT_FOUND 2022-05-25 12:42:52,670 main WARN Advanced terminal features are not available in this environment 2022-05-25 12:42:52,709 main ERROR Unable to locate appender "ServerGuiConsole" for logger config "root" [12:42:52] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmlserver, --fml.forgeVersion, 36.2.35, --fml.mcpVersion, 20210115.111550, --fml.mcVersion, 1.16.5, --fml.forgeGroup, net.minecraftforge, nogui] [12:42:52] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 8.1.3+8.1.3+main-8.1.x.c94d18ec starting: java version 1.8.0_321 by Oracle Corporation [12:42:53] [main/INFO] [ne.mi.fm.lo.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust Exception in thread "main" [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: java.lang.NoClassDefFoundError: com/google/common/base/Preconditions [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at org.spongepowered.asm.service.modlauncher.MixinTransformationHandler.offer(MixinTransformationHandler.java:67) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at org.spongepowered.asm.service.modlauncher.MixinServiceModLauncher.offer(MixinServiceModLauncher.java:162) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at org.spongepowered.asm.launch.MixinBootstrap.offerInternals(MixinBootstrap.java:227) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at org.spongepowered.asm.launch.MixinBootstrap.start(MixinBootstrap.java:148) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at org.spongepowered.asm.launch.MixinTransformationServiceAbstract.initialize(MixinTransformationServiceAbstract.java:88) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.TransformationServiceDecorator.onInitialize(TransformationServiceDecorator.java:68) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.TransformationServicesHandler.lambda$initialiseTransformationServices$7(TransformationServicesHandler.java:107) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at java.util.HashMap$Values.forEach(Unknown Source) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.TransformationServicesHandler.initialiseTransformationServices(TransformationServicesHandler.java:107) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.TransformationServicesHandler.initializeTransformationServices(TransformationServicesHandler.java:59) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.Launcher.run(Launcher.java:76) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at net.minecraftforge.server.ServerMain$Runner.runLauncher(ServerMain.java:49) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at net.minecraftforge.server.ServerMain$Runner.access$100(ServerMain.java:46) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at net.minecraftforge.server.ServerMain.main(ServerMain.java:43) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: Caused by: java.lang.ClassNotFoundException: com.google.common.base.Preconditions [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at java.net.URLClassLoader.findClass(Unknown Source) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at java.lang.ClassLoader.loadClass(Unknown Source) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at java.lang.ClassLoader.loadClass(Unknown Source) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         ... 15 more C:\Users\30121\Desktop\N0u3_OL_server>pause 请按任意键继续. . .
    • Although I am not exactly sure how a try-finally block would help (i.e. what code I should run even if a runtime exception is thrown), I have made some progress. The custom mob renders, but it does not rotate--even when I apply rotations to it before calling render(). private static boolean renderingCustomEntity = false; private static CustomEntity customEntity; private static void initializeCustomEntityIfNull(LocalPlayer localPlayer) { if (customEntity == null) { customEntity = ModEntities.CUSTOM_ENTITY.get().create(localPlayer.clientLevel); } } @SubscribeEvent public static void replaceMobModel(RenderLivingEvent.Pre<LivingEntity, EntityModel<LivingEntity>> event) { LocalPlayer localPlayer = Minecraft.getInstance().player; if (localPlayer != null && event.getEntity() instanceof Mob mob) { try { if (!renderingCustomEntity) { renderingCustomEntity = true; event.setCanceled(true); initializeCustomEntityIfNull(localPlayer); // I try to apply rotations to the custom entity before it rendered, but it still does not rotate at all. customEntity.setYRot(mob.getYRot()); customEntity.setYHeadRot(mob.getYHeadRot()); customEntity.setPose(mob.getPose()); // For some reason, the custom mob did not render when I called EntityRenderDispatcher#render. // So I called render() from EntityRenderDispatcher#getRenderer instead. Minecraft.getInstance().getEntityRenderDispatcher().getRenderer(customEntity).render( customEntity, customEntity.getYRot(), event.getPartialTick(), event.getPoseStack(), event.getMultiBufferSource(), event.getPackedLight() ); } } finally { renderingCustomEntity = false; } } } What would I be missing? Thank you for the help.
    • https://ileanafilio.com/cong-ty-co-phan-dau-tu-lien-doanh-viet-anh/ https://ileanafilio.com/tu-dong-viet-hoa-dau-dong-trong-excel-2007/ https://ileanafilio.com/tai-bai-hat-yeu-lai-tu-dau/ https://ileanafilio.com/phan-ky-dau-tu-du-an/ https://ileanafilio.com/su-lua-chon-so-phan-tap-62/ https://ileanafilio.com/cong-ty-co-phan-thuong-mai-dau-tu-va-phat-trien-cong-nghe-sctt/ https://ileanafilio.com/karate-co-nguon-goc-tu-dau/ https://ileanafilio.com/tap-doan-co-khi-xay-dung-thuong-mai-dai-dung/ https://ileanafilio.com/cach-tinh-dau-tu-tai-san-co-dinh/
    • Yes, I used it. And when I deleted the unnecessary parts and ran it again, I got an error. Now when I repaired that error and ran it, it worked fine. Thanks!
  • Topics

×
×
  • Create New...

Important Information

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