Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

TheMattyBoy

Forge Modder
  • Content Count

    40
  • Joined

  • Last visited

Community Reputation

2 Neutral

About TheMattyBoy

  • Rank
    Tree Puncher

Converted

  • Gender
    Male
  • URL
    https://minecraft.curseforge.com/projects/gadgets-n-goodies-mod?gameCategorySlug=mc-mods&projectID=230028
  • Location
    Sweden

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Oh oops, didn't even notice that... Embarrassing... Right, thanks. Didn't I already sort of do this by doing world.getEntityByID(message.pianoId).getDistanceSqToEntity(p_apply_1_) < 900.0D in the predicate for finding the players? Alright, this is what I was having trouble with. If I tried to register a client packet on both sides the server would crash with a NoClassDefFoundError on whatever client-only class I was trying to access in my onMessage method in my message handler, and no amount of side checking or @SideOnly-ing would fix the error.
  2. I'm trying to create a GUI that can play sounds of type MovingSound (as opposed to a normal PositionedSoundRecords, which is what World#playSound uses) when pressed, not only to the player using the GUI, but to everyone within range. Of course, GUI's are exclusively client sided, so I decided to use SimpleImpl to send a message about the sound to the server, but since I'm using a MovingSound I then have to play it through the SoundHandler in Minecraft (which is a client class) on all receiving clients. I'm kinda new to SimpleImpl and networking in general, but from my limited experience it wou
  3. OK then. Why don't you register it like Minecraft has done it in LootTableList::register(ResourceLocation) (which is a public static method)? That does mean that you have to rename your "loot" folder to "loot_tables", and you probably want to create a sub folder called "chests" where you put your "loot_chest.json" file, but that shouldn't be too big of an issue. I would try doing something like public static ResourceLocation LOOT_CHEST; in your main mod class, then say LOOT_CHEST = LootTableList.register(new ResourceLocation("nm", "chests/loot_chest")); in your pre-initialization e
  4. Try adding .json to your resource location. Not entirely sure if necessary but I know you need for instance .png in resource locations for entity textures
  5. if(world.isRemote) checks if it's on the client, it should be if(!world.isRemote)
  6. So I have a crafting recipe that uses water bottles, which are technically a potion with only an NBT tag to separate them from other potions. Is it possible to check for this NBT tag in the new JSON format for making crafting recipes? If so, what's the syntax? I don't really want players to be able to craft the item with any potion... Here's what my JSON file looks like so far: { "type": "minecraft:crafting_shaped", "pattern": [ "iIw", "Db ", " Bi" ], "key": { "i": { "item": "minecraft:iron_ingot", "data": 0 }, "I": { "item": "minecraft:iron_block",
  7. Welp, I tried, it re-downloaded gradle and everything, but it still failed on ":applySourcePatches"... Think I might just wait for that patch of onArmorTick and hopefully it should be working by then
  8. Oh OK, guess I'll just have to wait then... Thanks for replying What do you mean by "rename the directory"? If I try to physically rename the folder ".gradle", Windows tells me that I must type a file name (maybe because .gradle is an extension and not a file name? Not sure on that one...)
  9. I've made a mod with a bunch of armor items that worked fine, until I tried updating the mod to 1.12. I dug through the code (ctrl + H is my friend) and found that the only place where Item#onArmorTick (a method that should update the armor every tick) gets called is in InventoryPlayer#setPickedItemStack, a method for handling pickblocking (so I could only fly my jetpack for a split second while pickblocking, which is no good), with a message from Forge saying "FORGE: Tick armor on animation ticks". How would I go about doing that (I don't have a separate class for rendering my armors or anyth
  10. What I did was to just put Entity#setSize([width of grown animal] * [a factor that goes from the smallest size* when it's a baby, up to 1 when it's an adult], [height of grown animal] * [the same factor]); in EntityLivingBase#onLivingUpdate. In order to calculate the factor I would need to see your code for handling aging, unless you could figure it out yourself? *By the smallest size I mean say if the smallest version of the animal was 20% the size of the adult one, the "smallest size" would be 0.2, if it was 10% it would be 0.1 etc.
  11. I know, I was just pointing out that it happens and that I need to cancel certain key presses to compensate. Hey, thank you for bringing this to my attention! The KeyBinding class was just what I needed (even though I settled for a slightly different method in the end). I do believe my problems are solved now, thank you to all of you for your help! I really appreciate it! (For those wondering, this is what I settled on): entity.setVelocity(0, 0, 0); if(entity.posX != entity.prevPosX || entity.posY != entity.prevPosY || entity.posZ != entity.prevPosZ) { e
  12. Okay, I sort of solved it by doing this: entity.setVelocity(0, 0, 0); if(entity.posX != entity.prevPosX || entity.posY != entity.prevPosY || entity.posZ != entity.prevPosZ) { entity.setPositionAndUpdate(entity.prevPosX, entity.prevPosY, entity.prevPosZ); } but when you try to move, it starts jittering (seen as I'm teleporting the player every tick). Is there a way to cancel keyboard input from only the buttons [W], [A], [D], [SPACE] and [SHIFT]? I seem to remember there was an event for handling keyboard input, but I can't seem to find one.
  13. Well, there are a few reasons. First of all we have the annoying FOV change (I know I could probably fix this with an event). Slowness doesn't affect knockback, so you could just punch out the mobs (again, should be an easy fix but still). Also, I know it might sound dumb but I'd prefer it if you didn't have the slowness icon in the inventory. But the main reason is that slowness doesn't affect all mobs, such as bats, squid and flying players, and it doesn't block vertical movement, so it's easy to just jump out. If I were to use slowness together with constantly setting only motionY to 0, the
  14. Two things: first, I actually do want skeletons to shoot arrows and creepers to explode and what not. I don't want to freeze time, I merely want to freeze mobs in place so that they can't move/fly. Second, the player is an issue... If I allow the event on the client side, all mobs including the player start jittering like mad when stuck in the ice, and if I limit the event to server side only, it works fine for other mobs but the player doesn't get affected. Edit: It also brings a whole lot of other problems, such as, as you said, they don't take damage unless you do so
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.