Jump to content

MFMods

Members
  • Posts

    369
  • Joined

  • Days Won

    13

MFMods last won the day on January 15

MFMods had the most liked content!

1 Follower

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Recent Profile Visitors

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

MFMods's Achievements

Diamond Finder

Diamond Finder (5/8)

39

Reputation

  1. of the top of my head (it's been many years and i will not set up the 1.8 workspace): there is a method getBlockMetaSomething (maybe getBlockMetadata or getBlockMeta, not sure); call it after the getBlock call, printout metadata (integer, 0-15). find the values for colors that interest you.
  2. if you have a location (BlockPos type, get it from your entity) and a world (Level, also available in any entity), ask the world for light level at that location. you can also ask if the "block" at location can see the sky, etc.
  3. remove half the mods you have. if that did not solved the problem, repeat (remove half of the remaining half). if it did, culprit is in the removed half. switch groups. remove half. repeat. repeat until you find the culprit. then tell mod authors.
  4. make a new world for testing. do binary search until portal works.
  5. no. world generation is now done through resources (json files). good news: modpack makers can change most things; bad news: it's a nightmare for devs and you picked a horible task for an inexperienced modder. i'd switch to another plan if you have plans for multiple mods. if you must go forth, check out mcjty on youtube. there are online generators for worldgen jsons, use those (after you go through a tutorial).
  6. not really a minecraft question. what i will tell you is that there are three types of config files: client (you want that one), common (it's the one you want for most things) and server (stored in game save folder; separate values for each save game).
  7. 1) figure out how to use events. (find forge community wiki or forge docs) 2) subscribe to level tick event. 3) check that the level in event is overworld. overworld is always loaded. 4) check the side (level.isClient). you likely want to do thing only on server side. 5) get the total time in ticks from the level. compare with saved value and be sure that at least 20 ticks (1 second) have passed. (obviously there are multiple ways to do this part).
  8. yeah, you can do that (make a data pack for recipes and loot tables and make an asset pack for models and textures). i'll tell you right away it would be a lot of work and questionable benefit - there are already mods that allow you to add items with a few lines of text and a png file. there always have been. if you really must, investigate source code of BuddingCrystals by XFactHD.
  9. you did it on client only. all changes need to happen on the server. client only actions can be particles, toasts, etc. in useOn(), first check the side - if not client then printBlocks. outside of the check, return proper value (see below). do not call super.useOn - let's say you right-clicked a lever. you do not want to generate your island in front of the lever and then flip it as a bonus. have one or the other. you may want to support both via crouching check but i wouldn't. return InteractionResult.sidedSuccess(level_is_client). that will give you a hand animation on client. if you're in a good mood, don't make a hundred BlockPos objects. make one BlockPos.Mutable, call set to move it around before use.
  10. > How do I make an item have two textures, one held, and one in the inventory an example of that would be a trident. > Also, how do I double the size of the held item model? open the model in blockbench (or just make a new one). set scale and angles for left hand, right hand, item frame (fixed), etc.
  11. looks like twigs' author changed blocks and didn't update every compat. you're going to have to choose between the two mods until that is fixed.
  12. what he said. ...except instead of state.getBlock() == Blocks.grass you should say state.is(BlockTags.DIRT) . tags are not a new thing and people need to use them. also, instead of that BlockPos constructor use above() call in BlockPos.
  13. so, your wish is to be a real boy? good. first follow a tutorial on how to start dev environment. do not edit anything in the example mod. only after the game starts with example mod, start editing it. vanilla block types are accessible through Blocks class (Blocks.something). find one that matches your block type, follow it to creation to discover the block class. have your block extend that. things like bonemeal, etc. will work but you can override all. loot table (block dropping item) won't work. copy from the most similar block or (not easier) follow a tutorial.
  14. it's a simple problem, that's why solution is easy to miss. you will have one main block (if you have a block entity, attach it to that one) and 4 secondary blocks (adjacent to the center one) and 4 tertiary blocks (in corners, adjacent to two secondary ones). you will have block properties (accessed via blockState.getValue) which need to be enough for you to locate the main block. for example if current block is secondary and its "facing" is south, main block is one to the north. override canSurvive if block is tertiary check two adjacent positions (according to blockState); if either is not secondary, return false. if block is secondary get a position of main, get block, if it isn't primary return false. if block is primary and was just placed return true if block is primary get 4 adjacent postitions, return false if either isnt secondary block return true. that's basically it. you may keep canSurvive() it in one block class or split into two (or three if you must), but that method is the only thing that you need to break multiblocks. you also need this one (identical in all of my multiblocks): @Override public void neighborChanged(BlockState state, Level level, BlockPos rackPos, Block block, BlockPos wallPos, boolean something) { super.neighborChanged(state, level, rackPos, block, wallPos, something); if (!this.canSurvive(state, level, rackPos)) { level.destroyBlock(rackPos, true); } }
  15. 1) there is a player tick event. it fires 20x per second for each player. obviously you don't need that precision, skip 19/20 ticks or even 39/40. check items in inventory there. first check that it's a server player. 2) player has a field holding remaining air. just reset it to max. there are ways of preventing that field from being reduced but those are far more difficult that just setting the field to the max value.
×
×
  • Create New...

Important Information

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