Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Kokkie

Forge Modder
  • Joined

  • Last visited

Everything posted by Kokkie

  1. 1.7.10 is no longer supported
  2. 1.7.10 is no longer supported
  3. Does it have something to do with template.addBlocksToWorld(worldIn, position, placementsettings, 20);?
  4. We won't download a file with your code, use gitub or something like that
  5. Hello, I made a structure for in my dimension but the lights of it aren't updated when it spawns, how can I fix this? Code: public class WorldGenCheeseHouse2 extends WorldGenerator { private static final BlockStateMatcher IS_STONE = BlockStateMatcher.forBlock(CheeseBlocks.CHEESE_STONE); private final ResourceLocation HOUSE = new ResourceLocation(Reference.MODID + ":cheese_house"); public boolean generate(World worldIn, Random rand, BlockPos position) { while (worldIn.isAirBlock(position) && position.getY() > 2) { position = position.down(); } if (!IS_STONE.apply(worldIn.getBlockState(position))) { return false; } Random random = worldIn.getChunkFromChunkCoords(position.getX(), position.getZ()).getRandomWithSeed(987234911L); Rotation[] arotation = Rotation.values(); Rotation rotation = arotation[random.nextInt(arotation.length)]; ChunkPos chunkpos = new ChunkPos(position); StructureBoundingBox structureboundingbox = new StructureBoundingBox(chunkpos.getXStart() - 16, 0, chunkpos.getZStart() - 16, chunkpos.getXEnd() + 16, 256, chunkpos.getZEnd() + 16); PlacementSettings placementsettings = (new PlacementSettings()).setRotation(rotation).setBoundingBox(structureboundingbox).setRandom(random); MinecraftServer minecraftserver = worldIn.getMinecraftServer(); TemplateManager templatemanager = worldIn.getSaveHandler().getStructureTemplateManager(); Template template = templatemanager.getTemplate(minecraftserver, HOUSE); template.addBlocksToWorld(worldIn, position, placementsettings, 20); return true; } } Image: https://i.gyazo.com/3a9a3f8df4d5c9dffebf815899a130bf.png
  6. I have this: @SubscribeEvent public void playerTick(TickEvent.PlayerTickEvent event) { EntityPlayer player = event.player; World world = player.world; BlockPos pos = player.getPosition(); Random random = new Random(); if (world.getBlockState(pos.west()).getBlock() == CheeseBlocks.CHEESE_FIRE || world.getBlockState(pos.east()).getBlock() == CheeseBlocks.CHEESE_FIRE || world.getBlockState(pos.north()).getBlock() == CheeseBlocks.CHEESE_FIRE || world.getBlockState(pos.south()).getBlock() == CheeseBlocks.CHEESE_FIRE) { if(!world.isRemote && random.nextInt(20) == 0 && !player.isImmuneToFire() && !player.isCreative()) { player.setFire(random.nextInt(5) + 5); } } } And it seems to work, thanks
  7. Not that hard, I only look at the feet and doing it 1 north, 1 west, 1 south and 1 east
  8. Also, forgot to add that I would like to add that if you are 1 block away from the fire you will also be set on fire, because it is so hot... Is there a way to add that?
  9. Okay, thanks for replying
  10. I'll try that, thanks
  11. Hello, I would want there to be a feature that if you, at (in build.gradle) minecraft { version = "1.11-13.19.0.2157" runDir = "run" // the mappings can be changed at any time, and must be in the following format. // snapshot_YYYYMMDD snapshot are built nightly. // stable_# stables are built at the discretion of the MCP team. // Use non-default mappings at your own risk. they may not allways work. // simply re-run your setup task after changing the mappings to update your workspace. *mappings = "snapshot_20161202"* // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. } mappings = "snapshot_latest" or mappings = "stable_latest" it would automaticaly use the latest snapshot/stable Thanks for looking at this and hope it gets implemented
  12. Yeah I know I just wasn't really thinking right so I made a dumb mistake... And also, how do I make it so it actually sets an entity on fire, well, a better question is where, I couldn't find a good method that updates every tick..?
  13. I set the block on the server side (if !remote) and play the sound on the client side (if remote)
  14. I thought you ment if I was using an @Override annotation, but... My head is dumb some times @SubscribeEvent public void playerInteract(LeftClickBlock event) { EnumHand hand = event.getHand(); BlockPos pos = event.getPos(); World world = event.getWorld(); EntityPlayer player = event.getEntityPlayer(); pos = pos.offset(event.getFace()); if (world.getBlockState(pos).getBlock() == CheeseBlocks.CHEESE_FIRE && hand == EnumHand.MAIN_HAND) { event.setCanceled(true); if(world.isRemote) world.playSound(player, pos, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.8F, 1.5F); if(!world.isRemote) world.setBlockToAir(pos); } }
  15. OOOOHHWWW you mean that, sorry It works now but it gets fired 2 times, and yes I did do it only if it was the main-hand @SubscribeEvent public void playerInteract(LeftClickBlock event) { EnumHand hand = event.getHand(); BlockPos pos = event.getPos(); World world = event.getWorld(); EntityPlayer player = event.getEntityPlayer(); pos = pos.offset(event.getFace()); if (world.getBlockState(pos).getBlock() == CheeseBlocks.CHEESE_FIRE && hand == EnumHand.MAIN_HAND) { event.setCanceled(true); world.playSound(player, pos, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 1.0F, 1.5F); world.setBlockToAir(pos); } }
  16. public class ClientProxy extends CommonProxy { public void registerModels() { registerItemModel(CheeseItems.CHEESE, 0); registerItemModel(CheeseItems.CHEESE_COOKED, 0); registerItemModel(CheeseItems.BREAD_CHEESE, 0); registerItemModel(CheeseItems.CHEESE_APPLE, 0); registerItemModel(CheeseItems.CHEESE_BUCKET, 0); registerItemModel(CheeseItems.CHEESE_SEEDS, 0); registerItemModel(CheeseItems.CHEESE_INGOT, 0); registerItemModel(CheeseItems.CHEESE_ARROW, 0); registerItemModel(CheeseItems.CHEESE_SWORD, 0); registerItemModel(CheeseItems.CHEESE_PICKAXE, 0); registerItemModel(CheeseItems.CHEESE_AXE, 0); registerItemModel(CheeseItems.CHEESE_SHOVEL, 0); registerItemModel(CheeseItems.CHEESE_HOE, 0); registerItemModel(CheeseItems.CHEESE_FLY_STICK, 0); registerItemModel(CheeseItems.CHEESE_BOW, 0); registerItemModel(CheeseItems.CHEESE_MULTITOOL, 0); registerItemModel(CheeseItems.FLINT_AND_CHEESE, 0); registerItemModel(CheeseItems.CHEESE_HELMET, 0); registerItemModel(CheeseItems.CHEESE_CHESTPLATE, 0); registerItemModel(CheeseItems.CHEESE_LEGGINGS, 0); registerItemModel(CheeseItems.CHEESE_BOOTS, 0); registerItemModel(CheeseItems.CHEESE_PICKAXE_HEAD, 0); registerItemModel(CheeseItems.CHEESE_AXE_HEAD, 0); registerItemModel(CheeseItems.CHEESE_SHOVEL_HEAD, 0); registerBlockModel(CheeseBlocks.CHEESE_ORE, 0); registerBlockModel(CheeseBlocks.CHEESE_ORE_NETHER, 0); registerBlockModel(CheeseBlocks.CHEESE_ORE_END, 0); registerBlockModel(CheeseBlocks.CHEESE_BLOCK, 0); registerBlockModel(CheeseBlocks.QUICK_CHEESE, 0); registerBlockModel(CheeseBlocks.COMPLIMENT_MACHINE, 0); registerBlockModel(CheeseBlocks.BELGIUM_FLAG, 0); registerBlockModel(CheeseBlocks.CHEESE_PLANT, 0); registerBlockModel(CheeseBlocks.CHEESE_FURNACE, 0); registerBlockModel(CheeseBlocks.LIT_CHEESE_FURNACE, 0); registerBlockModel(CheeseBlocks.CHEESE_CRAFTING_TABLE, 0); registerBlockModel(CheeseBlocks.CHEESE_COOKIE_BLOCK, 0); registerBlockModel(CheeseBlocks.CHEESE_BOARD, 0); registerBlockModel(CheeseBlocks.CHEESE_GRASS, 0); registerBlockModel(CheeseBlocks.CHEESE_DIRT, 0); registerBlockModel(CheeseBlocks.CHEESE_GRASS_PATH, 0); registerBlockModel(CheeseBlocks.CHEESE_FARM_LAND, 0); registerBlockModel(CheeseBlocks.CHEESE_STAIRS, 0); registerBlockModel(CheeseBlocks.CHEESE_PORTAL, 0); registerBlockModel(CheeseBlocks.CHEESE_STONE, 0); registerBlockModel(CheeseBlocks.CHEESE_FIRE, 0); } public void registerEventHandler() { GameRegistry.registerTileEntity(TileEntityCheeseBoard.class, Reference.MODID + "TileEntityCheeseBoard"); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCheeseBoard.class, new RenderCheeseBoard()); MinecraftForge.EVENT_BUS.register(new CheeseClientHandler()); } public void setTitle(String title) { Display.setTitle(title); } public void renderEntities() { RenderingRegistry.registerEntityRenderingHandler(EntityCheeseCow.class, new RenderingHandlerCheeseCow()); RenderingRegistry.registerEntityRenderingHandler(EntityCheeseArrow.class, new RenderingHandlerCheeseArrow()); RenderingRegistry.registerEntityRenderingHandler(EntityCheeseBoss.class, new RenderingHandlerCheeseBoss()); RenderingRegistry.registerEntityRenderingHandler(EntityCheeseBall.class, new RenderingHandlerCheeseBall()); } private void registerItemModel(Item item, int meta) { ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(item.getRegistryName(), "inventory")); } private void registerBlockModel(Block block, int meta) { ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), meta, new ModelResourceLocation(block.getRegistryName(), "inventory")); } }
  17. Bumperdiebumbumbump
  18. I found that entityIn.getLastPortalVec() is null... Can/how do I fix this?
  19. I don't override the methods, and registering it from preInit doesn't change anything
  20. - entityIn.getLastPortalVec().yCoord * (double) blockpattern$patternhelper.getHeight(); in the placeInExistingPortal() method

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.