Jump to content

Cerandior

Members
  • Posts

    385
  • Joined

  • Last visited

Everything posted by Cerandior

  1. I already finished the sucking part. Still haven't gotten into the rendering. But now i want to give my black hole another abillity. I want my black hole to suck the blocks around it aswell. Now for something to exist in world it should either be a block or an entity. Now, you can't give blocks any motion. At least i am not aware of a way to give a block a motion. So what i was wondering is that i should add a timer to the blackhole so each 4-8 seconds destroys about 40 blocks around it at random. By destroying them, the blocks will drop their EntityItem. I can give motion to that. But it would be more "cool-looking" if these EntityItems would have a size of a block. Can you resize/scale an existing entity? Or there is another way to achieve what i want.
  2. Yeah, that's what i meant
  3. One more thing that i want to ask. Which uses up more resources: Checking each tick for blocks around my black hole Or checking each tick for entities around my block. EDIT: @HappyKiller101 derping everywhere , thanks for letting me know, probably saved me some time
  4. This is the code that i used: Everything except for the explosion is working. But this is a tile-entity. I will have to create an entity and hopefully find a way to render a god damn circle.
  5. @americanman I appreciate the fact you took your time to comment and try to help me, the rest doesn't matter. @Ernio I am very very (very) bad at GL Rendering. I had a post some time ago and requested a OpenGL tutorial, coolAlias and diesiebien07 helped me out. However GLProgramming was very intense. I only have finished 2 chapters, and to be honest i still haven't tried anything on minecraft yet. I am not sure how would i render a black "circle" on the game =_= EDIT: @lasgerrits, Is Thaumcraft 4 Open-Source? Hungry-Nodes Code and their custom renderer would help me out a lot, but i can't seem to find it on github. I can only find Thaumcraft 4 API.
  6. I would really like to try and simulate the effect of a black hole on minecraft. The way that i am going to do it is that the "black-hole" to suck inside it every Mob and Players aswell as the Item Entities (Items thrown on ground). I also want to give the "black-hole" a inventory so for each item that it sucks in, the "mass" inside the blackhole will be increased by one. The bigger the mass, the more power / range the "black-hole" has to suck items on it. When it reaches a certain amount of mass, it will either add a huge explosion to the world, or will be stabilized into a "Singularity" if you used a "Singularity Stabilizer" which will be a block. I would like to know how to make the dropped items, mobs and players be attracted by the "black-hole" and i also would like to know how to store these Entity Items into the "mass" variable that will be into the "black-hole" Tile Entity. Thank you for your time.
  7. It also is far more cleaner and easier to read. The only reason i posted that code is to give him another option, which he can use in other situations.
  8. Thank you both for answering. @coolAlias That is intense indeed. However I will read through all of it and hopefully after i am done i will get a better understanding over minecraft rendering.
  9. You can do this and your entity will spawn items only if a player is within 5 blocks radius, which can be tweaked to your likings: public class YourTileEntity extends TileEntity implements IUpdatePlayerListBox{ @Override public void update() { List<Entity> PlayersInRange = this.worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.fromBounds(this.getPos().getX() -5, this.getPos().getY() - 5, this.getPos().getZ() -5, this.getPos().getX() +6, this.getPos().getY() +6, this.getPos().getZ() +6)); if(!PlayersInRange.isEmpty()){ System.out.println("Player Found!"); //Run Code here } } } EDIT: This Code is for minecraft 1.8, if you are working with an older version you might have to tweak some little things and you don't need to implement IUpdatePlayerListBox
  10. Even with the older versions of forge i have had problems and haven't taken the time to learn how rendering works in minecraft. Now that rendering has gone through a overhaul, even that little bit of thinks that i knew abou the way minecraft renders, does no good in 1.8. Anyway, i have seen so many things that i want to be able create. Lets's get straight to the point. I want ro know how the book in top of the enchantment table is rendered. I want to know how that book is animated. I want to know how "the lights" that come when you kill the ender dragon are rendered. Basically i am very bad at rendering in minecraft and have no idea on how to do a lot of things. I could copy-paste most code from vanilla, but what is the point in that if i dont know what i am doing. If anyone can lead me to some easy-readable well explained tutorial that sums up the things that i wanted to learn, i would be very grateful. Thank you for the time and have a nice day.
  11. I think i know the problem now , Shouldn't have posted without putting my brain into work a little more. Before i started the server today i removed "Witchery" yesterday and the filter Upgrade had a "Witchery" mod item in it. The reason why it is null it is because there is no no such item in the game. Should i re-enable Witchery, get that item out of the filter and re-disable it again, or there is a shortcut on this.
  12. Firstly, i know that this is very outdated version and maybe i can't find much support about it, but the thing is me and some other of my friends had this old custom modpack and decided to give it a go. It worked fine for about 1 week, but now Extra-Utillities is acting weird. Everytime i put Extra-Utilities on mods at server files the server crashes as soon as a player connects. If i remove it then everything get's back to normal again. Well sort of, since i had Extra-Utilities pipes everywhere in some automation systems they are now spilling items everywhere and lag the server. It's very weird. It has to do with a filter upgrade that i used. There is probably a method / variable called "isFilter" that the mod author isn't using good. Anyway, if someone can help i would appreciate it. Here is the crash-report:
  13. There is a switch in your world generation class that is checking for the dimension ID. Draco18 spoke very clearly. 0 is the ID number for the overword dimension, however you are using this ID, the id that belongs to the overworld dimension, to generate in the end. At case 0 in the switch you want to execute the generateSurface method not the generateEnd that you are currently using
  14. He is drawing the energy bar on the gui. I don't think the container have much to do with it. I looked through you read and write to NBT aswell as your updateEntity code. I think i have maybe found the problem but i am not sure of something. Is a pipe supossed to extract energy from a storage or your "generator" has to send energy to the pipe?
  15. I am not very sure if this is actually a thing (because i am a 1.8 noob) but i think that BlockPos has got a .getX(), geY(), getZ(). You already have a BlockPos instance on your method so use pos.getX(), pos.getY() and pos.getZ() instead of hitX, hitY, hitZ. If this is not a thing then ignore this comment. It is me being derpy on 1.8 forge.
  16. As he mentioned above = is used to assign a value to a variable while == is for comparing. When you have a boolean you don't need to add the == part though because a boolean is always true or false. Adding ! Before your boolean is like saying "not" true.
  17. What exactly are you doing? Don't type World.isRemote, that will bring you errors. Type this: worldIn.isRemote
  18. Are you sure that "test2.png" exists in your textures/model folder?
  19. Are you using some sort of loop before passing these values, or you simply taking the raw ones from methods
  20. public boolean onBlockActivated(World worldIn .... Here on the method you already have an instance of "World" so use it If you are still not getting it: worldIn.isRemote instead of World.isRemote
  21. Open your jar folder with winrar or 7zip. Check if there is a "assets" folder.
  22. As mentioned above. I missed a part of the code he wrote because i was on my phone. That is why i asked that question, because it doesn't make sense to compare a block with a blockstate. However when i got home i re-checked the code and saw the .getBlock in: worldIn.getBlockState(pos).getBlock() == Blocks.farmland Everything made sense after i notice this. I managed to get it working and the dispenser is now planting the seeds the way i wanted it to.
  23. Is it possible to compare blocks with blockstates? I thought you couldn't do that. Anyway i will try this when i get home Edit: Sorry i missed the .getBlock() part. I was on my phone. It is now working, thanks for help
  24. Now, adding the custom behavior wasn't hard at all. I tested and it worked. It does set the Wheat (The first type of seeds i tried). But problems started soon when i tried to add an if statement to check if the block in front of dispenser is farmland. I am so damn confused with this block states thing that were added on 1.8 I tried using this code: It doesn't work. It wont even place the seeds. However if i remove the if statement, it will place the seeds even if the block in front is obsidian. (It doesn't care what block is there). Now i think that i know what is happening and i don't know at the same time. I refused to work with 1.8 before and this was one of the reasons. I don't like this blockstates thing. What i am guessing it happens is that the farmland should have different states. I am only checking for the default state in which the farmland may or not be. Of course since there is not a checker for the wheat block the dispenser will always try to place the wheat block. So it wastes seeds and also resets the crop state from full-grown to ungrown state. How can i make this block-check thing easily. I am sorry for noobish questions but i really don't get these block states. It is actually very frustrating because it seems like is such a simple thing to do and i can't get around it
  25. I have had a very busy month and i have gotten quite rusty in this past month. However we are near christmass and my school's homeworks are getting lighter. Today i opened up Eclipse and started to catch up to my old project. Apparently i would have wanted to make dispensers able to plant seeds. So instead of dispensing the seeds as items, i want the dispenser plant these seeds if the block on front is farmland. I haven't quite started anything on this and before i do i wanted to make sure that this can be done easily. Is there any event that handles item dispensed? Maybe through that event i might be able to achieve something. If there is can you please tell me the event name. If there is not. How can i edit the dispenser class? I don't remember on working in this type of thing before so any help would be appreciated. Thank you for your time.
×
×
  • Create New...

Important Information

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