Jump to content

Recommended Posts

Posted (edited)

Hey, I want to play Tekkit lite 2 on my nitrado server. I already took the mods from the modpack and deleted the client mods. but it still crashing when i launch the server.
 


Crashreport:

Spoiler

---- Minecraft Crash Report ----
// I bet Cylons wouldn't have this problem.

Time: 6/26/17 8:34 PM
Description: Exception in server tick loop

cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraft/client/renderer/texture/TextureMap
at cpw.mods.fml.common.LoadController.transition(LoadController.java:163)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:739)
at cpw.mods.fml.server.FMLServerHandler.finishServerLoading(FMLServerHandler.java:97)
at cpw.mods.fml.common.FMLCommonHandler.onServerStarted(FMLCommonHandler.java:319)
at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:210)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:387)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)
Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/renderer/texture/TextureMap
at com.pahimar.ee3.reference.Textures.<clinit>(Textures.java:38)
at com.pahimar.ee3.block.BlockEE.func_149739_a(BlockEE.java:39)
at codechicken.microblock.ConfigContent$$anonfun$load$1.apply(ConfigContent.scala:103)
at codechicken.microblock.ConfigContent$$anonfun$load$1.apply(ConfigContent.scala:102)
at scala.collection.Iterator$class.foreach(Iterator.scala:743)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1174)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at codechicken.microblock.ConfigContent$.load(ConfigContent.scala:102)
at codechicken.microblock.handler.MicroblockMod$.init(MicroblockMod.scala:28)
at codechicken.microblock.handler.MicroblockMod.init(MicroblockMod.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:737)
... 5 more
Caused by: java.lang.ClassNotFoundException: net.minecraft.client.renderer.texture.TextureMap
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 42 more
Caused by: java.lang.RuntimeException: Attempted to load class bpz for invalid side SERVER
at cpw.mods.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:50)
at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279)
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176)
... 44 more

 

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

-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Linux (amd64) version 4.4.26-nitradoV3-MC-1000-nH-dP-d-a
Java Version: 1.8.0_101, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 409787016 bytes (390 MB) / 643301376 bytes (613 MB) up to 954728448 bytes (910 MB)
JVM Flags: 2 total; -Xmx1024M -Xms256M
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.4.1614 89 mods loaded, 78 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
UCHI mcp{9.05} [Minecraft Coder Pack] (minecraft.jar)
UCHI FML{7.10.99.99} [Forge Mod Loader] (minecraft_server.jar)
UCHI Forge{10.13.4.1614} [Minecraft Forge] (minecraft_server.jar)
UCHI appliedenergistics2-core{rv2-stable-10} [AppliedEnergistics2 Core] (minecraft.jar)
UCHI CodeChickenCore{1.0.7.47} [CodeChicken Core] (minecraft.jar)
UCHI <CoFH ASM>{000} [CoFH ASM] (minecraft.jar)
UCHI bspkrsCore{6.15} [bspkrsCore] ([1.7.10]bspkrsCore-universal-6.15.jar)
UCHI Treecapitator{1.7.10} [Treecapitator] ([1.7.10]Treecapitator-universal-2.0.4 (1).jar)
UCHI CoFHCore{1.7.10R3.1.4} [CoFH Core] (CoFHCore-[1.7.10]3.1.4-329.jar)
UCHI BuildCraft|Core{7.1.21} [BuildCraft] (buildcraft-7.1.21 (1).jar)
UCHI BuildCraft|Factory{7.1.21} [BC Factory] (buildcraft-7.1.21 (1).jar)
UCHI BuildCraft|Silicon{7.1.21} [BC Silicon] (buildcraft-7.1.21 (1).jar)
UCHI BuildCraft|Transport{7.1.21} [BC Transport] (buildcraft-7.1.21 (1).jar)
UCHI BuildCraft|Robotics{7.1.21} [BC Robotics] (buildcraft-7.1.21 (1).jar)
UCHI ComputerCraft{1.75} [ComputerCraft] (ComputerCraft1.75.jar)
UCHI factorization.notify{1.0} [Factorization Notification System] (Factorization-Mod-1.7.10.jar)
UCHI factorization{1.7.10-0.8.83} [Factorization] (Factorization-Mod-1.7.10.jar)
UCHI IC2{2.2.823-experimental} [IndustrialCraft 2] (industrialcraft-2-2.2.823-experimental.jar)
UCHI LogisticsPipes{0.9.3.129} [Logistics Pipes] (logisticspipes-0.9.3.129 (1).jar)
UCHI additionalpipes{4.7.0} [Additional Pipes] (additionalpipes-4.7.6.jar)
UCHI ImmibisCore{59.1.4} [Immibis Core] (immibis-core-59.1.4.jar)
UCHI AdvancedMachines{59.0.2} [Advanced Machines] (advanced-machines-59.0.2.jar)
UCHI AdvancedPowerManagement{2.0.0b} [Advanced Power Management] (AdvPowerMan-2.0.0b.jar)
UCHI appliedenergistics2{rv2-stable-10} [Applied Energistics 2] (appliedenergistics2-rv2-stable-10.jar)
UCHI AutoFood{59.0.0} [AutoFood] (autofood-59.0.0.jar)
UCHI BiblioCraft{1.11.5} [BiblioCraft] (BiblioCraft[v1.11.5][MC1.7.10] (1).jar)
UCHI BuildCraft|Builders{7.1.21} [BC Builders] (buildcraft-7.1.21 (1).jar)
UCHI BuildCraft|Energy{7.1.21} [BC Energy] (buildcraft-7.1.21 (1).jar)
UCHI CompactSolars{4.4.39.315} [Compact Solar Arrays] (CompactSolars-1.7.10-4.4.39.315-universal.jar)
UCHI customrecipes{4.72} [Custom Recipes] (customrecipes-1.7.10-4.7.jar)
UCHI DimensionalAnchors{59.0.3} [Dimensional Anchors] (dimensional-anchor-59.0.3.jar)
UCHI EnderStorage{1.4.7.37} [EnderStorage] (EnderStorage-1.7.10-1.4.7.37-universal.jar)
UCHI EE3{0.2.234} [Equivalent Exchange 3] (Equivalent-Exchange-3-Mod-1.7.10.jar)
UCHI factorization.misc{1.7.10-0.8.83} [Factorization Miscellaneous Nonsense] (Factorization-Mod-1.7.10.jar)
UCHI FlatBedrockx{1.0.2} [FlatBedrock Xplosion's Edition] (Flat-Bedrock-Mod-1.7.10.jar)
UCHI IC2NuclearControl{2.4.2a} [Nuclear Control 2] (IC2NuclearControl-2.4.2a.jar)
UCHI inventorytweaks{1.59-dev-152-cf6e263} [Inventory Tweaks] (InventoryTweaks-1.59-dev-152.jar)
UCHI IronChest{6.0.62.742} [Iron Chest] (ironchest-1.7.10-6.0.62.742-universal.jar)
UCHI MineFactoryReloaded{1.7.10R2.8.2B1} [MineFactory Reloaded] (MineFactoryReloaded-[1.7.10]2.8.2B1-201.jar)
UCHI MineFactoryReloaded|CompatAppliedEnergistics{1.7.10R2.8.2B1} [MFR Compat: Applied Energistics] (MineFactoryReloaded-[1.7.10]2.8.2B1-201.jar)
UCHI MineFactoryReloaded|CompatBuildCraft{1.7.10R2.8.2B1} [MFR Compat: BuildCraft] (MineFactoryReloaded-[1.7.10]2.8.2B1-201.jar)
UCHI MineFactoryReloaded|CompatForgeMicroblock{1.7.10R2.8.2B1} [MFR Compat: ForgeMicroblock] (MineFactoryReloaded-[1.7.10]2.8.2B1-201.jar)
UCHI MineFactoryReloaded|CompatIC2{1.7.10R2.8.2B1} [MFR Compat: IC2] (MineFactoryReloaded-[1.7.10]2.8.2B1-201.jar)
UCHI ForgeMultipart{1.2.0.345} [Forge Multipart] (ForgeMultipart-1.7.10-1.2.0.345-universal.jar)
UCHI MrTJPCoreMod{1.1.0.33} [MrTJPCore] (MrTJPCore-1.7.10-1.1.0.33-universal.jar)
UCHI ProjRed|Core{4.7.0pre12.95} [ProjectRed Core] (ProjectRed-Base-1.7.10.jar)
UCHI ProjRed|Exploration{4.7.0pre12.95} [ProjectRed Exploration] (ProjectRed-1.7.10-World.jar)
UCHI MineFactoryReloaded|CompatProjRed{1.7.10R2.8.2B1} [MFR Compat ProjectRed] (MineFactoryReloaded-[1.7.10]2.8.2B1-201.jar)
UCHI MineFactoryReloaded|CompatVanilla{1.7.10R2.8.2B1} [MFR Compat: Vanilla] (MineFactoryReloaded-[1.7.10]2.8.2B1-201.jar)
UCHI numina{0.4.1.104} [Numina] (Numina-0.4.1.104.jar)
UCHI powersuits{1.7.10-0.11.1.114} [MachineMuse's Modular Powersuits] (ModularPowersuits-1.7.10-0.11.1.114.jar)
UCHI cfm{3.4.7} [�9MrCrayfish's Furniture Mod] (MrCrayfishs-Furniture-Mod-1.7.10.jar)
UCHI Mystcraft{0.12.3.03} [Mystcraft] (mystcraft-1.7.10-0.12.3.03.jar)
UCHI NetherOres{1.7.10R2.3.2B1} [Nether Ores] (NetherOres-[1.7.10]2.3.2B1-25.jar)
UCHI OmniStuff{3.0} [Omni-Stuff] (OmniThings-3.0.jar)
UCHI OCS{1.7.5} [OpenCCSensors] (openccsensors-1.7.5.jar)
UCHI PowerConverters3{1.7.10-2.11} [Power Converters 3] (PowerConverters-1.7.10-2.11.jar)
UCHI ProjectE{1.7.10-PE1.10.1} [ProjectE] (ProjectE-1.7.10-PE1.10.1.jar)
UCHI ProjRed|Transmission{4.7.0pre12.95} [ProjectRed Transmission] (ProjectRed-1.7.10-Integration.jar)
UCHI ProjRed|Transportation{4.7.0pre12.95} [ProjectRed Transportation] (ProjectRed-1.7.10-Mechanical.jar)
UCHI ProjRed|Compatibility{4.7.0pre12.95} [ProjectRed Compatibility] (ProjectRed-1.7.10-Compat (1).jar)
UCHI ProjRed|Integration{4.7.0pre12.95} [ProjectRed Integration] (ProjectRed-1.7.10-Integration.jar)
UCHI ProjRed|Fabrication{4.7.0pre12.95} [ProjectRed Fabrication] (ProjectRed-1.7.10-Fabrication.jar)
UCHI ProjRed|Illumination{4.7.0pre12.95} [ProjectRed Illumination] (ProjectRed-1.7.10-Lighting.jar)
UCHI ProjRed|Expansion{4.7.0pre12.95} [ProjectRed Expansion] (ProjectRed-1.7.10-Mechanical.jar)
UCHI secretroomsmod{@VERSION@} [The SecretRoomsMod] (Secret-Rooms-Mod-1.7.10.jar)
UCHI StevesCarts{2.0.0.b18} [Steve's Carts 2] (StevesCarts2.0.0.b18.jar)
UCHI ThermalFoundation{1.7.10R1.2.6} [Thermal Foundation] (ThermalFoundation-[1.7.10]1.2.6-118.jar)
UCHI Tubestuff{59.0.4} [Tubestuff] (tubestuff-59.0.4.jar)
UCHI weaponmod{v1.14.3} [Balkon's WeaponMod] (weaponmod-1.14.3.jar)
UCHI WR-CBE|Core{1.4.1.9} [WR-CBE Core] (WR-CBE-1.7.10-1.4.1.9-universal.jar)
UCHI WR-CBE|Addons{1.4.1.9} [WR-CBE Addons] (WR-CBE-1.7.10-1.4.1.9-universal.jar)
UCHI WR-CBE|Logic{1.4.1.9} [WR-CBE Logic] (WR-CBE-1.7.10-1.4.1.9-universal.jar)
UCHI McMultipart{1.2.0.345} [Minecraft Multipart Plugin] (ForgeMultipart-1.7.10-1.2.0.345-universal.jar)
UCHI ForgeRelocation{0.0.1.4} [ForgeRelocation] (ForgeRelocation-1.7.10-0.0.1.4-universal.jar)
UCHI MCFrames{1.0} [MCFrames] (ForgeRelocation-1.7.10-0.0.1.4-universal.jar)
UCHI RelocationFMP{0.0.1.2} [RelocationFMP] (ForgeRelocationFMP-1.7.10-0.0.1.2-universal.jar)
UCHE ForgeMicroblock{1.2.0.345} [Forge Microblocks] (ForgeMultipart-1.7.10-1.2.0.345-universal.jar)
UD MineFactoryReloaded|CompatAtum{1.7.10R2.8.2B1} [MFR Compat: Atum] (MineFactoryReloaded-[1.7.10]2.8.2B1-201.jar)
UD MineFactoryReloaded|CompatBackTools{1.7.10R2.8.2B1} [MFR Compat: BackTools] (MineFactoryReloaded-[1.7.10]2.8.2B1-201.jar)
UD MineFactoryReloaded|CompatChococraft{1.7.10R2.8.2B1} [MFR Compat: Chococraft] (MineFactoryReloaded-[1.7.10]2.8.2B1-201.jar)
UD MineFactoryReloaded|CompatExtraBiomes{1.7.10R2.8.2B1} [MFR Compat: ExtraBiomes] (MineFactoryReloaded-[1.7.10]2.8.2B1-201.jar)
UD MineFactoryReloaded|CompatForestry{1.7.10R2.8.2B1} [MFR Compat: Forestry] (MineFactoryReloaded-[1.7.10]2.8.2B1-201.jar)
UD MineFactoryReloaded|CompatRailcraft{1.7.10R2.8.2B1} [MFR Compat: Railcraft] (MineFactoryReloaded-[1.7.10]2.8.2B1-201.jar)
UD MineFactoryReloaded|CompatSufficientBiomes{1.7.10R2.8.2B1} [MFR Compat: Sufficient Biomes] (MineFactoryReloaded-[1.7.10]2.8.2B1-201.jar)
UD MineFactoryReloaded|CompatThaumcraft{1.7.10R2.8.2B1} [MFR Compat: Thaumcraft] (MineFactoryReloaded-[1.7.10]2.8.2B1-201.jar)
UD MineFactoryReloaded|CompatThermalExpansion{1.7.10R2.8.2B1} [MFR Compat: Thermal Expansion] (MineFactoryReloaded-[1.7.10]2.8.2B1-201.jar)
UD MineFactoryReloaded|CompatTConstruct{1.7.10R2.8.2B1} [MFR Compat: Tinkers' Construct] (MineFactoryReloaded-[1.7.10]2.8.2B1-201.jar)
UD MineFactoryReloaded|CompatTwilightForest{1.7.10R2.8.2B1} [MFR Compat: TwilightForest] (MineFactoryReloaded-[1.7.10]2.8.2B1-201.jar)
CoFHCore: -[1.7.10]3.1.4-329
AE2 Version: stable rv2-stable-10 for Forge 10.13.2.1291
MineFactoryReloaded: -[1.7.10]2.8.2B1-201
NetherOres: -[1.7.10]2.3.2B1-25
ThermalFoundation: -[1.7.10]1.2.6-118
Profiler Position: N/A (disabled)
Is Modded: Definitely; Server brand changed to 'fml,forge'
Type: Dedicated Server (map_server.txt)

 

Hope someone is able to help me.

Edited by Xplayer
Posted
13 minutes ago, Xplayer said:

Is there a forum which still support it?

Probably, but I don't know one.

 

A better solution is to move on and use 1.11.2 or soon 1.12.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

  • Guest locked this topic
Guest
This topic is now closed to further replies.

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.