diff --git a/gradle.properties b/gradle.properties index 84d3d80..ef6f89a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,7 +14,7 @@ org.gradle.jvmargs=-Xmx2G parchment_version = 2022.11.06 # Mod Properties - mod_version = 1.5.2 + mod_version = 1.5.3 maven_group = com.github.ethanicuss archives_base_name = astraladditions diff --git a/src/main/java/com/github/ethanicuss/astraladditions/entities/boomerang/BoomerangEntity.java b/src/main/java/com/github/ethanicuss/astraladditions/entities/boomerang/BoomerangEntity.java index a759103..104cc43 100644 --- a/src/main/java/com/github/ethanicuss/astraladditions/entities/boomerang/BoomerangEntity.java +++ b/src/main/java/com/github/ethanicuss/astraladditions/entities/boomerang/BoomerangEntity.java @@ -122,7 +122,7 @@ public void tick() { float xspeed = (float)this.getVelocity().getX(); float yspeed = (float)this.getVelocity().getZ(); float angle = (float)(Math.toDegrees(Math.atan(xspeed/yspeed))) - this.getDataTracker().get(CURVE); - if (yspeed < 0){angle += 180; System.out.println("brah");} + if (yspeed < 0){angle += 180;} this.setVelocity(Math.sqrt(Math.pow(xspeed, 2)+Math.pow(yspeed, 2))*Math.sin(Math.toRadians(angle)), (float)this.getVelocity().getY(), Math.sqrt(Math.pow(xspeed, 2)+Math.pow(yspeed, 2))*Math.cos(Math.toRadians(angle))); if (this.getDataTracker().get(AGE) > this.getDataTracker().get(MAX_AGE)){ this.getDataTracker().set(HIT, true); diff --git a/src/main/java/com/github/ethanicuss/astraladditions/entities/scrap_projectile/ScrapProjectileEntity.java b/src/main/java/com/github/ethanicuss/astraladditions/entities/scrap_projectile/ScrapProjectileEntity.java index e2f626f..34febed 100644 --- a/src/main/java/com/github/ethanicuss/astraladditions/entities/scrap_projectile/ScrapProjectileEntity.java +++ b/src/main/java/com/github/ethanicuss/astraladditions/entities/scrap_projectile/ScrapProjectileEntity.java @@ -49,8 +49,6 @@ protected void onEntityHit(EntityHitResult entityHitResult) { float damage = 25 - this.age*2; - System.out.println(damage); - entity.damage(DamageSource.thrownProjectile(this, this.getOwner()), damage); } diff --git a/src/main/java/com/github/ethanicuss/astraladditions/items/weapons/ShotgunItem.java b/src/main/java/com/github/ethanicuss/astraladditions/items/weapons/ShotgunItem.java index db6a7d0..5e94cc1 100644 --- a/src/main/java/com/github/ethanicuss/astraladditions/items/weapons/ShotgunItem.java +++ b/src/main/java/com/github/ethanicuss/astraladditions/items/weapons/ShotgunItem.java @@ -8,12 +8,9 @@ import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.BowItem; import net.minecraft.item.ItemStack; -import net.minecraft.item.Items; -import net.minecraft.item.RangedWeaponItem; import net.minecraft.sound.SoundCategory; import net.minecraft.sound.SoundEvents; import net.minecraft.stat.Stats; -import net.minecraft.tag.ItemTags; import net.minecraft.util.Hand; import net.minecraft.util.TypedActionResult; import net.minecraft.world.World; @@ -36,12 +33,10 @@ public void onStoppedUsing(ItemStack stack, World world, LivingEntity user, int Predicate predicate = (ammoStack) -> ammoStack.isOf(ModItems.SPUD_MAG); - PlayerEntity p = (PlayerEntity) user; - ItemStack itemStack = stack;//set to stack just to init - for(int i = 0; i < p.getInventory().size(); ++i) { - ItemStack itemStack2 = p.getInventory().getStack(i); + for(int i = 0; i < playerEntity.getInventory().size(); ++i) { + ItemStack itemStack2 = playerEntity.getInventory().getStack(i); if (predicate.test(itemStack2)) { bl2 = true; itemStack = itemStack2; @@ -51,8 +46,6 @@ public void onStoppedUsing(ItemStack stack, World world, LivingEntity user, int float f = getPullProgress(this.getMaxUseTime(stack) - remainingUseTicks); if (!world.isClient && (isCreative || bl2)) { - int k; - int j; for (var i = 0; i < 15; i++) { ScrapProjectileEntity proj = new ScrapProjectileEntity(ModEntities.SCRAP_PROJECTILE, world); proj.setPos(playerEntity.getX(), playerEntity.getEyeY(), playerEntity.getZ()); @@ -96,9 +89,18 @@ public static float getPullProgress(int useTicks) { @Override public TypedActionResult use(World world, PlayerEntity user, Hand hand) { - boolean bl; + boolean bl = false; ItemStack itemStack = user.getStackInHand(hand); - boolean bl2 = bl = user.getArrowType(itemStack).getCount() > 0; + + Predicate predicate = (ammoStack) -> ammoStack.isOf(ModItems.SPUD_MAG); + + for(int i = 0; i < ((PlayerEntity) user).getInventory().size(); ++i) { + ItemStack itemStack2 = ((PlayerEntity) user).getInventory().getStack(i); + if (predicate.test(itemStack2)) { + bl = true; + } + } + if (user.getAbilities().creativeMode || bl) { user.setCurrentHand(hand); return TypedActionResult.consume(itemStack); diff --git a/src/main/java/com/github/ethanicuss/astraladditions/recipes/DesizerRecipes.java b/src/main/java/com/github/ethanicuss/astraladditions/recipes/DesizerRecipes.java index 6ead2f1..794852e 100644 --- a/src/main/java/com/github/ethanicuss/astraladditions/recipes/DesizerRecipes.java +++ b/src/main/java/com/github/ethanicuss/astraladditions/recipes/DesizerRecipes.java @@ -56,8 +56,6 @@ public static void init(){ }*/ DESIZER_RECIPES.add(register("desizer_recipes/testrecipe")); - - System.out.println(DESIZER_RECIPES.get(0).tryCast(Registry.BLOCK_KEY)); //TagPacketSerializer. recipes.add(new RecipeStructure()); @@ -90,12 +88,9 @@ public static void init(){ recipes.get(0).blocks[2][2][1] = Blocks.OBSIDIAN; recipes.get(0).blocks[2][2][2] = Blocks.OBSIDIAN; - System.out.println("I'm gonna print!!!"); for (int i = 0; i < DESIZER_RECIPES.size(); i++){ recipes.add(new RecipeStructure()); recipes.get(0).resultItem = Items.GLOWSTONE; - System.out.println(DESIZER_RECIPES.get(i).toString()); - System.out.println(DESIZER_RECIPES.get(i)); //RegistryEntryList blocks = DESIZER_RECIPES.get(i); //blocks.get(); diff --git a/src/main/resources/assets/astraladditions/blockstates/missing_block.json b/src/main/resources/assets/astraladditions/blockstates/missing_block.json new file mode 100644 index 0000000..b3ea875 --- /dev/null +++ b/src/main/resources/assets/astraladditions/blockstates/missing_block.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": {"model": "astraladditions:block/missing_block"} + } +} \ No newline at end of file diff --git a/src/main/resources/assets/astraladditions/models/block/missing_block.json b/src/main/resources/assets/astraladditions/models/block/missing_block.json new file mode 100644 index 0000000..6539c76 --- /dev/null +++ b/src/main/resources/assets/astraladditions/models/block/missing_block.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "astraladditions:block/missing" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/astraladditions/models/item/admin_rang.json b/src/main/resources/assets/astraladditions/models/item/admin_rang.json new file mode 100644 index 0000000..f997b63 --- /dev/null +++ b/src/main/resources/assets/astraladditions/models/item/admin_rang.json @@ -0,0 +1,118 @@ +{ + "credit": "Made with Blockbench", + "texture_size": [32, 32], + "textures": { + "1": "astraladditions:block/missing", + "particle": "astraladditions:block/missing" + }, + "elements": [ + { + "name": "middle", + "from": [0, 0, 0], + "to": [3, 2, 3], + "faces": { + "north": {"uv": [3, 5, 4.5, 6], "texture": "#1"}, + "east": {"uv": [4.5, 5, 6, 6], "texture": "#1"}, + "south": {"uv": [3, 6, 4.5, 7], "texture": "#1"}, + "west": {"uv": [4.5, 6, 6, 7], "texture": "#1"}, + "up": {"uv": [6.5, 1.5, 5, 0], "texture": "#1"}, + "down": {"uv": [6.5, 1.5, 5, 3], "texture": "#1"} + } + }, + { + "name": "left", + "from": [3, 0, 0], + "to": [13, 1, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [3, 0, 0]}, + "faces": { + "north": {"uv": [3, 3, 8, 3.5], "texture": "#1"}, + "east": {"uv": [6.5, 2, 8, 2.5], "texture": "#1"}, + "south": {"uv": [3, 3.5, 8, 4], "texture": "#1"}, + "west": {"uv": [6.5, 2.5, 8, 3], "texture": "#1"}, + "up": {"uv": [5, 1.5, 0, 0], "texture": "#1"}, + "down": {"uv": [5, 1.5, 0, 3], "texture": "#1"} + } + }, + { + "name": "right", + "from": [0, 0, 3], + "to": [3, 1, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 3]}, + "faces": { + "north": {"uv": [3, 7, 4.5, 7.5], "texture": "#1"}, + "east": {"uv": [3, 4, 8, 4.5], "texture": "#1"}, + "south": {"uv": [4.5, 7, 6, 7.5], "texture": "#1"}, + "west": {"uv": [3, 4.5, 8, 5], "texture": "#1"}, + "up": {"uv": [1.5, 8, 0, 3], "texture": "#1"}, + "down": {"uv": [3, 3, 1.5, 8], "texture": "#1"} + } + }, + { + "name": "left tip", + "from": [13, 0, 0], + "to": [15, 1, 2], + "rotation": {"angle": 0, "axis": "y", "origin": [13, 0, 0]}, + "faces": { + "north": {"uv": [7, 6.5, 8, 7], "texture": "#1"}, + "east": {"uv": [7, 7, 8, 7.5], "texture": "#1"}, + "south": {"uv": [7.5, 0, 8.5, 0.5], "texture": "#1"}, + "west": {"uv": [7.5, 0.5, 8.5, 1], "texture": "#1"}, + "up": {"uv": [7.5, 1, 6.5, 0], "texture": "#1"}, + "down": {"uv": [7.5, 1, 6.5, 2], "texture": "#1"} + } + }, + { + "name": "right tip", + "from": [0, 0, 13], + "to": [2, 1, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 13]}, + "faces": { + "north": {"uv": [7, 5, 8, 5.5], "texture": "#1"}, + "east": {"uv": [7, 5.5, 8, 6], "texture": "#1"}, + "south": {"uv": [6, 7, 7, 7.5], "texture": "#1"}, + "west": {"uv": [7, 6, 8, 6.5], "texture": "#1"}, + "up": {"uv": [7, 6, 6, 5], "texture": "#1"}, + "down": {"uv": [7, 6, 6, 7], "texture": "#1"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [180, -180, 90], + "translation": [3.75, 1.5, 3.25], + "scale": [0.5, 0.5, 0.5] + }, + "thirdperson_lefthand": { + "rotation": [180, -180, -90], + "translation": [-3.75, 1.5, 3.25], + "scale": [0.5, 0.5, 0.5] + }, + "firstperson_righthand": { + "rotation": [180, -180, 90], + "translation": [3.75, 1.5, 3.25], + "scale": [0.5, 0.5, 0.5] + }, + "firstperson_lefthand": { + "rotation": [180, -180, -90], + "translation": [-3.75, 1.5, 3.25], + "scale": [0.5, 0.5, 0.5] + }, + "ground": { + "translation": [0, 5, 0], + "scale": [0.5, 0.5, 0.5] + }, + "gui": { + "rotation": [90, -135, 0], + "translation": [-3, 0, 0], + "scale": [0.75, 0.75, 0.75] + }, + "head": { + "rotation": [180, 45, 45], + "translation": [-5.75, 2.5, -13.5] + }, + "fixed": { + "rotation": [-90, 45, 0], + "translation": [4.5, 0, -7.25] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/astraladditions/sounds.json b/src/main/resources/assets/astraladditions/sounds.json index 8aca089..abb9c75 100644 --- a/src/main/resources/assets/astraladditions/sounds.json +++ b/src/main/resources/assets/astraladditions/sounds.json @@ -6,7 +6,7 @@ "stream": true }, { - "name": "astraladditions:astroid_cluster", + "name": "astraladditions:asteroid_cluster", "stream": true } ]