Jump to content
  • Home
  • Files
  • Docs
All Content
  • All Content

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Leaderboard

Leaderboard

  • Leaderboard
  • Past Leaders
  • Top Members
  • in all areas
    • All areas
    • Events
    • Event Comments
    • Event Reviews
    • Posts
    • Status Updates
    • Status Replies
  • Custom Date
    • All time

      February 2 2017 - January 18 2021

    • Year

      January 18 2020 - January 18 2021

    • Month

      December 18 2020 - January 18 2021

    • Week

      January 11 2021 - January 18 2021

    • Today

      January 18 2021

    • Custom Date

      06/07/17 - 06/07/17

    • Between and
  1. diesieben07

    diesieben07

    Forum Team


    • Points

      1

    • Content Count

      54991


    • Find Content
  2. Draco18s

    Draco18s

    Members


    • Points

      1

    • Content Count

      15921


    • Find Content
  3. The_Fireplace

    The_Fireplace

    Forge Modder


    • Points

      1

    • Content Count

      241


    • Find Content
  4. JimiIT92

    JimiIT92

    Members


    • Points

      1

    • Content Count

      745


    • Find Content

Popular Content

Showing content with the highest reputation on 06/07/17 in all areas

  1. 1 point
    Draco18s

    [1.11.2] Minecraft Seasons: What To Expect

    It's a pain in the ass. Stop now. If you want to look at what I did in 1.7.10 (which involved heavy use of things that shant be talked about) you can have a look at my event handler class: https://github.com/Draco18s/HarderStuff/blob/master/src/main/java/com/draco18s/wildlife/WildlifeEventHandler.java Roughly: 1) store the original biome data, we need to keep records of what they are so we can calculate time offsets properly 2) modify the shit out of these numbers because some of them are garbage. We also need to calculate the variance delta (deserts have greater temperature variance than oceans because of water's thermal capacity) 3) get the current date, look up the seasonal sine waves, multiply by variance delta, add to the base value, apply back to the biome It's ugly and there's hacks all over the place. One of the most annoying was having to deal with ice. Ice doesn't melt on its own, but water will freeze. Have fun handling that.
    • June 7, 2017
  2. 1 point
    V0idWa1k3r

    [1.11.2] HarvestDropsEvent specifying block metadata

    you have the IBlockState of the block in the event. That state contains properties. See BlockStone to see which ones(hint - it's the VARIANT property). You can get a value of that property from the blockstate you have... And then you would just compare that value to see if it is a regular stone block or diorite/whatever. Something like if (event.getState().getValue(BlockStone.VARIANT) == BlockStone.EnumType.STONE) Edit: Here is a documentation that explains blockstates.
    • June 7, 2017
  3. 1 point
    diesieben07

    Compile source without gradle (or reconstruct the structure to compile)

    The proper fix is to yell at the author to fix his shit. Also you should tell him about Git branches.
    • June 7, 2017
  4. 1 point
    SubDivide

    Compile source without gradle (or reconstruct the structure to compile)

    Just use the MDK as normal and replace the generated src folder with his...?
    • June 7, 2017
  5. 1 point
    The_Fireplace

    What does the acronym SRG stand for?

    SRG stands for Searge. He is one of the guys that works/worked on MCP, possibly the one that came up with that naming system.
    • June 7, 2017
  6. 1 point
    JimiIT92

    [1.10.2] Spawning structures using Structure Blocks files

    EDIT: I've looked at the Strucutre Block class and i found out how to load a structure. But for some reason if i generate a new world and (for example) try to load this structure right-clicking an item it seems like the game can't find the structure (wich is stored in the structures folder into resources). This is the dummy item class i use to "spawn" the structure public class ItemMW extends Item { public ItemMW(CreativeTabs tab) { this.setCreativeTab(tab); } @Override public ActionResult<ItemStack> onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn, EnumHand hand) { if (!worldIn.isRemote) this.func_189714_c(playerIn.getPosition(), worldIn); return super.onItemRightClick(itemStackIn, worldIn, playerIn, hand); } public boolean func_189714_c(BlockPos pos, World world) { WorldServer worldserver = (WorldServer) world; MinecraftServer minecraftserver = world.getMinecraftServer(); TemplateManager templatemanager = worldserver.getStructureTemplateManager(); Template template = templatemanager.func_189942_b(minecraftserver, new ResourceLocation(MW.MODID + ":" + "structures/pagoda.nbt")); if(template == null) { System.out.println("NO STRUCTURE"); return false; } BlockPos blockpos2 = template.getSize(); IBlockState iblockstate = world.getBlockState(pos); world.notifyBlockUpdate(pos, iblockstate, iblockstate, 3); PlacementSettings placementsettings = (new PlacementSettings()).setMirror(Mirror.NONE) .setRotation(Rotation.NONE).setIgnoreEntities(false).setChunk((ChunkPos) null) .setReplacedBlock((Block) null).setIgnoreStructureBlock(false); template.addBlocksToWorldChunk(world, pos.add(0, 1, 0), placementsettings); return true; } } The NBT file is stored into resources-assets-mw-structures-pagoda.nbt (mw is the mod id) EDIT 2: Found out a way to make it works. The problem was (as i suspected) in the ResourceLocation, that for some reason pointed at a wrong location. By changing that i can spawn my structure and also integrating this function into (for example) a biome class i can spawn it randomly in the world using the nbt file public void loadStructure(BlockPos pos, World world, String name) { WorldServer worldserver = (WorldServer) world; MinecraftServer minecraftserver = world.getMinecraftServer(); TemplateManager templatemanager = worldserver.getStructureTemplateManager(); ResourceLocation loc = new ResourceLocation(MW.MODID, name); Template template = templatemanager.func_189942_b(minecraftserver, loc); if (template != null) { IBlockState iblockstate = world.getBlockState(pos); world.notifyBlockUpdate(pos, iblockstate, iblockstate, 3); PlacementSettings placementsettings = (new PlacementSettings()).setMirror(Mirror.NONE) .setRotation(Rotation.NONE).setIgnoreEntities(false).setChunk((ChunkPos) null) .setReplacedBlock((Block) null).setIgnoreStructureBlock(false); template.addBlocksToWorldChunk(world, pos.add(0, 1, 0), placementsettings); } }
    • October 29, 2016


  • All Activity
  • Home
  • Leaderboard
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community