Jump to content

cleardragonf

Members
  • Posts

    22
  • Joined

  • Last visited

Everything posted by cleardragonf

  1. just a heads up....found a way around the overlay issue. if you want... public class customGUI { public static final Minecraft mc = Minecraft.getInstance(); public static void drawModalRectWithCustomSizedTexture(double leftSideX, double rightSideX, double bottomY, double topY, ResourceLocation texture) { GlStateManager.disableDepthTest(); GlStateManager.depthMask(false); GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO); GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.disableAlphaTest(); mc.getTextureManager().bindTexture(texture); Tessellator tessellator = Tessellator.getInstance(); BufferBuilder bufferbuilder = tessellator.getBuffer(); bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX); //botlef bufferbuilder.pos(0.0D, (double)mc.mainWindow.getScaledHeight(), -90.0D).tex(0.0D, 1.0D).endVertex(); bufferbuilder.pos(leftSideX, bottomY, -90.0D).tex(0.0D, 1.0D).endVertex(); //botr bufferbuilder.pos((double)mc.mainWindow.getScaledWidth(), (double)mc.mainWindow.getScaledHeight(), -90.0D).tex(1.0D, 1.0D).endVertex(); bufferbuilder.pos(rightSideX, bottomY, -90.0D).tex(1.0D, 1.0D).endVertex(); //topr bufferbuilder.pos((double)mc.mainWindow.getScaledWidth(), 0.0D, -90.0D).tex(1.0D, 0.0D).endVertex(); bufferbuilder.pos(rightSideX, topY, -90.0D).tex(1.0D, 0.0D).endVertex(); //topl bufferbuilder.pos(0.0D, 0.0D, -90.0D).tex(0.0D, 0.0D).endVertex(); bufferbuilder.pos(leftSideX, topY, -90.0D).tex(0.0D, 0.0D).endVertex(); tessellator.draw(); GlStateManager.depthMask(true); GlStateManager.enableDepthTest(); GlStateManager.enableAlphaTest(); GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); } } make this a class...then call it from where ever you want...works for me on a 128 *29 image.
  2. yea...i notice that...but ContainerScreen in 1.14.3 functions the way most people are use to...ie custom size capabilities...
  3. RIGHT?! Please let me know as I to have a Post up about this...the only way i was able to get mine to work was by making it 256 * 256 which is counter countuitive
  4. So i'm having an issue when i'm rendering a GRaphic into my game via a mod for the overlays....the image is 256x128...however when i do a mc.ingameGUI.blit(5,5,0,0,256,128)...the bottom of the image keeps being cut off....WHY? with containers when i place the size it is the size of the image...so why is that not working for this overlay??? any help is appreciated. here's the classes AsuraMagicaMod.java Temperature.java
  5. So I have a Entity Designed that i want to pass to it another Blocks POS. I know i could do this by doing a search in the tick portion of the block...but instead i want to pass to it when someone leftClicks with a specific tool in their hand on the target and right clicks on the Entity with the tool...then i wasnt to pass an instance of that block into the container of my TileEntity so that i can start removing stuff from it...can someone point me in the right direction? thanks. WardEnscriber- Class used to left click on the Mana_Stone block that houses the Mana_StoneTile class and get an instance of such. V Mana_Stone - Class that hosts the Mana_StoneTile Class...i want to get the instance of this block and store it in memory of an instance of the WardEnscriber... WardEnscriber - the tool Class used to right click...and depart the instance of a Mana_StoneTile into the MCM_Tile class. V MCM_Block Class...the block that hosts the MCM_Tile Class... I want to right click on this and send the Value stored in the WardEnscriber into the TileEntity Class https://github.com/Cleardragonf/AsuraMagica
  6. Yea after being explained what was going on by another...i realized that Two would be the way to go for this mod....as the energy inside would only SEEM to be energy...and wouldn't be used for any other mod at this time, eventually I'd create a converter block or system that would turn them into other mod's energy. But honestly this is more of a 'magical energy' system...and shouldn't be used by other mods...though i suppose it could. Thank you for taking the time to recommend these things and point out some of the setup issues i had! I'm glad you took the time.
  7. Just to add on...As I too used McJty to get a better feel for Custom GUIs...they work. the big difference for is that now in 1.14.3 we use .blitz to 'place' the image foreground and background.
  8. Hi So i've been trying to add a second and third energy to the same block....and i've hit a snag with not not being able to get the energy to be non static PER block placement...but i also need them to be static so that i can pass the Energy into the Screen to increase Bar Progress and Energy Status....Here's my git...Any help with figuring out HOW to Intialize Mana_StoneTile.java would be a major help...I know i need an instant of it...and probably some other things...but i can't figure out how... Thanks. https://github.com/Cleardragonf/AsuraMagica.git
  9. mmm perfect i'll take a look at this over the week and try with it....thanks!
  10. Hello So I'm trying to figure out how to put in a Custom BAR that'll be for say Mana. I've looked around and haven't found a single document or tutorial on this. I don't wanna use the BOSS BAR i wanna MAKE my own sorta like how Draconic Evolution has their Custom GUI interface?
  11. Hello, I'm quite new at the whole Minecraft modding aspect and would like to make some custom blocks that need custom looks....can someone please tell me how I create a gui that i'm guessing would be called when a player right clicks on the designated block?
  12. https://github.com/Cleardragonf/AsuraMagica/tree/master/src/main/resources/assets/asuramagica
  13. hahahaha isn't that the Greatest Question? So I've never modded before and there's very few tutorials on it. So what i'm trying to do is create an Item...and a Custom Tab...not one that already Exists. and place them into the game....here's what i have so far..but...i don't know if it's not displaying the stone because there's no tab or inventory or what...so i'm trying to figure out how to render and register the item... modid-1.0.jar
  14. What did ModelLoader.setCustomResourceLocation change to in 1.13?
  15. hmmm perfect Explanation...i just didn't like the Tab cause at first glace...it didn't support individual items...but...i can make a Tag for arrows? yes? in a json? i'll have to look into that in the future. Thank you for taking the time to explain
  16. hmmm yea i didn't know that...my java is very basic and i've had .toString() == "asdf" work before in pure java...so i'll use the Equals() Thanks. lol cause i'm learning i'm overwritten the same method over and over. I'm learning to do things like i say...this is my first time ever getting into modding for minecraft...so i'm trying different things to understand the code a bit better and logic. Could you explain why I would use Tag vs checking the name of an item? the reason i'm doing the name of an item is because once i figure out how to make items i may want to do things based upon picking that item up.
  17. Hello So I run the below code @SubscribeEvent public void arrowNocked(PlayerEvent.ItemPickupEvent event) { if(event.getStack().getItem().getDisplayName(null).getUnformattedComponentText().toString() =="Arrow"){ logger.error(event.getPlayer().getName().getFormattedText()+ " has collected a Diamond at" + event.getPlayer().getPosition()); }else{ logger.warn("Hmm Doesn't seem to be working at all" + event.getStack().getItem().getDisplayName(null).getUnformattedComponentText().toString()); } } However I get the below result Could Someone Please Explain Why it keeps going to the else? when i pick up an Arrow?
  18. So I'm trying to get started and looking at creating a Tab for the creative menu....to start placing items...but there's not many tutorials that explains this...can someone please explain how to set up a creative tab?
  19. Thanks that solved it. I'm still trying to figure out the whole server side client side portion....but i understood that i just simply needed to add a @SubscribedEvent to make 'Thanks' appear.
  20. So i've just started modding minecraft as i'm more use to sponge so i'm trying to piece things together...can someone explain why @Mod("asuramagica") public class Main { public static Main instance; public static String modid = "asuramagica"; private static final Logger logger = LogManager.getLogger(modid); public Main() { instance = this; FMLJavaModLoadingContext.get().getModEventBus().addListener(this::arrowNocked); FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); FMLJavaModLoadingContext.get().getModEventBus().addListener(this::clientRegistries); MinecraftForge.EVENT_BUS.register(this); } public void arrowNocked(PlayerEvent.PlayerLoggedInEvent event) { System.out.println("Testing"); } private static void init(final FMLServerAboutToStartEvent event){ } private void setup(final FMLCommonSetupEvent event){ logger.info("Setup method registered."); } private void clientRegistries(final FMLClientSetupEvent event){ logger.info("clientRegistries method registered."); } } is not pushing out Testing to the console....when a Player joins the server? i've tried both this way and @Mod("asuramagica") public class Main { public static Main instance; public static String modid = "asuramagica"; private static final Logger logger = LogManager.getLogger(modid); public Main() { instance = this; FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); FMLJavaModLoadingContext.get().getModEventBus().addListener(this::clientRegistries); MinecraftForge.EVENT_BUS.register(this); } @SubscribedEvent public static void arrowNocked(PlayerEvent.PlayerLoggedInEvent event) { System.out.println("Testing"); } private static void init(final FMLServerAboutToStartEvent event){ } private void setup(final FMLCommonSetupEvent event){ logger.info("Setup method registered."); } private void clientRegistries(final FMLClientSetupEvent event){ logger.info("clientRegistries method registered."); } }
×
×
  • Create New...

Important Information

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