Jump to content

Cadiboo

Members
  • Posts

    3624
  • Joined

  • Last visited

  • Days Won

    58

Posts posted by Cadiboo

  1. theres quite a few things wrong with your code, Im short on sleep so sorry for being blunt.

    1) Proxies are for making sure that code is run only on one side. A common proxy doesn't make sense

    2) ModelLoader has to be called in PreInit OR its Registry Event.

    3) switch to using Registry Events instead of your initClient (why is it in your event subscriber class if it doesn't subscribe to anything?), as they allow for greater control over everything, knowing your code will be called at the right time, and many other important things.

    4) the "assets" being prepended hints to me that something is not right with your file tree.

  2. 34 minutes ago, fieldbox said:

    I use the ItemModelMesher

    Never use ItemModelMesher

     

    Please post your code

     

    "assets/testmod:blockstates/testblock.json"

    Why is assets prepended? is it part of your mod id???

    the assets part should not be part of your ResourceLocation, a proper ResourceLocation would look like this "MOD_ID:PATH". assets and any other directories would be automatically prepended to your ResourceLocation, depending on the context

  3. 20 hours ago, SeanOMik said:

    Yeah, I actually just finished one last night and everything with it seems to work, so I'm gonna try adding that functionality now. But where would I put that function, in my tile entity?

    in your Main mod class or in your common Event Subscriber class

    I forgot @SubscribeEvent

    heres what the code should look like

    @Mod.EventBusSubscriber(modid = Reference.ID)
    public class CommonEventSubscriber {
    
      @SubscribeEvent
      //having the method be static is IMPORTANT
      public static void onSmelt(final ItemSmeltedEvent event) {
          if(event.smelting.getItem() instanceof ItemPanWithDough)
              //spawn in item;	
      }
    
    }

     

  4. 4 hours ago, Cadiboo said:

    I believe there a couple posts on here about how to do it. I think it has something to do with hooking into the furnace's onBake event, checking if its your item that was cooked and dropping the pan if it was

     

    public static void onSmelt(final ItemSmeltedEvent event) {
    	if(event.smelting.getItem() instanceof ItemPanWithDough)
    		//spawn in item;	
    }

    Look at how the furnace normally drops its items when broken.

    I would however recommend making your own furnace (oven?) that supports having fuel,  pan and dough, pan, and bread in it all at the same time

  5. 4 minutes ago, SeanOMik said:

    GameRegistry.registerWorldGenerator(new realFoodsWorldGenerator(), 0);

    I think that your weight should definitely never be 0, try changing it to something like 3

     

    I don't understand what your trying to do in your world gen class, but having

    private WorldGenerator gen_blueberry;
    	
    	public realFoodsWorldGenerator()
    	{
    		gen_blueberry = new WorldGenBush(realfoodsBlocks.BLUEBERRY_PLANT);
    	}
    

    is probably not good

     

    Here is a link to my perfectly working generator if it helps

    https://github.com/Cadiboo/WIPTech/blob/9ecbff1ab981930f9351fdeb38ffdea3c820a94f/src/main/java/cadiboo/wiptech/world/WorldGen.java

  6. 1 minute ago, diesieben07 said:

    BS. There are migration paths from "metadata" to "not metadata". Not using it now will not buy you much.

    Its my personal opinion, get it done now - while you are still making your mod - and have less work in the future

  7. 5 minutes ago, diesieben07 said:

    You are not setting the metadata of your drops. I highly recommend just overriding getDrops instead of using the combination of singular methods.

    This is one way to do it - and probably the way you want to do it right now, but it will no longer work in future versions because metadata is being removed in 1.13. If you are planing on continuing to support your mod into 1.13 and beyond I would highly recommend not using metadata.

     

    Many people use metadata to avoid creating multiple classes, forgetting that you can instantiate the same class multiple times to create many items. Here is a good topic on this subject:

     

  8. Metadata is being removed in 1.13, If you are planing on continuing to support your mod into 1.13 and beyond I would highly recommend not using metadata.

     

    My WIFI is dying on me and keeps posting comments twice. Read the comment below

  9. have you done debugging to find out what code is called?

    On 08/05/2018 at 8:55 AM, naturaGodhead said:

    I have the event handler registered in my main class.

    I don't know how you have done this but I believe it is impossible and that you need to put

    @Mod.EventBusSubscriber OR @EventBusSubscriber above your ClientEventHandler class and make your onRenderWorld method static. Also why is there 

    public ClientEventHandler() {
    		
    	}

    ?

     

  10. On 08/05/2018 at 10:03 AM, its333 said:

    i am trying to make a thirst bar at the same spot as breath bubbles are. But even when i copy and pasted all the vanilla calculation for it, its y position is way off. help!!

     

    ScaledResolution scaledresolution = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);

    int i2 = scaledresolution.getScaledHeight() / 2 - 39;
            IAttributeInstance iattributeinstance = mc.thePlayer.getEntityAttribute(SharedMonsterAttributes.maxHealth);
            float f = (float)iattributeinstance.getAttributeValue();
            float f1 = mc.thePlayer.getAbsorptionAmount();
            int j2 = MathHelper.ceiling_float_int((f + f1) / 2.0F / 10.0F);
            int k2 = Math.max(10 - (j2 - 2), 3);
            int l2 = i2 - (j2 - 1) * k2 - 10;

    mc.ingameGUI.drawTexturedModalRect(k4, l2, 0, 0, 7, 9);

     

    the x position is fine but the l2 thing makes it go no where close to where it should be

     

    how do i fix this?

    Post your code (we have no idea when & where this is being called etc), Post logs, Preferably post a GitHub

  11. On 09/05/2018 at 12:16 PM, tuunaa said:

    Even telling someone to "just Google it" would help.

    He did better than this, he told you the solution to your problem & didn't make you find it yourself. He then not-so-subtly hinted that you might want to do some extra homework about java because if you don't know that there wold probably be some other holes in your knowledge that will trip you up in the future

  12. On 09/05/2018 at 8:04 AM, Flemmli97 said:

    ok. what about this then? i have a list of blockpos that i update daily (so i dont have to use ticking tiles). its not a woldsaveddata and since the client doesnt know about it it should be fine? (one instance of the list is created for each world(dimension))

    it seems you are trying to improve performance. Why don't you make tickable TileEntities with something like

    if (getWorld().getWorldTime() % 200 != 0) return;

    in their update() methods? them? this makes them only update every 10 seconds (world time is in ticks, 20 ticks per second)

  13. Or download a JSON plugin for eclipse like JSON Editor 1.1.1 from the Eclipse Marketplace

    Help > Eclipse MarketPlace

     

    It allows you to read, modify, create etc all JSON files inside eclipse & provides syntax correction (very helpful for missing commas or quotation marks)

  14. I assume you are registering your GUI handler and everything correctly.

    50 minutes ago, #ÖCT said:

    I`m using now 1.10.2

    Please use 1.12

     

    Please post any relevant logs & these classes

    InventoryCrafting
    InventoryCraftResult

     

  15. 12 hours ago, Niogenesis said:

    I am currently running it on Windows 10

    Use @MDW01's approach. I don't know anything off the top of my head but for mac & linux there are apps (and console commands) that allow you to forcibly limit a specific application's ram, cpu & network usage. You could try looking at windows versions of these.

×
×
  • Create New...

Important Information

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