Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -36,12 +33,10 @@ public void onStoppedUsing(ItemStack stack, World world, LivingEntity user, int

Predicate<ItemStack> 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;
Expand All @@ -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());
Expand Down Expand Up @@ -96,9 +89,18 @@ public static float getPullProgress(int useTicks) {

@Override
public TypedActionResult<ItemStack> 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<ItemStack> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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<Block> blocks = DESIZER_RECIPES.get(i);
//blocks.get();

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"variants": {
"": {"model": "astraladditions:block/missing_block"}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "block/cube_all",
"textures": {
"all": "astraladditions:block/missing"
}
}
118 changes: 118 additions & 0 deletions src/main/resources/assets/astraladditions/models/item/admin_rang.json
Original file line number Diff line number Diff line change
@@ -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]
}
}
}
2 changes: 1 addition & 1 deletion src/main/resources/assets/astraladditions/sounds.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"stream": true
},
{
"name": "astraladditions:astroid_cluster",
"name": "astraladditions:asteroid_cluster",
"stream": true
}
]
Expand Down
Loading