Jump to content

FireIsH0t

Members
  • Posts

    57
  • Joined

  • Last visited

Everything posted by FireIsH0t

  1. Possible to create obj model that doesn't follow the uv bounds? 0-1
  2. Hey I was wondering how I could get one of my items/gun to be able to render 2 hands on the screen so the player can look and them and it will look very cool and awesome. I want to do something similar to this: http://prntscr.com/lltq7r But I have no idea on were to start.
  3. Alright good morning, I am back. @SubscribeEvent public static void onSounds(PlaySoundEvent event) { event.setResultSound(null); } I try this and it does disable ALL the sounds like every one but it disables my sounds to that I put into the mod.
  4. Alright I got this in my eventhandler class: @SubscribeEvent public static void onSounds(PlaySoundEvent event) { } but I don't know what to do next to disable the sounds
  5. if (!playingMenuMusic) { /** * Location, volume?, pitch, ? , ?, ? * */ mc.getSoundHandler().playSound(backgroundMusic); playingMenuMusic = true; } So I have my new main menu music on the gui that I have replaced and it works. You can hear the new music but the issue is were that the regular minecraft music you can still hear in the background so like both are on. How could I disable the minecraft music?
  6. https://github.com/Ugachaga/AdventureBackpack
  7. package net.arsenalnetwork.arsenalmod.client.gui; import net.arsenalnetwork.arsenalmod.ArsenalMod; import net.arsenalnetwork.arsenalmod.util.ArsenalUtils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; public class ArsenalFadeGui extends GuiScreen { private float fade = 0.0F; private int timer = 60; public void drawScreen(int x, int y, float ticks) { if(timer >= 0) { timer--; if (this.fade < 1.0F) { this.fade += 0.03F; } } else { this.mc.displayGuiScreen(new ArsenalMainMenu()); } ArsenalUtils.drawBackground(0,0,new ResourceLocation(ArsenalMod.MODID, "textures/gui/fade/FadeBackground.png"),this.width,this.height); drawTexturedModalRect(this.width / 2 - 125, this.height / 2 - 75, 250.0D, 150.0D, "arsenal:textures/gui/fade/ArsenalLogo.png"); super.drawScreen(x, y, y); } public void drawTexturedModalRect(double x, double y, double width, double height, String location) { GL11.glPushMatrix(); GL11.glEnable(3042); GL11.glColor4f(1.0F, 1.0F, 1.0F, this.fade); Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(location)); final Tessellator tessellator = Tessellator.getInstance(); GlStateManager.enableBlend(); final BufferBuilder buffer = tessellator.getBuffer(); buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR); buffer.pos(x, y + height, 0.0).tex(0.0, 1.0).color(255, 255, 255, 255).endVertex(); buffer.pos(x + width, y + height, 0.0).tex(1.0, 1.0).color(255, 255, 255, 255).endVertex(); buffer.pos(x + width, y, 0.0).tex(1.0, 0.0).color(255, 255, 255, 255).endVertex(); buffer.pos(x, y, 0.0).tex(0.0, 0.0).color(255, 255, 255, 255).endVertex(); tessellator.draw(); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glPopMatrix(); } } Hello, I am trying to get my fade gui to work but it isnt. What is this fade gui? When your client loads up before it goes to the main menu gui it shows a image of the logo and then fades to the main menu
  8. well I tried looking at the code and doing something simular
  9. and the text still doesn't show yay
  10. package net.arsenalnetwork.arsenalmod.client; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.Gui; import net.minecraftforge.client.event.RenderGameOverlayEvent; public class MessageGui extends Gui { public static final int WHITE = 0xFFFFFFFF; private static String text = "Test"; private FontRenderer fontRenderer; public RenderGameOverlayEvent.ElementType getType() { return type; } private final RenderGameOverlayEvent.ElementType type; private void vertifyRenderer() { if (fontRenderer != null) return; Minecraft minecraft = Minecraft.getMinecraft(); fontRenderer = minecraft.fontRenderer; } public MessageGui(RenderGameOverlayEvent.ElementType type) { vertifyRenderer(); fontRenderer.drawString(text, 10, 20, WHITE, false); this.type = type; } } So far thats what I got
  11. Alright. Please don't make fun of me lol but if you already don't know i'm new to coding in java. But could you go in more detail on what you mean by: RenderGameOverlayEvent#getType specifically by the # in that.
  12. how could I do that?
  13. Hey sorry I figured it out for the color but not I changed the topic but it doesnt want to run
  14. package net.arsenalnetwork.arsenalmod.client; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.Gui; import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; public class MessageGui extends Gui { public static final int WHITE = 0xFFFFFFFF; private static String text = "Test"; private FontRenderer fontRenderer; private void vertifyRenderer() { if (fontRenderer != null) return; Minecraft minecraft = Minecraft.getMinecraft(); fontRenderer = minecraft.fontRenderer; } @SubscribeEvent public void render(RenderGameOverlayEvent.Post event) { vertifyRenderer(); fontRenderer.drawString(text, 10, 20, WHITE, false); } } Im trying to do and event to draw a text on the HUD. But when i hop in my world it doesnt show the text
  15. is there any tutorials on this or something? I cant figure out how to do it
  16. could you help me with doing those? Im new to coding
  17. yeah I didn't create a method but im trying to make my block be able to rotate like an anvil instead of it just being in one position
  18. Im currently trying to get enum facing to work on my BlockBase My Code: package net.arsenalnetwork.arsenalmod.blocks; import net.arsenalnetwork.arsenalmod.ArsenalMod; import net.arsenalnetwork.arsenalmod.init.ModBlocks; import net.arsenalnetwork.arsenalmod.init.ModItems; import net.arsenalnetwork.arsenalmod.util.IHasModel; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class BlockBase extends Block implements IHasModel { public BlockBase(String name, Material material) { super(material); setUnlocalizedName(name); setRegistryName(name); setCreativeTab(ArsenalMod.tabprops); ModBlocks.BLOCKS.add(this); ModItems.ITEMS.add(new ItemBlock(this).setRegistryName(this.getRegistryName())); } @Override public void registerModels() { ArsenalMod.proxy.registerItemRenderer(Item.getItemFromBlock(this), 0, "inventory"); } public void onItemUse(EntityPlayer player, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { IBlockState iblockstate = worldIn.getBlockState(pos); Block block = iblockstate.getBlock(); if (!block.isReplaceable(worldIn, pos)) { pos = pos.offset(facing); } } }
  19. Going to do that now
  20. the zombies still burn in day light
  21. package net.arsenalnetwork.arsenalmod.client.entities; import net.minecraft.entity.monster.EntityZombie; import net.minecraft.world.World; public class Zombies extends EntityZombie { //Constructor public Zombies(World worldIn) { super(worldIn); } @Override protected boolean shouldBurnInDay() { return false; } }
  22. Im just trying to change shoutBurnInDay to false
×
×
  • Create New...

Important Information

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