Jump to content

[1.7.2] Block.blocksList [Update 1.6.4->1.7.2] Question


darthvader45

Recommended Posts

Ok, I'm trying to update SpringMine's BetterLog mod to 1.7.2.  Here's my code:

 

/*  1:   */ package mods.springmine.BetterLog;
/*  2:   */ 
/*  3:   */ import cpw.mods.fml.client.registry.RenderingRegistry;
/*  4:   */ import cpw.mods.fml.common.Mod;
/*  5:   */ import cpw.mods.fml.common.Mod.EventHandler;
/*  6:   */ import cpw.mods.fml.common.event.FMLInitializationEvent;
/*  7:   */ import cpw.mods.fml.common.event.FMLPreInitializationEvent;
/*  9:   */ import cpw.mods.fml.relauncher.Side;
/* 10:   */ import mods.springmine.utils.BlockModelRender;
/* 11:   */ import net.minecraft.block.Block;
/* 12:   */ import net.minecraft.block.BlockLog;
/* 14:   */ 
/* 15:   */ @Mod(modid="mods.springmine.BetterLog", name="BetterLog", version="1.6.2")
/* 16:   */
/* 17:   */ public class BetterLog
/* 18:   */ {
/* 19:   */   public static int RenderType;
/* 20:   */   
/* 21:   */   @Mod.EventHandler
/* 22:   */   public void preinit(FMLPreInitializationEvent event)
/* 23:   */   {
/* 24:24 */     int tempid = Block.field_71951_J.field_71990_ca;
/* 25:25 */     Block.field_71973_m[tempid] = null;
/* 26:26 */     Block block = new BlockBetterLog(tempid);
/* 27:27 */     net.minecraft.item.Item.field_77698_e[tempid] = new ItemMultiTextureTile(tempid - 256, block, BlockLog.field_72142_a).func_77655_b("log");
/* 28:   */   }
/* 29:   */   
/* 30:   */   @Mod.EventHandler
/* 31:   */   public void init(FMLInitializationEvent event)
/* 32:   */   {
/* 33:35 */     if (event.getSide() == Side.CLIENT)
/* 34:   */     {
/* 35:37 */       RenderType = RenderingRegistry.getNextAvailableRenderId();
/* 36:38 */       RenderingRegistry.registerBlockHandler(RenderType, new BlockModelRender(new ModelBetterLog(), RenderType, true));
/* 37:   */     }
/* 38:   */   }
/* 39:   */ }



/* Location:           C:\Users\*****\Downloads\BetterLog162.zip

* Qualified Name:     mods.springmine.BetterLog.BetterLog

* JD-Core Version:    0.7.0.1

*/

Link to comment
Share on other sites

Ok, my code is here(w/o line numbers): http://pastebin.com/4HNwrRD3

 

My problem is a couple errors on this line:

net.minecraft.item.Item.field_77698_e[tempid] = new ItemMultiTextureTile(tempid - 256, block, BlockLog.getBlockById(tempid)).setUnlocalizedName("log");

 

 

Not sure how to change ItemMultiTextureTile and field_77698_e to their 1.7.2 equivalents.

Link to comment
Share on other sites

No, this mod was meant to render all the vanilla wood with a new, rounder model.  I have most of the errors fixed, but some still bug me.  Like the ones on this line:

net.minecraft.item.Item.field_77698_e[tempid] = new ItemMultiTexture(tempid - 256, block, BlockLog.getBlockById(tempid)).setUnlocalizedName("log");

.  The errors are: 'field_77698_e cannot be resolved or is not a field', and 'ItemMultiTextureTile cannot be resolved to a type'

Link to comment
Share on other sites

It says right there.

 

field_77698_e

does not exist (anymore), and it seems you haven't imported the class

ItemMultiTexture

.

 

What is

field_77698_e

supposed to be? Have a look through Item.java and replace

field_77698_e

with the deobfuscated name, if it exists.

Link to comment
Share on other sites

The Item.java will need to be decompiled and deobfuscated to make any sense. This has probably already happened if your development environment is set up correctly, but the location of the java files has changed from 1.6.4, I believe.

 

They now reside in forge/build/tmp/recompSrc.

Link to comment
Share on other sites

The Item.java will need to be decompiled and deobfuscated to make any sense. This has probably already happened if your development environment is set up correctly, but the location of the java files has changed from 1.6.4, I believe.

 

They now reside in forge/build/tmp/recompSrc.

 

I looked in forge/build/tmp/ and there was no recompSrc folder.  I followed all the directions for installing the Forge src and it still won't show up.

Link to comment
Share on other sites

 

C:\Users\joshl\Desktop\forge-1.7.2-10.12.2.1121-src>gradlew.bat setupDecompWorks
pace
****************************
Powered By MCP:
http://mcp.ocean-labs.de/
Searge, ProfMobius, Fesh0r,
R4wk, ZeuX, IngisKahn
MCP Data version : unknown
****************************
:extractUserDev
:getAssetsIndex
:getAssets
:copyAssets
:extractNatives
:genSrgs SKIPPED
:makeStart SKIPPED
:downloadMcpTools
:downloadClient SKIPPED
:downloadServer SKIPPED
:mergeJars SKIPPED
:deobfuscateJar SKIPPED
:decompile SKIPPED
:processSources SKIPPED
:remapJar SKIPPED
:extractMinecraftSrc SKIPPED
:recompMinecraft SKIPPED
:repackMinecraft SKIPPED
:setupDecompWorkspace

BUILD SUCCESSFUL

Total time: 57.673 secs
C:\Users\joshl\Desktop\forge-1.7.2-10.12.2.1121-src>

 

 

Here it is.  Dunno why these were skipped.

Link to comment
Share on other sites

Hence diabolical!

 

I can see how it could corrupt worlds, but what I am working on using reflection is merely a proof of concept.

 

Once Forge for 1.7 supports replacing vanilla Blocks (if it ever will), I will port the code. For now, though, reflection seems to be the best way for me to test out my ideas as if that system was already in place.

 

Thank you for the heads up, though!

Link to comment
Share on other sites

just a bit of hijack(sorry), but i use asm to replace items, blocks and remove some entities,while i do a bunch of sanity checks, can it still corrupt worlds? if so, do i need to hook the world load/save events and make backups of the world? thanks

edit:

its just me or this guy decompiled a mod using JAD? (hence line numbers and obfuscated names)

Link to comment
Share on other sites

Have you run the eclipse command after running setupDecompWorkspace?

For your actual problem, I misunderstood the first time. You are trying to replace vanilla Blocks. This is no longer (or rather: not yet) possible in Forge for 1.7 because of the switch to a non-id based system.

I don't think running the eclipse command lets me have the deobfuscated classes.

Link to comment
Share on other sites

You mean type in both setupDecompWorkspace AND eclipse in the same line?  Hmmm, I'll try that, can't guarantee anything since the output last time skipped the srg as well as the client and server jars.

 

Edit: Nope, gave me this output:

 

 

C:\Users\joshl\Desktop\forge-1.7.2-10.12.2.1121-src>gradlew.bat setupDecompWorks
pace eclipse
****************************
Powered By MCP:
http://mcp.ocean-labs.de/
Searge, ProfMobius, Fesh0r,
R4wk, ZeuX, IngisKahn
MCP Data version : unknown
****************************
:extractUserDev
:getAssetsIndex
:getAssets
:copyAssets
:extractNatives
:genSrgs SKIPPED
:makeStart SKIPPED
:downloadMcpTools
:downloadClient SKIPPED
:downloadServer SKIPPED
:mergeJars SKIPPED
:deobfuscateJar SKIPPED
:decompile SKIPPED
:processSources SKIPPED
:remapJar SKIPPED
:extractMinecraftSrc SKIPPED
:recompMinecraft SKIPPED
:repackMinecraft SKIPPED
:setupDecompWorkspace
:eclipseClasspath
:eclipseJdt
:eclipseProject
:eclipse

BUILD SUCCESSFUL

Total time: 1 mins 13.113 secs
C:\Users\joshl\Desktop\forge-1.7.2-10.12.2.1121-src>

 

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
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 was just trying to play my modded world when i randomly got this crash for no reason. I sorted through like every mod and eventually I realized it was LLibrary but I can't seem to find a solution to fix the crashing. I can't lose the world that I have that uses this mod please help me. Here's the report: https://pastebin.com/0D00B79i If anyone has a solution please let me know.  
    • 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑   Daftar Slot Ligawin88 adalah bocoran slot rekomendasi gacor dari Ligawin88 yang bisa anda temukan di SLOT Ligawin88. Situs SLOT Ligawin88 hari ini yang kami bagikan di sini adalah yang terbaik dan bersiaplah untuk mengalami sensasi tak terlupakan dalam permainan slot online. Temukan game SLOT Ligawin88 terbaik dengan 100 pilihan provider ternama yang dipercaya akan memberikan kepuasan dan kemenangan hari ini untuk meraih x500. RTP SLOT Ligawin88 merupakan SLOT Ligawin88 hari ini yang telah menjadi pilihan utama bagi pemain judi online di seluruh Indonesia. Setiap harinya jutaan pemain memasuki dunia maya untuk memperoleh hiburan seru dan kemenangan besar dalam bermain slot dengan adanya bocoran RTP SLOT Ligawin88. Tidak ada yang lebih menyenangkan daripada mengungguli mesin slot dan meraih jackpot x500 yang menggiurkan di situs SLOT Ligawin88 hari ini yang telah disediakan SLOT Ligawin88. Menangkan jackpot besar x500 rajanya maxwin dari segala slot dan raih kemenangan spektakuler di situs Ligawin88 terbaik 2024 adalah tempat yang menyediakan mesin slot dengan peluang kemenangan lebih tinggi daripada situs slot lainnya. Bagi anda yang mencari pengalaman judi slot paling seru dan mendebarkan, situs bo SLOT Ligawin88 terbaik 2024 adalah pilihan yang tepat. Jelajahi dunia slot online melalui situs SLOT Ligawin88 di link SLOT Ligawin88.
    • 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑   Daftar Slot Asusslot adalah bocoran slot rekomendasi gacor dari Asusslot yang bisa anda temukan di SLOT Asusslot. Situs SLOT Asusslot hari ini yang kami bagikan di sini adalah yang terbaik dan bersiaplah untuk mengalami sensasi tak terlupakan dalam permainan slot online. Temukan game SLOT Asusslot terbaik dengan 100 pilihan provider ternama yang dipercaya akan memberikan kepuasan dan kemenangan hari ini untuk meraih x500. RTP SLOT Asusslot merupakan SLOT Asusslot hari ini yang telah menjadi pilihan utama bagi pemain judi online di seluruh Indonesia. Setiap harinya jutaan pemain memasuki dunia maya untuk memperoleh hiburan seru dan kemenangan besar dalam bermain slot dengan adanya bocoran RTP SLOT Asusslot. Tidak ada yang lebih menyenangkan daripada mengungguli mesin slot dan meraih jackpot x500 yang menggiurkan di situs SLOT Asusslot hari ini yang telah disediakan SLOT Asusslot. Menangkan jackpot besar x500 rajanya maxwin dari segala slot dan raih kemenangan spektakuler di situs Asusslot terbaik 2024 adalah tempat yang menyediakan mesin slot dengan peluang kemenangan lebih tinggi daripada situs slot lainnya. Bagi anda yang mencari pengalaman judi slot paling seru dan mendebarkan, situs bo SLOT Asusslot terbaik 2024 adalah pilihan yang tepat. Jelajahi dunia slot online melalui situs SLOT Asusslot di link SLOT Asusslot.
    • 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 Daftar Slot Galeri555 adalah bocoran slot rekomendasi gacor dari Galeri555 yang bisa anda temukan di SLOT Galeri555. Situs SLOT Galeri555 hari ini yang kami bagikan di sini adalah yang terbaik dan bersiaplah untuk mengalami sensasi tak terlupakan dalam permainan slot online. Temukan game SLOT Galeri555 terbaik dengan 100 pilihan provider ternama yang dipercaya akan memberikan kepuasan dan kemenangan hari ini untuk meraih x500. RTP SLOT Galeri555 merupakan SLOT Galeri555 hari ini yang telah menjadi pilihan utama bagi pemain judi online di seluruh Indonesia. Setiap harinya jutaan pemain memasuki dunia maya untuk memperoleh hiburan seru dan kemenangan besar dalam bermain slot dengan adanya bocoran RTP SLOT Galeri555. Tidak ada yang lebih menyenangkan daripada mengungguli mesin slot dan meraih jackpot x500 yang menggiurkan di situs SLOT Galeri555 hari ini yang telah disediakan SLOT Galeri555. Menangkan jackpot besar x500 rajanya maxwin dari segala slot dan raih kemenangan spektakuler di situs Galeri555 terbaik 2024 adalah tempat yang menyediakan mesin slot dengan peluang kemenangan lebih tinggi daripada situs slot lainnya. Bagi anda yang mencari pengalaman judi slot paling seru dan mendebarkan, situs bo SLOT Galeri555 terbaik 2024 adalah pilihan yang tepat. Jelajahi dunia slot online melalui situs SLOT Galeri555 di link SLOT Galeri555.
    • 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 Daftar Slot Kocok303 adalah bocoran slot rekomendasi gacor dari Kocok303 yang bisa anda temukan di SLOT Kocok303. Situs SLOT Kocok303 hari ini yang kami bagikan di sini adalah yang terbaik dan bersiaplah untuk mengalami sensasi tak terlupakan dalam permainan slot online. Temukan game SLOT Kocok303 terbaik dengan 100 pilihan provider ternama yang dipercaya akan memberikan kepuasan dan kemenangan hari ini untuk meraih x500. RTP SLOT Kocok303 merupakan SLOT Kocok303 hari ini yang telah menjadi pilihan utama bagi pemain judi online di seluruh Indonesia. Setiap harinya jutaan pemain memasuki dunia maya untuk memperoleh hiburan seru dan kemenangan besar dalam bermain slot dengan adanya bocoran RTP SLOT Kocok303. Tidak ada yang lebih menyenangkan daripada mengungguli mesin slot dan meraih jackpot x500 yang menggiurkan di situs SLOT Kocok303 hari ini yang telah disediakan SLOT Kocok303. Menangkan jackpot besar x500 rajanya maxwin dari segala slot dan raih kemenangan spektakuler di situs Kocok303 terbaik 2024 adalah tempat yang menyediakan mesin slot dengan peluang kemenangan lebih tinggi daripada situs slot lainnya. Bagi anda yang mencari pengalaman judi slot paling seru dan mendebarkan, situs bo SLOT Kocok303 terbaik 2024 adalah pilihan yang tepat. Jelajahi dunia slot online melalui situs SLOT Kocok303 di link SLOT Kocok303.
  • Topics

×
×
  • Create New...

Important Information

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