Jump to content

Bektor

Forge Modder
  • Posts

    852
  • Joined

  • Last visited

Everything posted by Bektor

  1. Hm, I'm doing this in my mod, too. So there has to be a check if we are in dev-env or not? If so, how can this be done?
  2. to 1: Well I could when I would send packets to each player informing them about the path. So basically a path is really hard-coded? So such things ( and other effects from other mods ) are really hard-coded? Seems like a lot of code... No other way? to 3: Could you link me something about this. I really want to read more about it because I've never heard of such stuff. I just knew, never do FPS and logic as the same.... like some stupid AAA games do..... (nice games, but not really good in that terms of rendering) to 4: Well, I learned some of the basics. But it was modern OpenGL. Look into the spoiler to see what I mean. (it was never much what I learned back then, but I'm going to buy a OpenGL 4.5 book soon.... hopefully I can just work with matrix stuff without really understanding them because I'm going to learn that in 2 years in school and not yet.... currently doing that in school: an=a1*q^(n-1) But you could link a book to OpenGL 4.5 which also teaches the GLSL shading language and the math behind if you want. And thx for the answer.
  3. Hi, I've got a few questions: 1. How can I let particles move a specific path. 2. How do I get a "explosion" with particles. So I've got a circle around a block and then all particles move fast away from the block. 3. I've saw many people are doing this: float currentX = (float) (this.prevPosX + (this.posX - this.prevPosX) * partialTicks); float currentY = (float) (this.prevPosX + (this.posX - this.prevPosX) * partialTicks); float currentZ = (float) (this.prevPosX + (this.posX - this.prevPosX) * partialTicks); What does this do? 4. How can I set the brightness and color and size of a custom particle? 5. What are 'partialTicks'? That's all. I hope someone can help me with this. Never done something before with particle effects. Thx in advance. Bektor
  4. I've already got the check for the entities. So I've got a array list with all nearby entities. But from the rest I've got no idea. I've got no clue how I can get the entitiy to be moved to my block. I can of course add just some random values to the motion values of the entity, but then it will not get moved to my block in every situation, because of random values. And to do it with a switch statement for the directions isn't that good because it requires the same code with just one different value for each direction and a lot of testing to find values which are working --> so nothing I can work with.
  5. Hi, I'm wondering how a entity can get thrown or moved into (I'm not quite sure if these words are really correct there, but no idea what to use instead) my block when it comes to near to it. (for anyone who knows Thaumcraft 4, the hungry nodes do something similiar) I already looked into the code of the xp orbs, because the player can collect them, but I wasn't able to understand it... So I'm asking now here. Thx in advance. Bektor
  6. This has nothing to do with a modpack. It's basically the mods. When they add their ore to the ore dictionary and a second mod does the same it will work, otherwhise it won't. So you just have to add only mods which add their stuff to the ore dictionary when you want this.
  7. Hi, I'm wondering how I can get all entities nearby. So when a monster, animal or player is nearby I can push it into my block. (So I've got a block with an tile entity and this should check for nearby entities) Any ideas how I can do this? And is there a class from Minecraft or Forge itself which does it already? Thx in advance. Bektor
  8. Hi, I'm wondering what's the replacement for StatCollector.translateToLocal ? Thx in advance. Bektor
  9. Ok, thx. I'll test it out. Oh and anyone who got an idea how to let entities travel through dimensions, like tamed wolves, untamed wolves, Zombies and all of that stuff?
  10. Hm, I still can't figure out how I have to do it now in Minecraft 1.9. But after looking deeper into the code I know that the class which will be returned from getConfigurationManager seems to be gone in 1.9, atleast it does no longer exists in the package and in the MinecraftServer class. So any idea?
  11. Ok, thx. Now it's working perfectly.
  12. So this gives me a crash: public void register(IName name) { this.setUnlocalizedName(Constants.MOD_ID.toLowerCase() + "." + name.getName()); this.setRegistryName(name.getName()); GameRegistry.register(this); GameRegistry.register(new ItemBlock(this)); } java.lang.IllegalArgumentException: No registry name set for object net.minecraft.item.ItemBlock@1ed763aa (net.minecraft.item.ItemBlock) So do I have to give my item block an extra registry name, even when the block has still one? And how can I do this with custom ItemBlocks, I mean, which paramenter must I just in my method to be able to pass this parameter to the GameRegistry thing?
  13. So I have to create for every block a new class which extends from ItemBlock? (which I currently just have for one block) Right?
  14. The BlockLeaves is currently not an item block. Just did it not with item blocks because when it's not working for normal blocks it will not work for item blocks, too and before I make a mistake in item block and can't find it because there is already one in block.... So I tested it now without ItemBlock. And with "does not work" I mean, I'm getting no error, but when I want to join the world Forge tells me about the missing block "leaves" and when I then join even when the block is missing the block is not shown in the creative inventory and I can't give it to me with the command /give.
  15. Well, but it's not working and the only thing I'm doing is having the method register in the abstract class BlockBaseLeaves. public void register(IName name) { this.setUnlocalizedName(Constants.MOD_ID.toLowerCase() + "." + name.getName()); this.setRegistryName(name.getName()); GameRegistry.register(this); } Then I call this method in the class BlockLeaves in the constructor. (class BlockLeaves extends BlockBaseLeaves). public BlockLeaves() { super(); this.register(() -> "leaves"); } That's all what I am doing. With the old GameRegistry.registerBlock everything works fine, but with the new GameRegistry.register it does not work.
  16. The interface came because I wanted to test the Java 8 Lambda expressions out in Minecraft modding and found no other place where I can put a lambda expression in, so I did it there for testing. Well, this does not work. When I use GameRegistry.register(thing) is my block gone. For some reasons it seems to work for items, but not for blocks. So when I use this register(IName name, ItemBlock iblock) { and then this GameRegistry.register(this); GameRegistry.register(iblock); I can't pass my ItemStone block which extends von ItemBlockBase which extends from ItemBlock. (all my GameRegistry.register stuff is in abstract classes in methods there which will be called from the class which extends from the abstract class in the constructor.)
  17. Hi, I'm wondering how to register my blocks in 1.9: In 1.8.9 I used these to methods for it: this.registerBlock(() -> "sand"); this.registerBlock(() -> "stone", ItemStone.class); public void registerBlock(IName name) { this.setUnlocalizedName(Constants.MOD_ID.toLowerCase() + "." + name.getName()); this.setRegistryName(name.getName()); GameRegistry.registerBlock(this); } public void registerBlock(IName name, Class<? extends ItemBlock> iblock) { this.setUnlocalizedName(Constants.MOD_ID.toLowerCase() + "." + name.getName()); this.setRegistryName(name.getName()); GameRegistry.registerBlock(this, iblock); } IName is a functional interface. Now in 1.9 I tried this: this.register(() -> "sand"); public void register(IName name) { this.setUnlocalizedName(Constants.MOD_ID.toLowerCase() + "." + name.getName()); this.setRegistryName(name.getName()); GameRegistry.register(this); } But this is not working. So anyone who got an idea? And what is required to get the ItemBlock's updated? Thx in advance. Bektor
  18. Ok, thx.
  19. Why would you use the OreDict here? Leaves should only check for their type of wood, not any. Well, I want them to check for any time of wood. Allows me some nice stuff. So I think I have to save them here in a list (this is in ServerProxy) and then call itemMatches in my own method in the Block class? @Override public void postInit() { OreDictionary.getOres("logWood"); } And what have I to put in here: OreDictionary.itemMatches(target, input, strict) ?
  20. To 1: So basically I've got a tree and the leaves are checking if they are connected to other leaves and/or the tree itself. So when the scanState matches wood the method should return true. To 2: Well, I've got no idea if I want that my wood and stuff can be used in normal recipes. That's the problem. What would you suggest when my dimension should be harder then the one from vanilla. So harder crafting recipes and all of that stuff in my custom dimension (and it should be able to get the items into the normal dimension back for fun ^^)
  21. Hi, I've got a few question about the Ore Dictionary. I want to compare if the given IBlockState equals wood, so if it is wood (logs). How can I do this the best way? (should work with all other mods, so Ore Dictionary) Should I register my custom dirt, grass, logs, stone and leaves with the Ore Dictionary or not? (they do not work like normal vanilla blocks of these kinds, which is the reason why I made them custom | they should only spawn in my own dimension | they have stuff like gravity) Thx in advance. Bektor
  22. Thx. With that code its working perfectly in static and final space.
  23. Thx. Now it's working. Oh and I can't put it into a "final static" field becauce of the try-catch blog.
×
×
  • Create New...

Important Information

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