Jump to content

1.10.2 - Custom Mobs dont work Server-side, but Singleplayer work fine!


Keks

Recommended Posts

1.10.2 - Custom Mobs dont work Server-side, but Singleplayer work fine!

 

Sry for my english.

 

Own mob do not go Server-sided, but in the single player it goes well. The Spawn eggs spawnen the monster in server worlds not. As said Client-sided it goes. At which place lies my mistake. I know that this is no Forge mistake, but my Mod mistake ;) Thanks to you already in prerau

 

german:

Eigene Mobs gehen Server-seitig nicht, aber im Einzelspieler geht es gut. Die Spawn-Eier spawnen das Monster auf Server-Welten nicht. Wie gesagt Client-seitig geht es. An welcher Stelle liegt mein Fehler. Ich weiß, dass dies kein Forge-Fehler ist, sondern mein Mod-Fehler ;) Danke euch schon mal im Vorraus

Link to comment
Share on other sites

Main Class sinobinmain:

 

@SidedProxy(clientSide="sinobinmod.proxy.ClientProxy", serverSide="sinobinmod.proxy.ServerProxy")

 

//================================================================================

 

ClientProxy:

 

public class ClientProxy extends ServerProxy {

 

public void registerRenderThings(){

 

  EntityCreator.createEntity(sinobinmain.mob_beaver, EntityBeaver.class, new RenderBeaver(), "beaver", EnumCreatureType.CREATURE, 10, 2, 3, new Biome[] {

  Biomes.RIVER}, 0x664106, 0x120E08, true);

  }

}

 

//======================================================================================

 

public class EntityCreator {

 

public static final void createEntity(int id, Class entityClass, Render render, String entityName, EnumCreatureType type, int probability, int minSpawn, int maxSpawn, Biome[] biomes,

  int solidColor, int spotColor, boolean hasSpawnEgg){

 

EntityRegistry.registerModEntity(entityClass, entityName, id, sinobinmain.instance, 64, 1, true);

EntityRegistry.addSpawn(entityClass, probability, minSpawn, maxSpawn, type, biomes);

RenderingRegistry.registerEntityRenderingHandler(entityClass, render);

 

if(hasSpawnEgg){

EntityRegistry.registerEgg(entityClass, solidColor, spotColor);

}

}

 

Link to comment
Share on other sites

Good jorb, the server has no idea you even added an entity at all: your entity registration is client-side-only because it is inside your client-proxy.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Exactly this I imagined of beginning also, but all the same how I push between ClientProxy and ServerProxy there un here, the Spawn Egg also not even exists afterwards and the Entity not :(

 

german:

Genau das dachte ich mir Anfangs auch, aber egal, wie ich zwischen ClientProxy und ServerProxy hin und her schiebe, das Spawn Egg existiert danach nicht  einmal und das Entity auch nicht :(

 

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

ClientProxy:

 

public class ClientProxy extends ServerProxy{

 

  public void registerRenderThings(){

    RenderingRegistry.registerEntityRenderingHandler(EntityBeaver.class, new RenderBeaver());

  }

 

}

 

ServerProxy:

 

public class ServerProxy{

 

  public void registerThings(){

    EntityRegistry.registerModEntity(EntityBeaver.class, "beaver", sinobinmain.mob_beaver, sinobinmain.instance, 64, 1, true);

    EntityRegistry.registerEgg(EntityBeaver.class, 0x664106, 0x120E08);

    EntityRegistry.addSpawn(EntityBeaver.class, 10, 2, 3, EnumCreatureType.CREATURE, new Biome[] {Biomes.RIVER});

  }

 

}

Link to comment
Share on other sites

NO! Jesus... READ THE LINK I GAVE YOU!

http://mcforge.readthedocs.io/en/latest/concepts/sides/

 

Client = Client.jar

Server = Dedicated.jar

 

You ServerProxy is supposed to be fired for Dedicated.jar and ClientProxy for Client.jar.

 

Entity should be registered in pre-init on BOTH SIDES - thus either main mod pre-init OR CommonProxy method called from pre-init.

Render should be registered on CLIENT, so in ClientProxy.

 

CommonProxy is abstract base! // handler registering code for both sides

ClientProxy extends CommonProxy // handles registering rendering stufff for only client

ServerProxy extends CommonProxy // almost never used, but sometimes required to do stuff for dedicated server (e.g database connection)

@SidedProxy(client = clientProxy, server = serverProxy)

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Yes - maybe a conflict/incompatibility with another mod
    • LINK ADA DI BAWAH INI  LINK LOGIN LINK DAFTAR EXTRAWD ADALAH AGEN SLOT , TOGEL DAN BOLA TERBESAR INDONESIA YANG MERUPAKAN SITUS ONLINE PERTAMA YANG MENYEDIAKAN BERBAGAI JENIS PERMAINAN DAN BETTING ONLINE TELENGKAP, SEPERTI PERMAINAN CASINO ONLINE, SLOT ONLINE, TOGEL ONLINE, BOLA ONLINE, DAN MASIH BANYAK JENIS PILIHAN PERMAINAN LAINNYA. PROVIDER TERLENGKAP DAN TERNAMA UNTUK SLOT : PRAGMATIC PLAY-PG SOFT-NOLIMIT CITY-JOKER-PNG SLOT-BIG TIM GAMING-NETENT-TIGER PROVIDDER TERLENGKAP LIVEGAME : PRAGMATIC PLAY - VEGAS LOUNGE - SA GAMING - BG LIVE - EVOLUTION GAMING SWEET BONANZA CANDYLAND, MEGAWHEEL X 500, BACCARAT, ROULETTE PELAYANAN TERBAIK DARI OPERATOR KAMI YANG SIAP MELAYANI ANDA SELAMA 24 JAM
    • LINK ADA DI BAWAH INI  LINK LOGIN LINK DAFTAR EXTRAWD ADALAH AGEN SLOT , TOGEL DAN BOLA TERBESAR INDONESIA YANG MERUPAKAN SITUS ONLINE PERTAMA YANG MENYEDIAKAN BERBAGAI JENIS PERMAINAN DAN BETTING ONLINE TELENGKAP, SEPERTI PERMAINAN CASINO ONLINE, SLOT ONLINE, TOGEL ONLINE, BOLA ONLINE, DAN MASIH BANYAK JENIS PILIHAN 
    • Platform tempat untuk melangsungkan perjudian togel yang paling aman saat ini dan bisa merasakan sensasi hadiah JP jeda tentunya hanya bisa menggunakan situs agen toto togel resmi EXTRAWD . Bersama website agen togel ini anda akan mendapatkan jaminan bahwa hadiah kemenangan pasti dibayar tanpa ada potongan biaya administrasi. Hal terpenting di dalam permainan judi togel melalui situs EXTRAWD adalah wajib memiliki legalitas demi menghindari risiko terhadap hadiah kemenangan. Legalitas tersebut merupakan badan hukum untuk mengawasi terjadinya proses pengundian, sehingga cita-cita untuk mendapatkan JP togel semakin mudah untuk direalisasikan.  
    • I'm having trouble updating my mod Primal Magick to MC1.20.4 on Forge 49.0.48 with JEI 17.3.0.49. I believe I've followed the Forge and JEI instructions correctly, but I'm getting the following exception when I try to run the data generator: java.lang.module.ResolutionException: Modules jei._1._20._4.common.api and jei export package mezz.jei.api.runtime to module primalmagick Full output sample here, and the build.gradle file in question is here. Trying to run the game client results in a different type of exception, but with the same inner error. It looks like I'm getting two separate JEI modules which are interfering with each other, but I'm not sure why that would be. Things I've discovered in my investigations so far: Blowing away my repository and re-cloning from remote does not fix the error, even in combination with nuking my entire gradle cache.  I'm *mostly* sure that it's not just because my workspace is in a bad state. Commenting out line 144 of the build.gradle file, where it specifies the runtime-only deobf dependency of JEI makes the exception not get thrown, but means that JEI is not active in my debug runtime.  While this is a partial workaround for the issue, it leaves me unable to debug any of my JEI integration code, and so is far from ideal. Most maddeningly, running the client and/or data generator from the gradle CLI *also* causes the bug to not reproduce.  Data files get generated, and the client even runs with JEI; it just leaves me unable to trace through the code. I've already reached out to Mezz on the JEI Discord and he's stumped as well.  If I didn't know better, I'd say that one of the "compileOnly" or "runtimeOnly" directives are being executed when they shouldn't be, but why that would be happening now, or happening only when run in Eclipse, is beyond me.  If anyone knows how to resolve this issue, I would be very grateful.  Thank you, and stay safe.
  • Topics

×
×
  • Create New...

Important Information

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