Posted March 20, 20205 yr Hello I have this little issue that I wanted to create a new item which can be thrown but I have problems with rendering the created entity. It works like it should except that it has the texture of a pig instead of my entity. Could someone please help me? Entity Class: public class CensoredEntity extends ThrowableEntity { public static final EntityType<CensoredEntity> CENSORED = register(); public CensoredEntity(double x, double y, double z, World worldIn) { super(CensoredEntity.CENSORED, x, y, z, worldIn); } protected CensoredEntity( LivingEntity livingEntityIn, World worldIn) { super(CensoredEntity.CENSORED, livingEntityIn, worldIn); } protected CensoredEntity(EntityType<CensoredEntity> entityCensoredEntityType, World world) { super(CensoredEntity.CENSORED, world); } @Override public IPacket<?> createSpawnPacket() { return NetworkHooks.getEntitySpawningPacket(this); } @Override protected void onImpact(RayTraceResult result) { if (result instanceof EntityRayTraceResult) { EntityRayTraceResult entityRayTraceResult = (EntityRayTraceResult) result; if(entityRayTraceResult.getEntity() instanceof MobEntity) { MobEntity entity = (MobEntity) entityRayTraceResult.getEntity(); double d0 = (double)entity.lastTickPosX ; double d1 = (double)entity.lastTickPosY + 1D; double d2 = (double)entity.lastTickPosZ; entity.addPotionEffect(new EffectInstance(Effects.REGENERATION,100,2)); this.world.playSound(d0, d1, d2, SoundEvents.BLOCK_ANVIL_HIT, SoundCategory.AMBIENT,1,1,true); this.remove(); } else if(entityRayTraceResult.getEntity() instanceof PlayerEntity) { PlayerEntity entity = (PlayerEntity) entityRayTraceResult.getEntity(); entity.addPotionEffect(new EffectInstance(Effects.REGENERATION,100,2)); this.remove(); } } else if (result instanceof BlockRayTraceResult) { BlockRayTraceResult blockRayTraceResult = (BlockRayTraceResult) result; World world = this.world; Block block = world.getBlockState(blockRayTraceResult.getPos()).getBlock(); if(block == Blocks.GRASS_BLOCK) { world.setBlockState(blockRayTraceResult.getPos(), BlockList.pink_grass_block.getDefaultState()); Vec3d vec = blockRayTraceResult.getHitVec(); double x = vec.getX(); double y = vec.getY(); double z = vec.getZ(); this.setMotion(x,y,z); this.remove(); } Vec3d vec = blockRayTraceResult.getHitVec(); double x = vec.getX(); double y = vec.getY(); double z = vec.getZ(); this.setMotion(x,y,z); this.remove(); } } public static EntityType<CensoredEntity> register() { return EntityType.Builder.<CensoredEntity>create(CensoredEntity::new, EntityClassification.MISC).size(0.8f, 0.8f).build(Censored.modid + ":censored_entity"); } public void tick() { Vec3d vec3d = this.getMotion(); double d0 = this.func_226277_ct_() + vec3d.x; double d1 = this.func_226278_cu_() + vec3d.y; double d2 = this.func_226281_cx_() + vec3d.z; this.world.addParticle(ParticleTypes.HEART, d0 - vec3d.x * 0.25D, d1 - vec3d.y * 0.25D, d2 - vec3d.z * 0.25D, vec3d.x, vec3d.y, vec3d.z); LivingEntity livingentity = this.getThrower(); if (livingentity != null && livingentity instanceof PlayerEntity && !livingentity.isAlive()) { this.remove(); } else { super.tick(); } } protected Item func_213885_i() { return ItemList.censored; } @Override protected void registerData() { } } Entity Render Class: @OnlyIn(Dist.CLIENT) public class CensoredEntityRender extends EntityRenderer<CensoredEntity> { protected CensoredEntityRender(EntityRendererManager renderManager) { super(renderManager); } @Override public ResourceLocation getEntityTexture(CensoredEntity entity) { return Censoredmodid.RegistryEvents.location("textures/entity/censored"); } public static class RenderFactory implements IRenderFactory<CensoredEntity> { @Override public EntityRenderer<? super CensoredEntity> createRenderFor(EntityRendererManager manager) { return new CensoredEntityRender(manager); } } } Render Registry: @OnlyIn(Dist.CLIENT) public class CensoredIdRenderRegistry { public static void registryEntityRenders() { RenderingRegistry.registerEntityRenderingHandler(CensoredEntity.CENSORED, new CensoredEntityRender.RenderFactory()); } } I also have a model class for my entity but it's empty because I don't know if this is needed for an item entity. Thank you in advance ? Edited April 4, 20205 yr by Peerius Updated to 1.15.2
March 22, 20205 yr Don't assume that because you set EntityRenderer#getEntityTexture that your texture will automatically be binded for you. You still need to bind your texture to the IVertexBuilder, Model, or however you are rendering the entity.
March 24, 20205 yr Author But then I also need my render class to extend something else than EntityRenderer because it doesn't depend on a model, am I right? What renderer shall I use? I also looked at comporable Vanilla items like snowballs, eggs and ender pearls, but I didn't find any renderer to those. I saw that in the past the rendering could be made with RenderSnowball but this class doesn't exist anymore.
March 26, 20205 yr Author When running the game and throwing my mod item, there's the following error in the log: [25Mär2020 08:17:58.031] [Render thread/FATAL] [net.minecraft.util.concurrent.ThreadTaskExecutor/]: Error executing task on Client java.lang.IllegalStateException: Invalid entity data item type for field 7 on entity PigEntity['Schwein'/411, l='MpServer', x=-262.54, y=81.56, z=417.63]: old=0(class java.lang.Byte), new=1 air(class net.minecraft.item.ItemStack) at net.minecraft.network.datasync.EntityDataManager.setEntryValue(EntityDataManager.java:246) ~[forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] at net.minecraft.network.datasync.EntityDataManager.setEntryValues(EntityDataManager.java:234) ~[forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] at net.minecraft.client.network.play.ClientPlayNetHandler.handleEntityMetadata(ClientPlayNetHandler.java:568) ~[forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] at net.minecraft.network.play.server.SEntityMetadataPacket.processPacket(SEntityMetadataPacket.java:47) ~[forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] at net.minecraft.network.play.server.SEntityMetadataPacket.processPacket(SEntityMetadataPacket.java:12) ~[forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] at net.minecraft.network.PacketThreadUtil.lambda$checkThreadAndEnqueue$0(PacketThreadUtil.java:19) ~[forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] at net.minecraft.util.concurrent.ThreadTaskExecutor.run(ThreadTaskExecutor.java:140) ~[forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] at net.minecraft.util.concurrent.RecursiveEventLoop.run(RecursiveEventLoop.java:22) ~[forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] at net.minecraft.util.concurrent.ThreadTaskExecutor.driveOne(ThreadTaskExecutor.java:110) ~[forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] at net.minecraft.util.concurrent.ThreadTaskExecutor.drainTasks(ThreadTaskExecutor.java:97) ~[forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:887) ~[forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] at net.minecraft.client.Minecraft.run(Minecraft.java:520) ~[forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] at net.minecraft.client.main.Main.main(Main.java:176) ~[forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_231] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_231] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231] at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.0.0-milestone.4.jar:?] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.0.0-milestone.4.jar:?] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.0.0-milestone.4.jar:?] at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.0.0-milestone.4.jar:?] at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.0.0-milestone.4.jar:?] at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:101) [forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] Edit: It also seems like my custom entity doesn't even get registred. So here is where I register my entity: @SubscribeEvent public void registerEntities(final RegistryEvent.Register<EntityType<?>> event) { event.getRegistry().registerAll ( EntityType.Builder.<CensoredEntity>create(EntityClassification.MISC).setCustomClientFactory(CensoredEntity::new).size(0.8f, 0.8f).build(modid + ":censored_entity") ); } Edited March 26, 20205 yr by Peerius
March 27, 20205 yr Author Update: Found out that in vanilla items like ender pearls are rendered with the SpriteRenderer so now my renderer looks like this: @OnlyIn(Dist.CLIENT) public class CustomEntityRender extends SpriteRenderer<CustomEntity> { protected CustomEntityRender(EntityRendererManager renderManager, ItemRenderer itemRenderer) { super(renderManager, itemRenderer); } @Override public ResourceLocation getEntityTexture(CustomEntity entity) { return Modid.RegistryEvents.location("textures/entity/texture.png"); } } I changed my RenderRegistry to: RenderingRegistry.registerEntityRenderingHandler(CustomEntity.CUSTOM, renderManager -> new CustomEntityRender(renderManager, Minecraft.getInstance().getItemRenderer())); While SpriteRenderer extends EntityRenderer, but I don't have access to the SpriteRenderer class. Inside of the EntityRenderer, the method looks like this: public abstract ResourceLocation getEntityTexture(T entity); My problem is the error shown in the attached screenshot. So it seems like I'm only overriding the getEntityTexture() method from EntityRenderer and not from SpriteRenderer. Edit: I removed the super.getEntityTexture(entity) error - this was just an act of desperation and I know it's very wrong Can someone please help me fixing this problem? Thanks in advance. Edited April 4, 20205 yr by Peerius Changed code
April 4, 20205 yr 8 minutes ago, Peerius said: Bump... still needing help with this What actually is your current problem? VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
April 4, 20205 yr Author 2 hours ago, Animefan8888 said: What actually is your current problem? I am currently thinking of two options for rendering my entity. The one is with the SpriteRenderer, which is used by vanilla to render items like snowballs. When I use this one, the game spawns a PigEntity when right clicking with my custom item and the error message as shown here: On 3/26/2020 at 7:29 AM, Peerius said: [25Mär2020 08:17:58.031] [Render thread/FATAL] [net.minecraft.util.concurrent.ThreadTaskExecutor/]: Error executing task on Client java.lang.IllegalStateException: Invalid entity data item type for field 7 on entity PigEntity['Schwein'/411, l='MpServer', x=-262.54, y=81.56, z=417.63]: old=0(class java.lang.Byte), new=1 air(class net.minecraft.item.ItemStack) at net.minecraft.network.datasync.EntityDataManager.setEntryValue(EntityDataManager.java:246) ~[forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] at net.minecraft.network.datasync.EntityDataManager.setEntryValues(EntityDataManager.java:234) ~[forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] at net.minecraft.client.network.play.ClientPlayNetHandler.handleEntityMetadata(ClientPlayNetHandler.java:568) ~[forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] at net.minecraft.network.play.server.SEntityMetadataPacket.processPacket(SEntityMetadataPacket.java:47) ~[forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] at net.minecraft.network.play.server.SEntityMetadataPacket.processPacket(SEntityMetadataPacket.java:12) ~[forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] at net.minecraft.network.PacketThreadUtil.lambda$checkThreadAndEnqueue$0(PacketThreadUtil.java:19) ~[forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] at net.minecraft.util.concurrent.ThreadTaskExecutor.run(ThreadTaskExecutor.java:140) ~[forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] at net.minecraft.util.concurrent.RecursiveEventLoop.run(RecursiveEventLoop.java:22) ~[forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] at net.minecraft.util.concurrent.ThreadTaskExecutor.driveOne(ThreadTaskExecutor.java:110) ~[forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] at net.minecraft.util.concurrent.ThreadTaskExecutor.drainTasks(ThreadTaskExecutor.java:97) ~[forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:887) ~[forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] at net.minecraft.client.Minecraft.run(Minecraft.java:520) ~[forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] at net.minecraft.client.main.Main.main(Main.java:176) ~[forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_231] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_231] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231] at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.0.0-milestone.4.jar:?] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.0.0-milestone.4.jar:?] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.0.0-milestone.4.jar:?] at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.0.0-milestone.4.jar:?] at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.0.0-milestone.4.jar:?] at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:101) [forge-1.15.1-30.0.51_mapped_snapshot_20190719-1.14.3-recomp.jar:?] The other option I thought of was to extend SpriteRenderer to override the getEntityTexture method with a ResourceLocation to my texture for the ProjectileItemEntity. But then the error as shown here appears: On 3/27/2020 at 7:17 PM, Peerius said: Where only the first error is relevant. So overall my problem is that I don't know how to make the entity have the texture of my custom item. Edited April 4, 20205 yr by Peerius
April 4, 20205 yr 21 minutes ago, Peerius said: The one is with the SpriteRenderer Use the SpriteRenderer 23 minutes ago, Peerius said: java.lang.IllegalStateException: Invalid entity data item type for field 7 on entity PigEntity['Schwein'/411, l='MpServer', x=-262.54, y=81.56, z=417.63]: old=0(class java.lang.Byte), new=1 air(class net.minecraft.item.ItemStack) I dislike it when people cherry pick lines from the log/console. Was this the whole error? Was there a "Caused by..." line? But this error sounds like the Entity being spawned on the Client wasn't your entity and instead a Pig was spawned. This happens when an Entity of an unregistered EntityType is requested to spawn. Which means your EntityType you are using was not registered. Which leads me to this. On 3/20/2020 at 12:39 PM, Peerius said: public static final EntityType<CensoredEntity> CENSORED = register(); This is not how registration works. EntityTypes are singleton values. You can't just create another one and expect it to work. You have to use the instance that you registered. Typically this is done with the @ObejctHolder annotation. You can read the documentation here. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
April 4, 20205 yr Author 2 hours ago, Animefan8888 said: Use the SpriteRenderer All right. 2 hours ago, Animefan8888 said: I dislike it when people cherry pick lines from the log/console. Was this the whole error? Was there a "Caused by..." line? Sorry, I thought the rest wouldn't be relevant. Here is a full error log: [04Apr2020 20:18:18.179] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmluserdevclient, --fml.mcpVersion, 20200307.202953, --fml.mcVersion, 1.15.2, --fml.forgeGroup, net.minecraftforge, --fml.forgeVersion, 31.1.27, --version, MOD_DEV, --assetIndex, 1.15, --assetsDir, C:\Users\peers\.gradle\caches\forge_gradle\assets, --username, Dev, --accessToken, ????????, --userProperties, {}] [04Apr2020 20:18:18.187] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 5.0.0-milestone.4+67+b1a340b starting: java version 1.8.0_231 by Oracle Corporation [04Apr2020 20:18:19.971] [main/INFO] [net.minecraftforge.fml.loading.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust [04Apr2020 20:18:21.724] [main/INFO] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Launching target 'fmluserdevclient' with arguments [--version, MOD_DEV, --gameDir, ., --assetsDir, C:\Users\peers\.gradle\caches\forge_gradle\assets, --assetIndex, 1.15, --username, Dev, --accessToken, ????????, --userProperties, {}] [04Apr2020 20:18:26.040] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Setting user: Dev [04Apr2020 20:18:42.331] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Backend library: LWJGL version 3.2.2 build 10 [04Apr2020 20:18:44.556] [modloading-worker-2/INFO] [net.minecraftforge.common.ForgeMod/FORGEMOD]: Forge mod loading, version 31.1.27, for MC 1.15.2 with MCP 20200307.202953 [04Apr2020 20:18:44.556] [modloading-worker-2/INFO] [net.minecraftforge.common.MinecraftForge/FORGE]: MinecraftForge v31.1.27 Initialized [04Apr2020 20:18:45.306] [Render thread/INFO] [censoredmodid/]: Blocks registred. [04Apr2020 20:18:45.353] [Render thread/INFO] [censoredmodid/]: Items registred. [04Apr2020 20:18:49.565] [Render thread/INFO] [com.mojang.text2speech.NarratorWindows/]: Narrator library for x64 successfully loaded [04Apr2020 20:18:49.732] [Render thread/INFO] [net.minecraft.resources.SimpleReloadableResourceManager/]: Reloading ResourceManager: Default, Mod Resources [04Apr2020 20:18:49.793] [modloading-worker-2/INFO] [censoredmodid/]: Setup method registred. [04Apr2020 20:18:51.855] [modloading-worker-3/WARN] [net.minecraft.entity.EntityType/]: No data fixer registered for entity censoredmodid:censored_entity [04Apr2020 20:18:51.864] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [forge] Starting version check at https://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json [04Apr2020 20:18:51.869] [modloading-worker-3/INFO] [deepaffection/]: Entity render registerd. [04Apr2020 20:18:51.898] [modloading-worker-3/INFO] [deepaffection/]: clientRegistries method registred. [04Apr2020 20:18:52.620] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [forge] Found status: OUTDATED Current: 31.1.27 Target: 31.1.35 [04Apr2020 20:19:05.737] [Render thread/INFO] [net.minecraft.client.audio.SoundSystem/]: OpenAL initialized. [04Apr2020 20:19:05.738] [Render thread/INFO] [net.minecraft.client.audio.SoundEngine/SOUNDS]: Sound engine started [04Apr2020 20:19:06.074] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 1024x512x4 minecraft:textures/atlas/blocks.png-atlas [04Apr2020 20:19:06.272] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 128x128x4 minecraft:textures/atlas/signs.png-atlas [04Apr2020 20:19:06.274] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 512x512x4 minecraft:textures/atlas/banner_patterns.png-atlas [04Apr2020 20:19:06.280] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 512x512x4 minecraft:textures/atlas/shield_patterns.png-atlas [04Apr2020 20:19:06.287] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 256x256x4 minecraft:textures/atlas/chest.png-atlas [04Apr2020 20:19:06.290] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 512x256x4 minecraft:textures/atlas/beds.png-atlas [04Apr2020 20:19:06.293] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 512x256x4 minecraft:textures/atlas/shulker_boxes.png-atlas [04Apr2020 20:19:06.976] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 256x256x0 minecraft:textures/atlas/particles.png-atlas [04Apr2020 20:19:06.982] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 256x256x0 minecraft:textures/atlas/paintings.png-atlas [04Apr2020 20:19:06.984] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 128x128x0 minecraft:textures/atlas/mob_effects.png-atlas [04Apr2020 20:19:07.733] [Realms Notification Availability checker #1/INFO] [com.mojang.realmsclient.client.RealmsClient/]: Could not authorize you against Realms server: Invalid session id [04Apr2020 20:19:12.032] [Render thread/WARN] [net.minecraft.command.Commands/]: Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498] [04Apr2020 20:19:12.033] [Render thread/WARN] [net.minecraft.command.Commands/]: Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0] [04Apr2020 20:19:12.034] [Render thread/WARN] [net.minecraft.command.Commands/]: Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0] [04Apr2020 20:19:12.035] [Render thread/WARN] [net.minecraft.command.Commands/]: Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498] [04Apr2020 20:19:12.037] [Render thread/WARN] [net.minecraft.command.Commands/]: Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0] [04Apr2020 20:19:12.288] [Server thread/INFO] [net.minecraft.server.integrated.IntegratedServer/]: Starting integrated minecraft server version 1.15.2 [04Apr2020 20:19:12.288] [Server thread/INFO] [net.minecraft.server.integrated.IntegratedServer/]: Generating keypair [04Apr2020 20:19:12.513] [Server thread/INFO] [net.minecraftforge.registries.GameData/REGISTRIES]: Injecting existing registry data into this SERVER instance [04Apr2020 20:19:12.871] [Server thread/INFO] [net.minecraft.resources.SimpleReloadableResourceManager/]: Reloading ResourceManager: Default, main, forge-1.15.2-31.1.27_mapped_snapshot_20200225-1.15.1-recomp.jar [04Apr2020 20:19:15.895] [Server thread/INFO] [net.minecraft.item.crafting.RecipeManager/]: Loaded 6 recipes [04Apr2020 20:19:19.675] [Server thread/INFO] [net.minecraft.advancements.AdvancementList/]: Loaded 825 advancements [04Apr2020 20:19:20.481] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing start region for dimension minecraft:overworld [04Apr2020 20:19:21.623] [Render thread/INFO] [net.minecraft.world.chunk.listener.LoggingChunkStatusListener/]: Einstiegsbereich wird vorbereitet: 0% [04Apr2020 20:19:21.623] [Render thread/INFO] [net.minecraft.world.chunk.listener.LoggingChunkStatusListener/]: Einstiegsbereich wird vorbereitet: 0% [04Apr2020 20:19:21.623] [Render thread/INFO] [net.minecraft.world.chunk.listener.LoggingChunkStatusListener/]: Einstiegsbereich wird vorbereitet: 0% [04Apr2020 20:19:22.039] [Render thread/INFO] [net.minecraft.world.chunk.listener.LoggingChunkStatusListener/]: Einstiegsbereich wird vorbereitet: 83% [04Apr2020 20:19:22.572] [Render thread/INFO] [net.minecraft.world.chunk.listener.LoggingChunkStatusListener/]: Time elapsed: 2084 ms [04Apr2020 20:19:23.023] [Server thread/INFO] [net.minecraft.world.server.ChunkManager/]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved [04Apr2020 20:19:23.026] [Server thread/INFO] [net.minecraft.world.server.ChunkManager/]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved [04Apr2020 20:19:23.030] [Server thread/INFO] [net.minecraft.server.integrated.IntegratedServer/]: Changing view distance to 11, from 10 [04Apr2020 20:19:29.348] [Netty Local Client IO #0/INFO] [net.minecraftforge.fml.network.NetworkHooks/]: Connected to a modded server. [04Apr2020 20:19:29.474] [Server thread/INFO] [net.minecraft.server.management.PlayerList/]: Dev[local:E:fb3edaec] logged in with entity id 233 at (69.19712512044106, 81.678043496736, 60.595977333329) [04Apr2020 20:19:29.520] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dev hat das Spiel betreten [04Apr2020 20:19:30.274] [Server thread/INFO] [net.minecraft.server.integrated.IntegratedServer/]: Saving and pausing game... [04Apr2020 20:19:30.292] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'Test'/minecraft:overworld [04Apr2020 20:19:30.441] [Render thread/INFO] [net.minecraft.advancements.AdvancementList/]: Loaded 0 advancements [04Apr2020 20:19:30.871] [Server-Worker-9/WARN] [com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService/]: Couldn't look up profile properties for com.mojang.authlib.GameProfile@2cf5d6a6[id=380df991-f603-344c-a090-369bad2a924a,name=Dev,properties={},legacy=false] com.mojang.authlib.exceptions.AuthenticationException: The client has sent too many requests within a certain amount of time at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:79) ~[authlib-1.5.25.jar:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillGameProfile(YggdrasilMinecraftSessionService.java:180) ~[authlib-1.5.25.jar:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:60) ~[authlib-1.5.25.jar:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:57) ~[authlib-1.5.25.jar:?] at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3716) ~[guava-21.0.jar:?] at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2424) ~[guava-21.0.jar:?] at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2298) ~[guava-21.0.jar:?] at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2211) ~[guava-21.0.jar:?] at com.google.common.cache.LocalCache.get(LocalCache.java:4154) ~[guava-21.0.jar:?] at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4158) ~[guava-21.0.jar:?] at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5147) ~[guava-21.0.jar:?] at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:5153) ~[guava-21.0.jar:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillProfileProperties(YggdrasilMinecraftSessionService.java:170) ~[authlib-1.5.25.jar:?] at net.minecraft.client.Minecraft.getProfileProperties(Minecraft.java:1995) ~[?:?] at net.minecraft.client.resources.SkinManager.lambda$loadProfileTextures$4(SkinManager.java:96) ~[?:?] at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402) [?:1.8.0_231] at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) [?:1.8.0_231] at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) [?:1.8.0_231] at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) [?:1.8.0_231] at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) [?:1.8.0_231] [04Apr2020 20:19:35.072] [Render thread/FATAL] [net.minecraft.util.concurrent.ThreadTaskExecutor/]: Error executing task on Client java.lang.IllegalStateException: Invalid entity data item type for field 7 on entity PigEntity['Schwein'/443, l='MpServer', x=68.59, y=82.26, z=59.92]: old=0(class java.lang.Byte), new=1 air(class net.minecraft.item.ItemStack) at net.minecraft.network.datasync.EntityDataManager.setEntryValue(EntityDataManager.java:246) ~[forge-1.15.2-31.1.27_mapped_snapshot_20200225-1.15.1-recomp.jar:?] at net.minecraft.network.datasync.EntityDataManager.setEntryValues(EntityDataManager.java:234) ~[forge-1.15.2-31.1.27_mapped_snapshot_20200225-1.15.1-recomp.jar:?] at net.minecraft.client.network.play.ClientPlayNetHandler.handleEntityMetadata(ClientPlayNetHandler.java:587) ~[forge-1.15.2-31.1.27_mapped_snapshot_20200225-1.15.1-recomp.jar:?] at net.minecraft.network.play.server.SEntityMetadataPacket.processPacket(SEntityMetadataPacket.java:50) ~[forge-1.15.2-31.1.27_mapped_snapshot_20200225-1.15.1-recomp.jar:?] at net.minecraft.network.play.server.SEntityMetadataPacket.processPacket(SEntityMetadataPacket.java:12) ~[forge-1.15.2-31.1.27_mapped_snapshot_20200225-1.15.1-recomp.jar:?] at net.minecraft.network.PacketThreadUtil.lambda$checkThreadAndEnqueue$0(PacketThreadUtil.java:19) ~[forge-1.15.2-31.1.27_mapped_snapshot_20200225-1.15.1-recomp.jar:?] at net.minecraft.util.concurrent.ThreadTaskExecutor.run(ThreadTaskExecutor.java:140) ~[forge-1.15.2-31.1.27_mapped_snapshot_20200225-1.15.1-recomp.jar:?] at net.minecraft.util.concurrent.RecursiveEventLoop.run(RecursiveEventLoop.java:22) ~[forge-1.15.2-31.1.27_mapped_snapshot_20200225-1.15.1-recomp.jar:?] at net.minecraft.util.concurrent.ThreadTaskExecutor.driveOne(ThreadTaskExecutor.java:110) ~[forge-1.15.2-31.1.27_mapped_snapshot_20200225-1.15.1-recomp.jar:?] at net.minecraft.util.concurrent.ThreadTaskExecutor.drainTasks(ThreadTaskExecutor.java:97) ~[forge-1.15.2-31.1.27_mapped_snapshot_20200225-1.15.1-recomp.jar:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:935) ~[forge-1.15.2-31.1.27_mapped_snapshot_20200225-1.15.1-recomp.jar:?] at net.minecraft.client.Minecraft.run(Minecraft.java:559) ~[forge-1.15.2-31.1.27_mapped_snapshot_20200225-1.15.1-recomp.jar:?] at net.minecraft.client.main.Main.main(Main.java:177) ~[forge-1.15.2-31.1.27_mapped_snapshot_20200225-1.15.1-recomp.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_231] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_231] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231] at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.15.2-31.1.27_mapped_snapshot_20200225-1.15.1-recomp.jar:?] at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.0.0-milestone.4.jar:?] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.0.0-milestone.4.jar:?] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.0.0-milestone.4.jar:?] at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.0.0-milestone.4.jar:?] at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.0.0-milestone.4.jar:?] at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102) [forge-1.15.2-31.1.27_mapped_snapshot_20200225-1.15.1-recomp.jar:?] [04Apr2020 20:19:37.456] [Server thread/INFO] [net.minecraft.server.integrated.IntegratedServer/]: Saving and pausing game... [04Apr2020 20:19:37.462] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'Test'/minecraft:overworld [04Apr2020 20:19:42.058] [Server thread/INFO] [net.minecraft.network.play.ServerPlayNetHandler/]: Dev lost connection: Verbindung getrennt [04Apr2020 20:19:42.059] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dev hat das Spiel verlassen [04Apr2020 20:19:42.066] [Server thread/INFO] [net.minecraft.network.play.ServerPlayNetHandler/]: Stopping singleplayer server as player logged out [04Apr2020 20:19:42.130] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Stopping server [04Apr2020 20:19:42.130] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving players [04Apr2020 20:19:42.130] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving worlds [04Apr2020 20:19:42.130] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'Test'/minecraft:overworld [04Apr2020 20:19:42.462] [Server thread/INFO] [net.minecraft.world.server.ChunkManager/]: ThreadedAnvilChunkStorage (Test): All chunks are saved [04Apr2020 20:19:42.474] [Server thread/INFO] [net.minecraft.world.server.ChunkManager/]: ThreadedAnvilChunkStorage (Test): All chunks are saved [04Apr2020 20:19:44.116] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Stopping! I guess it could also be relevant that there is no data fixer registered for my entity. I think I'm not using the @ObjectHolder the right way.. where is my mistake? Here is my entity class: @ObjectHolder(CensoredMod.modid) public class CensoredEntity extends ProjectileItemEntity { @ObjectHolder("censored_entity") public static final EntityType<CensoredEntity> CENSORED = register(); ... public static EntityType<CensoredEntity> register() { return EntityType.Builder.<CensoredEntity>create(EntityClassification.MISC).setCustomClientFactory(CensoredEntity::new).size(0.8f, 0.8f).build(CensoredMod.modid + ":censored_entity"); } } And where I register the entity: @SubscribeEvent public void registerEntities(final RegistryEvent.Register<EntityType<?>> event) { event.getRegistry().registerAll ( CensoredEntity.CENSORED ); } And here is my render registry: @OnlyIn(Dist.CLIENT) public class CensoredModRenderRegistry { public static void registryEntityRenders() { RenderingRegistry.registerEntityRenderingHandler(CensoredEntity.CENSORED, renderManager -> new SpriteRenderer<CensoredEntity>(renderManager, Minecraft.getInstance().getItemRenderer())); } } where the method is getting called during the FMLClientSetupEvent.
April 6, 20205 yr Author Nevermind, it works now after orientating on this: .Thank you for your help.
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.