-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
72 changed files
with
12,703 additions
and
284 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
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
28 changes: 28 additions & 0 deletions
28
common/src/main/java/com/ryorama/terrariamod/blocks/blanketcon/AdventurePlate.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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.ryorama.terrariamod.blocks.blanketcon; | ||
|
||
import net.minecraft.block.BlockSetType; | ||
import net.minecraft.block.BlockState; | ||
import net.minecraft.block.PressurePlateBlock; | ||
import net.minecraft.entity.Entity; | ||
import net.minecraft.server.network.ServerPlayerEntity; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.GameMode; | ||
import net.minecraft.world.World; | ||
|
||
public class AdventurePlate extends PressurePlateBlock { | ||
|
||
public AdventurePlate(Settings settings) { | ||
super(ActivationRule.EVERYTHING, settings.strength(9999999, 9999999), BlockSetType.STONE); | ||
} | ||
|
||
@Override | ||
public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) { | ||
super.onEntityCollision(state, world, pos, entity); | ||
|
||
if (!world.isClient()) { | ||
if (entity instanceof ServerPlayerEntity) { | ||
((ServerPlayerEntity) entity).interactionManager.changeGameMode(GameMode.ADVENTURE); | ||
} | ||
} | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
common/src/main/java/com/ryorama/terrariamod/blocks/blanketcon/SurvivalPlate.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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.ryorama.terrariamod.blocks.blanketcon; | ||
|
||
import net.minecraft.block.BlockSetType; | ||
import net.minecraft.block.BlockState; | ||
import net.minecraft.block.PressurePlateBlock; | ||
import net.minecraft.entity.Entity; | ||
import net.minecraft.server.network.ServerPlayerEntity; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.GameMode; | ||
import net.minecraft.world.World; | ||
|
||
public class SurvivalPlate extends PressurePlateBlock { | ||
|
||
public SurvivalPlate(Settings settings) { | ||
super(ActivationRule.EVERYTHING, settings.strength(9999999, 9999999), BlockSetType.STONE); | ||
} | ||
|
||
@Override | ||
public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) { | ||
super.onEntityCollision(state, world, pos, entity); | ||
System.out.println("E"); | ||
|
||
if (!world.isClient()) { | ||
if (entity instanceof ServerPlayerEntity) { | ||
((ServerPlayerEntity) entity).interactionManager.changeGameMode(GameMode.SURVIVAL); | ||
} | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
common/src/main/java/com/ryorama/terrariamod/blocks/terraria/world/ores/HellstoneOre.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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.ryorama.terrariamod.blocks.terraria.world.ores; | ||
|
||
import com.ryorama.terrariamod.blocks.impl.HotBlockT; | ||
import net.minecraft.block.BlockState; | ||
import net.minecraft.block.Blocks; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.WorldAccess; | ||
|
||
public class HellstoneOre extends HotBlockT { | ||
public HellstoneOre(Settings properties, float hardness, float difficulty) { | ||
super(properties, hardness, difficulty); | ||
} | ||
|
||
@Override | ||
public void onBroken(WorldAccess world, BlockPos pos, BlockState state) { | ||
super.onBroken(world, pos, state); | ||
|
||
world.setBlockState(pos, Blocks.LAVA.getDefaultState(), 0); | ||
} | ||
} |
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
63 changes: 0 additions & 63 deletions
63
common/src/main/java/com/ryorama/terrariamod/client/particles/Flame.java
This file was deleted.
Oops, something went wrong.
45 changes: 0 additions & 45 deletions
45
common/src/main/java/com/ryorama/terrariamod/client/particles/Leaf.java
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
common/src/main/java/com/ryorama/terrariamod/client/particles/ParticlesT.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
26 changes: 26 additions & 0 deletions
26
common/src/main/java/com/ryorama/terrariamod/entities/models/hostile/ModelDemonEye.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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.ryorama.terrariamod.entities.models.hostile; | ||
|
||
import com.ryorama.terrariamod.TerrariaMod; | ||
import com.ryorama.terrariamod.entities.terraria.hostile.EntityDemonEye; | ||
import com.ryorama.terrariamod.entities.terraria.hostile.slime.EntityBlueSlime; | ||
import net.minecraft.util.Identifier; | ||
import software.bernie.geckolib.model.GeoModel; | ||
|
||
public class ModelDemonEye extends GeoModel<EntityDemonEye> { | ||
|
||
@Override | ||
public Identifier getAnimationResource(EntityDemonEye animatable) { | ||
return new Identifier(TerrariaMod.MOD_ID, "animations/demon_eye.animation.json"); | ||
} | ||
|
||
@Override | ||
public Identifier getModelResource(EntityDemonEye object) { | ||
return new Identifier(TerrariaMod.MOD_ID, "geo/demon_eye.geo.json"); | ||
} | ||
|
||
@Override | ||
public Identifier getTextureResource(EntityDemonEye object) { | ||
return new Identifier(TerrariaMod.MOD_ID, "textures/entity/eyes/eye.png"); | ||
} | ||
|
||
} |
42 changes: 42 additions & 0 deletions
42
common/src/main/java/com/ryorama/terrariamod/entities/renderers/hostile/RenderDemonEye.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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package com.ryorama.terrariamod.entities.renderers.hostile; | ||
|
||
import com.ryorama.terrariamod.entities.models.hostile.ModelDemonEye; | ||
import com.ryorama.terrariamod.entities.models.hostile.slime.ModelBlueSlime; | ||
import com.ryorama.terrariamod.entities.terraria.hostile.EntityDemonEye; | ||
import com.ryorama.terrariamod.entities.terraria.hostile.slime.EntityBlueSlime; | ||
import net.minecraft.client.render.RenderLayer; | ||
import net.minecraft.client.render.VertexConsumer; | ||
import net.minecraft.client.render.VertexConsumerProvider; | ||
import net.minecraft.client.render.entity.EntityRendererFactory; | ||
import net.minecraft.client.util.math.MatrixStack; | ||
import net.minecraft.util.Identifier; | ||
import software.bernie.geckolib.cache.object.BakedGeoModel; | ||
import software.bernie.geckolib.renderer.DynamicGeoEntityRenderer; | ||
|
||
import javax.annotation.Nullable; | ||
import java.util.Random; | ||
|
||
public class RenderDemonEye extends DynamicGeoEntityRenderer<EntityDemonEye> { | ||
|
||
public Random rand = new Random(); | ||
|
||
private Identifier[] eyeTexture = { | ||
new Identifier("terrariamod:textures/entity/eyes/eye.png"), | ||
new Identifier("terrariamod:textures/entity/eyes/eye_cataract.png"), | ||
new Identifier("terrariamod:textures/entity/eyes/eye_dilated.png"), | ||
new Identifier("terrariamod:textures/entity/eyes/eye_green.png"), | ||
new Identifier("terrariamod:textures/entity/eyes/eye_purple.png"), | ||
new Identifier("terrariamod:textures/entity/eyes/eye_sleepy.png") | ||
}; | ||
|
||
public RenderDemonEye(EntityRendererFactory.Context context) { | ||
super(context, new ModelDemonEye()); | ||
} | ||
|
||
@Override | ||
public RenderLayer getRenderType(EntityDemonEye animatable, Identifier texture, @Nullable VertexConsumerProvider bufferSource, float partialTick) { | ||
int type = animatable.getDataTracker().get(EntityDemonEye.typed_data).intValue(); | ||
|
||
return RenderLayer.getEntityTranslucent(eyeTexture[type]); | ||
} | ||
} |
Oops, something went wrong.