Jump to content

Kenkron

Members
  • Posts

    14
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Kenkron's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. I think you can change the appearance of stars by modifying particles.png in a resource pack. Maybe there's some extra space you could fill up. ...nah, I don't see anything, it just appears to be hardcoaded. I think it's the `double d3 = (double)(0.15F + random.nextFloat() * 0.1F);` line that determines the size, but I'm not sure how to change it.
  2. I've noticed a helpful message warning me that my mod loaded a new chunk during chunk population, causing cascading worldgen lag. Which calls can force chunk generation? I've tried removing all references to `World.getChunkFromChunkCoords()`, `World.getChunkFromBlockCoords()`, and `IChunkProvider.provideChunk()`, but it still happens. What other calls should I watch out for? Forge Mod Loader version 13.20.0.2313 for Minecraft 1.11.2
  3. Dang, it was staring me right in the face. I did the part about using .Post, but forgot to add the ElementType check. Thanks. (Note: don't use markdown toggle on this forum. It doesn't work well) ​
  4. I’ve been trying to make a minimap addon for antique atlas. It’s going well, but when I go into survival mode, there is a problem with the GUI. It seems that the last texture I bind for my minimap is also used hunger textures (not XP and HP). I think I must be binding textures the wrong way, but I can’t seem to figure out what the right way is. I’ve been trying to work off of the tuorial here. (This happens in 1.8.9:11.15.1.1722) Here’s what I have right now: //somewhere in//@SubscribeEvent(priority = EventPriority.NORMAL)//public void eventHandler(RenderGameOverlayEvent.Post event) Minecraft.getMinecraft().renderEngine.bindTexture(key); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2f(maxU, maxV); GL11.glVertex2f(x+tileHalfSize, y+ tileHalfSize); GL11.glTexCoord2f(maxU, minV); GL11.glVertex2f(x+tileHalfSize,y); GL11.glTexCoord2f(minU, minV); GL11.glVertex2f(x,y); GL11.glTexCoord2f(minU, maxV); GL11.glVertex2f(x,y+ tileHalfSize); GL11.glEnd(); Anybody know a better way to draw HUD textures? Should I just rebind the hp/xp/hunger texture afterwards (is there a clean way to access that)? Thanks ​
  5. Just some Ideas. I have some "code of not-necessarily-good practice" that would probably benefit from these kinds of event handlers.
  6. okay, thanks. Just wanted to make sure before I made a mistake.
  7. I don't know that there's a tutorial, but if realmsofchaos isn't enough, you could also try looking at the buildcraft source. Somehow, they get a BlockFluidClassic to not spread. Also, maybe BlockFluidFinite could help. http://docs.larry1123.net/forge/1187/net/minecraftforge/fluids/BlockFluidFinite.html
  8. I want to change some of the functionality of existing minecraft machines (piston, dropper, furnace, etc). It seems forge is not designed to replace vanilla blocks (tough I'm told it can be done with reflection). Is there a way to add to what these do with forge event hooks? Could I make something happen when a piston extends, or a dropper drops,or a furnace finishes smelting something?
  9. Thanks for the advice , but it didn't work (assuming that the superclass in your response was Block.)
  10. I'm new to forging, and trying out block breaking. Naturally, I want to break blocks the "right" way (meaning, I want to break blocks as though a player had broken them with the right tool without enchantment.). I've gotten blocks to break with this method, which tree-capitator seems to use: public void breakBlock(World w, Block b, int x,int y,int z){ ArrayList<ItemStack> drops=b.getDrops(world, x, y, z, world.getBlockMetadata(x, y, z), 0); b.dropBlockAsItem(w, x, y, z, world.getBlockMetadata(x, y, z), 0); world.removeTileEntity(x, y, z); world.setBlockToAir(x, y, z); } But it seems like I should break blocks this way: public void breakBlock(World w, Block b, int x,int y,int z){ int fortune = 0; boolean silkTouch=false; int metadata = w.getBlockMetadata(x, y, z); ArrayList<ItemStack> drops = b.getDrops(w, x, y, z, metadata, fortune); ForgeEventFactory.fireBlockHarvesting(drops, w, b, x, y, z, metadata, fortune, 1, false, null); } However, the latter doesn't work. I know there's more than one way to solve a problem, but if one adheres to convention, I'd rather use that way. Anyone know how the player does it?
  11. Okay, I think I get it. I just rune the gradlew file instead for all the gradle commands, right?
  12. Installing gradle seems to conflict with libtomcat-7. Should I uninstall eclise, downgrade libtomcat, and just install eclipse again, or is there a better way? using Ubuntu 13.10 $sudo aptitude install gradle
  13. Thanks GoToLink! I wondered if this was some client/server thing, but as I said, I'm new, and I really don't know how the client/server thing works. If you have any advice on learning the client/server thing, I'll eat it up, but if not, I'm sure I can figure it out somewhere else.
  14. I am a tutorial-reading, source-code-speculating newb, so pardon my ignorance. When I try to make a block plant something, the plant appears, but as soon as I interact with it (right-click, left-click, etc.), it disappears. I hope that this is a problem that you veterans are familiar with, because I have no real idea what's going on. I want to make a version of a dropper that plants on tilled soil. To do this, I made a block, extended the dropper class, and overwrote the dispense method. In the method, I call the onItemUse method of the seeds, and according to a println, the 'player', ' x' ,'y' ,'z' , and 'direction' of the onItemUse call are the same as when I do it myself (manually planting still works). here is what I added to the dispense method. //first, we parasitically use the first player in the world list. //(change this later) World world=Minecraft.getMinecraft().theWorld; int tarx=x + Facing.offsetsXForSide[i1], tary=y + Facing.offsetsYForSide[i1], tarz=z + Facing.offsetsZForSide[i1]; float f1=1, f2=1, f3=1; boolean used = false; if (world.playerEntities.size()>0) { EntityPlayer oddballPlayer = (EntityPlayer) world.playerEntities.get(0); used = itemstack.getItem().onItemUse(itemstack, oddballPlayer, world, tarx, tary, tarz, 1, f1, f2, f3); if (used){ System.out.println("I PLANTED!"); }else{ System.out.println("I tried..."); } } if (used){ itemstack1 = itemstack.copy(); if (--itemstack1.stackSize == 0) { itemstack1 = null; } }else{ itemstack1 = getBehaviorForItemStack(itemstack).dispense(blocksourceimpl, itemstack); } the full class is here: http://pastebin.com/2cQKdpGE
×
×
  • Create New...

Important Information

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