Jump to content

SorenCabral

Members
  • Posts

    27
  • Joined

  • Last visited

Everything posted by SorenCabral

  1. 1- The ores blocks that drop items are actually giving no experience points after mined; 2- The "shears" don't play the sound of cut when used in a sheep; 3- After be died for the Ender Dragon, the game stay freeze in the (Respawn/Return to Menu) screen. Forge ver. 1.14.4 - 28.0.11
  2. After build my mod with (gradlew build) and try to execute in the game, it not work. build.gradle: MANIFEST.MF sorenmymdl_at.cfg
  3. Im trying again, but I dont know how create my new renderer correctly. I try follow one 1.12.2 tutorial to learn how register, but is different in this part (Renderer Creation) causing error in this code above, prohibiting me to continue:
  4. (For while is one copy, that render the same model. After fix all erros, I will try apply the changes). How Im are new in modding, am learning per steps.
  5. Like this? package soren.mymdl; // imports // @Mod("sorenmod") public class SorenMod { public static IProxy proxy = DistExecutor.runForDist(() -> () -> new ClientProxy(), () -> () -> new ServerProxy()); private static final Logger LOGGER = LogManager.getLogger(); public static NewRenderer test = new NewRenderer(Minecraft.getInstance().getRenderManager()); public SorenMod() { FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); MinecraftForge.EVENT_BUS.register(new PlayerManage()); } private void setup(final FMLCommonSetupEvent event) { proxy.getClientWorld(); } @SubscribeEvent public void onServerStarting(FMLServerStartingEvent event) { } @Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD) public static class RegistryEvents { } } package soren.mymdl; // imports // public class PlayerManage { @SubscribeEvent public void renderPlayerPre(RenderPlayerEvent.Pre event) { event.setCanceled(true); SorenMod.test.doRender((AbstractClientPlayerEntity) event.getEntity(), 1, 1, 1, 0.625F, 0.625F); } } No more errors, but the player have not rendered.
  6. [20:02:01.217] [modloading-worker-2/INFO] [ne.mi.co.ForgeMod/FORGEMOD]: Forge mod loading, version 27.0.25, for MC 1.14.3 with MCP 20190624.152911 [20:02:01.217] [modloading-worker-2/INFO] [ne.mi.co.MinecraftForge/FORGE]: MinecraftForge v27.0.25 Initialized FATAL ERROR in native method: Thread[modloading-worker-1,5,main]: No context is current or a function that is not available in the current context was called. The JVM will abort execution. at org.lwjgl.opengl.GL11C.nglGenTextures(Native Method) at org.lwjgl.opengl.GL11C.glGenTextures(GL11C.java:664) at org.lwjgl.opengl.GL11.glGenTextures(GL11.java:2492) at com.mojang.blaze3d.platform.GlStateManager.genTexture(GlStateManager.java:419) at com.mojang.blaze3d.platform.TextureUtil.generateTextureId(TextureUtil.java:27) at net.minecraft.client.renderer.texture.Texture.getGlTextureId(Texture.java:45) at net.minecraft.client.renderer.texture.DynamicTexture.<init>(DynamicTexture.java:22) at net.minecraft.client.renderer.entity.LivingRenderer.<clinit>(LivingRenderer.java:31) at soren.mymdl.PlayerManage.<init>(PlayerManage.java:11) at soren.mymdl.SorenMod.<init>(SorenMod.java:33) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at net.minecraftforge.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:131) at net.minecraftforge.fml.javafmlmod.FMLModContainer$$Lambda$1957/1324518852.accept(Unknown Source) at java.util.function.Consumer.lambda$andThen$0(Unknown Source) at java.util.function.Consumer$$Lambda$1956/1300011842.accept(Unknown Source) at java.util.function.Consumer.lambda$andThen$0(Unknown Source) at java.util.function.Consumer$$Lambda$1956/1300011842.accept(Unknown Source) at net.minecraftforge.fml.ModContainer.transitionState(ModContainer.java:112) at net.minecraftforge.fml.ModList.lambda$null$9(ModList.java:119) at net.minecraftforge.fml.ModList$$Lambda$2011/1533322181.accept(Unknown Source) at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source) at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) at java.util.stream.AbstractPipeline.copyInto(Unknown Source) at java.util.stream.ForEachOps$ForEachTask.compute(Unknown Source) at java.util.concurrent.CountedCompleter.exec(Unknown Source) at java.util.concurrent.ForkJoinTask.doExec(Unknown Source) at java.util.concurrent.ForkJoinTask.doInvoke(Unknown Source) at java.util.concurrent.ForkJoinTask.invoke(Unknown Source) at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(Unknown Source) at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(Unknown Source) at java.util.stream.AbstractPipeline.evaluate(Unknown Source) at java.util.stream.ReferencePipeline.forEach(Unknown Source) at java.util.stream.ReferencePipeline$Head.forEach(Unknown Source) at net.minecraftforge.fml.ModList.lambda$dispatchParallelEvent$10(ModList.java:119) at net.minecraftforge.fml.ModList$$Lambda$2009/1340737883.run(Unknown Source) at java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(Unknown Source) at java.util.concurrent.ForkJoinTask.doExec(Unknown Source) at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(Unknown Source) at java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source) And the Code: https://github.com/avphonix0/Minecraft-1.14.3/tree/master/src/main
  7. Why I receive this error in my new player renderer? FATAL ERROR in native method: Thread[modloading-worker-1,5,main]: No context is current or a function that is not available in the current context was called. The JVM will abort execution. My Handler: package soren.mymdl; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.player.AbstractClientPlayerEntity; import net.minecraftforge.client.event.RenderPlayerEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; public class PlayerManage { private final NewRenderer test = new NewRenderer(Minecraft.getInstance().getRenderManager()); @SubscribeEvent public void renderPlayerPre(RenderPlayerEvent.Pre event) { event.setCanceled(true); test.doRender((AbstractClientPlayerEntity) event.getEntity(), 1, 1, 1, 0.625F, 0.625F); } }
  8. I'm are new in modding, so is being hard to know what I need to reach to my custom render. Supposing that I start the mod now in the 1.14.3 (Forge 27025), and already canceled the player render. Main Mod Class: public SorenMod() { FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); MinecraftForge.EVENT_BUS.register(new PlayerManage()); } public class PlayerManage { @SubscribeEvent public void renderPlayerPre(RenderPlayerEvent.Pre event) { event.setCanceled(true); System.out.println("-- Cancel Model! --"); } } What classes I need to extend to customize and where and how I say to mod execute/fire that?
  9. I solved that. Have how I override one method from the class LayerBipedArmor? I what so much to include some fields inside the setModelVIsible switch(), 2 in case LEGS and 2 in case FEET: In the case, I only want to turn LEGS pants invisible. Have one simple way to make to the pants not appear when equipped? Thanks!
  10. Was only for share my doubts But now I have advanced a lot, think that now it go! Thanks to who helped me.
  11. After have build all, I are receiving these two errors in this RenderPlayer copy: If I comment this part and run the game, this crash when I try 3º person vision
  12. I found this example in web, would be like this with me too? public class RenderCustomPlayerEvent { RenderHoverClaws render = new RenderHoverClaws(Minecraft.getMinecraft().getRenderManager(), new ModelHoverClaws(), 1F); @Subscribe public void renderCustomPlayer(RenderPlayerEvent.Pre pre) { pre.setCanceled(true); render.doRender((EntityLiving) pre.getEntityLiving(), 0D, -1.625, 0D, 0F, 0.0625F); } }
  13. I'm now lost how do one new player rendering, how do to initialize one new with my changes? I want all equal to normal player, changing only he legs for an correct armor generation
  14. I'm passing for problems during the new model creation, with the extends and others... I made one copy of the ModelPlayer, ModelBiped and RenderPlayer to edit how i want, but I can't make this work. When I change the class names, appear some issue... Doing this looks be so hard.. : (
  15. Think I have each time understanding more over the forge... Let me try work a bit now whit you have taught to me. If I lock again, I ask Thanks a lot again s2
  16. One ask, is possible do to one player run one class/java and the other another? Example: Player 1 run ModelBiped_1.java Player 2 run ModelBiped_2.java (Both are equal, only with minor adjusts) I am asking it because after make the two in same class, the change no have effect in multiplayer... One see both normal, and other see both modified. public class ModelBipedAlt extends ModelBiped { private Map<EnumParts, List<ModelScaleRenderer>> map = new HashMap(); public ModelBipedAlt(float scale) { super(scale); this.bipedLeftArm = createScale(this.bipedLeftArm, EnumParts.ARM_LEFT); this.bipedRightArm = createScale(this.bipedRightArm, EnumParts.ARM_RIGHT); . . . if(Minecraft.getMinecraft().getSession().getUsername().contains("yRaposa")) { this.bipedLeftLeg.rotationPointZ = 3.0F; this.bipedRightLeg.rotationPointZ = 3.0F; System.out.println("RedArmor"); } Or have me forgot of anything?
  17. I receive null error only for try one RenderPlayerEvent public class RenderPlayerRed { @SubscribeEvent public void thisPlayer(RenderPlayerEvent event) { event.setCanceled(true); System.out.println("-- No more player! --"); } public void load(FMLPreInitializationEvent ev) { MinecraftForge.EVENT_BUS.register(new RenderPlayerRed());
  18. After be studying more, maybe I only need create some ifs in the ModelBiped with the forge way. How can I override/replace some functions in this class during all game run using forge? (I only replacing the base code for test and study how it works, but need to make this changes using forge) I need to create some ModelRenderes too, for my parts: .. public ModelrRenderer bipedRightLeg2; public ModelrRenderer bipedRightLegLow; and others .. Example (only part of the code, have more ifs() below) package net.minecraft.client.model; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.EnumHand; import net.minecraft.util.EnumHandSide; import net.minecraft.util.math.MathHelper; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class ModelBiped extends ModelBase { public ModelRenderer bipedHead; /** The Biped's Headwear. Used for the outer layer of player skins. */ public ModelRenderer bipedHeadwear; public ModelRenderer bipedBody; /** The Biped's Right Arm */ public ModelRenderer bipedRightArm; /** The Biped's Left Arm */ public ModelRenderer bipedLeftArm; /** The Biped's Right Leg */ public ModelRenderer bipedRightLeg; /** The Biped's Left Leg */ public ModelRenderer bipedLeftLeg; public ModelBiped.ArmPose leftArmPose; public ModelBiped.ArmPose rightArmPose; public boolean isSneak; // public ModelRenderer bipedRightLeg; public ModelRenderer bipedRightLeg2; public ModelRenderer bipedRightLeglow; // public ModelRenderer bipedLeftLeg; public ModelRenderer bipedLeftLeg2; public ModelRenderer bipedLeftLeglow; public ModelRenderer rightboot; public ModelRenderer leftboot; public ModelBiped() { this(0.0F); } public ModelBiped(float modelSize) { this(modelSize, 0.0F, 64, 32); } public ModelBiped(float modelSize, float p_i1149_2_, int textureWidthIn, int textureHeightIn) { this.leftArmPose = ModelBiped.ArmPose.EMPTY; this.rightArmPose = ModelBiped.ArmPose.EMPTY; this.textureWidth = textureWidthIn; this.textureHeight = textureHeightIn; this.bipedHead = new ModelRenderer(this, 0, 0); this.bipedHead.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, modelSize); this.bipedHead.setRotationPoint(0.0F, 0.0F + p_i1149_2_, 0.0F); this.bipedHeadwear = new ModelRenderer(this, 32, 0); this.bipedHeadwear.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, modelSize + 0.5F); this.bipedHeadwear.setRotationPoint(0.0F, 0.0F + p_i1149_2_, 0.0F); this.bipedBody = new ModelRenderer(this, 16, 16); this.bipedBody.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, modelSize); this.bipedBody.setRotationPoint(0.0F, 0.0F + p_i1149_2_, 0.0F); this.bipedRightArm = new ModelRenderer(this, 40, 16); this.bipedRightArm.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, modelSize); this.bipedRightArm.setRotationPoint(-5.0F, 2.0F + p_i1149_2_, 0.0F); this.bipedLeftArm = new ModelRenderer(this, 40, 16); this.bipedLeftArm.mirror = true; this.bipedLeftArm.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, modelSize); this.bipedLeftArm.setRotationPoint(5.0F, 2.0F + p_i1149_2_, 0.0F); if (!Minecraft.getMinecraft().getSession().getUsername().contains("yRaposa")) { // Not is me this.bipedRightLeg = new ModelRenderer(this, 0, 16); this.bipedRightLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, modelSize); this.bipedRightLeg.setRotationPoint(-1.9F, 12.0F + p_i1149_2_, 0.0F); this.bipedLeftLeg = new ModelRenderer(this, 0, 16); this.bipedLeftLeg.mirror = true; this.bipedLeftLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, modelSize); this.bipedLeftLeg.setRotationPoint(1.9F, 12.0F + p_i1149_2_, 0.0F); } // RED Armor // if (Minecraft.getMinecraft().getSession().getUsername().contains("yRaposa")) { // Is me // this.bipedRightLeg = new ModelRenderer(this, 20, 22); this.bipedRightLeg = new ModelRenderer(this, 40, 25); // this.bipedRightLeg.addBox(-2.25F, -0.53F, -2.23F, 5, 5, 5, modelSize + 0.01F); this.bipedRightLeg.addBox(-2.25F, -0.53F, -2.23F, 5, 5, 5, modelSize + 0.01F); this.bipedRightLeg.setRotationPoint(-1.99F, 10.0F, 0.01F); setRotation(this.bipedRightLeg, 0.25F, 0.0F, 0.0F); // this.bipedRightLeg2 = new ModelRenderer(this, 0, 16); this.bipedRightLeg2 = new ModelRenderer(this, 40, 25); this.bipedRightLeg2.addBox(-2.24F, -0.88F, -1.95F, 4, 5, 4, modelSize); this.bipedRightLeg2.setRotationPoint(0.0F, 4.3F, 0.0F); setRotation(this.bipedRightLeg2, 0.75F, 0.0F, 0.0F); this.bipedRightLeg.addChild(this.bipedRightLeg2); // this.bipedRightLeglow = new ModelRenderer(this, 0, 16); this.bipedRightLeglow = new ModelRenderer(this, 0, 16); // this.bipedRightLeglow.addBox(-2.25F, -2.025F, -4.025F, 4, 8, 4, modelSize); this.bipedRightLeglow.addBox(-2.25F, 1.0F, -4.025F, 4, 5, 4, modelSize); this.bipedRightLeglow.setRotationPoint(0.0F, 5.0F, 0.0F); setRotation(this.bipedRightLeglow, -1.25F, 0.0F, 0.0F); this.bipedRightLeg2.addChild(this.bipedRightLeglow); /* this.rightdetail = new ModelRenderer(this, 0, 20); this.rightdetail.addBox(0.0F, 0.0F, 0.0F, 1, 1, 5, modelSize - 0.001F); this.rightdetail.setRotationPoint(1.75F, 3.5F, -2.25F); setRotation(this.rightdetail, 0.0F, 0.0F, 0.0F); this.bipedRightLeg.addChild(this.rightdetail); */ // this.bipedLeftLeg = new ModelRenderer(this, 20, 22); this.bipedLeftLeg = new ModelRenderer(this, 40, 25); this.bipedLeftLeg.mirror = true; // this.bipedLeftLeg.addBox(-2.75F, -0.53F, -2.23F, 5, 5, 5, modelSize + 0.01F); this.bipedLeftLeg.addBox(-2.75F, -0.53F, -2.23F, 5, 5, 5, modelSize + 0.01F); this.bipedLeftLeg.setRotationPoint(2.01F, 10.0F, 0.0F); setRotation(this.bipedLeftLeg, 0.25F, 0.0F, 0.0F); // this.bipedLeftLeg2 = new ModelRenderer(this, 0, 16); this.bipedLeftLeg2 = new ModelRenderer(this, 40, 25); this.bipedLeftLeg2.mirror = true; this.bipedLeftLeg2.addBox(-1.76F, -0.88F, -1.95F, 4, 5, 4, modelSize); this.bipedLeftLeg2.setRotationPoint(0.0F, 4.3F, 0.0F); setRotation(this.bipedLeftLeg2, 0.75F, 0.0F, 0.0F); this.bipedLeftLeg.addChild(this.bipedLeftLeg2); // this.bipedLeftLeglow = new ModelRenderer(this, 0, 16); this.bipedLeftLeglow = new ModelRenderer(this, 0, 16); this.bipedLeftLeglow.mirror = true; // this.bipedLeftLeglow.addBox(-1.75F, -2.025F, -4.025F, 4, 8, 4, modelSize); this.bipedLeftLeglow.addBox(-1.75F, 1.0F, -4.025F, 4, 5, 4, modelSize); this.bipedLeftLeglow.setRotationPoint(0.0F, 5.0F, 0.0F); setRotation(this.bipedLeftLeglow, -1.25F, 0.0F, 0.0F); this.bipedLeftLeg2.addChild(this.bipedLeftLeglow); /* this.leftdetail = new ModelRenderer(this, 0, 20); this.leftdetail.mirror = true; this.leftdetail.addBox(0.0F, 0.0F, 0.0F, 1, 1, 5, modelSize - 0.001F); this.leftdetail.setRotationPoint(-2.75F, 3.5F, -2.25F); setRotation(this.leftdetail, 0.0F, 0.0F, 0.0F); this.bipedLeftLeg.addChild(this.leftdetail); */ this.rightboot = new ModelRenderer(this, 0, 16); this.rightboot.addBox(-2.25F, 1.75F, 2.85F, 4, 10, 4, modelSize + 0.01F); this.rightboot.setRotationPoint(-2.0F, 10.0F, 0.01F); setRotation(this.rightboot, -0.25F, 0.0F, 0.0F); this.leftboot = new ModelRenderer(this, 0, 16); this.leftboot.mirror = true; this.leftboot.addBox(-1.75F, 1.75F, 2.85F, 4, 10, 4, modelSize + 0.01F); this.leftboot.setRotationPoint(2.0F, 10.0F, 0.0F); setRotation(this.leftboot, -0.25F, 0.0F, 0.0F); this.bipedLeftLeg.showModel = false; this.bipedRightLeg.showModel = false; this.leftboot.showModel = false; this.rightboot.showModel = false; } // ------ // } /** * Sets the models various rotation angles then renders the model. */ public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale) { this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale, entityIn); GlStateManager.pushMatrix(); if (this.isChild) { float f = 2.0F; GlStateManager.scale(0.75F, 0.75F, 0.75F); GlStateManager.translate(0.0F, 16.0F * scale, 0.0F); this.bipedHead.render(scale); GlStateManager.popMatrix(); GlStateManager.pushMatrix(); GlStateManager.scale(0.5F, 0.5F, 0.5F); GlStateManager.translate(0.0F, 24.0F * scale, 0.0F); this.bipedBody.render(scale); this.bipedRightArm.render(scale); this.bipedLeftArm.render(scale); if (!Minecraft.getMinecraft().getSession().getUsername().contains("yRaposa")) { // Not is me this.bipedRightLeg.render(scale); this.bipedLeftLeg.render(scale); } this.bipedHeadwear.render(scale); if (Minecraft.getMinecraft().getSession().getUsername().contains("yRaposa")) { // Is me this.bipedRightLeg.render(scale); this.bipedLeftLeg.render(scale); this.rightboot.render(scale); this.leftboot.render(scale); } } else { if (entityIn.isSneaking()) { GlStateManager.translate(0.0F, 0.2F, 0.0F); } this.bipedHead.render(scale); this.bipedBody.render(scale); this.bipedRightArm.render(scale); this.bipedLeftArm.render(scale); if (!Minecraft.getMinecraft().getSession().getUsername().contains("yRaposa")) { // Not is me this.bipedRightLeg.render(scale); this.bipedLeftLeg.render(scale); } this.bipedHeadwear.render(scale); if (Minecraft.getMinecraft().getSession().getUsername().contains("yRaposa")) { // Is me this.bipedRightLeg.render(scale); this.bipedLeftLeg.render(scale); this.rightboot.render(scale); this.leftboot.render(scale); } } GlStateManager.popMatrix(); }
  19. Hi, How can I simulate that have added new parts to ModelBiped and edited the switch from LayerBipedArmor only with forge events? And the code come in the same handler that have canceled the first? Thanks
  20. Sorry again.. Is because I don't know how say exactly, is a lot hard without one base and few knowledge. For example, when I cancel the PlayerRender even, what I do call one custom? For the same way? (creating another BUS or @SubscribeEvent). How I say to the program run one new class?
  21. Think that to solve this mod,maybe I have two options: 1º> |- Create one complete ModelBiped.java to my character; |- Maybe create one copy of LayerBipedArmor.java or override the original CASE/SWITCH, case I add more parts to my character legs/boots; |- Cancel vanilla RenderPlayer.java or say to it open a CustomLayerBipedArmor.java to use in player when it is me; |- Make, I don't know how yet, to render my CustomModelBiped.java when it is me. or.. 2º> |- Only edit the base ModelBiped.java restricting my and vanilla parts building with some ifs(), getting my name with Minecraft.getMinecraft().getSession().getUsername(). and trying to adjust the feet layer (that is different in the first try, because armor texture mapping limitations). Have you one trigger to offer for me? Thanks to be patient and for trying to help!
  22. Hi, For my learning, I copied the first example event, creating one class called MyForgeEventHandler.java in any package of my mod, but nothing happen in the game/console when I pick one item... how if it not existing: package soren.skinmod.util; import net.minecraftforge.event.entity.player.EntityItemPickupEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; public class MyForgeEventHandler { @SubscribeEvent public void pickupItem(EntityItemPickupEvent event) { System.out.println("Item picked up! -- Edited"); } } These types of events need to be in one specific classe/method like in main class? .... public void load(FMLPreInitializationEvent event) { MinecraftForge.EVENT_BUS.register(new MyForgeEventHandler()); .... Thanks
  23. Please, can you make one little example that how cancel the render event and one reflection? I'm beginner in forge.. Or share one source example that contains both of this for i could study to learn more Thanks
×
×
  • Create New...

Important Information

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