Skip to content

Commit

Permalink
Ogre Adjustments
Browse files Browse the repository at this point in the history
Adjusted how Cave Ogres are spawned. Fire Ogres no longer get damaged under the sun but do get damaged by water. Toned down default ogre strength.
  • Loading branch information
IcarussOne committed Jun 26, 2023
1 parent 9d3902f commit 93c9792
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/main/java/drzhark/mocreatures/MoCProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@ public void readGlobalConfigValues() {
this.rareItemDropChance = this.mocSettingsConfig.get(CATEGORY_MOC_CREATURE_GENERAL_SETTINGS, "RareItemDropChance", 25, "The percentage for horses, ostriches, scorpions etc. to drop a rare item such as a heart of darkness, unicorn, bone when killed.").getInt();
this.wyvernEggDropChance = this.mocSettingsConfig.get(CATEGORY_MOC_CREATURE_GENERAL_SETTINGS, "WyvernEggDropChance", 33, "The percentage for wyverns to drop an egg.").getInt();
this.motherWyvernEggDropChance = this.mocSettingsConfig.get(CATEGORY_MOC_CREATURE_GENERAL_SETTINGS, "MotherWyvernEggDropChance", 66, "The percentage for mother wyverns to drop an egg.").getInt();
this.ogreStrength = Float.parseFloat(this.mocSettingsConfig.get(CATEGORY_MOC_MONSTER_GENERAL_SETTINGS, "OgreStrength", 2.5F, "The block destruction radius of green ogres.").getString());
this.ogreCaveStrength = Float.parseFloat(this.mocSettingsConfig.get(CATEGORY_MOC_MONSTER_GENERAL_SETTINGS, "CaveOgreStrength", 3.0F, "The block destruction radius of cave ogres.").getString());
this.ogreStrength = Float.parseFloat(this.mocSettingsConfig.get(CATEGORY_MOC_MONSTER_GENERAL_SETTINGS, "OgreStrength", 2.0F, "The block destruction radius of green ogres.").getString());
this.ogreCaveStrength = Float.parseFloat(this.mocSettingsConfig.get(CATEGORY_MOC_MONSTER_GENERAL_SETTINGS, "CaveOgreStrength", 2.5F, "The block destruction radius of cave ogres.").getString());
this.ogreFireStrength = Float.parseFloat(this.mocSettingsConfig.get(CATEGORY_MOC_MONSTER_GENERAL_SETTINGS, "FireOgreStrength", 2.0F, "The block destruction radius of fire ogres.").getString());
this.ogreAttackRange = (short) this.mocSettingsConfig.get(CATEGORY_MOC_MONSTER_GENERAL_SETTINGS, "OgreAttackRange", 12, "The block radius where ogres 'smell' players.").getInt();
this.golemDestroyBlocks = this.mocSettingsConfig.get(CATEGORY_MOC_MONSTER_GENERAL_SETTINGS, "GolemDestroyBlocks", true, "Allows big golems to break blocks.").getBoolean(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import net.minecraft.item.Item;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;

public class MoCEntityCaveOgre extends MoCEntityOgre {
Expand All @@ -19,7 +18,7 @@ public MoCEntityCaveOgre(World world) {

@Override
public ResourceLocation getTexture() {
return MoCreatures.proxy.getTexture("ogreblue.png");
return MoCreatures.proxy.getTexture("ogre_cave.png");
}

/**
Expand All @@ -37,8 +36,7 @@ protected boolean isHarmedByDaylight() {

@Override
public boolean getCanSpawnHere() {
return (!this.world.canBlockSeeSky(new BlockPos(MathHelper.floor(this.posX), MathHelper.floor(this.posY), MathHelper
.floor(this.posZ)))) && (this.posY < 50D) && super.getCanSpawnHere();
return super.getCanSpawnHere() && !this.world.canSeeSky(new BlockPos(this)) && (this.posY < 50.0D);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import drzhark.mocreatures.init.MoCItems;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.util.DamageSource;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;

Expand All @@ -19,7 +20,7 @@ public MoCEntityFireOgre(World world) {

@Override
public ResourceLocation getTexture() {
return MoCreatures.proxy.getTexture("ogrered.png");
return MoCreatures.proxy.getTexture("ogre_fire.png");
}

@Override
Expand All @@ -33,8 +34,12 @@ public float getDestroyForce() {
}

@Override
protected boolean isHarmedByDaylight() {
return true;
public void onLivingUpdate() {
super.onLivingUpdate();

if (this.isWet()) {
this.attackEntityFrom(DamageSource.DROWN, 1.0F);
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public MoCEntityGreenOgre(World world) {

@Override
public ResourceLocation getTexture() {
return MoCreatures.proxy.getTexture("ogregreen.png");
return MoCreatures.proxy.getTexture("ogre_green.png");
}

/**
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.

0 comments on commit 93c9792

Please sign in to comment.