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.

Featured Replies

World#isRemote

is

true

on the client and

false

on the server. So you want:

 if !remote do stuff

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

What else would I mean with overriding?

I thought you ment if I was using an @Override annotation, but... My head is dumb some times

 

The annotation doesn't compile into anything, you are still overriding a method.  If you are overriding a method, mark it with the annotation as it will detect user error in the method signature.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

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..?

Classes: 94

Lines of code: 12173

Other files: 206

Github repo: https://github.com/KokkieBeer/DeGeweldigeMod

  • Author

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?

Classes: 94

Lines of code: 12173

Other files: 206

Github repo: https://github.com/KokkieBeer/DeGeweldigeMod

Not easily, no. You'd have to subscribe to the PlayerTickEvent (or EntityLivingTickEvent) and search the 3x4x3 volume around the entity for your fire block.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

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

Classes: 94

Lines of code: 12173

Other files: 206

Github repo: https://github.com/KokkieBeer/DeGeweldigeMod

Guest
This topic is now closed to further replies.

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.