-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjusted backported changes to 1.19.2
- Loading branch information
Showing
11 changed files
with
55 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file renamed
BIN
+455 KB
libs/majrusz-library-1.19.3-3.2.0.jar → libs/majrusz-library-1.19.2-3.2.0.jar
Binary file not shown.
162 changes: 0 additions & 162 deletions
162
src/main/java/com/majruszsdifficulty/CreativeModeTabs.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 38 additions & 1 deletion
39
src/main/java/com/majruszsdifficulty/items/CerberusFangItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,46 @@ | ||
package com.majruszsdifficulty.items; | ||
|
||
import com.majruszsdifficulty.Registries; | ||
import net.minecraft.core.NonNullList; | ||
import net.minecraft.world.item.CreativeModeTab; | ||
import net.minecraft.world.item.Item; | ||
import net.minecraft.world.item.ItemStack; | ||
import net.minecraft.world.item.Items; | ||
import net.minecraft.world.item.alchemy.Potion; | ||
import net.minecraft.world.item.alchemy.PotionUtils; | ||
|
||
import java.util.stream.Stream; | ||
|
||
public class CerberusFangItem extends Item { | ||
public CerberusFangItem() { | ||
super( new Properties() ); | ||
super( new Properties().tab( Registries.ITEM_GROUP ) ); | ||
} | ||
|
||
@Override | ||
public void fillItemCategory( CreativeModeTab creativeModeTab, NonNullList< ItemStack > itemStacks ) { | ||
super.fillItemCategory( creativeModeTab, itemStacks ); | ||
|
||
if( !this.allowedIn( creativeModeTab ) ) { | ||
return; | ||
} | ||
|
||
Stream.of( | ||
newItemStackWithPotion( Items.TIPPED_ARROW, Registries.WITHER_POTION.get() ), | ||
newItemStackWithPotion( Items.TIPPED_ARROW, Registries.WITHER_POTION_LONG.get() ), | ||
newItemStackWithPotion( Items.TIPPED_ARROW, Registries.WITHER_POTION_STRONG.get() ), | ||
newItemStackWithPotion( Items.POTION, Registries.WITHER_POTION.get() ), | ||
newItemStackWithPotion( Items.POTION, Registries.WITHER_POTION_LONG.get() ), | ||
newItemStackWithPotion( Items.POTION, Registries.WITHER_POTION_STRONG.get() ), | ||
newItemStackWithPotion( Items.SPLASH_POTION, Registries.WITHER_POTION.get() ), | ||
newItemStackWithPotion( Items.SPLASH_POTION, Registries.WITHER_POTION_LONG.get() ), | ||
newItemStackWithPotion( Items.SPLASH_POTION, Registries.WITHER_POTION_STRONG.get() ), | ||
newItemStackWithPotion( Items.LINGERING_POTION, Registries.WITHER_POTION.get() ), | ||
newItemStackWithPotion( Items.LINGERING_POTION, Registries.WITHER_POTION_LONG.get() ), | ||
newItemStackWithPotion( Items.LINGERING_POTION, Registries.WITHER_POTION_STRONG.get() ) | ||
).forEach( itemStacks::add ); | ||
} | ||
|
||
private static ItemStack newItemStackWithPotion( Item item, Potion potion ) { | ||
return PotionUtils.setPotion( new ItemStack( item ), potion ); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters