Jump to content

V0idWa1k3r

Members
  • Posts

    1773
  • Joined

  • Last visited

  • Days Won

    61

Everything posted by V0idWa1k3r

  1. Items that use item/generated don't have an inventory variable you can assign a texture to. They instead have layerX, where X is the tint index.
  2. You have deleted the register method, but you are still referencing it. Remove the references to the method. You should really use refactor to delete/move methods anyway. If you are using 1.12 you should use ObjectHolders. Do not assign values to your item fields directly. ModelLoader.setCustomModelResourceLocation(johncena, 0, (ModelResourceLocation) johncena.getRegistryName()); Item::getRegistryName returns you a ResourceLocation, not a ModelResourceLocation, you can't just cast it like this. Instantinate a new ModelResourceLocation object, the first parameter is a ResourceLocation(hint - it is the registry name), the second is your variant(usually it's "inventory" for items.) Assets must be entirely lowercase is 1.12. That includes your language file if you specify your pack format as 3 in your pack.mcmeta. You do. Rename the en_US to en_us then. It is a good practice to use your registry name as the unlocalized name for the item, as it includes your modid and avoids potential conflicts.
  3. This field is null and you never assign anything to it. An Instance annotation goes over a field you want an instance of your mod to be injected into, not over the field that contains your modid.
  4. Well, something in your ConfigGui constructor is null. Try setup a breakpoint to figure out what. The potential culprits are:
  5. No it was deleted, look at the signatures: 1.11: public Class<? extends GuiScreen> mainConfigGuiClass(); 1.12 public GuiScreen createConfigGui(GuiScreen parentScreen); How is that renamed? The return type changed, a parameter had been introduced and the name is different. This does not look like a rename to me. Especially considering the fact that 1.11 has the createConfigGui method with the exact 1.12 signature. Yes it does. There is no public Class<? extends GuiScreen> createConfigGui() method for you to override or implement in the interface. Your last code attachment looks fine to me.
  6. the only method from IPerspectiveAwareModel (handlePerspective) was moved directly to IBakedModel and made default. You are free to override it and do whatever you want to as you were doing before. MapWrapper that was a nested class of IPerspectiveAwareModel was moved into a separate PerspectiveMapWrapper.
  7. Those particular methods have been deleted as they've been deprecated for a while now. RuntimeOptionGuiHandler was deleted as, quoting the javadocs for RuntimeOptionGuiHandler from 1.11 code: TODO remove in 1.11 - this was never fully implemented and will be removed And it also was deprecated btw.
  8. Did you mean layer0, not 0? You have never set the unlocalized name for your item.
  9. https://mcforge.readthedocs.io/en/latest/effects/sounds/#world-playsound-pxyzecvp. A player can be null on a server and then all the players nearby will hear it. And if your side is the client - there is only 1 player on the client(if that is the case you can also use the overload you were using originaly).
  10. World::playSound takes a SoundEvent as it's 4th parameter, not a string. Vanilla SoundEvents can be found at net.minecraft.init.SoundEvents. You should also use the overload that takes an EntityPlayer as it's first parameter as the method you are using will only work on the client. All that is explained in the docs here.
  11. gen_AngelicOre = new WorldGenMinable(eAngelusBlocks.angelicOre.getDefaultState(), 2, BlockMatcher.forBlock(Blocks.STONE)); eAngelusBlocks.angelicOre This is null. And it is null because you are initializing your blocks/items in your client proxy(aka client side only). Edit - well, I'm late. Anyway you should not use proxies for common code, just move it somewhere else, pereferrably to the new registry events.
  12. A ModelRegistryEvent is a normal forge event you can subscribe to just like to any other event.
  13. You are rendering your model at 0,0,0 view-space wise. You need to translate the matrix accordingly by the x/y/z passed in the doRender method. You also probably want to bind your texture before rendering the model.
  14. Well, all I can tell you at this point is to learn the basics of java before starting to create mods. Minecraft is fairly complex with java usages, and forge is even more complex. You need to understand the language, or at least it's common basics before using it. createRenderFor requires you to return an instance of Render<T> where T(type) is the type of the entity the renderer is designed to render. IRenderFactory also uses the very same type.
  15. Your type, not your render class instance. This is java basics. You do not need to use unknown and raw types as you know for a fact that this IRenderFactory you are implementing is used for registering an entity of type NukePrimed. Thus your type is NukePrimed.
  16. My mistake, your class is called NukePrimed, without the Entity prefix.
  17. Do not use raw types. Do you know what generics are and how they work? Your type is EntityNukePrimed.
  18. What is factory in this context? You do not have a local and/or a field with this name. You must provide an instance of IRenderFactory. This is a basic java concept. You can have all the things in the world in your renderer, if it is not registered the game is not aware of it's existance. If no renderer is found for an entity minecraft will use the one for one of the parent classes of the entity.
  19. You must explicitly call GuiTextField::textboxKeyTyped to let your text fields handle the keyboard input. See how it is done in GuiCreateWorld for example.
  20. Call this in your register method. If you are implementing an interface you must implement it's methods which are not default. In your case you must implement public Render<? super T> createRenderFor(RenderManager manager) Your IDE most likely will tell you that you need to do so anyway. This method must return a new instance of your Render class(new RenderNukePrimed(manager)) Blindly passing null into methods is probably a bad idea. Especially if you do not know what those methods do. Here is an example of how to register a renderer for your entity.
  21. Your renderer must extend any subclass of Render<T> where T is a type of your entity class. Currently you are extending RenderTNTPrimed. That is a wrong method. Use the other method that takes IRenderingFactory as it's second parameter.
  22. You must use RenderingRegistry::registerEntityRenderingHandler (the one overload that takes a class and a IRenderFactory). IRenderFactory is an interface that you can either implement directly or use lambdas. You must call RenderingRegistry::registerEntityRenderingHandler during pre-init from either your client proxy or another client-only class.
  23. Please show where you are registering your entity renderer. Additionally make sure that your nuke block actually spawns your nuke entity when ignited.
  24. Your positioning is still of. Think about it - the coordinates you are giving to the text field/button are it's top left corner. If you say "Your position is at width / 2 - 200, height / 2 - 200 and your size is 200, 20" then you are going to see the box at [width / 2 - 200 => width / 2; height / 2 - 200 => height / 2 - 180]. When you are creating a text field at width / 2 + 200 it will go from that to width / 2 + 400. The one text field you are seing is most likely your question field, everything else is way up there or down there with their current y coordinates and some are way too offset to the right. As your buttons take positions from your text fields the same is true for them.
  25. MC works the same way, that is how rendering in 2d works. The thing is - you are drawing your buttons first. the super call in the drawScreen method is what draws the buttons. That happens because a GuiButton can only have a y size of 20 at most. I do not see where you are setting your button's size above 20 in your class though, have you changed that? By that I ment to compare your button positioning with vanilla's. You are positioning your buttons based on the positioning of your text fields, and those are not really positioned all that well... they are positioned exactly in the way they are drawn. Some are positioned against the right boundry of the screen answerB = new GuiTextField(9, this.fontRenderer, this.width - 50, 200, 200, 20); answerD = new GuiTextField(11, this.fontRenderer, this.width - 50, this.height / 2 + 100, 200, 20); Some are positioned agains left top corner of the screen answerA = new GuiTextField(8, this.fontRenderer, 200, 200, 200, 20); And this one is positioned agains the left x boundry and the middle of the screen answerC = new GuiTextField(10, this.fontRenderer, 200, this.height / 2 + 100, 200, 20); If you want the buttons to anchor to the middle of the screen position them agains it. The center is [width / 2, height / 2]. width and height here are scaled width and height of the screen.
×
×
  • Create New...

Important Information

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