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.

Ideki

Members
  • Joined

  • Last visited

  1. Hello, Every time I compile I get the following error in the console. It does not stop/fail the compilation, but I think I should still address it. Any idea how to fix it ?
  2. nvm, just realized that patchouli is using MC 1.18.2 So I got the wrong MDK
  3. Ok, so I fixed my build.gradle Then I was able to compile. But minecraft started I got an error message from Patchouli that basically said that I was not using the correct version of Forge. So I changed the dependency to And I downloaded forge-1.18.1-39.1.0-mdk.zip I extracted the files and copied gradlew, gradlew.bat and the gradle folder to my mod folder. Now when I try to compile I get the following error: So I am guessing I did something wrong when attempting to update the forge mdk. Any idea what I am missing ?
  4. Hello, I am trying to use Patchouli so I can make a book in my mod. I copied the part I think I need from Botania's build-gradle. https://github.com/VazkiiMods/Botania/blob/fb8d7db61c54930d29f4b22ab988a783d61c83da/Common/build.gradle https://github.com/VazkiiMods/Botania/blob/4697930092cd1cc1ad318abc9ab7ebf58ee9b5ce/Forge/build.gradle But the compilation fails with the following error: Where does compileOnly() come from? This is my build.gradle: buildscript { repositories { maven { url = 'https://maven.minecraftforge.net' } maven { name = "Jared" url = "https://maven.blamejared.com/" } mavenCentral() } dependencies { classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true compileOnly "vazkii.patchouli:Patchouli-xplat:1.18.2-66-SNAPSHOT" implementation fg.deobf("vazkii.patchouli:Patchouli:1.18.2-66-SNAPSHOT") } } apply plugin: 'net.minecraftforge.gradle' apply plugin: 'eclipse' apply plugin: 'maven-publish' version = '1.0' group = 'com.ideki.test_mod' archivesBaseName = 'test_mod' java.toolchain.languageVersion = JavaLanguageVersion.of(17) println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch')) minecraft { mappings channel: 'official', version: '1.18.1' accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') runs { client { workingDirectory project.file('run') mods { test_mod { source sourceSets.main } } } server { workingDirectory project.file('run') mods { test_mod { source sourceSets.main } } } data { workingDirectory project.file('run') args '--mod', archivesBaseName, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') mods { test_mod { source sourceSets.main } } } } } sourceSets.main.resources { srcDir 'src/generated/resources' } repositories { } dependencies { minecraft 'net.minecraftforge:forge:1.18.1-39.0.5' } jar { manifest { attributes([ "Specification-Title" : "test_mod", "Specification-Vendor" : "Ideki", "Specification-Version" : "1", "Implementation-Title" : project.name, "Implementation-Version" : project.jar.archiveVersion, "Implementation-Vendor" : "Ideki", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") ]) } } jar.finalizedBy('reobfJar') publishing { publications { mavenJava(MavenPublication) { artifact jar } } repositories { maven { url "file://${project.projectDir}/mcmodsrepo" } } }
  5. Hello, Is it possible to rotate a block every tick by a given degree/radian? I have a block that I would like to rotate on its own each tick around its Y axis.
  6. [Edited replied to the wrong post]
  7. So is it a lost knowledge ? Nobody knows how to do this anymore?
  8. ok, so if I go the other way around and make the speed 3600000 then that should discourage most people to try and break it. Right ?
  9. What would happen if I made the speed of 0 ? Would that keep it unbreakable but pushable ?
  10. Hello, I am trying to create an unbreakable block but that I can move with pistons. So I got the indestructible part figured out from the BEDROCK block. And I get the properties of GLASS to make it unspawnable. But it looks that it also makes it unpushable. These are the properties of my block: public static final BlockBehaviour.Properties MY_BLOCK_PROPERTIES = BlockBehaviour.Properties .of(Material.GLASS, MaterialColor.TERRACOTTA_BLACK) .strength(-1.0F, 3600000.0F) .noDrops() .sound(SoundType.METAL); Any idea how I can make my block pushable ?
  11. Hello, Anybody knows how to make a Prism (like a pyramid) shape in 1.18 ? Like the spikes from Extra Utilities, or Carpenter's Blocks. Is there a 1.18 mod that does it? ex: I tried to do it with BLockBench, but could not figure out how to do it.
  12. I figured it out. The BlockInit was using the wrong block. Since I have 2 blocks (toggle and timer) and I copied timer from toggle. BlockInit was using Toggle instead of Timer. And the behavior are similar enough that I did not initially see the problem. Thank you for trying to help me on this.
  13. Yes, the property is registered to the block state too public class ActivatedBlock extends HorizontalDirectionalBlock { public static final BooleanProperty IS_ACTIVATED = BooleanProperty.create("is_activated"); public ActivatedBlock(Properties properties) { super(properties); registerDefaultState(defaultBlockState().setValue(IS_ACTIVATED, Boolean.valueOf(false))); } @Override protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) { super.createBlockStateDefinition(builder); builder.add(IS_ACTIVATED); } public int getSignal(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, Direction direction) { return blockState.getValue(IS_ACTIVATED) ? 15 : 0; } public int getDirectSignal(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, Direction direction) { return blockState.getValue(IS_ACTIVATED) ? 15 : 0; } } Yes, I checked the debugger. And nothing comes up in the console. That's why I put all those println.
  14. The IS_ACTIVATED property is declared in the parent ActivatedBlock class. My problem is that the following function is never called: public void tick(BlockState state, ServerLevel world, BlockPos pos, Random random) In the use function I do the following, but nothing happens level.scheduleTick(blockPos, blockstate.getBlock(), 2 + level.random.nextInt(5));
  15. Hello, I am trying to schedule a tick on a block when I right click it. But somehow I never get the tick event to trigger. Any idea what is going on? public class ActivatedTimerBlock extends ActivatedBlock { public static final BooleanProperty ACTIVE = BooleanProperty.create("active"); public ActivatedTimerBlock(Properties properties) { super(properties); } @Override protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) { super.createBlockStateDefinition(builder); builder.add(ACTIVE); } private boolean isTicking(BlockState state) { return state.hasProperty(IS_ACTIVATED) && state.getValue(IS_ACTIVATED); } @Override public InteractionResult use(BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult) { if (level.isClientSide) { return InteractionResult.SUCCESS; } else { BlockState blockstate = this.pull(blockState, level, blockPos); float f = blockstate.getValue(IS_ACTIVATED) ? 0.6F : 0.5F; level.playSound((Player) null, blockPos, SoundEvents.LEVER_CLICK, SoundSource.BLOCKS, 0.3F, f); level.gameEvent(player, blockstate.getValue(IS_ACTIVATED) ? GameEvent.BLOCK_SWITCH : GameEvent.BLOCK_UNSWITCH, blockPos); level.scheduleTick(blockPos, blockstate.getBlock(), 2 + level.random.nextInt(5)); return InteractionResult.CONSUME; } } public BlockState pull(BlockState blockState, Level level, BlockPos blockPos) { blockState = blockState.cycle(IS_ACTIVATED); level.setBlock(blockPos, blockState, 3); this.updateNeighbours(blockState, level, blockPos); return blockState; } public boolean isSignalSource(BlockState blockState) { return true; } private void updateNeighbours(BlockState blockState, Level level, BlockPos blockPos) { level.updateNeighborsAt(blockPos, this); } @Override public void tick(BlockState state, ServerLevel world, BlockPos pos, Random random) { super.tick(state, world, pos, random); System.out.println("tick"); if (world.isClientSide) { return; } if (isTicking(state)) { System.out.println("ticking"); if (state.getValue(ACTIVE)) { System.out.println("active"); world.setBlockAndUpdate(pos, state.setValue(IS_ACTIVATED, false).setValue(ACTIVE, false)); } else { System.out.println("not active"); world.setBlockAndUpdate(pos, state.setValue(ACTIVE, true)); world.scheduleTick(pos, this, 15); } } } }

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.