Skip to content

Commit 03693de

Browse files
merged miko's stuff
1 parent 407a29f commit 03693de

File tree

13 files changed

+62
-117
lines changed

13 files changed

+62
-117
lines changed

src/main/java/com/github/ethanicuss/astraladditions/blocks/LuneShroomBlock.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) {
7878

7979
@Override
8080
public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) {
81-
//entity.damage(DamageSource.CACTUS, 2.0f);
8281
}
8382

8483
@Override

src/main/java/com/github/ethanicuss/astraladditions/blocks/jar/JarBlock.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEnt
4848
}
4949
}
5050
world.updateListeners(pos, oldState, state, Block.NOTIFY_LISTENERS);
51-
//DebugInfoSender.sendNeighborUpdate(world, pos);
52-
//world.updateNeighbor(pos, this, pos);
53-
//world.emitGameEvent((Entity)player, GameEvent.BLOCK_CHANGE, pos);
5451

5552
BlockPos goofyPos = new BlockPos(pos.getX(), -64, pos.getZ());
5653
BlockState goofyState = world.getBlockState(goofyPos);

src/main/java/com/github/ethanicuss/astraladditions/blocks/jar/JarBlockEntity.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ public DefaultedList<ItemStack> getItems(){
3131
@Override
3232
public void readNbt(NbtCompound nbt) {
3333
super.readNbt(nbt);
34-
//this.item.set(0, ItemStack.EMPTY);
35-
//this.item.set(1, ItemStack.EMPTY);
3634
Inventories.readNbt(nbt, this.item);
3735
}
3836

@@ -43,10 +41,6 @@ public void writeNbt(NbtCompound nbt) {
4341
NbtList nbtList = new NbtList();
4442
{
4543
ItemStack itemStack = stacks.get(0);
46-
//if (itemStack.isEmpty()) {
47-
// System.out.println("it's empty");
48-
// continue;
49-
//}
5044
NbtCompound nbtCompound = new NbtCompound();
5145
nbtCompound.putByte("Slot", (byte)0);
5246
itemStack.writeNbt(nbtCompound);
@@ -56,7 +50,6 @@ public void writeNbt(NbtCompound nbt) {
5650
nbt.put("Items", nbtList);
5751
}
5852

59-
//super.writeNbt(nbt);
6053
}
6154

6255
@Nullable

src/main/java/com/github/ethanicuss/astraladditions/entities/boomerang/BoomerangEntityRenderer.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,6 @@ protected int getBlockLight(BoomerangEntity dragonFireballEntity, BlockPos block
3737

3838
@Override
3939
public void render(BoomerangEntity entity, float f, float g, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i) {
40-
/*matrixStack.push();
41-
matrixStack.scale(1.0f, 1.0f, 1.0f);
42-
matrixStack.multiply(this.dispatcher.getRotation());
43-
matrixStack.multiply(Vec3f.POSITIVE_Y.getDegreesQuaternion(180.0f));
44-
MatrixStack.Entry entry = matrixStack.peek();
45-
Matrix4f matrix4f = entry.getPositionMatrix();
46-
Matrix3f matrix3f = entry.getNormalMatrix();
47-
VertexConsumer vertexConsumer = vertexConsumerProvider.getBuffer(RenderLayer.getEntityCutoutNoCull(TEXTURE));
48-
produceVertex(vertexConsumer, matrix4f, matrix3f, i, 0.0f, 0, 0, 1);
49-
produceVertex(vertexConsumer, matrix4f, matrix3f, i, 1.0f, 0, 1, 1);
50-
produceVertex(vertexConsumer, matrix4f, matrix3f, i, 1.0f, 1, 1, 0);
51-
produceVertex(vertexConsumer, matrix4f, matrix3f, i, 0.0f, 1, 0, 0);
52-
matrixStack.pop();
53-
super.render(dragonFireballEntity, f, g, matrixStack, vertexConsumerProvider, i);*/
5440
ItemStack itemStack = entity.getRangItem();
5541
if (itemStack != ItemStack.EMPTY || itemStack.isOf(Items.AIR)) {
5642
matrixStack.push();

src/main/java/com/github/ethanicuss/astraladditions/entities/cogfly/CogflyEntity.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.github.ethanicuss.astraladditions.entities.cogfly;
22

33
import com.github.ethanicuss.astraladditions.AstralAdditions;
4-
import com.github.ethanicuss.astraladditions.entities.boomerang.BoomerangEntity;
54
import com.github.ethanicuss.astraladditions.registry.ModItems;
65
import net.minecraft.entity.Entity;
76
import net.minecraft.entity.EntityType;
@@ -10,7 +9,6 @@
109
import net.minecraft.entity.data.DataTracker;
1110
import net.minecraft.entity.data.TrackedData;
1211
import net.minecraft.entity.data.TrackedDataHandlerRegistry;
13-
import net.minecraft.entity.effect.StatusEffectInstance;
1412
import net.minecraft.entity.player.PlayerEntity;
1513
import net.minecraft.entity.projectile.thrown.ThrownItemEntity;
1614
import net.minecraft.item.Item;
@@ -117,5 +115,4 @@ protected void initDataTracker() {
117115
this.dataTracker.startTracking(ITEM, "minecraft:dirt");
118116
}
119117

120-
}
121-
118+
}

src/main/java/com/github/ethanicuss/astraladditions/entities/ender_watcher/EnderWatcherEntity.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,6 @@ public void tick() {
157157
for (int i = 0; i < 1; ++i) {
158158
ModUtils.playSound((ServerWorld)this.blaze.world, this.blaze.getX(), this.blaze.getY(), this.blaze.getZ(), SoundEvents.ENTITY_SHULKER_OPEN, SoundCategory.HOSTILE, 1.0f, 1.1f + this.blaze.world.random.nextFloat() * 0.2f, true);
159159
this.blaze.playSound(SoundEvents.ENTITY_SHULKER_OPEN, 0.5f, 1.1f + this.blaze.world.random.nextFloat() * 0.2f);
160-
/*SmallShimmerballEntity smallShimmerballEntity = new SmallShimmerballEntity(ModEntities.SMALL_SHIMMERBALL, this.blaze.world);
161-
smallShimmerballEntity.setPosition(this.blaze.getX(), this.blaze.getBodyY(0.5) + 0.5, this.blaze.getZ());
162-
smallShimmerballEntity.refreshPositionAndAngles(this.blaze.getX(), this.blaze.getBodyY(0.5) + 0.5, this.blaze.getZ(), 0.0f, 0.0f);
163-
double speed = 0.05;
164-
smallShimmerballEntity.setVelocity(e * speed + this.blaze.getRandom().nextGaussian() * h, f * speed + this.blaze.getRandom().nextGaussian() * h, g * speed + this.blaze.getRandom().nextGaussian() * h);
165-
this.blaze.world.spawnEntity(smallShimmerballEntity);*/
166160
ItemStack arrow = new ItemStack(Items.SPECTRAL_ARROW);
167161
PersistentProjectileEntity persistentProjectileEntity = ProjectileUtil.createArrowProjectile(this.blaze, arrow, 3.0f);
168162
double dArrow = livingEntity.getX() - this.blaze.getX();
@@ -188,15 +182,9 @@ public void tick() {
188182
pPos = pPos.down();
189183
stopper++;
190184
}
191-
/*ShimmerBlazeRainEntity shimmerRain = new ShimmerBlazeRainEntity(ModEntities.SHIMMER_RAIN, this.blaze.world);
192-
shimmerRain.setPosition(pPos.getX(), pPos.getY() - 0.5, pPos.getZ());
193-
shimmerRain.refreshPositionAndAngles(pPos.getX(), pPos.getY() - 0.5, pPos.getZ(), 0.0f, 0.0f);
194-
this.blaze.world.spawnEntity(shimmerRain);*/
195185
GluttonyBallEntity gluttonyBallEntity = new GluttonyBallEntity(ModEntities.GLUTTONY_BALL, this.blaze.world);
196186
gluttonyBallEntity.setPos(pPos.getX(), pPos.getY() - 0.5, pPos.getZ());
197187
gluttonyBallEntity.refreshPositionAndAngles(pPos.getX(), pPos.getY() - 0.5, pPos.getZ(), 0.0f, 0.0f);
198-
//double speed = 0.1;
199-
//e.setVelocity((p.getX() - e.getX()) * speed - 0.1 + i * 0.1, (p.getY() - e.getY()) * speed - 0.2 + i * 0.2, (p.getZ() - e.getZ()) * speed - 0.1 + i * 0.1);
200188
this.blaze.world.spawnEntity(gluttonyBallEntity);
201189
}
202190
if (this.fireballCooldown == 0){

src/main/java/com/github/ethanicuss/astraladditions/entities/shimmerblaze/SmallShimmerballEntity.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,6 @@ protected void onEntityHit(EntityHitResult entityHitResult) {
5959
Explosion.DestructionType destructionType = Explosion.DestructionType.NONE;
6060
this.world.createExplosion(this, this.getX(), this.getY(), this.getZ(), 1.5f, destructionType);
6161
this.discard();
62-
/*Entity entity = entityHitResult.getEntity();
63-
Entity entity2 = this.getOwner();
64-
boolean bl = entity.damage(DamageSource.fireball(this, entity2), 5.0f);
65-
if (!bl) {
66-
} else if (entity2 instanceof LivingEntity) {
67-
this.applyDamageEffects((LivingEntity)entity2, entity);
68-
}*/
6962
}
7063

7164
@Override

src/main/java/com/github/ethanicuss/astraladditions/items/CogflySpawnItem.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
package com.github.ethanicuss.astraladditions.items;
22

3-
import com.github.ethanicuss.astraladditions.entities.ModEntities;
3+
import com.github.ethanicuss.astraladditions.registry.ModEntities;
44
import com.github.ethanicuss.astraladditions.entities.cogfly.CogflyEntity;
5+
import net.minecraft.client.item.TooltipContext;
56
import net.minecraft.entity.EntityType;
67
import net.minecraft.entity.mob.MobEntity;
78
import net.minecraft.entity.player.PlayerEntity;
89
import net.minecraft.item.Item;
910
import net.minecraft.item.ItemStack;
1011
import net.minecraft.item.SpawnEggItem;
1112
import net.minecraft.stat.Stats;
13+
import net.minecraft.text.Text;
14+
import net.minecraft.text.TranslatableText;
15+
import net.minecraft.util.Formatting;
1216
import net.minecraft.util.Hand;
1317
import net.minecraft.util.TypedActionResult;
1418
import net.minecraft.world.World;
1519

20+
import java.util.List;
1621
import java.util.UUID;
1722

1823
public class CogflySpawnItem extends Item {
@@ -38,5 +43,8 @@ public TypedActionResult<ItemStack> use(World world, PlayerEntity user, Hand han
3843
return TypedActionResult.success(itemStack, world.isClient());
3944
}
4045

41-
}
42-
46+
@Override
47+
public void appendTooltip(ItemStack stack, World world, List<Text> tooltip, TooltipContext context) {
48+
tooltip.add(new TranslatableText("tooltip.astraladditions.cogfly").formatted(Formatting.GRAY));
49+
}
50+
}

src/main/java/com/github/ethanicuss/astraladditions/registry/ModEntities.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,9 @@ public static void registerClient() {
215215
EntityRendererRegistry.register(GLAZER, GlazerEntityRenderer::new);
216216
EntityModelLayerRegistry.registerModelLayer(ModEntityModelLayer.MODEL_GLAZER_LAYER, BeeEntityModel::getTexturedModelData);
217217

218+
EntityRendererRegistry.register(ModEntities.COGFLY, CogflyEntityRenderer::new);
219+
EntityModelLayerRegistry.registerModelLayer(ModEntityModelLayer.MODEL_COGFLY_LAYER, CogflyEntityModel::getTexturedModelData);
220+
218221
EntityRendererRegistry.register(ENDER_BALL, EnderBallEntityRenderer::new);
219222

220223
EntityRendererRegistry.register(GLUTTONY_BALL, GluttonyBallEntityRenderer::new);
@@ -238,8 +241,5 @@ public static void registerClient() {
238241
EntityRendererRegistry.register(BOOMERANG, BoomerangEntityRenderer::new);
239242

240243
EntityRendererRegistry.register(ModEntities.BLACKHOLE, BlackholeEntityRenderer::new);
241-
242-
EntityRendererRegistry.register(ModEntities.COGFLY, CogflyEntityRenderer::new);
243-
EntityModelLayerRegistry.registerModelLayer(ModEntityModelLayer.MODEL_COGFLY_LAYER, CogflyEntityModel::getTexturedModelData);
244244
}
245245
}

src/main/java/com/github/ethanicuss/astraladditions/registry/ModEntityModelLayer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,6 @@ public class ModEntityModelLayer {
2323
new EntityModelLayer(new Identifier(AstralAdditions.MOD_ID, "ender_watcher"), "main");
2424
public static final EntityModelLayer MODEL_GLAZER_LAYER =
2525
new EntityModelLayer(new Identifier(AstralAdditions.MOD_ID, "glazer"), "main");
26+
public static final EntityModelLayer MODEL_COGFLY_LAYER =
27+
new EntityModelLayer(new Identifier(AstralAdditions.MOD_ID, "cogfly"), "main");
2628
}

0 commit comments

Comments
 (0)