port to 1.19 + other changes

This commit is contained in:
Sunskimmer82 2022-06-09 14:27:02 -05:00
parent 316803d567
commit 1e0cf3291e
16 changed files with 29 additions and 148 deletions

View File

@ -11,21 +11,9 @@ version = project.mod_version
group = project.maven_group group = project.maven_group
repositories { repositories {
maven {
url 'https://jitpack.io'
}
maven {
url "https://maven.terraformersmc.com/"
}
maven {
url "https://maven.shedaniel.me/"
}
} }
repositories {
maven {url = "https://maven.kyrptonaught.dev"}
}
@ -38,11 +26,6 @@ dependencies {
// Fabric API. This is technically optional, but you probably want it anyway. // Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modImplementation 'net.kyrptonaught:customportalapi:0.0.1-beta47-1.18'
include 'net.kyrptonaught:customportalapi:0.0.1-beta47-1.18'
modImplementation("com.gitlab.Lortseam:completeconfig:1.3.3")
include 'com.gitlab.Lortseam:completeconfig:1.3.3'
} }
processResources { processResources {

View File

@ -3,14 +3,14 @@ org.gradle.jvmargs=-Xmx6G
# Fabric Properties # Fabric Properties
# check these on https://fabricmc.net/develop # check these on https://fabricmc.net/develop
minecraft_version=1.18.1 minecraft_version=1.19
yarn_mappings=1.18.1+build.22 yarn_mappings=1.19+build.1
loader_version=0.12.12 loader_version=0.14.7
# Mod Properties # Mod Properties
mod_version = 1.5.0 mod_version = 1.5.0
maven_group = com.serenas.shitmod maven_group = com.serenas.shitmod
archives_base_name = serenas-shitmod archives_base_name = serenas-shitmod
# Dependencies # Fabric API
fabric_version=0.46.2+1.18 fabric_version=0.55.3+1.19

16
gradle_BAK.properties Normal file
View File

@ -0,0 +1,16 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx6G
# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.18.1
yarn_mappings=1.18.1+build.22
loader_version=0.12.12
# Mod Properties
mod_version = 1.5.0
maven_group = com.serenas.shitmod
archives_base_name = serenas-shitmod
# Dependencies
fabric_version=0.46.2+1.18

View File

@ -9,7 +9,7 @@ import net.minecraft.sound.BlockSoundGroup;
public class FabricBlock extends Block { public class FabricBlock extends Block {
public FabricBlock() { public FabricBlock() {
super(FabricBlockSettings.of(Material.WOOL).breakByHand(false).sounds(BlockSoundGroup.ANCIENT_DEBRIS).strength(1000, 100f)); super(FabricBlockSettings.of(Material.WOOL).sounds(BlockSoundGroup.ANCIENT_DEBRIS).strength(1000, 100f));
} }
} }

View File

@ -3,11 +3,9 @@ package net.serenas.shitmod;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.text.LiteralText;
import net.minecraft.util.ActionResult; import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import net.minecraft.util.TypedActionResult; import net.minecraft.util.TypedActionResult;
import net.minecraft.util.Util;
import net.minecraft.world.World; import net.minecraft.world.World;
public class Hausbommer extends Item{ public class Hausbommer extends Item{
@ -26,7 +24,7 @@ public class Hausbommer extends Item{
String Ymessage = String.valueOf(yRound); String Ymessage = String.valueOf(yRound);
String Zmessage = String.valueOf(zRound); String Zmessage = String.valueOf(zRound);
String fullMessage = "X: " + Xmessage + " Y: " + Ymessage + " Z: " + Zmessage; String fullMessage = "X: " + Xmessage + " Y: " + Ymessage + " Z: " + Zmessage;
playerentity.sendSystemMessage(new LiteralText(fullMessage), Util.NIL_UUID); System.out.println(fullMessage);
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, playerentity.getStackInHand(hand)); return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, playerentity.getStackInHand(hand));
} }
} }

View File

@ -1,7 +0,0 @@
package net.serenas.shitmod;
import me.lortseam.completeconfig.api.ConfigContainer;
public class MyContainer implements ConfigContainer {
}

View File

@ -1,10 +1,8 @@
package net.serenas.shitmod; package net.serenas.shitmod;
import me.lortseam.completeconfig.data.Config;
import net.fabricmc.api.ModInitializer; import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder; import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder;
import net.fabricmc.fabric.api.item.v1.FabricItemSettings; import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
import net.kyrptonaught.customportalapi.api.CustomPortalBuilder;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentTarget; import net.minecraft.enchantment.EnchantmentTarget;
@ -37,8 +35,6 @@ public class Shitmod implements ModInitializer {
new Identifier("shitmod", "tools"), new Identifier("shitmod", "tools"),
() -> new ItemStack(Shitmod.BLAZE_METAL_SHOVEL)); () -> new ItemStack(Shitmod.BLAZE_METAL_SHOVEL));
public static final Config config = new Config("shitmod", new MyContainer(), new configGroup());
public static final Item FABRIC_ITEM = new FabricItem(new Item.Settings().group(Shitmod.GENERAL_GROUP)); public static final Item FABRIC_ITEM = new FabricItem(new Item.Settings().group(Shitmod.GENERAL_GROUP));
public static final Block FABRIC_BLOCK = new FabricBlock(); public static final Block FABRIC_BLOCK = new FabricBlock();
@ -114,8 +110,6 @@ public class Shitmod implements ModInitializer {
@Override @Override
public void onInitialize() { public void onInitialize() {
config.load();
Registry.register(Registry.ITEM, new Identifier("shitmod", "fabric_item"), FABRIC_ITEM); Registry.register(Registry.ITEM, new Identifier("shitmod", "fabric_item"), FABRIC_ITEM);
Registry.register(Registry.BLOCK, new Identifier("shitmod", "fabric_block"), FABRIC_BLOCK); Registry.register(Registry.BLOCK, new Identifier("shitmod", "fabric_block"), FABRIC_BLOCK);
@ -188,14 +182,6 @@ public class Shitmod implements ModInitializer {
Registry.register(Registry.ITEM, new Identifier("shitmod", "pulverized_netherite"), PULVERIZED_NETHERITE); Registry.register(Registry.ITEM, new Identifier("shitmod", "pulverized_netherite"), PULVERIZED_NETHERITE);
Registry.register(Registry.ITEM, new Identifier("shitmod", "seared_gold_ingot"), SEARED_GOLD_INGOT); Registry.register(Registry.ITEM, new Identifier("shitmod", "seared_gold_ingot"), SEARED_GOLD_INGOT);
CustomPortalBuilder.beginPortal()
.frameBlock(Shitmod.FABRIC_BLOCK)
.lightWithItem(Shitmod.BLAZE_METAL_INGOT)
.destDimID(new Identifier("the_end"))
.tintColor(45,65,101)
.registerPortal();
} }

View File

@ -1,21 +0,0 @@
package net.serenas.shitmod;
import me.lortseam.completeconfig.api.ConfigEntry;
import me.lortseam.completeconfig.api.ConfigGroup;
public class configGroup implements ConfigGroup {
@ConfigEntry
private int swordFireballStrengthMultiplier = 1;
@ConfigEntry
private int axeFireballStrengthMultiplier = 1;
@ConfigEntry
private int explosionAspectStrengthMultiplier = 1;
@ConfigEntry
private int explosiveThornsStrengthMultiplier = 1;
public void setSetting(int explosionAspectStrengthMultiplier) {
this.explosionAspectStrengthMultiplier = explosionAspectStrengthMultiplier;
}
}

View File

@ -3,7 +3,6 @@ package net.serenas.shitmod;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.text.LiteralText;
import net.minecraft.util.ActionResult; import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import net.minecraft.util.TypedActionResult; import net.minecraft.util.TypedActionResult;
@ -18,23 +17,10 @@ public class fragileHeartCharm extends Item {
super(settings); super(settings);
} }
public int availableSlots = 1;
@Override @Override
public TypedActionResult<ItemStack> use(World World, PlayerEntity Playerentity, Hand Hand) { public TypedActionResult<ItemStack> use(World World, PlayerEntity Playerentity, Hand Hand) {
if (availableSlots > 0) {
availableSlots--;
Playerentity.sendMessage(new LiteralText("You have " + availableSlots + "charm notches left."), false);
Playerentity.addStatusEffect(new StatusEffectInstance(StatusEffects.HEALTH_BOOST, 20*1000000, 2)); Playerentity.addStatusEffect(new StatusEffectInstance(StatusEffects.HEALTH_BOOST, 20*1000000, 2));
Playerentity.getMainHandStack().damage(50,Playerentity,e-> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND)); Playerentity.getMainHandStack().damage(50,Playerentity,e-> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND));
availableSlots++;
} else if (availableSlots < 1) {
Playerentity.sendMessage(new LiteralText("You don't have enough charm notches to do that!"), true);
}
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, Playerentity.getStackInHand(Hand)); return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, Playerentity.getStackInHand(Hand));
} }
} }

View File

@ -6,7 +6,7 @@ import net.minecraft.entity.effect.StatusEffects;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.text.LiteralText;
import net.minecraft.util.ActionResult; import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import net.minecraft.util.TypedActionResult; import net.minecraft.util.TypedActionResult;
@ -22,17 +22,9 @@ public class fragileStrengthCharm extends Item{
@Override @Override
public TypedActionResult<ItemStack> use(World world, PlayerEntity PlayerEntity, Hand Hand) { public TypedActionResult<ItemStack> use(World world, PlayerEntity PlayerEntity, Hand Hand) {
if (availableSlots > 0) {
availableSlots--;
PlayerEntity.sendMessage(new LiteralText("You have " + availableSlots + "charm notches left."), false);
PlayerEntity.addStatusEffect(new StatusEffectInstance(StatusEffects.STRENGTH, 20*1000000, 2)); PlayerEntity.addStatusEffect(new StatusEffectInstance(StatusEffects.STRENGTH, 20*1000000, 2));
PlayerEntity.getMainHandStack().damage(50,PlayerEntity,e-> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND)); PlayerEntity.getMainHandStack().damage(50,PlayerEntity,e-> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND));
availableSlots++;
} else if (availableSlots < 1) {
PlayerEntity.sendMessage(new LiteralText("You don't have enough charm notches to do that!"), true);
}
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(Hand)); return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(Hand));
} }

View File

@ -4,7 +4,6 @@ import net.minecraft.entity.EquipmentSlot;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.text.LiteralText;
import net.minecraft.util.ActionResult; import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import net.minecraft.util.TypedActionResult; import net.minecraft.util.TypedActionResult;
@ -21,17 +20,8 @@ public class kingsoul extends Item {
@Override @Override
public TypedActionResult<ItemStack> use(World world, PlayerEntity PlayerEntity, Hand hand) { public TypedActionResult<ItemStack> use(World world, PlayerEntity PlayerEntity, Hand hand) {
if (availableSlots > 0) {
availableSlots--;
PlayerEntity.sendMessage(new LiteralText("You have " + availableSlots + "charm notches left."), false);
PlayerEntity.getHungerManager().add(1, 1); PlayerEntity.getHungerManager().add(1, 1);
PlayerEntity.getMainHandStack().damage(1,PlayerEntity,e-> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND)); PlayerEntity.getMainHandStack().damage(1,PlayerEntity,e-> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND));
availableSlots++;
} else if (availableSlots < 1) {
PlayerEntity.sendMessage(new LiteralText("You don't have enough charm notches to do that!"), true);
}
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(hand)); return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(hand));
} }

View File

@ -1,11 +1,8 @@
package net.serenas.shitmod; package net.serenas.shitmod;
import net.minecraft.entity.effect.StatusEffectInstance;
import net.minecraft.entity.effect.StatusEffects;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.text.LiteralText;
import net.minecraft.util.ActionResult; import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import net.minecraft.util.TypedActionResult; import net.minecraft.util.TypedActionResult;
@ -23,13 +20,6 @@ int potatoChipsConsumed = 0;
public TypedActionResult<ItemStack> use(World World, PlayerEntity PlayerEntity, Hand Hand) { public TypedActionResult<ItemStack> use(World World, PlayerEntity PlayerEntity, Hand Hand) {
PlayerEntity.getHungerManager().add(1, 10f); PlayerEntity.getHungerManager().add(1, 10f);
PlayerEntity.getStackInHand(Hand).decrement(1); PlayerEntity.getStackInHand(Hand).decrement(1);
potatoChipsConsumed+=1;
if (potatoChipsConsumed == 69) {
PlayerEntity.addStatusEffect(new StatusEffectInstance(StatusEffects.HUNGER, 20 * 15, 4));
int potatoChipsConsumed = 0;
PlayerEntity.sendMessage(new LiteralText("I'm really fat/test"), false);
System.out.println("I'm really fat\n/test");
}
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(Hand)); return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(Hand));
} }
} }

View File

@ -3,7 +3,6 @@ package net.serenas.shitmod;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.text.LiteralText;
import net.minecraft.util.ActionResult; import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import net.minecraft.util.TypedActionResult; import net.minecraft.util.TypedActionResult;
@ -19,13 +18,13 @@ public class rockWithAStringAround extends Item {
public TypedActionResult<ItemStack> use(World World, PlayerEntity PlayerEntity, Hand Hand) { public TypedActionResult<ItemStack> use(World World, PlayerEntity PlayerEntity, Hand Hand) {
var messageToSay = Math.random(); var messageToSay = Math.random();
if (messageToSay < 0.3) { if (messageToSay < 0.3) {
PlayerEntity.sendMessage(new LiteralText("I'm a faggot"), false); System.out.println("placeholder 1");
} else if (messageToSay > 0.3) { } else if (messageToSay > 0.3) {
if (messageToSay < 0.6) { if (messageToSay < 0.6) {
PlayerEntity.sendMessage(new LiteralText("I'm a tranny"), false); System.out.println("placeholder 2");
} }
} else if (messageToSay > 0.6) { } else if (messageToSay > 0.6) {
PlayerEntity.sendMessage(new LiteralText("I'm a mick"), false); System.out.println("placeholder 3");
} }

View File

@ -6,7 +6,6 @@ import net.minecraft.entity.effect.StatusEffects;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.text.LiteralText;
import net.minecraft.util.ActionResult; import net.minecraft.util.ActionResult;
import net.minecraft.util.TypedActionResult; import net.minecraft.util.TypedActionResult;
import net.minecraft.world.World; import net.minecraft.world.World;
@ -22,17 +21,8 @@ public class stalwartShell extends Item{
@Override @Override
public TypedActionResult<ItemStack> use(World world, PlayerEntity PlayerEntity, Hand hand) { public TypedActionResult<ItemStack> use(World world, PlayerEntity PlayerEntity, Hand hand) {
if (availableSlots > 0) {
availableSlots--;
PlayerEntity.sendMessage(new LiteralText("You have " + availableSlots + "charm notches left."), false);
PlayerEntity.addStatusEffect(new StatusEffectInstance(StatusEffects.RESISTANCE, 20, 5)); PlayerEntity.addStatusEffect(new StatusEffectInstance(StatusEffects.RESISTANCE, 20, 5));
PlayerEntity.getMainHandStack().damage(1,PlayerEntity,e-> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND)); PlayerEntity.getMainHandStack().damage(1,PlayerEntity,e-> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND));
availableSlots++;
} else if (availableSlots < 1) {
PlayerEntity.sendMessage(new LiteralText("You don't have enough charm notches to do that!"), true);
}
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(hand)); return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(hand));
} }

View File

@ -5,7 +5,6 @@ import net.minecraft.entity.effect.StatusEffects;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.text.LiteralText;
import net.minecraft.util.ActionResult; import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import net.minecraft.util.TypedActionResult; import net.minecraft.util.TypedActionResult;
@ -21,16 +20,7 @@ public class unbreakableHeartCharm extends Item {
@Override @Override
public TypedActionResult<ItemStack> use(World world, PlayerEntity PlayerEntity, Hand Hand) { public TypedActionResult<ItemStack> use(World world, PlayerEntity PlayerEntity, Hand Hand) {
if (availableSlots > 0) {
availableSlots--;
PlayerEntity.sendMessage(new LiteralText("You have " + availableSlots + " charm notches left."), false);
PlayerEntity.addStatusEffect(new StatusEffectInstance(StatusEffects.HEALTH_BOOST, 20*1000000, 4)); PlayerEntity.addStatusEffect(new StatusEffectInstance(StatusEffects.HEALTH_BOOST, 20*1000000, 4));
availableSlots++;
} else if (availableSlots < 1) {
PlayerEntity.sendMessage(new LiteralText("You don't have enough charm notches to do that!"), true);
}
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(Hand)); return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(Hand));
} }
} }

View File

@ -5,7 +5,6 @@ import net.minecraft.entity.effect.StatusEffects;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.text.LiteralText;
import net.minecraft.util.ActionResult; import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import net.minecraft.util.TypedActionResult; import net.minecraft.util.TypedActionResult;
@ -21,17 +20,7 @@ public class unbreakableStrengthCharm extends Item {
@Override @Override
public TypedActionResult<ItemStack> use(World world, PlayerEntity PlayerEntity, Hand Hand) { public TypedActionResult<ItemStack> use(World world, PlayerEntity PlayerEntity, Hand Hand) {
if (availableSlots > 0) {
availableSlots--;
PlayerEntity.sendMessage(new LiteralText("You have " + availableSlots + "charm notches left."), false);
PlayerEntity.addStatusEffect(new StatusEffectInstance(StatusEffects.STRENGTH, 20*1000000, 3)); PlayerEntity.addStatusEffect(new StatusEffectInstance(StatusEffects.STRENGTH, 20*1000000, 3));
availableSlots++;
} else if (availableSlots < 1) {
PlayerEntity.sendMessage(new LiteralText("You don't have enough charm notches to do that!"), true);
}
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(Hand)); return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(Hand));
} }
} }