After a long hiatus, I am pleased to announce that (after some urging from my roommate) I am continuing to work on this mod again, after which I will (hopefully) be updating it to newer minecraft versions
i made a custom furnace, and the background gui draws properly. the slots draw properly. items go in, items go out. things burn. everything works fine except for when i try to draw the progress bars. my progress bar is drawing based not on the time left to cook the item, but based on how long the fuel can burn for, and its drawing the entire rectangle that my overlay is in. so it draws the overlay, yes, but it doesnt exclude the rest of the line.
my gui texture is set like so: (orange is gui, green is fuel bar, blue is progress bar)
aaaaaaaaa
bbbbbbbbb
ccccccc
dddddd
but instead of drawing aaa for the fuel, it draws the entire line (aaaaaaaaa)
same for the progress, it draws bbbbbbbbb instead of bbb
heres the code in my guiFurnace class regarding the drawing of the background:
@Override
protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3) {
GL11.glColor4f(1F, 1F, 1F, 1F);
Minecraft.getMinecraft().getTextureManager().bindTexture(bground);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
if (this.shadowFurnace.isBurning()) {
int k = this.shadowFurnace.getBurnTimeRemainingScaled(40);
int j = 40 - k;
drawTexturedModalRect(guiLeft + 29, guiTop + 65, 176, 0, 40 - j, 10);
}
int k = this.shadowFurnace.getCookProgressScaled(24);
drawTexturedModalRect(guiLeft + 79, guiTop + 34, 176, 10, k + 1, 16);
}
}
and heres the code in my containerFurnace regarding the progress bar:
and what about removing recipes? i know that having the same recipe in my mod will make minecraft use my recipe instead, but what if i just dont want the recipe to exist? would i just return null for the output?
So I know its possible, because there are a couple of mods that do this, but how would I go about tweaking vanilla methods without relying on a 3rd party mod. so for example, change it so you cant punch wood, or that beds will blow up in the overworld. Basically how do i modify the vanilla block's properties in my own mod. I was thinking of making classes that just extend the certain block i want to change and using @Overrides on the things i want to change, but I don't know if that would work. oh and, removing/overriding minecraft recipes too.
i copied the onBlockActivated code from minecraft crafting table, but now the gui flickers on and off real quick, like it closes the gui as soon as its opened,and this only happens once, any subsequent times and the cursor will flicker, but no gui.
Okay so after a while i figured out myself how to make a model, but then when i imported the textures some parts of it were using the same texture and i had the sides using the same texture as the legs and i just got this really wierd texture. if anyone could help me and tell me whats going on that'd be appreciated
Right now I just have the first recipe with the extended code, and it just worked for every other recipe, i don't really know why, but right now thats not important since it doesn't have any metadata/NBT attached to it, since i dont really understand those. i did notice that if i went into NEI, enchanted it (giving it a NBT), then used it in the recipe, it basically reset the enchant (removed the NBT) and it was a regular stone again, but still functioned like it did previously, so i can understand what you mean by it will return a new itemstack with no NBT, not the original itemstack with the NBT.
0
After a long hiatus, I am pleased to announce that (after some urging from my roommate) I am continuing to work on this mod again, after which I will (hopefully) be updating it to newer minecraft versions
0
im pretty available right now so ill get started on it soon. probably y next wednesday i'll have something
0
@OP, download back in slime for the slime blocks, i'll try and find/make some mods that fill the rest.
0
accepted.
0
I'm at a wall with my mods, so i have quite a bit of free time right now, i'd be happy to help with the textures.
0
i made a custom furnace, and the background gui draws properly. the slots draw properly. items go in, items go out. things burn. everything works fine except for when i try to draw the progress bars. my progress bar is drawing based not on the time left to cook the item, but based on how long the fuel can burn for, and its drawing the entire rectangle that my overlay is in. so it draws the overlay, yes, but it doesnt exclude the rest of the line.
my gui texture is set like so: (orange is gui, green is fuel bar, blue is progress bar)
aaaaaaaaa
bbbbbbbbb
ccccccc
dddddd
but instead of drawing aaa for the fuel, it draws the entire line (aaaaaaaaa)
same for the progress, it draws bbbbbbbbb instead of bbb
heres the code in my guiFurnace class regarding the drawing of the background:
and heres the code in my containerFurnace regarding the progress bar:
any help you can offer is appreciated, since this is seriously annoying.
0
and what about removing recipes? i know that having the same recipe in my mod will make minecraft use my recipe instead, but what if i just dont want the recipe to exist? would i just return null for the output?
0
So I know its possible, because there are a couple of mods that do this, but how would I go about tweaking vanilla methods without relying on a 3rd party mod. so for example, change it so you cant punch wood, or that beds will blow up in the overworld. Basically how do i modify the vanilla block's properties in my own mod. I was thinking of making classes that just extend the certain block i want to change and using @Overrides on the things i want to change, but I don't know if that would work. oh and, removing/overriding minecraft recipes too.
0
yeah that worked. (-_(\ the exact thing i saw and thought i didnt need. thanks.
0
i copied the onBlockActivated code from minecraft crafting table, but now the gui flickers on and off real quick, like it closes the gui as soon as its opened,and this only happens once, any subsequent times and the cursor will flicker, but no gui.
0
i just checked mc, theres no BlockPos class in net.minecraft.util
along with no
net.minecraft.world.IInteractionObject
net.minecraft.block.state.IBlockState
net.minecraft.util.EnumWorldBlockLayer
either.
0
I want to have two ores spawn in the nether, but they arent
The ore set to spawn in the overworld works fine though?
Mod WorldGen class:
and the Main Class's section where i call all the methods that need to be called during init:
public void init(FMLInitializationEvent event){
GameRegistry.registerWorldGenerator(new ALCWorldGen(), 0);
LogHelper.info("Initialization Complete");
}
I also added GameRegistry.registerWorldGenerator(new ALCWorldGen(), -1); to this and that did nothing either.
0
Basically the title, i need help getting a custom crafting gui to appear on my custom crafting table when i right click it.
0
Okay so after a while i figured out myself how to make a model, but then when i imported the textures some parts of it were using the same texture and i had the sides using the same texture as the legs and i just got this really wierd texture. if anyone could help me and tell me whats going on that'd be appreciated
0
Right now I just have the first recipe with the extended code, and it just worked for every other recipe, i don't really know why, but right now thats not important since it doesn't have any metadata/NBT attached to it, since i dont really understand those. i did notice that if i went into NEI, enchanted it (giving it a NBT), then used it in the recipe, it basically reset the enchant (removed the NBT) and it was a regular stone again, but still functioned like it did previously, so i can understand what you mean by it will return a new itemstack with no NBT, not the original itemstack with the NBT.