Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

hydroflame

Members
  • Joined

  • Last visited

Everything posted by hydroflame

  1. well the bin directory is not obfuscated so its normal it crash i dont understand why peopel do that, it only causes problem later :\
  2. @mazetar, actually the whole class is just pure trolling
  3. entityPlayerMP.theItemInWorldManager.isCreative()
  4. time for today funny mojang code BlockCarpet.java (extends Block btw) protected void func_111047_d(int par1) { byte b0 = 0; float f = (float)(1 * (1 + b0)) / 16.0F; this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, f, 1.0F); } this function does NOT override anythign in Block the argument par1 has absolutelly NO use in the function b0 is specificly set to something :\ theres a "1*somethign"... why would you do that ? basicly this is the same thing as: this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1/16f, 1.0F);
  5. i didnt know about package lowercase, java convention is to not use uppercase for package anyway but thats good to know (yes i know not a lot of people follow java convention)
  6. did you run recompile.sh then reobfuscate.sh (or .bat if you're a windows user)?
  7. weird, because trapdoors have a way smaller box (and doors too)
  8. hmmm, i would try to copy the code for slab to try to at least make if different successfully, then try to make it change according to your rules.
  9. no no of course, but at least we know theres nothign super weird goign on vanilla is doign it a biiiit differently, im thinking maybe you have a mismatch :\, maybe try something that is closer to what vanilla is doing ? or actually BlockHalfSlab doesnt even override that method. ps: i dont really know whats the problem, im jsut trying to debug with you
  10. hmmm, well ok thsi is obviously a problem with the aabb, can you try giving something more simple, like a standard 1x1x1 aabb, maybe just to see if it works or not :\
  11. pushes out like youre getting teleported or you're slowly moving out of the block ?
  12. code to open a gui
  13. well if you were using a keyhandler you wouldnt have to worry about that, but no there isnt
  14. yeah in Minecraft.gameSettings.keyBindings
  15. if its suppose to be "tunnels" connecting the end togheter, why would you make a cube out of it ? like i dont get the advantage of having a 9x9x6 versus just a 9x1x1 you want to get to point A to B, so take the smallest road possible ?
  16. *hydroflame goes suspicisous mode.... hmmmm* anyway hum you are returning null @Override public EnumSet<TickType> ticks(){ return null; } and you should be returning something : @Override public EnumSet<TickType> ticks() { return EnumSet.of(TickType.PLAYER); }
  17. why would you need a packet handler ? its a key press example: import java.util.EnumSet; import net.minecraft.client.Minecraft; import net.minecraft.client.settings.KeyBinding; import org.lwjgl.input.Keyboard; import cpw.mods.fml.client.registry.KeyBindingRegistry.KeyHandler; import cpw.mods.fml.common.TickType; public class HBKeyHandler extends KeyHandler { public HBKeyHandler() { super(new KeyBinding[]{new KeyBinding("configure health bar", Keyboard.KEY_C)}, new boolean[]{false}); } @Override public String getLabel() { return "hbkh"; } @Override public void keyDown(EnumSet<TickType> types, KeyBinding kb, boolean tickEnd, boolean isRepeat) { if(Minecraft.getMinecraft().inGameHasFocus){ Minecraft.getMinecraft().thePlayer.openGui(MainMod.instance, 0, Minecraft.getMinecraft().theWorld, 0, 0, 0); } } @Override public void keyUp(EnumSet<TickType> types, KeyBinding kb, boolean tickEnd) { } @Override public EnumSet<TickType> ticks() { return null; } } also, your TickHandler is not working because you are not returning null in "public EnumSet<TickType> ticks()"
  18. ok i figured a few thing for 1, for a reason i wont explain , you cannot use glTranslated, you have to surroudn your code with tessellator.addTranslation(x, y, z); and finish with tessellator.addTranslation(-x, -y, -z); now this will make place the tessellator where something like this tess.addVertex(0, 0, 0); tess.addVertex(0, 1, 0); tess.addVertex(1, 1, 0); tess.addVertex(1, 0, 0); will cover the entire face of a block (the one you want to render) after that you can easilly use the tessellator normally to render wtv u want unless you intended to render models (like IModelCustom) then you would need another layer of setup (which i can explain if you want)
  19. i think you are, unless you are expecting people to make network over hundreds and hundreds of block away it should be instant (at least to you) also, if the other block is literally hundreds of block away, you still need to get there and minecraft doesn't have a lot of fast travel methods so you probably wouldn't even see the difference.
  20. thats the beauty, you DONT have to know what are the child class List<Object> classList = new ArrayList<Object>(); ClassPath cp = ClassPath.from(TheMod.class.getClassLoader()); for(ClassPath.ClassInfo info: cp.getTopLevelClassesRecursive("com.hydroflame")){//iterate every class in my mod Class c; c = Class.forName(info.getName());//get the class for the name aka this will get EVERY class one by one if(MyInterface.class.isAssignableFrom(c)){ List weapons = ((MyInterface)c.newInstance()).getNewWeapons();//retreive the new weapons from the class } sorry about formatting and i remove all try catch block to make it easier to read
  21. just little warning, if you use System.nanoTime, ALL your block will be extremelly synchronized when i mean extremmelly, i mean like very very synchro (btw my code is synchonized but thats just because i did not have time to implement the synchro break to "break" this synchro you will need to use value that change from one block to another, the one i recommend using is x, y, z that is coviniently given to you by the method now we need to use those to differentiate one animation from the other imagine that all our animation are based on one factor lets say: float f = System.nanoTime()/1000000f; now that would mean everything is synchro, what would happen if we were to add somethign to differentiate them from one another: int loopFactor = 50; float f = System.nanoTime()/1000000f + (x%loopFactor)/attenuationFactor; and attenuationFactor im not sure what is a good value, to high will make it look weird, too low too basicly we introduced the x variable of the TE to make sure 2 TE with 2 different x will not be in synchronization, repeat for y and z to make sure that nothign is synchro ever of course this will only make the animation be at different "time" in their loop, but at least it looks nice now i know this isnt very clear, please ask if you want another explanation
  22. you can also make a class that extends KeyHandler and regsiter that class, will probably be easier
  23. that more a question of knowing exactly which function to use in the case to check is some class is child of another Parent.class.isAssignableFrom(PotentialChild.class); or if you're usign an object: Parent.class.isAssignableFrom(myObject.getClass()); in a minecraft related example: Block.class.isAssignableFrom(BlockOre.class) will return always true because BlockOre extends Block same thing for interfaces ISimpleBlockRenderingHandler.class.isAssignableFrom(MyISBRH.class) will return true because MyISBRH implements ISimpleBlockRenderingHandler
  24. can you give me your deffinition of that, because we could think 2 different stuff when we read that im thinking 3d texture or multiple texture that gets dispalyed one after the other how did I do it? well i personally like to use cyclic animation (the same thing over and over) since all i want is somethign that moves, i usually take the system and transform it into the matrix transform i want to apply it to hard to type but heres a real live example from my mod: //sorry about extremmelly shitty quality code that does that: import org.lwjgl.opengl.GL11; import com.hydroflame.mod.ForgeRevCommonProxy; import com.hydroflame.mod.TheMod; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import net.minecraft.world.IBlockAccess; import net.minecraftforge.client.model.AdvancedModelLoader; import net.minecraftforge.client.model.IModelCustom; import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; public class RenderTeleporter extends TileEntitySpecialRenderer{ private IModelCustom teleporter; private ResourceLocation texture = new ResourceLocation(TheMod.modid, "/models/textures/teleporter.png"); private float[] pos; int displayList = -1; public RenderTeleporter(){ teleporter = AdvancedModelLoader.loadModel("/teleporter.obj"); pos = new float[30]; for(int i = 0; i < pos.length; i++){ pos[i] = (float) Math.random()*2; } } @Override public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f) { //here for(int i =0; i < pos.length; i++){ } float size = 0.1f; Tessellator tess = Tessellator.instance; for(int i = 0; i < pos.length; i++){ pos[i]+=0.01f; if(pos[i] > 2){ pos[i] = 0; } } Minecraft.getMinecraft().renderEngine.func_110577_a(ForgeRevCommonProxy.portalParticle); GL11.glPushMatrix(); GL11.glTranslated(d0+0.5, d1+1, d2+0.5); for(int i = 0; i < pos.length; i++){ GL11.glRotated(360/pos.length, 0, 1, 0); GL11.glPushMatrix(); GL11.glTranslated(0, pos[i], 1); tess.startDrawingQuads(); tess.addVertexWithUV(-size, -size, 0, 0, 0); tess.addVertexWithUV(-size, size, 0, 0, 1); tess.addVertexWithUV(size, size, 0, 1, 1); tess.addVertexWithUV(size, -size, 0, 1, 0); tess.addVertexWithUV(-size, -size, 0, 0, 0); tess.addVertexWithUV(size, -size, 0, 1, 0); tess.addVertexWithUV(size, size, 0, 1, 1); tess.addVertexWithUV(-size, size, 0, 0, 1); tess.draw(); GL11.glPopMatrix(); } GL11.glPopMatrix(); GL11.glColor3f(1, 1, 1); Minecraft.getMinecraft().renderEngine.func_110577_a(texture); GL11.glPushMatrix(); GL11.glTranslated(d0+0.5, d1+1, d2+0.5); GL11.glScaled(1.3, 1.3, 1.3); Tessellator.instance.setColorOpaque_F(1, 1, 1); teleporter.renderAll(); Minecraft.getMinecraft().renderEngine.func_110577_a(ForgeRevCommonProxy.portalRune); GL11.glTranslated(0, 0.2, 0); GL11.glRotated(System.nanoTime()/100000000f, 0, 1, 0); tess.startDrawingQuads(); tess.addVertexWithUV(-0.5, 0, -0.5, 0, 0); tess.addVertexWithUV(-0.5, 0, 0.5, 0, 1); tess.addVertexWithUV(0.5, 0, 0.5, 1, 1); tess.addVertexWithUV(0.5, 0, -0.5, 1, 0); tess.draw(); GL11.glPopMatrix(); } }
  25. well look up java reflection on google, theres ton of beautifull content for it (and seiously reflection is soooo sexy ) but yeah, basicly make every "submod" implements a interface X use reflection to find all those class then use the interface to get the requried information like idk public interface extraMod{ public List<Item> getExtraItems(); public List<Block> getExtraBlocks(); public List<Object> getExtraEventHandlers(); }

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.