Skip to content

Commit

Permalink
Changes to remain compatible with Forge refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensworks committed Mar 27, 2016
1 parent 7f8a938 commit b0df023
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions build.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mod_version=0.5.3
mod_version=0.5.4
minecraft_version=1.9
forge_version=12.16.0.1767-1.9
forge_version=12.16.0.1811-1.9
mcp_mappings_version=snapshot_20160312
release_type=release
2 changes: 1 addition & 1 deletion src/main/java/org/cyclops/cyclopscore/Reference.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ public final class Reference {

// Dependencies
public static final String MOD_DEPENDENCIES =
"required-after:Forge@[12.16.0.1767,);";
"required-after:Forge@[12.16.0.1811,);";

}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected TextureAtlasSprite registerIcon(TextureMap textureMap, String location
@SubscribeEvent
public void onPreTextureStitch(TextureStitchEvent.Pre event) {
for(Pair<Pair<Object, Field>, String> entry : toRegister) {
TextureAtlasSprite icon = registerIcon(event.map, entry.getValue());
TextureAtlasSprite icon = registerIcon(event.getMap(), entry.getValue());
Object object = entry.getLeft().getLeft();
Field field = entry.getLeft().getRight();
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import net.minecraftforge.client.ForgeHooksClient;
import net.minecraftforge.client.model.Attributes;
import net.minecraftforge.client.model.IPerspectiveAwareModel;
import net.minecraftforge.client.model.TRSRTransformation;
import net.minecraftforge.common.model.TRSRTransformation;
import org.apache.commons.lang3.tuple.Pair;
import org.cyclops.cyclopscore.helper.Helpers;
import org.lwjgl.util.Color;
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/org/cyclops/cyclopscore/config/ConfigProperty.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public void save(Configuration config, boolean forceUpdate) {
if(forceUpdate) {
additionalProperty.setValue((Integer)value);
}
additionalProperty.comment = getComment();
additionalProperty.setComment(getComment());
if(forceUpdate) {
getCallback().run((Integer)value);
} else {
Expand All @@ -217,7 +217,7 @@ public void save(Configuration config, boolean forceUpdate) {
if(forceUpdate) {
additionalProperty.setValue((Boolean)value);
}
additionalProperty.comment = getComment();
additionalProperty.setComment(getComment());
if(forceUpdate) {
getCallback().run((Boolean)value);
} else {
Expand All @@ -234,7 +234,7 @@ public void save(Configuration config, boolean forceUpdate) {
if(forceUpdate) {
additionalProperty.setValue((Double)value);
}
additionalProperty.comment = getComment();
additionalProperty.setComment(getComment());
if(forceUpdate) {
getCallback().run((Double)value);
} else {
Expand All @@ -250,7 +250,7 @@ public void save(Configuration config, boolean forceUpdate) {
if(forceUpdate) {
additionalProperty.setValue((String)value);
}
additionalProperty.comment = getComment();
additionalProperty.setComment(getComment());
if(forceUpdate) {
getCallback().run((String)value);
} else {
Expand All @@ -266,7 +266,7 @@ public void save(Configuration config, boolean forceUpdate) {
if(forceUpdate) {
additionalProperty.setValues((String[])value);
}
additionalProperty.comment = getComment();
additionalProperty.setComment(getComment());
if(forceUpdate) {
getCallback().run((String[])value);
} else {
Expand All @@ -282,7 +282,7 @@ public void save(Configuration config, boolean forceUpdate) {
if(forceUpdate) {
additionalProperty.setValues((int[])value);
}
additionalProperty.comment = getComment();
additionalProperty.setComment(getComment());
if(forceUpdate) {
getCallback().run((int[])value);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public TextureAtlasSprite getTexture(String name) {
@SideOnly(Side.CLIENT)
public void onPreTextureStitch(TextureStitchEvent.Pre event) {
for(Map.Entry<String, ResourceLocation> textureEntry : textureMap.entrySet()) {
loadedTextureMap.put(textureEntry.getKey(), event.map.registerSprite(textureEntry.getValue()));
loadedTextureMap.put(textureEntry.getKey(), event.getMap().registerSprite(textureEntry.getValue()));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public int getAmplifier(EntityLivingBase entity) {

@SubscribeEvent
public void onEntityUpdate(LivingEvent.LivingUpdateEvent event) {
EntityLivingBase entity = event.entityLiving;
EntityLivingBase entity = event.getEntityLiving();
if(isActiveOn(entity)) {
onUpdate(entity);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public void preRun(BiomeConfig eConfig, Configuration config, boolean startup) {
Property property = config.get(eConfig.getHolderType().getCategory(), eConfig.getNamedId(), eConfig.isEnabled());
property.setRequiresWorldRestart(true);
property.setRequiresMcRestart(true);
property.comment = eConfig.getComment();
property.setComment(eConfig.getComment());

if(startup) {
// Update the ID, it could've changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void preRun(BlockConfig eConfig, Configuration config, boolean startup) {
Property property = config.get(eConfig.getHolderType().getCategory(), eConfig.getNamedId(),
eConfig.isEnabled());
property.setRequiresMcRestart(true);
property.comment = eConfig.getComment();
property.setComment(eConfig.getComment());

if(startup) {
// Update the ID, it could've changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public void preRun(EnchantmentConfig eConfig, Configuration config, boolean star
// Get property in config file and set comment
Property property = config.get(eConfig.getHolderType().getCategory(), eConfig.getNamedId(), eConfig.isEnabled());
property.setRequiresMcRestart(true);
property.comment = eConfig.getComment();
property.setComment(eConfig.getComment());

if(startup) {
// Update the ID, it could've changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void preRun(ItemConfig eConfig, Configuration config, boolean startup) {
Property property = config.get(eConfig.getHolderType().getCategory(), eConfig.getNamedId(),
eConfig.isEnabled());
property.setRequiresMcRestart(true);
property.comment = eConfig.getComment();
property.setComment(eConfig.getComment());

if(startup) {
// Update the ID, it could've changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public void preRun(PotionConfig eConfig, Configuration config, boolean startup)
// Get property in config file and set comment
Property property = config.get(eConfig.getHolderType().getCategory(), eConfig.getNamedId(), eConfig.isEnabled());
property.setRequiresMcRestart(true);
property.comment = eConfig.getComment();
property.setComment(eConfig.getComment());

if(startup) {
// Update the ID, it could've changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public ConfigChangedEventHook(ModBase mod) {
*/
@SubscribeEvent
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent eventArgs) {
if(eventArgs.modID.equals(mod.getModId())) {
if(eventArgs.getModID().equals(mod.getModId())) {
mod.getConfigHandler().syncProcessedConfigs();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ private boolean isEnabled(IExternalCompat compat, String id) {
Property property = config.get(CONFIG_CATEGORY, id,
compat.isEnabled());
property.setRequiresMcRestart(true);
property.comment = compat.getComment();
property.setComment(compat.getComment());
boolean enabled = property.getBoolean(true);
if(config.hasChanged()) {
config.save();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ public void retroGenLoad(ChunkDataEvent.Load event) {
if(tag == null) {
tag = new NBTTagCompound();
}
setChunkSeed(event.world, event.getChunk());
setChunkSeed(event.getWorld(), event.getChunk());

boolean atLeastOneModified = false;
for(IRetroGen retroGen : retroGeneratables) {
if(retroGen.shouldRetroGen(tag, event.world.provider.getDimension())) {
if(retroGen.shouldRetroGen(tag, event.getWorld().provider.getDimension())) {
retroGen.retroGenerateChunk(tag, event.getChunk(), random);
getMod().log(Level.INFO, "Retrogenerating chunk at "
+ event.getChunk().xPosition + ":" + event.getChunk().zPosition);
Expand Down

0 comments on commit b0df023

Please sign in to comment.