Jump to content

Large rectangle appears when entity shot?


Fruitsalid

Recommended Posts

you would have to 1 change the entity size and 2 make a renderer (like i said earlier). EntityThrowable will always be rendered in a way that will make them look like the image is facing the player, if you want to have more realistic bullet you're gonna have to make a class extends Render and register it in your client proxy

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Link to comment
Share on other sites

<troll> pic or it didnt happen </troll>

 

no no just kidding, but srly can we have some pic / video so we can understand whats going on

 

because since you are usign a renderer, the problem can now be anything, maybe its you graphic card, maybe your opengl 1 setting are in an odd state causing this effect etc etc

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Link to comment
Share on other sites

It seems to appear on random living entities

It : the visual problem ?  as like, randomly cows will start flickering/changing color or wtv is it that your visual bug do ?

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Link to comment
Share on other sites

public class RenderLaser extends Render
{
int red = 200;
int green = 40;
int blue = 40;
int alpha = 250;

@Override
public void doRender(Entity entity, double d0, double d1, double d2, float f, float f1)
{
	this.func_110777_b(entity);
	GL11.glPushMatrix();
	GL11.glDisable(GL11.GL_TEXTURE_2D);
	GL11.glDisable(GL11.GL_LIGHTING);
	GL11.glEnable(GL11.GL_BLEND);
	GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
	GL11.glEnable(GL12.GL_RESCALE_NORMAL);
	GL11.glTranslatef((float)d0, (float)d1, (float)d2);
	GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * f1 - 90.0F, 0.0F, 1.0F, 0.0F);
	GL11.glRotatef(entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * f1, 0.0F, 0.0F, 1.0F);
	Tessellator tessellator = Tessellator.instance;
	tessellator.setColorRGBA(red, green, blue, alpha);
	byte b0 = 0;
	float f2 = 0.0F;
	float f3 = 0.5F;
	float f4 = (float)(0 + b0 * 10) / 32.0F;
	float f5 = (float)(5 + b0 * 10) / 32.0F;
	float f6 = 0.0F;
	float f7 = 0.15625F;
	float f8 = (float)(5 + b0 * 10) / 32.0F;
	float f9 = (float)(10 + b0 * 10) / 32.0F;
	float f10 = 0.05625F;
	GL11.glEnable(GL12.GL_RESCALE_NORMAL);

	GL11.glRotatef(45.0F, 1.0F, 0.0F, 0.0F);
	GL11.glScalef(f10, f10, f10);
	GL11.glTranslatef(-4.0F, 0.0F, 0.0F);
	GL11.glNormal3f(f10, 0.0F, 0.0F);

	for (int i = 0; i < 4; ++i)
	{
		GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
		GL11.glNormal3f(0.0F, 0.0F, f10);
		tessellator.startDrawingQuads();
		tessellator.setColorRGBA(red, green, blue, alpha);
		tessellator.addVertex(-8.0D, -2.0D, 0.0D);
		tessellator.addVertex(8.0D, -2.0D, 0.0D);
		tessellator.addVertex(8.0D, 2.0D, 0.0D);
		tessellator.addVertex(-8.0D, 2.0D, 0.0D);
		tessellator.draw();
	}

	GL11.glDisable(GL11.GL_BLEND);
	GL11.glEnable(GL11.GL_LIGHTING);
	GL11.glEnable(GL11.GL_TEXTURE_2D);

	GL11.glDisable(GL12.GL_RESCALE_NORMAL);
	GL11.glPopMatrix();
}

@Override
protected ResourceLocation func_110775_a(Entity entity)
{
	return null;
}
}

Link to comment
Share on other sites

ok, well 2 things, either this code is copy pasted, either you name your variable in very weird ways (f1, f2, f3, f4, f5, f6) in either case im not suuure exactly where the problem is because im not sure hat youre trying to do but honestly by looking at the code it seems that the picture is doign EXACTLY what you asked it to do...

 

tessellator.addVertex(-8.0D, -2.0D, 0.0D);
		tessellator.addVertex(8.0D, -2.0D, 0.0D);
		tessellator.addVertex(8.0D, 2.0D, 0.0D);
		tessellator.addVertex(-8.0D, 2.0D, 0.0D);

^ this is a pretty big rectangle actually

 

GL11.glDisable(GL11.GL_TEXTURE_2D);
	GL11.glDisable(GL11.GL_LIGHTING);
	GL11.glEnable(GL11.GL_BLEND);

 

^ blending is enabled so you expect your bolt to be transparent, texture2D are DISABLED, so no image on your bullets and lighting disabled... result may vary since its LWJGL and opengl1

 

i would try to play with glEnable/glDisable those 3 thing above.

other then that, if you want to play if safe, remove a MAX ammount of code and add little by little

 

and hum ..... if you dont know what the code is doing ... try understanding first ... usually copy paste dont get prople very far ..... sorry if its mean :\

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

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

    • https://mclo.gs/iVJZfGm https://privatebin.net/?442243857e9dcaca#5MhV8JAuhNJnN587jbG2pcVQi8VnvgAVafmpAd6Gnv91
    • So im making a mod for minecraft and i want to add custom fishing rods... aka fishing rods with different bait, depending on the bait you can have a higher chance of getting other fish. I want to make basically custom fishing rods with at least one custom loot table for each (so that i can choose which fish have a higher chance of being caught in a simpler way with said loot table) Problem is i dont know even where to start with doing this, like at all. Im very beginner with modding minecraft, any help (links to any source which could help me with this is also very helpful) would be great. 1.20 forge(of course)
    • Hi, my name is Gatis. Mostly all I do is play minecraft on Hypixel server. I play Skyblock where almost every player has installed QOL mods. They are nice and work nice but recently the grind I'm on requires not wasting time on boosts and if I'm watching something I usually miss it. Let me explain better. So there is "Mining speed boost" when it's ready message appears in chat. Mod I've been using allows to copy chat message, paste it in mod and next time same message appears it flashes big notification message on screen that speed boost is ready. The thing is somehow I still miss the notification. SO, I want to create mod that can detect that message and make more noticable notification (ex. bigger) or even stop me from moving for 10 sec if I don't use it instantly. I have no knowledge about java I have prepared intellij with forge on 1.8.9 I'm just left with this:                 package com.example.examplemod;                  import net.minecraft.init.Blocks;                import net.minecraftforge.fml.common.Mod;                import net.minecraftforge.fml.common.Mod.EventHandler;                import net.minecraftforge.fml.common.event.FMLInitializationEvent;                 @Mod(modid = ExampleMod.MODID, version = ExampleMod.VERSION)               public class GatisMOD              {                           public static final String MODID = "GatisMOD"; \                           public static final String VERSION = "1.0";                            @EventHandler                          public void init(FMLInitializationEvent event)                          {                                      // some example code                                      System.out.println("DIRT BLOCK >> "+Blocks.dirt.getUnlocalizedName());                          } }     I've watched many video, mostly they show how to setup everything but how to create, prepare file and later (export I guess) export to import in mods folder to use they don't I'd appreciate any help, maybe someone would explain some things to me. In future I have plans to make other feature but I guess not for now.
    • I don't think embeddium and rubidium can be used together. Try removing one of them.
    • I have been attempting to troubleshoot my personal modpack created on Curseforge for 1.18.2 Forge but I keep getting the Exit Code: 1 crash upon launching the game. When I open the debug.log I find the error for "Duplicate mods found" which simply isn't the case as there isn't a single mod with the same name. Most files are for the correct version as far as I can tell so I think there may be mods that are conflicting and the game is confusing them as "Duplicates". (Or I simply didn't check the versions correctly. Debug.log file paste: https://paste.ee/p/pQwZo#s=0 I don't normally frequent forums and don't normally ask for help online but guidance would be greatly appreciated. I can provide any other info needed  
  • Topics

×
×
  • Create New...

Important Information

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