Jump to content

Recommended Posts

Posted

Hey everyone, I've got a problem. Every time I try to install Forge 3.3.8.152 to MCP, I get tons of errors. I'm doing everthing like I did before with Forge 3.1.3.105, except pre-installing ModLoader(because of FML), but after the installation, the functions are still obfuscated(field_####), which causes errors while recompiling. I hope to get a solution soon.

btw how do I get the error logs?

Posted

-.- all the crap that comes up when you run install.bat.. thats the log, post it here.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

 

 

 

=================================== Minecraft Forge Setup Start ================

=================

== MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==

WARNING:

The cleanup script will delete all folders created by MCP, including the

src folder which may contain changes you made to the code, along with any

saved worlds from the client or server.

If you really want to clean up, enter "Yes" yes

!! Updates available. Please run updatemcp to get them. !!

> Cleaning temp

> Cleaning src

> Cleaning bin

> Cleaning reobf

> Cleaning jars

> Cleaning logs

== MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==

# found jad, ff, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs

, param csvs, astyle, astyle config

!! Updates available. Please run updatemcp to get them. !!

> Creating Retroguard config files

!! Modified jar detected. Unpredictable results !!

== Decompiling client using fernflower ==

> Creating SRGs

> Applying Retroguard

> Applying MCInjector

> Unpacking jar

> Copying classes

> Decompiling

> Copying sources

> Applying fernflower fixes

> Applying patches

> Cleaning comments

- Done in 103.35 seconds

== Reformating client ==

> Cleaning sources

> Replacing OpenGL constants

> Reformating sources

- Done in 9.89 seconds

!! renaming disabled !!

!! Missing server jar file. Aborting !!

!! recompile disabled !!

Stripping META-INF from minecraft.jar

Applying Forge ModLoader patches

== MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==

== Updating client ==

> Adding javadoc

> Renaming sources

- Done in 7.28 seconds

Applying forge patches

patching file minecraft/net/minecraft/client/Minecraft.java

Hunk #1 succeeded at 1946 (offset -10 lines).

Hunk #2 succeeded at 2287 (offset -1 lines).

Hunk #3 succeeded at 2546 (offset -14 lines).

patching file minecraft/net/minecraft/src/AnvilChunkLoader.java

patching file minecraft/net/minecraft/src/AnvilSaveHandler.java

patching file minecraft/net/minecraft/src/Block.java

patching file minecraft/net/minecraft/src/BlockButton.java

patching file minecraft/net/minecraft/src/BlockChest.java

patching file minecraft/net/minecraft/src/BlockContainer.java

patching file minecraft/net/minecraft/src/BlockCrops.java

patching file minecraft/net/minecraft/src/BlockDoor.java

patching file minecraft/net/minecraft/src/BlockFire.java

patching file minecraft/net/minecraft/src/BlockLadder.java

patching file minecraft/net/minecraft/src/BlockLeaves.java

patching file minecraft/net/minecraft/src/BlockLever.java

patching file minecraft/net/minecraft/src/BlockLog.java

patching file minecraft/net/minecraft/src/BlockNetherStalk.java

patching file minecraft/net/minecraft/src/BlockPistonBase.java

patching file minecraft/net/minecraft/src/BlockPressurePlate.java

patching file minecraft/net/minecraft/src/BlockRail.java

patching file minecraft/net/minecraft/src/BlockRedstoneRepeater.java

patching file minecraft/net/minecraft/src/BlockRedstoneWire.java

patching file minecraft/net/minecraft/src/BlockSnow.java

patching file minecraft/net/minecraft/src/BlockTallGrass.java

patching file minecraft/net/minecraft/src/BlockTorch.java

patching file minecraft/net/minecraft/src/BlockTrapDoor.java

patching file minecraft/net/minecraft/src/BlockVine.java

patching file minecraft/net/minecraft/src/Chunk.java

patching file minecraft/net/minecraft/src/ChunkProvider.java

Hunk #1 succeeded at 6 with fuzz 2 (offset -2 lines).

patching file minecraft/net/minecraft/src/ContainerCreative.java

patching file minecraft/net/minecraft/src/ContainerFurnace.java

patching file minecraft/net/minecraft/src/CraftingManager.java

patching file minecraft/net/minecraft/src/EffectRenderer.java

patching file minecraft/net/minecraft/src/Enchantment.java

patching file minecraft/net/minecraft/src/EnchantmentHelper.java

patching file minecraft/net/minecraft/src/Entity.java

patching file minecraft/net/minecraft/src/EntityEnderman.java

patching file minecraft/net/minecraft/src/EntityItem.java

Hunk #1 FAILED at 2.

Hunk #2 succeeded at 172 with fuzz 1 (offset -2 lines).

1 out of 2 hunks FAILED -- saving rejects to file minecraft/net/minecraft/src/En

tityItem.ja#

patching file minecraft/net/minecraft/src/EntityLiving.java

patching file minecraft/net/minecraft/src/EntityMinecart.java

patching file minecraft/net/minecraft/src/EntityMooshroom.java

patching file minecraft/net/minecraft/src/EntityOcelot.java

patching file minecraft/net/minecraft/src/EntityPlayer.java

patching file minecraft/net/minecraft/src/EntityRenderer.java

patching file minecraft/net/minecraft/src/EntitySheep.java

patching file minecraft/net/minecraft/src/Explosion.java

patching file minecraft/net/minecraft/src/FurnaceRecipes.java

patching file minecraft/net/minecraft/src/GuiAchievements.java

patching file minecraft/net/minecraft/src/GuiControls.java

patching file minecraft/net/minecraft/src/GuiIngame.java

patching file minecraft/net/minecraft/src/Item.java

patching file minecraft/net/minecraft/src/ItemBow.java

patching file minecraft/net/minecraft/src/ItemBucket.java

patching file minecraft/net/minecraft/src/ItemDye.java

patching file minecraft/net/minecraft/src/ItemHoe.java

patching file minecraft/net/minecraft/src/ItemMap.java

patching file minecraft/net/minecraft/src/ItemRenderer.java

patching file minecraft/net/minecraft/src/ItemShears.java

patching file minecraft/net/minecraft/src/ItemTool.java

patching file minecraft/net/minecraft/src/MovingObjectPosition.java

patching file minecraft/net/minecraft/src/NetClientHandler.java

Hunk #1 FAILED at 14.

Hunk #2 succeeded at 55 (offset -2 lines).

Hunk #3 FAILED at 85.

Hunk #5 succeeded at 459 (offset -2 lines).

Hunk #6 succeeded at 509 with fuzz 2.

Hunk #7 FAILED at 573.

Hunk #8 succeeded at 665 (offset -3 lines).

Hunk #10 succeeded at 860 (offset -2 lines).

Hunk #12 succeeded at 1055 (offset -2 lines).

Hunk #13 FAILED at 1165.

4 out of 13 hunks FAILED -- saving rejects to file minecraft/net/minecraft/src/N

etClientHand#

patching file minecraft/net/minecraft/src/NetworkManager.java

patching file minecraft/net/minecraft/src/Packet53BlockChange.java

patching file minecraft/net/minecraft/src/PlayerController.java

patching file minecraft/net/minecraft/src/PlayerControllerCreative.java

patching file minecraft/net/minecraft/src/PlayerControllerMP.java

patching file minecraft/net/minecraft/src/PlayerControllerSP.java

patching file minecraft/net/minecraft/src/RailLogic.java

patching file minecraft/net/minecraft/src/RenderBiped.java

patching file minecraft/net/minecraft/src/RenderBlocks.java

Hunk #1 succeeded at 424 (offset -32 lines).

Hunk #2 succeeded at 1385 with fuzz 2.

Hunk #3 succeeded at 1373 with fuzz 2 (offset -32 lines).

Hunk #4 succeeded at 1417 with fuzz 2.

Hunk #5 succeeded at 1397 with fuzz 2 (offset -32 lines).

Hunk #6 succeeded at 1441 with fuzz 2.

Hunk #7 succeeded at 1421 with fuzz 2 (offset -32 lines).

Hunk #8 succeeded at 3611 (offset 2 lines).

Hunk #9 succeeded at 3700 (offset -32 lines).

Hunk #10 succeeded at 3857 (offset 2 lines).

Hunk #11 succeeded at 3946 (offset -32 lines).

Hunk #12 FAILED at 4058.

Hunk #13 FAILED at 4074.

Hunk #14 FAILED at 4090.

Hunk #15 FAILED at 4106.

4 out of 15 hunks FAILED -- saving rejects to file minecraft/net/minecraft/src/R

enderBlocks.#

patching file minecraft/net/minecraft/src/RenderEngine.java

Hunk #1 succeeded at 16 with fuzz 2 (offset -11 lines).

Hunk #3 succeeded at 158 (offset -13 lines).

patching file minecraft/net/minecraft/src/RenderGlobal.java

patching file minecraft/net/minecraft/src/RenderItem.java

patching file minecraft/net/minecraft/src/RenderManager.java

Hunk #1 succeeded at 125 (offset 1 line).

patching file minecraft/net/minecraft/src/RenderPlayer.java

Hunk #1 FAILED at 4.

Hunk #2 succeeded at 37 (offset -4 lines).

Hunk #4 succeeded at 280 (offset -4 lines).

1 out of 5 hunks FAILED -- saving rejects to file minecraft/net/minecraft/src/Re

nderPlayer.#

patching file minecraft/net/minecraft/src/RenderSnowMan.java

patching file minecraft/net/minecraft/src/SlotCrafting.java

Hunk #1 FAILED at 2.

Hunk #2 FAILED at 102.

2 out of 2 hunks FAILED -- saving rejects to file minecraft/net/minecraft/src/Sl

otCrafting.#

patching file minecraft/net/minecraft/src/SoundManager.java

patching file minecraft/net/minecraft/src/SoundPool.java

patching file minecraft/net/minecraft/src/SpawnerAnimals.java

patching file minecraft/net/minecraft/src/StatList.java

patching file minecraft/net/minecraft/src/Teleporter.java

patching file minecraft/net/minecraft/src/Tessellator.java

patching file minecraft/net/minecraft/src/TileEntity.java

Hunk #1 succeeded at 219 with fuzz 2 (offset -4 lines).

patching file minecraft/net/minecraft/src/TileEntityBrewingStand.java

patching file minecraft/net/minecraft/src/TileEntityFurnace.java

Hunk #1 FAILED at 3.

Hunk #2 succeeded at 282 (offset 4 lines).

Hunk #3 succeeded at 294 with fuzz 2.

Hunk #4 FAILED at 327.

Hunk #5 succeeded at 366 (offset 5 lines).

2 out of 5 hunks FAILED -- saving rejects to file minecraft/net/minecraft/src/Ti

leEntityFur#

patching file minecraft/net/minecraft/src/TileEntityRendererPiston.java

patching file minecraft/net/minecraft/src/World.java

Hunk #26 succeeded at 4465 with fuzz 2.

patching file minecraft/net/minecraft/src/WorldGenBigMushroom.java

patching file minecraft/net/minecraft/src/WorldGenDeadBush.java

patching file minecraft/net/minecraft/src/WorldGenDungeons.java

patching file minecraft/net/minecraft/src/WorldGenForest.java

patching file minecraft/net/minecraft/src/WorldGenHugeTrees.java

patching file minecraft/net/minecraft/src/WorldGenMinable.java

patching file minecraft/net/minecraft/src/WorldGenShrub.java

patching file minecraft/net/minecraft/src/WorldGenSwamp.java

patching file minecraft/net/minecraft/src/WorldGenTaiga1.java

patching file minecraft/net/minecraft/src/WorldGenTaiga2.java

patching file minecraft/net/minecraft/src/WorldGenTallGrass.java

patching file minecraft/net/minecraft/src/WorldGenTrees.java

patching file minecraft/net/minecraft/src/WorldProvider.java

patching file minecraft/net/minecraft/src/WorldProviderEnd.java

patching file minecraft/net/minecraft/src/WorldProviderHell.java

patching file minecraft/net/minecraft/src/WorldProviderSurface.java

patching file minecraft/net/minecraft/src/WorldRenderer.java

== MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==

== Updating MCP ==

New version found for : conf/methods.csv

New version found for : conf/fields.csv

Retrieving file from server : conf/methods.csv

Retrieving file from server : conf/fields.csv

== MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==

== Updating client ==

> Adding javadoc

> Renaming sources

- Done in 8.20 seconds

== MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==

== Recompiling client ==

> Cleaning bin

> Recompiling

'"C:\Program Files\Java\jdk1.7.0_03\bin\javac" -Xlint:-options -deprecation -g -

source 1.6 -target 1....' failed : 1

 

== ERRORS FOUND ==

 

src\minecraft\net\minecraft\src\NetClientHandler.java:57: error: cannot find sym

bol

        ForgeHooks.onConnect(netManager);

        ^

 

  symbol:  variable ForgeHooks

  location: class NetClientHandler

src\minecraft\net\minecraft\src\NetClientHandler.java:193: error: cannot find sy

mbol

            var8 = ModCompatibilityClient.mlmpVehicleSpawn(par1Packet23VehicleSp

awn.type,

                  ^

 

  symbol:  variable ModCompatibilityClient

  location: class NetClientHandler

src\minecraft\net\minecraft\src\NetClientHandler.java:661: error: cannot find sy

mbol

            this.addToSendQueue(ForgeHooksClient.onSendLogin(new Packet1Login(th

is.mc.session.username, 29)));

                                ^

 

  symbol:  variable ForgeHooksClient

  location: class NetClientHandler

src\minecraft\net\minecraft\src\NetClientHandler.java:674: error: cannot find sy

mbol

                    this.addToSendQueue(ForgeHooksClient.onSendLogin(new Packet1

Login(this.mc.session.username, 29)));

                                        ^

 

  symbol:  variable ForgeHooksClient

  location: class NetClientHandler

src\minecraft\net\minecraft\src\NetClientHandler.java:858: error: cannot find sy

mbol

                ModCompatibilityClient.mlmpOpenWindow(par1Packet100OpenWindow);

                ^

 

  symbol:  variable ModCompatibilityClient

  location: class NetClientHandler

src\minecraft\net\minecraft\src\NetClientHandler.java:972: error: cannot find sy

mbol

                ModLoader.getLogger().log(Level.WARNING, String.format(

                                          ^

 

  symbol:  variable Level

  location: class NetClientHandler

src\minecraft\net\minecraft\src\NetClientHandler.java:1051: error: cannot find s

ymbol

        else if (ForgeHooks.onItemDataPacket(netManager, par1Packet131MapData))

                ^

 

  symbol:  variable ForgeHooks

  location: class NetClientHandler

src\minecraft\net\minecraft\src\TileEntityFurnace.java:362: error: method does n

ot override or implement a method from a supertype

    @Override

    ^

 

src\minecraft\net\minecraft\src\TileEntityFurnace.java:370: error: method does n

ot override or implement a method from a supertype

    @Override

    ^

 

src\minecraft\net\minecraft\src\EntityItem.java:176: error: cannot find symbol

            if (delayBeforeCanPickup == 0 && !ForgeHooks.onItemPickup(par1Entity

Player, this))

                                              ^

 

  symbol:  variable ForgeHooks

  location: class EntityItem

src\minecraft\net\minecraft\src\EntityItem.java:178: error: cannot find symbol

                FMLClientHandler.instance().notifyItemPickup(this, par1EntityPla

yer);

                ^

 

  symbol:  variable FMLClientHandler

  location: class EntityItem

src\minecraft\net\minecraft\src\RenderPlayer.java:35: error: cannot find symbol

                if (var5 instanceof IArmorTextureProvider)

                                    ^

 

  symbol:  class IArmorTextureProvider

  location: class RenderPlayer

src\minecraft\net\minecraft\src\RenderPlayer.java:37: error: cannot find symbol

                    loadTexture(((IArmorTextureProvider)var5).getArmorTextureFil

e(var4));

                                  ^

 

  symbol:  class IArmorTextureProvider

  location: class RenderPlayer

src\minecraft\net\minecraft\src\RenderPlayer.java:174: error: cannot find symbol

 

            IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(

var3, EQUIPPED);

            ^

 

  symbol:  class IItemRenderer

  location: class RenderPlayer

src\minecraft\net\minecraft\src\RenderPlayer.java:174: error: cannot find symbol

 

            IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(

var3, EQUIPPED);

 

      ^

 

  symbol:  variable EQUIPPED

  location: class RenderPlayer

src\minecraft\net\minecraft\src\RenderPlayer.java:174: error: cannot find symbol

 

            IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(

var3, EQUIPPED);

                                          ^

 

  symbol:  variable MinecraftForgeClient

  location: class RenderPlayer

src\minecraft\net\minecraft\src\RenderPlayer.java:175: error: cannot find symbol

 

            boolean is3D = (customRenderer != null && customRenderer.shouldUseRe

nderHelper(EQUIPPED, var3, BLOCK_3D));

 

          ^

 

  symbol:  variable EQUIPPED

  location: class RenderPlayer

src\minecraft\net\minecraft\src\RenderPlayer.java:175: error: cannot find symbol

 

            boolean is3D = (customRenderer != null && customRenderer.shouldUseRe

nderHelper(EQUIPPED, var3, BLOCK_3D));

 

                          ^

 

  symbol:  variable BLOCK_3D

  location: class RenderPlayer

src\minecraft\net\minecraft\src\RenderPlayer.java:279: error: cannot find symbol

 

            IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(

var21, EQUIPPED);

            ^

 

  symbol:  class IItemRenderer

  location: class RenderPlayer

src\minecraft\net\minecraft\src\RenderPlayer.java:279: error: cannot find symbol

 

            IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(

var21, EQUIPPED);

 

      ^

 

  symbol:  variable EQUIPPED

  location: class RenderPlayer

src\minecraft\net\minecraft\src\RenderPlayer.java:279: error: cannot find symbol

 

            IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(

var21, EQUIPPED);

                                          ^

 

  symbol:  variable MinecraftForgeClient

  location: class RenderPlayer

src\minecraft\net\minecraft\src\RenderPlayer.java:280: error: cannot find symbol

 

            boolean is3D = (customRenderer != null && customRenderer.shouldUseRe

nderHelper(EQUIPPED, var21, BLOCK_3D));

 

          ^

 

  symbol:  variable EQUIPPED

  location: class RenderPlayer

src\minecraft\net\minecraft\src\RenderPlayer.java:280: error: cannot find symbol

 

            boolean is3D = (customRenderer != null && customRenderer.shouldUseRe

nderHelper(EQUIPPED, var21, BLOCK_3D));

 

                            ^

 

  symbol:  variable BLOCK_3D

  location: class RenderPlayer

23 errors

==================

 

Client recompile failed, correct source then rerun updatemd5

!! Can not find server sources, try decompiling !!

=================================== Minecraft Forge Setup Finished =============

====================

Drücken Sie eine beliebige Taste . . .

 

 

 

Posted

!! Modified jar detected. Unpredictable results !!

 

Thars your problem.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

It still doesn't work with a fresh minecraft.jar

 

 

=================================== Minecraft Forge Setup Start ================

=================

== MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==

WARNING:

The cleanup script will delete all folders created by MCP, including the

src folder which may contain changes you made to the code, along with any

saved worlds from the client or server.

If you really want to clean up, enter "Yes" yes

!! Updates available. Please run updatemcp to get them. !!

> Cleaning temp

> Cleaning src

> Cleaning bin

> Cleaning reobf

> Cleaning jars

> Cleaning logs

== MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==

# found jad, ff, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs

, param csvs, astyle, astyle config

!! Updates available. Please run updatemcp to get them. !!

> Creating Retroguard config files

== Decompiling client using fernflower ==

> Creating SRGs

> Applying Retroguard

> Applying MCInjector

> Unpacking jar

> Copying classes

> Decompiling

> Copying sources

> Applying fernflower fixes

> Applying patches

> Cleaning comments

- Done in 104.67 seconds

== Reformating client ==

> Cleaning sources

> Replacing OpenGL constants

> Reformating sources

- Done in 8.30 seconds

!! renaming disabled !!

!! Missing server jar file. Aborting !!

!! recompile disabled !!

Stripping META-INF from minecraft.jar

Skipping: META-INF/MANIFEST.MF

Skipping: META-INF/CODESIGN.SF

Skipping: META-INF/CODESIGN.RSA

Applying Forge ModLoader patches

== MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==

== Updating client ==

> Adding javadoc

> Renaming sources

- Done in 6.91 seconds

Applying forge patches

patching file minecraft/net/minecraft/client/Minecraft.java

Hunk #1 succeeded at 1946 (offset -10 lines).

Hunk #2 succeeded at 2287 (offset -1 lines).

Hunk #3 succeeded at 2546 (offset -14 lines).

patching file minecraft/net/minecraft/src/AnvilChunkLoader.java

patching file minecraft/net/minecraft/src/AnvilSaveHandler.java

patching file minecraft/net/minecraft/src/Block.java

patching file minecraft/net/minecraft/src/BlockButton.java

patching file minecraft/net/minecraft/src/BlockChest.java

patching file minecraft/net/minecraft/src/BlockContainer.java

patching file minecraft/net/minecraft/src/BlockCrops.java

patching file minecraft/net/minecraft/src/BlockDoor.java

patching file minecraft/net/minecraft/src/BlockFire.java

patching file minecraft/net/minecraft/src/BlockLadder.java

patching file minecraft/net/minecraft/src/BlockLeaves.java

patching file minecraft/net/minecraft/src/BlockLever.java

patching file minecraft/net/minecraft/src/BlockLog.java

patching file minecraft/net/minecraft/src/BlockNetherStalk.java

patching file minecraft/net/minecraft/src/BlockPistonBase.java

patching file minecraft/net/minecraft/src/BlockPressurePlate.java

patching file minecraft/net/minecraft/src/BlockRail.java

patching file minecraft/net/minecraft/src/BlockRedstoneRepeater.java

patching file minecraft/net/minecraft/src/BlockRedstoneWire.java

patching file minecraft/net/minecraft/src/BlockSnow.java

patching file minecraft/net/minecraft/src/BlockTallGrass.java

patching file minecraft/net/minecraft/src/BlockTorch.java

patching file minecraft/net/minecraft/src/BlockTrapDoor.java

patching file minecraft/net/minecraft/src/BlockVine.java

patching file minecraft/net/minecraft/src/Chunk.java

patching file minecraft/net/minecraft/src/ChunkProvider.java

Hunk #1 succeeded at 6 with fuzz 2 (offset -2 lines).

patching file minecraft/net/minecraft/src/ContainerCreative.java

patching file minecraft/net/minecraft/src/ContainerFurnace.java

patching file minecraft/net/minecraft/src/CraftingManager.java

patching file minecraft/net/minecraft/src/EffectRenderer.java

patching file minecraft/net/minecraft/src/Enchantment.java

patching file minecraft/net/minecraft/src/EnchantmentHelper.java

patching file minecraft/net/minecraft/src/Entity.java

patching file minecraft/net/minecraft/src/EntityEnderman.java

patching file minecraft/net/minecraft/src/EntityItem.java

Hunk #1 FAILED at 2.

Hunk #2 succeeded at 172 with fuzz 1 (offset -2 lines).

1 out of 2 hunks FAILED -- saving rejects to file minecraft/net/minecraft/src/En

tityItem.ja#

patching file minecraft/net/minecraft/src/EntityLiving.java

patching file minecraft/net/minecraft/src/EntityMinecart.java

patching file minecraft/net/minecraft/src/EntityMooshroom.java

patching file minecraft/net/minecraft/src/EntityOcelot.java

patching file minecraft/net/minecraft/src/EntityPlayer.java

patching file minecraft/net/minecraft/src/EntityRenderer.java

patching file minecraft/net/minecraft/src/EntitySheep.java

patching file minecraft/net/minecraft/src/Explosion.java

patching file minecraft/net/minecraft/src/FurnaceRecipes.java

patching file minecraft/net/minecraft/src/GuiAchievements.java

patching file minecraft/net/minecraft/src/GuiControls.java

patching file minecraft/net/minecraft/src/GuiIngame.java

patching file minecraft/net/minecraft/src/Item.java

patching file minecraft/net/minecraft/src/ItemBow.java

patching file minecraft/net/minecraft/src/ItemBucket.java

patching file minecraft/net/minecraft/src/ItemDye.java

patching file minecraft/net/minecraft/src/ItemHoe.java

patching file minecraft/net/minecraft/src/ItemMap.java

patching file minecraft/net/minecraft/src/ItemRenderer.java

patching file minecraft/net/minecraft/src/ItemShears.java

patching file minecraft/net/minecraft/src/ItemTool.java

patching file minecraft/net/minecraft/src/MovingObjectPosition.java

patching file minecraft/net/minecraft/src/NetClientHandler.java

Hunk #1 FAILED at 14.

Hunk #2 succeeded at 55 (offset -2 lines).

Hunk #3 FAILED at 85.

Hunk #4 succeeded at 191 (offset -1 lines).

Hunk #5 succeeded at 459 (offset -2 lines).

Hunk #6 succeeded at 508 (offset -1 lines).

Hunk #7 FAILED at 572.

Hunk #8 succeeded at 665 (offset -3 lines).

Hunk #9 succeeded at 680 (offset -1 lines).

Hunk #10 succeeded at 859 (offset -3 lines).

Hunk #11 succeeded at 970 (offset -1 lines).

Hunk #12 succeeded at 1054 (offset -3 lines).

Hunk #13 FAILED at 1164.

4 out of 13 hunks FAILED -- saving rejects to file minecraft/net/minecraft/src/N

etClientHand#

patching file minecraft/net/minecraft/src/NetworkManager.java

patching file minecraft/net/minecraft/src/Packet53BlockChange.java

patching file minecraft/net/minecraft/src/PlayerController.java

patching file minecraft/net/minecraft/src/PlayerControllerCreative.java

patching file minecraft/net/minecraft/src/PlayerControllerMP.java

patching file minecraft/net/minecraft/src/PlayerControllerSP.java

patching file minecraft/net/minecraft/src/RailLogic.java

patching file minecraft/net/minecraft/src/RenderBiped.java

patching file minecraft/net/minecraft/src/RenderBlocks.java

Hunk #1 succeeded at 423 with fuzz 1 (offset -33 lines).

Hunk #3 succeeded at 1372 (offset -33 lines).

Hunk #5 succeeded at 1396 (offset -33 lines).

Hunk #7 succeeded at 1420 (offset -33 lines).

Hunk #8 FAILED at 3576.

Hunk #9 FAILED at 3699.

Hunk #10 FAILED at 3822.

Hunk #11 FAILED at 3945.

Hunk #12 FAILED at 4057.

Hunk #13 FAILED at 4073.

Hunk #14 FAILED at 4089.

Hunk #15 FAILED at 4105.

8 out of 15 hunks FAILED -- saving rejects to file minecraft/net/minecraft/src/R

enderBlocks.#

patching file minecraft/net/minecraft/src/RenderEngine.java

Hunk #1 succeeded at 16 with fuzz 2 (offset -11 lines).

Hunk #3 succeeded at 158 (offset -13 lines).

patching file minecraft/net/minecraft/src/RenderGlobal.java

patching file minecraft/net/minecraft/src/RenderItem.java

patching file minecraft/net/minecraft/src/RenderManager.java

patching file minecraft/net/minecraft/src/RenderPlayer.java

Hunk #1 FAILED at 4.

Hunk #2 succeeded at 37 (offset -4 lines).

Hunk #4 succeeded at 280 (offset -4 lines).

1 out of 5 hunks FAILED -- saving rejects to file minecraft/net/minecraft/src/Re

nderPlayer.#

patching file minecraft/net/minecraft/src/RenderSnowMan.java

patching file minecraft/net/minecraft/src/SlotCrafting.java

Hunk #1 FAILED at 2.

Hunk #2 FAILED at 102.

2 out of 2 hunks FAILED -- saving rejects to file minecraft/net/minecraft/src/Sl

otCrafting.#

patching file minecraft/net/minecraft/src/SoundManager.java

patching file minecraft/net/minecraft/src/SoundPool.java

patching file minecraft/net/minecraft/src/SpawnerAnimals.java

patching file minecraft/net/minecraft/src/StatList.java

patching file minecraft/net/minecraft/src/Teleporter.java

patching file minecraft/net/minecraft/src/Tessellator.java

patching file minecraft/net/minecraft/src/TileEntity.java

Hunk #1 succeeded at 219 with fuzz 2 (offset -4 lines).

patching file minecraft/net/minecraft/src/TileEntityBrewingStand.java

patching file minecraft/net/minecraft/src/TileEntityFurnace.java

Hunk #1 FAILED at 3.

Hunk #2 succeeded at 275 (offset -3 lines).

Hunk #4 FAILED at 327.

Hunk #5 succeeded at 352 (offset -9 lines).

2 out of 5 hunks FAILED -- saving rejects to file minecraft/net/minecraft/src/Ti

leEntityFur#

patching file minecraft/net/minecraft/src/TileEntityRendererPiston.java

patching file minecraft/net/minecraft/src/World.java

Hunk #26 succeeded at 4465 with fuzz 2.

patching file minecraft/net/minecraft/src/WorldGenBigMushroom.java

patching file minecraft/net/minecraft/src/WorldGenDeadBush.java

patching file minecraft/net/minecraft/src/WorldGenDungeons.java

patching file minecraft/net/minecraft/src/WorldGenForest.java

patching file minecraft/net/minecraft/src/WorldGenHugeTrees.java

patching file minecraft/net/minecraft/src/WorldGenMinable.java

patching file minecraft/net/minecraft/src/WorldGenShrub.java

patching file minecraft/net/minecraft/src/WorldGenSwamp.java

patching file minecraft/net/minecraft/src/WorldGenTaiga1.java

patching file minecraft/net/minecraft/src/WorldGenTaiga2.java

patching file minecraft/net/minecraft/src/WorldGenTallGrass.java

patching file minecraft/net/minecraft/src/WorldGenTrees.java

patching file minecraft/net/minecraft/src/WorldProvider.java

Hunk #2 succeeded at 183 (offset 7 lines).

patching file minecraft/net/minecraft/src/WorldProviderEnd.java

patching file minecraft/net/minecraft/src/WorldProviderHell.java

patching file minecraft/net/minecraft/src/WorldProviderSurface.java

patching file minecraft/net/minecraft/src/WorldRenderer.java

== MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==

== Updating MCP ==

New version found for : conf/methods.csv

New version found for : conf/fields.csv

Retrieving file from server : conf/methods.csv

Retrieving file from server : conf/fields.csv

== MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==

== Updating client ==

> Adding javadoc

 

 

.......

 

ture);

                    ^

 

  symbol:  variable ModLoader

  location: class ForgeHooksClient

src\minecraft\net\minecraft\src\forge\ForgeHooksClient.java:174: error: cannot f

ind symbol

            texID = ModLoader.getMinecraftInstance().renderEngine.getTexture(tex

ture);

                    ^

 

  symbol:  variable ModLoader

  location: class ForgeHooksClient

src\minecraft\net\minecraft\src\forge\ForgeHooksClient.java:220: error: cannot f

ind symbol

            GL11.glBindTexture(GL11.GL_TEXTURE_2D, ModLoader.getMinecraftInstanc

e().renderEngine.getTexture("/terrain.png"));

                                                  ^

 

  symbol:  variable ModLoader

  location: class ForgeHooksClient

src\minecraft\net\minecraft\src\forge\ForgeHooksClient.java:231: error: cannot f

ind symbol

        GL11.glBindTexture(GL11.GL_TEXTURE_2D, ModLoader.getMinecraftInstance().

renderEngine.getTexture("/terrain.png"));

                                              ^

 

  symbol:  variable ModLoader

  location: class ForgeHooksClient

src\minecraft\net\minecraft\src\forge\ForgeHooksClient.java:257: error: cannot f

ind symbol

        GL11.glBindTexture(GL11.GL_TEXTURE_2D, ModLoader.getMinecraftInstance().

renderEngine.getTexture("/terrain.png"));

                                              ^

 

  symbol:  variable ModLoader

  location: class ForgeHooksClient

src\minecraft\net\minecraft\src\forge\ForgeHooksClient.java:264: error: override

BlockTexture has private access in RenderBlocks

        if (!block.isDefaultTexture && render.overrideBlockTexture == -1)

                                            ^

 

src\minecraft\net\minecraft\src\forge\ForgeHooksClient.java:272: error: override

BlockTexture has private access in RenderBlocks

        if (!block.isDefaultTexture && render.overrideBlockTexture == -1)

                                            ^

 

src\minecraft\net\minecraft\src\forge\ForgeHooksClient.java:282: error: cannot f

ind symbol

            GL11.glBindTexture(GL11.GL_TEXTURE_2D, ModLoader.getMinecraftInstanc

e().renderEngine.getTexture(((ITextureProvider)obj).getTextureFile()));

                                                  ^

 

  symbol:  variable ModLoader

  location: class ForgeHooksClient

src\minecraft\net\minecraft\src\forge\ForgeHooksClient.java:600: error: cannot f

ind symbol

                ModLoader.throwException("ForgeHooksClient.onCustomPayload", ex)

;

                ^

 

  symbol:  variable ModLoader

  location: class ForgeHooksClient

src\minecraft\net\minecraft\src\forge\ForgeHooksClient.java:615: error: cannot f

ind symbol

                ModLoader.throwException("ForgeHooksClient.onCustomPayload", ex)

;

                ^

 

  symbol:  variable ModLoader

  location: class ForgeHooksClient

src\minecraft\net\minecraft\src\forge\ForgeHooksClient.java:638: error: cannot f

ind symbol

                    Minecraft mc = ModLoader.getMinecraftInstance();

                                  ^

 

  symbol:  variable ModLoader

  location: class ForgeHooksClient

src\minecraft\net\minecraft\src\forge\MinecraftForge.java:1072: error: type argu

ment NetworkMod is not within bounds of type-variable V

        for (Entry<Integer, NetworkMod> entry : ForgeHooks.networkMods.entrySet(

))

                            ^

 

  where V is a type-variable:

    V extends Object declared in interface Entry

src\minecraft\net\minecraft\src\forge\MinecraftForge.java:1088: error: type argu

ment NetworkMod is not within bounds of type-variable E

        ArrayList<NetworkMod> ret = new ArrayList<NetworkMod>();

                  ^

 

  where E is a type-variable:

    E extends Object declared in class ArrayList

src\minecraft\net\minecraft\src\forge\MinecraftForge.java:1088: error: type argu

ment NetworkMod is not within bounds of type-variable E

        ArrayList<NetworkMod> ret = new ArrayList<NetworkMod>();

                                                  ^

 

  where E is a type-variable:

    E extends Object declared in class ArrayList

src\minecraft\net\minecraft\src\forge\MinecraftForge.java:1089: error: cannot fi

nd symbol

        for (BaseMod mod : (List<BaseMod>)ModLoader.getLoadedMods())

            ^

 

  symbol:  class BaseMod

  location: class MinecraftForge

src\minecraft\net\minecraft\src\forge\MinecraftForge.java:1089: error: cannot fi

nd symbol

        for (BaseMod mod : (List<BaseMod>)ModLoader.getLoadedMods())

                                ^

 

  symbol:  class BaseMod

  location: class MinecraftForge

src\minecraft\net\minecraft\src\forge\MinecraftForge.java:1089: error: cannot fi

nd symbol

        for (BaseMod mod : (List<BaseMod>)ModLoader.getLoadedMods())

                                          ^

 

  symbol:  variable ModLoader

  location: class MinecraftForge

src\minecraft\net\minecraft\src\forge\MinecraftForge.java:1096: error: no suitab

le method found for toArray(NetworkMod[])

        return ret.toArray(new NetworkMod[0]);

                  ^

 

    method ArrayList.<T>toArray(T[]) is not applicable

      (inferred type does not conform to declared bound(s)

        inferred: NetworkMod

        bound(s): Object)

    method ArrayList.toArray() is not applicable

      (actual and formal argument lists differ in length)

  where T is a type-variable:

    T extends Object declared in method <T>toArray(T[])

src\minecraft\net\minecraft\src\forge\MinecraftForgeClient.java:115: error: cann

ot find symbol

        ModLoader.getMinecraftInstance().renderEngine.getTexture(texture);

        ^

 

  symbol:  variable ModLoader

  location: class MinecraftForgeClient

src\minecraft\net\minecraft\src\forge\ModCompatibilityClient.java:89: error: can

not find symbol

            ModLoader.getLogger().fine("Loading Mod audio failed for folder: " +

path);

            ^

 

  symbol:  variable ModLoader

  location: class ModCompatibilityClient

src\minecraft\net\minecraft\src\forge\ModCompatibilityClient.java:90: error: can

not find symbol

            ModLoader.getLogger().fine(ex.toString());

            ^

 

  symbol:  variable ModLoader

  location: class ModCompatibilityClient

src\minecraft\net\minecraft\src\forge\ModCompatibilityClient.java:145: error: ca

nnot find symbol

        Minecraft mc = ModLoader.getMinecraftInstance();

                      ^

 

  symbol:  variable ModLoader

  location: class ModCompatibilityClient

src\minecraft\net\minecraft\src\forge\ModCompatibilityClient.java:230: error: ca

nnot find symbol

                ModLoader.getLogger().fine("Received spawn packet for entity wit

h owner, but owner was not found.");

                ^

 

  symbol:  variable ModLoader

  location: class ModCompatibilityClient

src\minecraft\net\minecraft\src\forge\PacketHandlerClient.java:34: error: cannot

find symbol

                    onEntitySpawnPacket((PacketEntitySpawn)pkt, data, ModLoader.

getMinecraftInstance().theWorld);

                                                                      ^

 

  symbol:  variable ModLoader

  location: class PacketHandlerClient

src\minecraft\net\minecraft\src\forge\PacketHandlerClient.java:58: error: cannot

find symbol

            ModLoader.getLogger().log(Level.SEVERE, "Exception in PacketHandlerC

lient.onPacketData", e);

            ^

 

  symbol:  variable ModLoader

  location: class PacketHandlerClient

src\minecraft\net\minecraft\src\forge\PacketHandlerClient.java:94: error: cannot

find symbol

                Minecraft mc = ModLoader.getMinecraftInstance();

                              ^

 

  symbol:  variable ModLoader

  location: class PacketHandlerClient

src\minecraft\net\minecraft\src\forge\PacketHandlerClient.java:141: error: canno

t find symbol

            ModLoader.getLogger().throwing("ForgeHooksClient", "onEntitySpawnPac

ket", e);

            ^

 

  symbol:  variable ModLoader

  location: class PacketHandlerClient

src\minecraft\net\minecraft\src\forge\PacketHandlerClient.java:142: error: no su

itable method found for format(String,int,NetworkMod)

            ModLoader.throwException(String.format("Error spawning entity of typ

e %d for %s.", packet.typeID, MinecraftForge.getModByID(packet.modID)), e);

                                          ^

 

    method String.format(Locale,String,Object...) is not applicable

      (actual argument String cannot be converted to Locale by method invocation

conversion)

    method String.format(String,Object...) is not applicable

      (argument type NetworkMod does not conform to vararg element type Object)

src\minecraft\net\minecraft\src\forge\PacketHandlerClient.java:142: error: canno

t find symbol

            ModLoader.throwException(String.format("Error spawning entity of typ

e %d for %s.", packet.typeID, MinecraftForge.getModByID(packet.modID)), e);

            ^

 

  symbol:  variable ModLoader

  location: class PacketHandlerClient

src\minecraft\net\minecraft\src\forge\PacketHandlerClient.java:172: error: canno

t find symbol

                if (mod.toString().equals(entry.getValue()))

                      ^

 

  symbol:  method toString()

  location: variable mod of type NetworkMod

src\minecraft\net\minecraft\src\forge\PacketHandlerClient.java:178: error: type

argument NetworkMod is not within bounds of type-variable E

        ArrayList<NetworkMod> missing = new ArrayList<NetworkMod>();

                  ^

 

  where E is a type-variable:

    E extends Object declared in class ArrayList

src\minecraft\net\minecraft\src\forge\PacketHandlerClient.java:178: error: type

argument NetworkMod is not within bounds of type-variable E

        ArrayList<NetworkMod> missing = new ArrayList<NetworkMod>();

                                                      ^

 

  where E is a type-variable:

    E extends Object declared in class ArrayList

src\minecraft\net\minecraft\src\forge\PacketHandlerClient.java:189: error: canno

t find symbol

        pkt.Mods = new String[ModLoader.getLoadedMods().size()];

                              ^

 

  symbol:  variable ModLoader

  location: class PacketHandlerClient

src\minecraft\net\minecraft\src\forge\PacketHandlerClient.java:191: error: canno

t find symbol

        for (BaseMod mod : (List<BaseMod>)ModLoader.getLoadedMods())

            ^

 

  symbol:  class BaseMod

  location: class PacketHandlerClient

src\minecraft\net\minecraft\src\forge\PacketHandlerClient.java:191: error: canno

t find symbol

        for (BaseMod mod : (List<BaseMod>)ModLoader.getLoadedMods())

                                ^

 

  symbol:  class BaseMod

  location: class PacketHandlerClient

src\minecraft\net\minecraft\src\forge\PacketHandlerClient.java:191: error: canno

t find symbol

        for (BaseMod mod : (List<BaseMod>)ModLoader.getLoadedMods())

                                          ^

 

  symbol:  variable ModLoader

  location: class PacketHandlerClient

src\minecraft\net\minecraft\src\forge\PacketHandlerClient.java:216: error: canno

t find symbol

        Minecraft mc = ModLoader.getMinecraftInstance();

                      ^

 

  symbol:  variable ModLoader

  location: class PacketHandlerClient

src\minecraft\net\minecraft\src\forge\PacketHandlerClient.java:233: error: bad o

perand types for binary operator '!='

        if (mod != null)

                ^

 

  first type:  NetworkMod

  second type: <null>

src\minecraft\net\minecraft\src\forge\PacketHandlerClient.java:235: error: canno

t find symbol

            EntityPlayerSP player = (EntityPlayerSP)ModLoader.getMinecraftInstan

ce().thePlayer;

                                                    ^

 

  symbol:  variable ModLoader

  location: class PacketHandlerClient

90 errors

==================

 

Client recompile failed, correct source then rerun updatemd5

!! Can not find server sources, try decompiling !!

=================================== Minecraft Forge Setup Finished =============

====================

Drücken Sie eine beliebige Taste . . .

 

 

 

Posted

How the hell are you running the install?

And there should be no reason that your install is failing if you have everything installed correctly.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

That will break it.

 

You should do nothing beyond:

Extract MCP.

Extract Forge in to MCP.

Place the vanilla MC jars and necessary directories in the jars folder.

Run the forge install.bat/sh from the forge directory.

Start modding.

 

It should be in the readme.

Posted

I've found out why it failed. While running the setup as administrator, everything went fine, and I have the source code now. Thank your for your help anyway.

 

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

    • Version 1.19 - Forge 41.0.63 I want to create a wolf entity that I can ride, so far it seems to be working, but the problem is that when I get on the wolf, I can’t control it. I then discovered that the issue is that the server doesn’t detect that I’m riding the wolf, so I’m struggling with synchronization. However, it seems to not be working properly. As I understand it, the server receives the packet but doesn’t register it correctly. I’m a bit new to Java, and I’ll try to provide all the relevant code and prints *The comments and prints are translated by chatgpt since they were originally in Spanish* Thank you very much in advance No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. MountableWolfEntity package com.vals.valscraft.entity; import com.vals.valscraft.network.MountSyncPacket; import com.vals.valscraft.network.NetworkHandler; import net.minecraft.client.Minecraft; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; import net.minecraft.server.MinecraftServer; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.Mob; import net.minecraft.world.entity.ai.attributes.AttributeSupplier; import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.entity.animal.Wolf; import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.Entity; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.phys.Vec3; import net.minecraftforge.event.TickEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.network.PacketDistributor; public class MountableWolfEntity extends Wolf { private boolean hasSaddle; private static final EntityDataAccessor<Byte> DATA_ID_FLAGS = SynchedEntityData.defineId(MountableWolfEntity.class, EntityDataSerializers.BYTE); public MountableWolfEntity(EntityType<? extends Wolf> type, Level level) { super(type, level); this.hasSaddle = false; } @Override protected void defineSynchedData() { super.defineSynchedData(); this.entityData.define(DATA_ID_FLAGS, (byte)0); } public static AttributeSupplier.Builder createAttributes() { return Wolf.createAttributes() .add(Attributes.MAX_HEALTH, 20.0) .add(Attributes.MOVEMENT_SPEED, 0.3); } @Override public InteractionResult mobInteract(Player player, InteractionHand hand) { ItemStack itemstack = player.getItemInHand(hand); if (itemstack.getItem() == Items.SADDLE && !this.hasSaddle()) { if (!player.isCreative()) { itemstack.shrink(1); } this.setSaddle(true); return InteractionResult.SUCCESS; } else if (!level.isClientSide && this.hasSaddle()) { player.startRiding(this); MountSyncPacket packet = new MountSyncPacket(true); // 'true' means the player is mounted NetworkHandler.CHANNEL.sendToServer(packet); // Ensure the server handles the packet return InteractionResult.SUCCESS; } return InteractionResult.PASS; } @Override public void travel(Vec3 travelVector) { if (this.isVehicle() && this.getControllingPassenger() instanceof Player) { System.out.println("The wolf has a passenger."); System.out.println("The passenger is a player."); Player player = (Player) this.getControllingPassenger(); // Ensure the player is the controller this.setYRot(player.getYRot()); this.yRotO = this.getYRot(); this.setXRot(player.getXRot() * 0.5F); this.setRot(this.getYRot(), this.getXRot()); this.yBodyRot = this.getYRot(); this.yHeadRot = this.yBodyRot; float forward = player.zza; float strafe = player.xxa; if (forward <= 0.0F) { forward *= 0.25F; } this.flyingSpeed = this.getSpeed() * 0.1F; this.setSpeed((float) this.getAttributeValue(Attributes.MOVEMENT_SPEED) * 1.5F); this.setDeltaMovement(new Vec3(strafe, travelVector.y, forward).scale(this.getSpeed())); this.calculateEntityAnimation(this, false); } else { // The wolf does not have a passenger or the passenger is not a player System.out.println("No player is mounted, or the passenger is not a player."); super.travel(travelVector); } } public boolean hasSaddle() { return this.hasSaddle; } public void setSaddle(boolean hasSaddle) { this.hasSaddle = hasSaddle; } @Override protected void dropEquipment() { super.dropEquipment(); if (this.hasSaddle()) { this.spawnAtLocation(Items.SADDLE); this.setSaddle(false); } } @SubscribeEvent public static void onServerTick(TickEvent.ServerTickEvent event) { if (event.phase == TickEvent.Phase.START) { MinecraftServer server = net.minecraftforge.server.ServerLifecycleHooks.getCurrentServer(); if (server != null) { for (ServerPlayer player : server.getPlayerList().getPlayers()) { if (player.isPassenger() && player.getVehicle() instanceof MountableWolfEntity) { MountableWolfEntity wolf = (MountableWolfEntity) player.getVehicle(); System.out.println("Tick: " + player.getName().getString() + " is correctly mounted on " + wolf); } } } } } private boolean lastMountedState = false; @Override public void tick() { super.tick(); if (!this.level.isClientSide) { // Only on the server boolean isMounted = this.isVehicle() && this.getControllingPassenger() instanceof Player; // Only print if the state changed if (isMounted != lastMountedState) { if (isMounted) { Player player = (Player) this.getControllingPassenger(); // Verify the passenger is a player System.out.println("Server: Player " + player.getName().getString() + " is now mounted."); } else { System.out.println("Server: The wolf no longer has a passenger."); } lastMountedState = isMounted; } } } @Override public void addPassenger(Entity passenger) { super.addPassenger(passenger); if (passenger instanceof Player) { Player player = (Player) passenger; if (!this.level.isClientSide && player instanceof ServerPlayer) { // Send the packet to the server to indicate the player is mounted NetworkHandler.CHANNEL.send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) player), new MountSyncPacket(true)); } } } @Override public void removePassenger(Entity passenger) { super.removePassenger(passenger); if (passenger instanceof Player) { Player player = (Player) passenger; if (!this.level.isClientSide && player instanceof ServerPlayer) { // Send the packet to the server to indicate the player is no longer mounted NetworkHandler.CHANNEL.send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) player), new MountSyncPacket(false)); } } } @Override public boolean isControlledByLocalInstance() { Entity entity = this.getControllingPassenger(); return entity instanceof Player; } @Override public void positionRider(Entity passenger) { if (this.hasPassenger(passenger)) { double xOffset = Math.cos(Math.toRadians(this.getYRot() + 90)) * 0.4; double zOffset = Math.sin(Math.toRadians(this.getYRot() + 90)) * 0.4; passenger.setPos(this.getX() + xOffset, this.getY() + this.getPassengersRidingOffset() + passenger.getMyRidingOffset(), this.getZ() + zOffset); } } } MountSyncPacket package com.vals.valscraft.network; import com.vals.valscraft.entity.MountableWolfEntity; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.player.Player; import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; public class MountSyncPacket { private final boolean isMounted; public MountSyncPacket(boolean isMounted) { this.isMounted = isMounted; } public void encode(FriendlyByteBuf buffer) { buffer.writeBoolean(isMounted); } public static MountSyncPacket decode(FriendlyByteBuf buffer) { return new MountSyncPacket(buffer.readBoolean()); } public void handle(NetworkEvent.Context context) { context.enqueueWork(() -> { ServerPlayer player = context.getSender(); // Get the player from the context if (player != null) { // Verifies if the player has dismounted if (!isMounted) { Entity vehicle = player.getVehicle(); if (vehicle instanceof MountableWolfEntity wolf) { // Logic to remove the player as a passenger wolf.removePassenger(player); System.out.println("Server: Player " + player.getName().getString() + " is no longer mounted."); } } } }); context.setPacketHandled(true); // Marks the packet as handled } } networkHandler package com.vals.valscraft.network; import com.vals.valscraft.valscraft; import net.minecraft.resources.ResourceLocation; import net.minecraftforge.network.NetworkRegistry; import net.minecraftforge.network.simple.SimpleChannel; import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; public class NetworkHandler { private static final String PROTOCOL_VERSION = "1"; public static final SimpleChannel CHANNEL = NetworkRegistry.newSimpleChannel( new ResourceLocation(valscraft.MODID, "main"), () -> PROTOCOL_VERSION, PROTOCOL_VERSION::equals, PROTOCOL_VERSION::equals ); public static void init() { int packetId = 0; // Register the mount synchronization packet CHANNEL.registerMessage( packetId++, MountSyncPacket.class, MountSyncPacket::encode, MountSyncPacket::decode, (msg, context) -> msg.handle(context.get()) // Get the context with context.get() ); } }  
    • Do you use features of inventory profiles next (ipnext) or is there a change without it?
    • Remove rubidium - you are already using embeddium, which is a fork of rubidium
  • Topics

×
×
  • Create New...

Important Information

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