Everything posted by Azarsra
-
1.18.1 I need help making an item that can skip time.
yeah I figured That was One of the problems lol, I honestly forgot about it. But it shows in the code it self. Here you go: public static ServerLevel serverlevel() { ServerLevel server = serverlevel().getLevel(); return server; } also yes, I know how stupid this code is, but how would I go about accessing ServerLevel?
-
1.18.1 I need help making an item that can skip time.
- 1.18.1 I need help making an item that can skip time.
public void inventoryTick(ItemStack stack, Level world, Entity entity, int i, boolean p_41408_) { if(active && world.getDayTime() < 13000) { active = false; } if(active&& world.getDayTime() > 13000) { serverlevel().setDayTime(1000); } } here's code so far- 1.18.1 I need help making an item that can skip time.
What I have tried so far Is calling setDayTime, it has an ticking entity crash.- 1.18.1 I need help making an item that can skip time.
I'm sorry for bothering You, but I can't seem to figure any of this out. How do the TimeCommand class changes the time without the game crashing? once again I'm really sorry for bothering you. I guess 1.7.10 was way easier for me to grasp.- 1.18.1 I need help making an item that can skip time.
Okay thanks I will try.- 1.18.1 I need help making an item that can skip time.
Okay, thanks I'll look in to that. Is there Away I get this effect I got back in 1.7.10? : https://gamejolt.com/p/1-7-10-transition-ewgpjxzc- 1.18.1 I need help making an item that can skip time.
Do you know where I can access setWorldtime in the version?, what class is it in?- 1.18.1 I need help making an item that can skip time.
So do you have any fix?- 1.18.1 I need help making an item that can skip time.
The first Line of code: public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { if (world.getWorldTime() < 13000) { return stack; } active = true; player.setItemInUse(stack, this.getMaxItemUseDuration(stack)); return stack; } The second line of code: public void onUpdate(ItemStack itemstack, World world, Entity entity_, int i, boolean flag) { block4 = world.getBlock(x, y, z); if (active && world.getWorldTime() > 24000) { world.setWorldTime(world.getWorldTime() - 24000); } if(active && world.getWorldTime() < 13000) active =false; if (active) { world.setWorldTime(world.getWorldTime() + 200); } }- 1.18.1 I need help making an item that can skip time.
Okay One second, sorry for not responding I was sleeping.- 1.18.1 I need help making an item that can skip time.
The title says it all, I manage to do this back in 1.7.10, but now, I don't know how to do it. Any help is fine. I also been trying to get this to work for the past few hours, but, I'll be honest, I do not know how any of the Worldtime code works. also, I only need it to be able to skip the night cycle, besides from some minor hickups, the port have been going really well- 1.18.1 help with generating custom block through out the world.
Anyone? I can't find anything about block generation- 1.18.1 help with generating custom block through out the world.
once again I find myself stuck while trying to port my mod from 1.7.10 to 1.18.1, anyone knows how to generate blocks through out the world? I searched but can't seem to find anything.- 1.18.1 Item Drops randomly
@diesieben07 I figured it out! thanks for your help!- 1.18.1 Item Drops randomly
Okay, thanks! I will See what I can learn.- 1.18.1 Item Drops randomly
@diesieben07 okay thanks, Any places you'd recommend to look in to it?- 1.18.1 Item Drops randomly
I've created a working mod on 1.7.10 and now I am trying to port it to 1.18.1 for me and my brothers to play, can somebody help me Make an item that drops and sometimes do not drop an item. - 1.18.1 I need help making an item that can skip time.
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.