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

[Solved...ish][1.7.10] iron bars/pane texture problems


PegBeard
 Share

Recommended Posts

I have made a new block, extending BlockPane. Initially, I had the texture set to the vanilla Iron Bars. This didn't require me to register any textures (obviously), just declare the already registered texture, when initialising the block, like so:

 

public static Block poweredFence = new REFence("iron_bars", "iron_bars", Material.rock, false).setBlockName(Names.Traps.POWEREDFENCE);

 

Now that I have gotten the block functioning as I want it to, I am attempting to add my own texture to it. I tried registering the texture as normal, in the block class - and adjusting the block initialisation:

 

public static Block poweredFence = new REFence("powered_fence", "powered_fence", Material.rock, false).setBlockName(Names.Traps.POWEREDFENCE);

 

@SideOnly(Side.CLIENT)
    @Override
    public void registerBlockIcons(IIconRegister icon)
    {
        blockIcon = icon.registerIcon(this.getUnlocalizedName().substring(this.getUnlocalizedName().indexOf(".") + 1));
    }

 

This has worked for everything else I have done, and does retexture the in-hand icon, but when placed in the world the game crashes with a null pointer exception.

I know that I need to register the texture file, and the way I have it works, but I am not sure why it causes a crash when the block is placed.

I presume I need to register the icon somewhere else, though I am not sure where/how, as registering the icon in my client proxy was unsuccessful and I couldn't find a sufficient tutorial that explained/solved my problem.

 

Here is the crash report too:

 

---- Minecraft Crash Report ----

// I blame Dinnerbone.

 

Time: 22/07/15 19:45

Description: Unexpected error

 

java.lang.NullPointerException: Unexpected error

at net.minecraft.client.renderer.RenderBlocks.renderBlockPane(RenderBlocks.java:3275)

at net.minecraft.client.renderer.RenderBlocks.renderBlockByRenderType(RenderBlocks.java:378)

at net.minecraft.client.renderer.WorldRenderer.updateRenderer(WorldRenderer.java:207)

at net.minecraft.client.renderer.RenderGlobal.updateRenderers(RenderGlobal.java:1618)

at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1263)

at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1091)

at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1068)

at net.minecraft.client.Minecraft.run(Minecraft.java:962)

at net.minecraft.client.main.Main.main(Main.java:164)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)

at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)

at GradleStart.main(Unknown Source)

 

 

A detailed walkthrough of the error, its code path and all known details is as follows:

---------------------------------------------------------------------------------------

 

-- Head --

Stacktrace:

at net.minecraft.client.renderer.RenderBlocks.renderBlockPane(RenderBlocks.java:3275)

at net.minecraft.client.renderer.RenderBlocks.renderBlockByRenderType(RenderBlocks.java:378)

at net.minecraft.client.renderer.WorldRenderer.updateRenderer(WorldRenderer.java:207)

at net.minecraft.client.renderer.RenderGlobal.updateRenderers(RenderGlobal.java:1618)

at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1263)

 

-- Affected level --

Details:

Level name: MpServer

All players: 1 total; [EntityClientPlayerMP['PegBeard'/418, l='MpServer', x=394.15, y=5.62, z=-48.13]]

Chunk stats: MultiplayerChunkCache: 70, 70

Level seed: 0

Level generator: ID 01 - flat, ver 0. Features enabled: false

Level generator options:

Level spawn location: World: (387,4,-56), Chunk: (at 3,0,8 in 24,-4; contains blocks 384,0,-64 to 399,255,-49), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)

Level time: 978 game time, 978 day time

Level dimension: 0

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

Forced entities: 30 total; [EntityClientPlayerMP['PegBeard'/418, l='MpServer', x=394.15, y=5.62, z=-48.13], EntitySlime['Slime'/330, l='MpServer', x=392.25, y=4.00, z=-94.99], EntitySlime['Slime'/331, l='MpServer', x=399.45, y=4.00, z=9.81], EntitySlime['Slime'/332, l='MpServer', x=393.43, y=4.00, z=20.43], EntitySheep['Sheep'/336, l='MpServer', x=429.50, y=4.00, z=-83.50], EntitySheep['Sheep'/337, l='MpServer', x=431.22, y=4.00, z=-82.22], EntityCow['Cow'/338, l='MpServer', x=431.34, y=4.00, z=-84.03], EntityCow['Cow'/339, l='MpServer', x=429.50, y=4.00, z=-85.50], EntityCow['Cow'/340, l='MpServer', x=429.13, y=4.00, z=-87.84], EntitySlime['Slime'/276, l='MpServer', x=329.70, y=4.00, z=30.91], EntityCow['Cow'/341, l='MpServer', x=430.41, y=4.00, z=-87.84], EntitySlime['Slime'/342, l='MpServer', x=430.09, y=4.00, z=-41.19], EntitySlime['Slime'/343, l='MpServer', x=422.66, y=4.00, z=26.34], EntityPig['Pig'/347, l='MpServer', x=437.69, y=4.00, z=-80.41], EntityPig['Pig'/348, l='MpServer', x=436.22, y=4.00, z=-82.66], EntityPig['Pig'/349, l='MpServer', x=441.81, y=4.00, z=-87.19], EntitySheep['Sheep'/350, l='MpServer', x=436.50, y=4.00, z=-81.31], EntitySheep['Sheep'/351, l='MpServer', x=432.75, y=4.00, z=-82.28], EntityPig['Pig'/352, l='MpServer', x=441.47, y=4.00, z=-70.19], EntitySlime['Slime'/353, l='MpServer', x=440.34, y=4.00, z=-69.92], EntitySlime['Slime'/354, l='MpServer', x=440.92, y=4.00, z=-17.69], EntitySlime['Slime'/355, l='MpServer', x=443.21, y=4.00, z=-15.37], EntityCow['Cow'/359, l='MpServer', x=460.22, y=4.00, z=-92.50], EntityCow['Cow'/360, l='MpServer', x=461.81, y=4.00, z=-92.50], EntitySlime['Slime'/297, l='MpServer', x=336.47, y=4.00, z=11.72], EntitySlime['Slime'/361, l='MpServer', x=449.97, y=4.00, z=-31.70], EntitySlime['Slime'/362, l='MpServer', x=464.07, y=4.00, z=-9.12], EntitySheep['Sheep'/307, l='MpServer', x=365.13, y=4.00, z=-31.88], EntitySlime['Slime'/318, l='MpServer', x=373.84, y=4.00, z=-20.43], EntitySlime['Slime'/319, l='MpServer', x=368.66, y=4.00, z=11.81]]

Retry entities: 0 total; []

Server brand: fml,forge

Server type: Integrated singleplayer server

Stacktrace:

at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415)

at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2567)

at net.minecraft.client.Minecraft.run(Minecraft.java:991)

at net.minecraft.client.main.Main.main(Main.java:164)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)

at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)

at GradleStart.main(Unknown Source)

 

-- System Details --

Details:

Minecraft Version: 1.7.10

Operating System: Windows 7 (x86) version 6.1

Java Version: 1.8.0_51, Oracle Corporation

Java VM Version: Java HotSpot Client VM (mixed mode, sharing), Oracle Corporation

Memory: 56544648 bytes (53 MB) / 173981696 bytes (165 MB) up to 259522560 bytes (247 MB)

JVM Flags: 0 total;

AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0

FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.3.1408 4 mods loaded, 4 mods active

mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available->Available->Available->Available->Available->Available

FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.3.1408-1.7.10.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available->Available->Available->Available->Available->Available

Forge{10.13.3.1408} [Minecraft Forge] (forgeSrc-1.7.10-10.13.3.1408-1.7.10.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available->Available->Available->Available->Available->Available

RedstoneEngineering{inDev} [RedstoneEngineering] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available->Available->Available->Available->Available->Available

GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.2.12422 Compatibility Profile Context 13.152.0.0' Renderer: 'AMD Radeon HD 8670D'

Launched Version: 1.7.10

LWJGL: 2.9.1

OpenGL: AMD Radeon HD 8670D GL version 4.2.12422 Compatibility Profile Context 13.152.0.0, ATI Technologies Inc.

GL Caps: Using GL 1.3 multitexturing.

Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.

Anisotropic filtering is supported and maximum anisotropy is 16.

Shaders are available because OpenGL 2.1 is supported.

 

Is Modded: Definitely; Client brand changed to 'fml,forge'

Type: Client (map_client.txt)

Resource Packs: []

Current Language: English (US)

Profiler Position: N/A (disabled)

Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

Anisotropic Filtering: Off (1)

 

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

    • I'm making a custom furnace(refinery) and want to sync the BlockEntity data with the client so I can display it on the ContainerScreen. I've tried getUpdatePacket() and onDataPacket() in the BlockEntity and also using a packet. Neither worked. RefineryBlock RefineryBlockEntity RefineryMenu RefineryScreen PacketHandler RefineryUpdatePacket ClientAccess  
    • i am trying to host a server using 1.12.2 and the  forge.jar file wont open
    • As title says. Already had to get some work arounds to get java working, and I don't have the ability to upgrade to windows 10.
    • I am having an issue running a server with my mod. I know that I am reaching across sides somewhere in my Mod, but could not find where this error is occurring in my mod. The crash report that I have attached below mentioned that it involved the LocalPlayer. However, when I searched my mod for LocalPlayer, I only found one case in the event that I have attached below. Can you find where I errored?   Crash Report: ---- Minecraft Crash Report ---- // I bet Cylons wouldn't have this problem. Time: 1/17/22, 8:10 PM Description: Mod loading error has occurred java.lang.Exception: Mod Loading has failed at net.minecraftforge.logging.CrashReportExtender.dumpModLoadingCrashReport(CrashReportExtender.java:69) ~[forge-1.18-38.0.17_mapped_official_1.18-recomp.jar%2376%2382!:?] {re:classloading} at net.minecraftforge.server.loading.ServerModLoader.load(ServerModLoader.java:53) ~[forge-1.18-38.0.17_mapped_official_1.18-recomp.jar%2376%2382!:?] {re:classloading} at net.minecraft.server.Main.main(Main.java:104) ~[forge-1.18-38.0.17_mapped_official_1.18-recomp.jar%2377!:?] {re:classloading} at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {} at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {} at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {} at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {} at net.minecraftforge.fml.loading.targets.ForgeServerUserdevLaunchHandler.lambda$launchService$0(ForgeServerUserdevLaunchHandler.java:16) ~[fmlloader-1.18-38.0.17.jar%230!:?] {} at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.0.24.jar%2310!:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.0.24.jar%2310!:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.0.24.jar%2310!:?] {} at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.0.24.jar%2310!:?] {} at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.0.24.jar%2310!:?] {} at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.0.24.jar%2310!:?] {} at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.0.24.jar%2310!:?] {} at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:90) [bootstraplauncher-0.1.17.jar:?] {} A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: main Stacktrace: at net.minecraftforge.fml.loading.RuntimeDistCleaner.processClassWithFlags(RuntimeDistCleaner.java:71) ~[fmlloader-1.18-38.0.17.jar%230!:1.0] {} -- MOD examplemod -- Details: Mod File: main Failure message: Example Mod (examplemod) has failed to load correctly java.lang.RuntimeException: Attempted to load class net/minecraft/client/player/LocalPlayer for invalid dist DEDICATED_SERVER Mod Version: 3.0 Mod Issue URL: NOT PROVIDED Exception message: java.lang.RuntimeException: Attempted to load class net/minecraft/client/player/LocalPlayer for invalid dist DEDICATED_SERVER Stacktrace: at net.minecraftforge.fml.loading.RuntimeDistCleaner.processClassWithFlags(RuntimeDistCleaner.java:71) ~[fmlloader-1.18-38.0.17.jar:1.0] {} at cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:88) ~[modlauncher-9.0.7.jar:?] {} at cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120) ~[modlauncher-9.0.7.jar:?] {} at cpw.mods.modlauncher.TransformingClassLoader.maybeTransformClassBytes(TransformingClassLoader.java:50) ~[modlauncher-9.0.7.jar:?] {} at cpw.mods.cl.ModuleClassLoader.readerToClass(ModuleClassLoader.java:110) ~[securejarhandler-0.9.54.jar:?] {} at cpw.mods.cl.ModuleClassLoader.lambda$findClass$16(ModuleClassLoader.java:213) ~[securejarhandler-0.9.54.jar:?] {} at cpw.mods.cl.ModuleClassLoader.loadFromModule(ModuleClassLoader.java:223) ~[securejarhandler-0.9.54.jar:?] {} at cpw.mods.cl.ModuleClassLoader.findClass(ModuleClassLoader.java:213) ~[securejarhandler-0.9.54.jar:?] {} at cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:130) ~[securejarhandler-0.9.54.jar:?] {} at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?] {} at java.lang.Class.forName0(Native Method) ~[?:?] {} at java.lang.Class.forName(Class.java:467) ~[?:?] {} at net.minecraftforge.fml.javafmlmod.AutomaticEventSubscriber.lambda$inject$6(AutomaticEventSubscriber.java:75) ~[javafmllanguage-1.18-38.0.17.jar%2378!:?] {} at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?] {} at net.minecraftforge.fml.javafmlmod.AutomaticEventSubscriber.inject(AutomaticEventSubscriber.java:62) ~[javafmllanguage-1.18-38.0.17.jar%2378!:?] {} at net.minecraftforge.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:91) ~[javafmllanguage-1.18-38.0.17.jar%2378!:?] {} at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:120) ~[fmlcore-1.18-38.0.17.jar%2380!:?] {} at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) ~[?:?] {} at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796) ~[?:?] {} at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] {} at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] {} at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] {} at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] {} at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] {} -- System Details -- Details: Minecraft Version: 1.18 Minecraft Version ID: 1.18 Operating System: Windows 10 (amd64) version 10.0 Java Version: 17.0.1, Eclipse Adoptium Java VM Version: OpenJDK 64-Bit Server VM (mixed mode, sharing), Eclipse Adoptium Memory: 320780752 bytes (305 MiB) / 1127219200 bytes (1075 MiB) up to 2122317824 bytes (2024 MiB) CPUs: 4 Processor Vendor: GenuineIntel Processor Name: Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz Identifier: Intel64 Family 6 Model 142 Stepping 9 Microarchitecture: Amber Lake Frequency (GHz): 2.30 Number of physical packages: 1 Number of physical CPUs: 2 Number of logical CPUs: 4 Graphics card #0 name: Intel(R) HD Graphics 620 Graphics card #0 vendor: Intel Corporation (0x8086) Graphics card #0 VRAM (MB): 1024.00 Graphics card #0 deviceId: 0x5921 Graphics card #0 versionInfo: DriverVersion=27.20.100.9664 Memory slot #0 capacity (MB): 8192.00 Memory slot #0 clockSpeed (GHz): 2.67 Memory slot #0 type: DDR4 Virtual memory max (MB): 16427.04 Virtual memory used (MB): 10800.33 Swap memory total (MB): 8334.11 Swap memory used (MB): 434.15 JVM Flags: 1 total; -XX:+ShowCodeDetailsInExceptionMessages ModLauncher: 9.0.24+9.0.24+main.7be9f01d ModLauncher launch target: forgeserveruserdev ModLauncher naming: mcp ModLauncher services: mixin PLUGINSERVICE eventbus PLUGINSERVICE object_holder_definalize PLUGINSERVICE runtime_enum_extender PLUGINSERVICE capability_token_subclass PLUGINSERVICE accesstransformer PLUGINSERVICE runtimedistcleaner PLUGINSERVICE mixin TRANSFORMATIONSERVICE fml TRANSFORMATIONSERVICE FML Language Providers: minecraft@1.0 javafml@null Mod List: forge-1.18-38.0.17_mapped_official_1.18-recomp.jar|Minecraft |minecraft |1.18 |COMMON_SET|Manifest: a1:d4:5e:04:4f:d3:d6:e0:7b:37:97:cf:77:b0:de:ad:4a:47:ce:8c:96:49:5f:0a:cf:8c:ae:b2:6d:4b:8a:3f main |Example Mod |examplemod |3.0 |ERROR |Manifest: NOSIGNATURE |Forge |forge |38.0.17 |COMMON_SET|Manifest: NOSIGNATURE Crash Report UUID: a2d945ef-ef76-4bb1-ac09-f2b263e52519 FML: 38.0 Forge: net.minecraftforge:38.0.17 Mod Event with LocalPlayer: @SubscribeEvent public static void renderGameOverlay(RenderGameOverlayEvent.Post event) { if(!(Thread.currentThread().getThreadGroup() == SidedThreadGroups.SERVER)) { Minecraft mc = Minecraft.getInstance(); LocalPlayer player = mc.player; if (mc.gameMode.canHurtPlayer() && event.getType() == RenderGameOverlayEvent.ElementType.ALL) { ModRender renderer = new ModRender(Minecraft.getInstance()); renderer.renderToolbars(Minecraft.getInstance(), player); } } }  
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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