Skip to content

Commit

Permalink
So much
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Cordero committed Jan 10, 2022
1 parent 6039a1b commit 64e1527
Show file tree
Hide file tree
Showing 13 changed files with 44 additions and 47 deletions.
20 changes: 3 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -103,32 +103,18 @@ dependencies {
runtimeOnly fg.deobf("curse.maven:gempire-427613:3474732" +
"")

// Real examples
// compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
// compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env

// The 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
// provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'

// These dependencies get remapped to your current MCP mappings
// deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev'

// For more info...
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
// http://www.gradle.org/docs/current/userguide/dependency_management.html

}

// Example for how to get properties into the manifest for reading by the runtime..
jar {
manifest {
attributes([
"Specification-Title": "examplemod",
"Specification-Vendor": "examplemodsareus",
"Specification-Title": "silicon",
"Specification-Vendor": "siliconlemby",
"Specification-Version": "1", // We are version 1 of ourselves
"Implementation-Title": project.name,
"Implementation-Version": "${version}",
"Implementation-Vendor" :"examplemodsareus",
"Implementation-Vendor" :"siliconlemby",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
Expand Down
7 changes: 1 addition & 6 deletions src/main/java/com/lemby/silicon/Silicon.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,11 @@ public class Silicon
private static final Logger LOGGER = LogManager.getLogger();

public Silicon() {
// Register the setup method for modloading
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
// Register the enqueueIMC method for modloading
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::enqueueIMC);
// Register the processIMC method for modloading
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::processIMC);
// Register the doClientStuff method for modloading

RegistryHandler.init();
// Register ourselves for server and other game events we are interested in
MinecraftForge.EVENT_BUS.register(this);
}

Expand All @@ -82,7 +77,7 @@ public EntityRenderer<? super BubbleEntity> createRenderFor(EntityRendererManage
private void enqueueIMC(final InterModEnqueueEvent event)
{
// some example code to dispatch IMC to another mod
InterModComms.sendTo("gempire", "helloworld", () -> { LOGGER.info("Hello world from the MDK"); return "Hello world";});
InterModComms.sendTo("silicon", "helloworld", () -> { LOGGER.info("Hello world from the MDK"); return "Hello world";});
}

private void processIMC(final InterModProcessEvent event)
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/com/lemby/silicon/entities/gems/EntityAzurite.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@ public static AttributeModifierMap.MutableAttribute setCustomAttributes() {
return MobEntity.func_233666_p_()
.createMutableAttribute(Attributes.MAX_HEALTH, 60.0D)
.createMutableAttribute(Attributes.MOVEMENT_SPEED, 0.3D)
.createMutableAttribute(Attributes.ATTACK_DAMAGE, 100.0D)
.createMutableAttribute(Attributes.ATTACK_DAMAGE, 3.0D)
.createMutableAttribute(Attributes.ATTACK_SPEED, 1.0D);
}

public EntityAzurite holder;

@Override
protected void registerGoals() {
super.registerGoals();
Expand All @@ -43,7 +41,7 @@ protected void registerGoals() {
this.goalSelector.addGoal(8, new LookRandomlyGoal(this));
this.goalSelector.addGoal(7, new EntityAIWander(this, 1.0D));
this.goalSelector.addGoal(7, new EntityAIFollowOwner(this, 1.0D));
this.goalSelector.addGoal(1, new RangedAttackGoal(this, 1.25D, 20, 10.0F));
this.goalSelector.addGoal(1, new RangedAttackGoal(this, 1.75D, 35, 10.0F));
this.targetSelector.addGoal(1, new NearestAttackableTargetGoal<>(this, MobEntity.class, 10, true, false, (p_213621_0_) -> {
return p_213621_0_ instanceof IMob;
}));
Expand Down Expand Up @@ -87,13 +85,15 @@ public GemPlacements[] getPlacements() {

public void attackEntityWithRangedAttack(LivingEntity target, float distanceFactor) {
BubbleEntity bubblyentity = new BubbleEntity(this.world, this);

double d0 = target.getPosYEye() - (double)1.1F;
double d1 = target.getPosX() - this.getPosX();
double d2 = d0 - bubblyentity.getPosY();
double d3 = target.getPosZ() - this.getPosZ();
float f = MathHelper.sqrt(d1 * d1 + d3 * d3) * 0.2F;
bubblyentity.shoot(d1, d2 + (double)f, d3, 1.6F, 12.0F);
this.playSound(SoundEvents.ENTITY_SNOW_GOLEM_SHOOT, 1.0F, 0.4F / (this.getRNG().nextFloat() * 0.4F + 0.8F));
bubblyentity.shoot(d1, d2 + (double)f, d3, 1.0F, 4.0F);

this.playSound(SoundEvents.AMBIENT_UNDERWATER_EXIT, 1.0F, 0.4F / (this.getRNG().nextFloat() * 0.4F + 0.8F));
this.world.addEntity(bubblyentity);
}

Expand All @@ -109,7 +109,7 @@ public int generateOutfitVariant(){

@Override
public int generateInsigniaVariant() {
return this.rand.nextInt(2);
return this.rand.nextInt(3);
}

@Override
Expand Down Expand Up @@ -160,7 +160,7 @@ public boolean canChangeInsigniaColorByDefault() {
@Override
public Abilities[] possibleAbilities() {
return new Abilities[]{
Abilities.NO_ABILITY
Abilities.NO_ABILITY, Abilities.TANK, Abilities.BEEFCAKE, Abilities.POWERHOUSE, Abilities.UNHINGED
};
}

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/lemby/silicon/entities/gems/EntityCoal.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static AttributeModifierMap.MutableAttribute setCustomAttributes() {
.createMutableAttribute(Attributes.MAX_HEALTH, 30.0D)
.createMutableAttribute(Attributes.MOVEMENT_SPEED, 0.4D)
.createMutableAttribute(Attributes.ATTACK_DAMAGE, 2.0D)
.createMutableAttribute(Attributes.ATTACK_SPEED, 1.0D);
.createMutableAttribute(Attributes.ATTACK_SPEED, 0.25D);
}


Expand Down Expand Up @@ -182,15 +182,15 @@ public boolean canChangeInsigniaColorByDefault() {
@Override
public Abilities[] possibleAbilities() {
return new Abilities[]{
Abilities.PYROKINESIS,
Abilities.NO_ABILITY
Abilities.NO_ABILITY, Abilities.TANK, Abilities.BEEFCAKE, Abilities.POWERHOUSE, Abilities.UNHINGED

};
}

@Override
public Abilities[] definiteAbilities() {
return new Abilities[]{
Abilities.NO_ABILITY
Abilities.PYROKINESIS
};
}
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public boolean canChangeInsigniaColorByDefault() {
@Override
public Abilities[] possibleAbilities() {
return new Abilities[]{
Abilities.NO_ABILITY
Abilities.NO_ABILITY, Abilities.TANK, Abilities.BEEFCAKE, Abilities.POWERHOUSE, Abilities.UNHINGED
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ protected Item getDefaultItem() {
protected void onEntityHit(EntityRayTraceResult rayTraceResult) {
super.onEntityHit(rayTraceResult);
Entity entity = rayTraceResult.getEntity();
int i = entity instanceof BlazeEntity ? 3 : 0;
entity.attackEntityFrom(DamageSource.causeThrownDamage(this, this.func_234616_v_()), (float)i);
int i = entity instanceof LivingEntity ? 3 : 0;
if (entity instanceof LivingEntity) {
((LivingEntity) entity).addPotionEffect(new EffectInstance(Effects.LEVITATION, 200));
entity.attackEntityFrom(DamageSource.causeThrownDamage(this, this.func_234616_v_()), (float)i);
}
}

Expand Down
28 changes: 20 additions & 8 deletions src/main/java/com/lemby/silicon/init/SiliconCruxes.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,24 @@ public class SiliconCruxes {

public static GemConditions SUGAR_CONDITIONS() {
ArrayList<Crux> gemCruxes = new ArrayList<>();
float gemTemperatureMin = 0f;
float gemTemperatureMax = 2f;
float gemTemperatureMin = 1f;
float gemTemperatureMax = 1.5f;
Item primer = Items.SUGAR;
String essences = "white";
gemCruxes.add(new Crux(Blocks.SUGAR_CANE.getDefaultState(), 9, CruxType.ORGANIC, gemTemperatureMin, gemTemperatureMax));
gemCruxes.add(new Crux(Blocks.SAND.getDefaultState(), 2, CruxType.MINERAL, gemTemperatureMin, gemTemperatureMax));
gemCruxes.add(new Crux(Blocks.STONE.getDefaultState(), 2, CruxType.INORGANIC, gemTemperatureMin, gemTemperatureMax));
gemCruxes.add(new Crux(Blocks.GRANITE.getDefaultState(), 2, CruxType.INORGANIC, gemTemperatureMin, gemTemperatureMax));
gemCruxes.add(new Crux(Blocks.DIORITE.getDefaultState(), 2, CruxType.INORGANIC, gemTemperatureMin, gemTemperatureMax));
return new GemConditions(gemCruxes, essences, primer, 2, gemTemperatureMin, gemTemperatureMax);
}
public static GemConditions COAL_CONDITIONS() {
ArrayList<Crux> gemCruxes = new ArrayList<>();
float gemTemperatureMin = 1.2f;
float gemTemperatureMax = 2f;
Item primer = Items.COAL;
String essences = "pink-blue";
gemCruxes.add(new Crux(Blocks.COAL_ORE.getDefaultState(), 3, CruxType.MINERAL, gemTemperatureMin, gemTemperatureMax));
gemCruxes.add(new Crux(Blocks.COAL_BLOCK.getDefaultState(), 9, CruxType.INORGANIC, gemTemperatureMin, gemTemperatureMax));
gemCruxes.add(new Crux(Blocks.STONE.getDefaultState(), 2, CruxType.INORGANIC, gemTemperatureMin, gemTemperatureMax));
gemCruxes.add(new Crux(Blocks.GRANITE.getDefaultState(), 2, CruxType.INORGANIC, gemTemperatureMin, gemTemperatureMax));
gemCruxes.add(new Crux(Blocks.DIORITE.getDefaultState(), 2, CruxType.INORGANIC, gemTemperatureMin, gemTemperatureMax));
Expand All @@ -28,15 +40,15 @@ public static final GemConditions AZURITE_CONDITIONS(){
ArrayList<Crux> gemCruxes = new ArrayList<>();
float gemTemperatureMin = 0.5f;
float gemTemperatureMax = 0.8f;
Item primer = Items.WATER_BUCKET;
Item primer = Items.TUBE_CORAL;
String essences = "blue";
gemCruxes.add(new Crux(Blocks.STONE.getDefaultState(), 2, CruxType.INORGANIC, gemTemperatureMin, gemTemperatureMax));
gemCruxes.add(new Crux(Blocks.GRANITE.getDefaultState(), 2, CruxType.INORGANIC, gemTemperatureMin, gemTemperatureMax));
gemCruxes.add(new Crux(Blocks.DIORITE.getDefaultState(), 2, CruxType.INORGANIC, gemTemperatureMin, gemTemperatureMax));
gemCruxes.add(new Crux(Blocks.PRISMARINE.getDefaultState(), 3, CruxType.INORGANIC, gemTemperatureMin, gemTemperatureMax));
gemCruxes.add(new Crux(Blocks.LAPIS_ORE.getDefaultState(), 3, CruxType.MINERAL, gemTemperatureMin, gemTemperatureMax));
gemCruxes.add(new Crux(Blocks.DARK_PRISMARINE.getDefaultState(), 3, CruxType.INORGANIC, gemTemperatureMin, gemTemperatureMax));
gemCruxes.add(new Crux(Blocks.PRISMARINE.getDefaultState(), 2, CruxType.INORGANIC, gemTemperatureMin, gemTemperatureMax));
gemCruxes.add(new Crux(Blocks.LAPIS_ORE.getDefaultState(), 2, CruxType.MINERAL, gemTemperatureMin, gemTemperatureMax));
gemCruxes.add(new Crux(Blocks.DARK_PRISMARINE.getDefaultState(), 2, CruxType.INORGANIC, gemTemperatureMin, gemTemperatureMax));
gemCruxes.add(new Crux(Blocks.LAPIS_BLOCK.getDefaultState(), 4, CruxType.INORGANIC, gemTemperatureMin, gemTemperatureMax));
return new GemConditions(gemCruxes, essences, primer, 2, gemTemperatureMin, gemTemperatureMax);
return new GemConditions(gemCruxes, essences, primer, 3, gemTemperatureMin, gemTemperatureMax);
}
}
6 changes: 5 additions & 1 deletion src/main/java/com/lemby/silicon/init/SiliconEntities.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,14 @@ public static void registerEntitiesToGempire(){
GemFormation.POSSIBLE_GEMS.add("sugar");
AddonHandler.ENTITY_ADDON_ENTITY_REGISTRIES.put("sugar", SiliconEntities.class);
//coal
ModEntities.CRUXTOGEM.put("coal", SiliconCruxes.AZURITE_CONDITIONS());
ModEntities.CRUXTOGEM.put("coal", SiliconCruxes.COAL_CONDITIONS());
GemFormation.POSSIBLE_GEMS.add("coal");
AddonHandler.ENTITY_ADDON_ENTITY_REGISTRIES.put("coal", SiliconEntities.class);

ModEntities.CRUXTOGEM.put("azurite", SiliconCruxes.AZURITE_CONDITIONS());
GemFormation.POSSIBLE_GEMS.add("azurite");
AddonHandler.ENTITY_ADDON_ENTITY_REGISTRIES.put("azurite", SiliconEntities.class);

AddonHandler.ADDON_ENTITY_REGISTRIES.put("silicon", SiliconEntities.class);
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 64e1527

Please sign in to comment.